Commit Graph
2098 Commits
Author SHA1 Message Date
Nico S.andGitHub aa20de14f2 Added paragraphs to tag-page (#1341) 2025-04-17 21:55:09 +02:00
Zef Hemel 1c1a84c63e Website content 2025-04-17 16:53:32 +02:00
Zef Hemel 199d553a81 Switch playground to v2 2025-04-17 16:37:44 +02:00
Zef Hemel 7b9b8fb12a Last tweaks before merging v2 into main 2025-04-17 16:32:14 +02:00
Zef Hemel 65cd6e7585 Enhance language core tests with comprehensive pairs and ipairs validation
- Modified the `assertEqual` function to include a custom message for assertion failures.
- Added tests for empty tables and JavaScript arrays to verify correct behavior of `pairs` and `ipairs`.
- Implemented checks for mixed key types and ensured `ipairs` only iterates over numeric indices, validating the expected values.
2025-04-17 15:23:59 +02:00
Zef Hemel 63db06a8c6 Fixed recently opened page tracking, fixed deletion of page when using dynamic index page 2025-04-17 14:44:38 +02:00
Zef Hemel 55fdaa2466 Added intro video 2025-04-17 14:14:53 +02:00
Zef Hemel cde017cda0 Fix broken links 2025-04-17 13:01:02 +02:00
Zef Hemel d4033763f7 Enhance link indexing logic for meta template pages
- Added a check to skip indexing links for pages tagged as "meta/template" to prevent indexing links there.
- Updated the documentation in `Spaces.md` to remove redundant information regarding git repository usage for space folders.
2025-04-17 12:59:53 +02:00
Zef Hemel 2df06fccfc Update Markdown documentation for code blocks and hashtags
- Changed the fenced code block notation from "template-type" to "language" for clarity in the Fenced Code Blocks documentation.
- Removed outdated example code from the Hashtags documentation to streamline content and improve focus on relevant information.
2025-04-17 12:07:46 +02:00
Zef Hemel 34557e0575 Update documentation for consistency and clarity
- Revised multiple documentation files to correct references and improve clarity, including updates to the Command Palette, Document Editor, and various Markdown files.
- Removed outdated references to "Slash Templatese" and replaced them with "Slash Templates" for consistency.
- Enhanced explanations regarding meta pages and shortcuts, ensuring accurate guidance for users.
2025-04-17 12:04:20 +02:00
Zef Hemel 2ac30edb2f Update configuration documentation and remove deprecated templates
- Enhanced the `Config.md` documentation to clarify built-in configuration options and the use of the `config.set` API.
- Removed outdated `Page Template.md` and `Slash Template.md` files to streamline documentation and avoid confusion.
- Updated references in various documentation files to reflect the removal of deprecated templates and ensure consistency across the site.
2025-04-17 11:55:09 +02:00
Zef Hemel 487f6b7c9b Add stdLibPrefix constant and update SyncService logic
- Introduced a new `stdLibPrefix` constant in `constants.ts` for standard library paths.
- Updated the import statement in `sync_service.ts` to include `stdLibPrefix`.
- Modified the logic in `SyncService` to check for both `plugPrefix` and `stdLibPrefix` when validating names.
2025-04-15 09:58:24 +02:00
Zef Hemel e1a6643d9a Website documentation work 2025-04-06 21:49:15 +02:00
Zef Hemel 50d26619e8 Put back space.*attachment syscalls for backwards compatibility 2025-04-06 20:41:00 +02:00
Zef Hemel b681e4dfc6 Remove debug print statement from page template command function 2025-04-06 13:44:27 +02:00
Zef Hemel 44d8fe4467 Implement slash command templates and enhance Lua command functionality
- Introduced a new system for defining slash commands using templates, allowing for easier command creation and management.
- Added multiple slash command templates, including for functions, queries, and admonitions, with specific context handling.
- Enhanced existing Lua command definitions to support new template-based commands and improved context filtering.
- Updated the `template.fromPage` function to handle raw template text, enabling more flexible command definitions.
2025-04-06 10:08:06 +02:00
Zef Hemel 18df394ef8 Add page template functionality and restructure existing templates
- Introduced a new page template system to automate page creation based on defined templates.
- Added configuration options for templates, including suggested names, confirmation prompts, and keyboard shortcuts.
- Created a new "Quick Note" template with specific command and key bindings.
- Removed the old "Page Templates" file and integrated its content into the new structure for better organization.
2025-04-06 08:59:49 +02:00
Zef Hemel f991a25a5a Add page existence check and improve cursor placeholder handling
- Introduced `pageExists` function in `space.ts` to verify if a page exists in the space.
- Enhanced cursor placeholder handling in `editor.ts` to prevent errors when the placeholder is not found, ensuring smoother text manipulation.
2025-04-06 08:59:22 +02:00
Zef Hemel a7719bdf3a Improve service worker config fetching logic
- Added caching mechanism for client configuration to enhance performance and reliability.
- Implemented a timeout for fetching fresh config, falling back to cached config in case of errors or timeouts.
- Updated error handling to ensure proper responses when fetching fails, including returning a 404 status when no config is available.
2025-04-05 20:35:07 +02:00
Zef Hemel 56b9caabab Create FUNDING.yml 2025-04-04 20:56:30 +02:00
Zef Hemel b62cef6d92 Add tag definition and registration to ScriptEnvironment
- Introduced a new `TagDef` type to define tags with optional schema and metatable.
- Added `registerTag` method in `ScriptEnvironment` to register tags.
- Updated `indexSyscalls` to handle tag registration and enrich query results with tag metadata.
- Modified `queryLua` and `DataStore` to support an optional enricher function for enhanced data processing.
2025-04-04 16:56:27 +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 3440217a88 Enhance tonumber function in Lua standard library
- Updated the `tonumber` function to support optional base conversion, allowing for binary, octal, decimal, hexadecimal, and base 36 inputs.
- Added validation for invalid bases and non-numeric strings.
- Introduced comprehensive tests for various `tonumber` scenarios in `language_core_test.lua` to ensure correct functionality.
2025-04-04 09:11:13 +02:00
Zef Hemel 4b52da3d86 Missing API docs 2025-04-03 18:09:51 +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 a7191d540a Expose htmlEscape function for external use and integrate it into the HTTP server response handling to sanitize DESCRIPTION values. 2025-03-31 16:03:35 +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 db62692d5a - Start of a migration guide
- Included a warning at the top of the SilverBullet documentation indicating that it is for version 2, which is still in progress.
- Provided a link to version 1 for users preferring a stable version and included a note about active development on v2.
2025-03-30 21:21:33 +02:00
Zef Hemel ed35a9d390 Bringing back the hamburger menu on mobile by default 2025-03-30 20:42:46 +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 453cb912d9 Refactor Lua built-in functions for improved type handling
- Updated `ipairsFunction` and `pairsFunction` to accept both `LuaTable` and array types, enhancing flexibility.
- Modified `eachFunction` to support arrays, ensuring consistent behavior across different data structures.
- Added type checks and adjusted key retrieval logic for better compatibility with JavaScript objects.
2025-03-30 15:03:57 +02:00
Zef Hemel 449c4da4c6 Implement YAML patching functionality and enhance tests
- Added `yaml.patch` syscall to apply patches to YAML strings using the new `applyPatches` function.
- Updated tests to cover a wider range of scenarios, including edge cases and preservation of comments and formatting.
- Refactored existing tests to utilize the new patching logic, ensuring comprehensive coverage of YAML operations.
2025-03-30 14:30:51 +02:00
Zef Hemel 8ab2c624e7 Lint fixes 2025-03-30 13:04:43 +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 a0807b052f Add YAML patching tests and implement serialization logic
- Introduced comprehensive tests for applying minimal set key patches in YAML, covering various scenarios including scalar operations, adding new keys, list operations, and handling of empty values.
- Implemented serialization functions to convert JavaScript types to YAML format, ensuring proper handling of scalars, arrays, and objects.
- Enhanced the `applyMinimalSetKeyPatches` function to support patching of top-level keys while preserving comments and formatting.
2025-03-30 13:03:32 +02:00
Zef Hemel c25a3bf0eb Fix string.find with plain = true 2025-03-29 22:07:31 +01:00
Zef Hemel f429e1f7b2 Attempt to address /.config auth issues 2025-03-29 19:20:11 +01:00
Zef Hemel 4d2299df41 Enhance page list caching logic in Client class
- Introduced checks for initial sync completion before updating the page list cache.
- Updated logic to fetch pages based on sync status and index plug availability.
- Added tagging for meta pages starting with "Library/" during direct fetch.
- Initialized empty tags array for file metadata in fileMetaToPageMeta function.
2025-03-29 15:48:49 +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 c28e7aacf5 Fixes #1311 2025-03-28 15:57:46 +01:00
Zef Hemel 1703020a8a feat: Add logout option to client wipe functionality
- Add optional logout parameter to system.wipeClient

- Add new 'Clear Local Storage & Logout' command

- Update API to support logout parameter

- Clean up server code comments
2025-03-28 13:45:39 +01:00
Zef Hemel 2787c40ebe Better Lua parse error reporting 2025-03-28 12:50:35 +01:00
Zef Hemel 64e537732b Debug: Reset Client is now called System: Wipe Client
Merged two datastores into one (for both state and files), this will trigger a resync on upgrade
2025-03-28 12:17:17 +01:00
512c85bbcb Add support for application/xml content type in lua http.request (#1320)
Co-authored-by: Long Hoang Nguyen <roman_nguyen@gatech.edu>
2025-03-27 19:11:56 +01:00
Zef Hemel 96f299bf8a Shell streaming support (Lua) 2025-03-27 17:04:15 +01:00
Zef Hemel 4587496406 Out of date docs purge 2025-03-26 19:49:44 +01:00