Commit Graph
16 Commits
Author SHA1 Message Date
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 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 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 f514ef1b53 Lua: support passing Lua function callbacks to native JS functions 2025-03-14 10:02:25 +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 34e50ae74d Linter fixes 2025-01-16 15:35:56 +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 c2fea2d25b Lua work 2025-01-08 17:09:09 +01: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