Commit Graph
50 Commits
Author SHA1 Message Date
Lennart OchelandGitHub 16d947b285 Remove common/space_lua/stdlib/math.md (#1371) 2025-05-04 20:35:02 +02:00
wbhoustonandGitHub c0f68f0906 Add notes on Space Lua Pattern Matching (#1366) 2025-05-02 07:36:04 +02:00
Zef Hemel b07823a53c Refactor pairs function for improved type handling
- Updated the `pairsFunction` to specify that keys can be of type `string` or `number`, enhancing type safety.
- Corrected a comment for clarity regarding key retrieval from plain JavaScript objects, ensuring accurate documentation.
2025-04-04 09:14:53 +02:00
Zef Hemel d9ff98e050 Enhance Lua function handling with promise support and update global object exposure
- Modified `luaCall` and `luaValueToJS` functions to handle promises, allowing asynchronous execution of JavaScript functions from Lua.
- Updated the `jsApi` to expose the global `globalThis` object instead of `window`, improving compatibility across different environments.
2025-03-31 17:44:55 +02:00
Zef Hemel bf8646d89d Biting the bullet: exposing the JS window object to Lua
- Added a convenience function for creating HTML widgets, streamlining widget creation.
- Enhanced the key retrieval logic in the pairs function to ensure it captures prototype keys correctly.
- Exposed the global window object in the jsApi for better access to DOM functions.
2025-03-31 15:51:02 +02:00
Zef Hemel 26a72ea8df Remove share functionality and related components, replaced with import and export infrastructure
- Deleted the `share` plug, including its associated files and YAML configuration.
- Removed references to share options and commands from the codebase.
- Cleaned up unused event listeners and functions related to sharing content.
2025-03-30 16:09:45 +02:00
Zef Hemel be86e53398 Implement new slash commands and enhance editor functionality
- Added slash commands for inserting today's, yesterday's, and tomorrow's dates.
- Introduced new admonition commands for notes and warnings.
- Implemented a table command for quick table insertion.
- Enhanced the `insertAtCursor` function to support a cursor placeholder option.
- Updated `getSelection` to return the selected text along with cursor positions.
- Added a new widget function to display linked tasks in the editor.
2025-03-30 13:03:57 +02:00
Zef Hemel c25a3bf0eb Fix string.find with plain = true 2025-03-29 22:07:31 +01:00
Zef Hemel 41559f1b06 Merge branch 'v2' of github.com:silverbulletmd/silverbullet into v2 2025-03-29 13:07:50 +01:00
Zef Hemel c2ab44699b Add back pageDecoration.disableTOC support 2025-03-29 13:07:21 +01:00
Zef Hemel 5b9122eb62 Fix very subtle Lua async bug 2025-03-28 18:25:47 +01:00
Zef Hemel 45b767fd3c Lua widgets: html can now also be a DOM node
Encoding some more space lua priorities and documenting them
2025-03-28 17:38:32 +01:00
Zef Hemel c157e979f0 WIP 2025-03-23 12:48:25 +01:00
Zef Hemel b1421dc030 Update table.find API 2025-03-21 16:48:30 +01:00
Zef Hemel e6aa89020a Lua: table.find 2025-03-21 16:11:00 +01:00
Zef Hemel 0812ba8287 Added some convenience editor syscalls 2025-03-16 15:53:00 +01:00
Zef Hemel c85fb17145 Improved Lua string library 2025-03-14 15:56:53 +01:00
Zef Hemel f514ef1b53 Lua: support passing Lua function callbacks to native JS functions 2025-03-14 10:02:25 +01:00
Zef Hemel 1881fa8af9 Lua: work to make more table APIs work with native JS arrays 2025-03-10 17:31:02 +01:00
Zef Hemel 242ae73078 Lua: fix some subtle Lua-isms 2025-03-09 15:37:38 +01:00
Zef Hemel 29c2781c11 lint fix 2025-03-08 20:55:30 +01:00
Zef Hemel 3b3e6991bc Lua: string.format implementation 2025-03-08 20:54:43 +01:00
KitAmbraidandGitHub 31792a3a43 space lua: os.date add support for %U, %V and %W (#1250) 2025-02-22 12:00:54 +01:00
Zef Hemel fb7be2a45a Changelog updates and Lua fixes 2025-02-09 18:37:21 +01:00
Zef Hemel 654151437c Lua: Set string as metatable of string values, allowing for strVal:upper() style invocations 2025-02-09 11:06:15 +01:00
Zef Hemel 6699ac783f Added some more string tests 2025-02-08 20:32:42 +01:00
Zef Hemel a169406d37 Lua: huge API breaking change: converted all snake_case APIs to camelCase 2025-02-06 10:04:45 +01:00
Zef Hemel 9ccfe13818 Expose SB instance base URL to Lua 2025-02-06 08:36:43 +01:00
Zef Hemel 47ac8cae09 Expose some JS regexp functions to Lua 2025-02-06 08:35:34 +01:00
Zef Hemel 236b2a7fdd Lua: tweaks and fixes 2025-01-25 08:29:11 +01:00
Zef Hemel 517cfb209a Lua: Reimplement template and config in Space Lua, distributed with Library/Std 2025-01-20 23:29:06 +01:00
Zef Hemel 6078452a6c Breaking Lua API changes:
* tpl -> template.new
* define_command -> command.define
* define_event_listener -> event.listen
* tag -> index.tag

Updated in the docs
2025-01-19 14:32:11 +01:00
Zef Hemel 6a65912b94 Lua math lib fixes 2025-01-17 18:32:01 +01:00
Zef Hemel 66433d27cc Lua math library 2025-01-17 10:40:47 +01:00
Zef Hemel 34e50ae74d Linter fixes 2025-01-16 15:35:56 +01:00
Zef Hemel 55f5a465c8 Lua query fixes 2025-01-16 15:33:18 +01:00
Zef Hemel ccea2200ac JS iterable handling 2025-01-16 12:35:15 +01:00
Zef Hemel bc1bdea396 Lua: refactored and extracted test approach 2025-01-15 20:47:58 +01:00
Zef Hemel 5604f6d8c2 Lua: tweaks and docs 2025-01-14 20:26:47 +01:00
Zef Hemel bf6a34f82c Lua Integrated Query 2025-01-13 20:25:39 +01:00
Zef HemelandGitHub 61f82869e9 Lua integrated query work (#1205)
* Lua query embeddings
2025-01-12 16:54:04 +01:00
Zef Hemel 15ad6f3129 Lua: language fixes, and new space_lua APIs 2025-01-09 18:22:12 +01:00
Zef Hemel 821dddff5e Lua string.gsub fixes 2025-01-09 09:00:29 +01:00
Zef Hemel c2fea2d25b Lua work 2025-01-08 17:09:09 +01:00
Zef Hemel 076c296dfd Lua iterator fixes 2025-01-08 11:12:26 +01:00
Zef Hemel 123309d791 Lua get and set now possibly async 2024-10-26 16:02:37 +02:00
Zef Hemel 8acb112e4e Lua stack frame refactor 2024-10-20 15:06:23 +02:00
Zef Hemel c1a20af981 Lua: widgets 2024-10-13 15:14:22 +02:00
Zef Hemel 64e398fd90 deno fmt 2024-10-11 15:34:27 +02:00
Zef Hemel 3319c7f21c More lua progress: JS Interop 2024-10-09 20:35:11 +02:00