### Run Deta Surf in Development Mode Source: https://github.com/deta/surf/blob/main/CONTRIBUTING.md Execute this command to start the application and required packages in development mode. ```bash yarn dev ``` -------------------------------- ### Install usearch Python Package Source: https://github.com/deta/surf/blob/main/packages/backend/README.md Installs the `usearch` Python package using pip. This is a prerequisite for using the Python code example. ```shell pip install usearch ``` -------------------------------- ### Install sffs Project Source: https://github.com/deta/surf/blob/main/packages/backend/README.md Installs the project dependencies and runs the build process. Ensure you have a supported version of Node and Rust installed. ```sh $ npm install ``` -------------------------------- ### Install Dependencies with Yarn Source: https://github.com/deta/surf/blob/main/CONTRIBUTING.md Run this command to install all project dependencies using Yarn Workspaces. ```bash yarn install ``` -------------------------------- ### Explore sffs Exports Source: https://github.com/deta/surf/blob/main/packages/backend/README.md After building, you can explore the addon's exports in the Node REPL. This example shows how to require the addon and call its `hello` function. ```sh $ npm install $ node ``` ```javascript > require('.').hello() "hello node" ``` -------------------------------- ### Build sffs Project Source: https://github.com/deta/surf/blob/main/packages/backend/README.md Builds the Node addon (`index.node`) from source without installing dependencies. This command uses `cargo-cp-artifact` to copy the built library. ```sh $ npm run build ``` -------------------------------- ### v0 Socket Protocol Example Source: https://github.com/deta/surf/blob/main/packages/backend-server/src/server/Readme.md Illustrates the sequence of messages exchanged between a client and server using the v0 socket protocol. This includes request initiation, acknowledgment, data transfer in chunks, and finalization. ```text Client → "EncodeSentences" Server → "[ack]\n" Client → "chunk of data..." Client → "more data...[done]" Server → "response data..." Server → "[done]\n" ``` -------------------------------- ### External Store for State Management Source: https://github.com/deta/surf/blob/main/packages/icons/README.md Use an external store to manage component state that needs to persist across Hot Module Replacement (HMR) cycles. This example demonstrates a simple writable store. ```typescript // store.ts // An extremely simple external store import { writable } from 'svelte/store' export default writable(0) ``` -------------------------------- ### External Store for HMR State Preservation Source: https://github.com/deta/surf/blob/main/packages/editor/README.md Use an external store to retain component state during Hot Module Replacement (HMR). This example shows a simple writable store. ```typescript import { writable } from 'svelte/store' export default writable(0) ``` -------------------------------- ### Build Desktop Application for Windows (x64) Source: https://github.com/deta/surf/blob/main/CONTRIBUTING.md Command to create the final distributable build for Windows on x64 architecture. ```bash yarn build:desktop:win:x64 ``` -------------------------------- ### Build All Apps and Packages Source: https://github.com/deta/surf/blob/main/CONTRIBUTING.md Use this command to build all applications and packages within the monorepo. ```bash yarn build ``` -------------------------------- ### Use usearch Python Module Source: https://github.com/deta/surf/blob/main/packages/backend/README.md Demonstrates importing the `usearch` module in Python and printing the path to the downloaded sqlite3 binary. ```python import usearch print(usearch.sqlite_path()) ``` -------------------------------- ### Build Desktop Application for macOS (Arm) Source: https://github.com/deta/surf/blob/main/CONTRIBUTING.md Command to create the final distributable build for macOS on Arm architecture. ```bash yarn build:desktop:mac:arm ``` -------------------------------- ### Input JSON Format for Smart Note Suggestions Source: https://github.com/deta/surf/blob/main/packages/services/src/lib/constants/prompts/smart-note-suggestions-generator.md Provides the expected JSON structure for input data, including note title, content, and user contexts, to the prompt generation AI. ```json { "title": "Note Title", "content": "full note content as html text", "contexts": ["name of the context the user is in"] } ``` -------------------------------- ### Output JSON Format for Smart Note Suggestions Source: https://github.com/deta/surf/blob/main/packages/services/src/lib/constants/prompts/smart-note-suggestions-generator.md Specifies the JSON array format for AI-generated prompts, each with a short label for user selection and the full prompt instruction. ```json [ { "label": "", "prompt": "" } ] ``` -------------------------------- ### Create a New Feature Branch Source: https://github.com/deta/surf/blob/main/CONTRIBUTING.md Use this command to create a new branch for your feature development. Ensure your branch name is descriptive. ```bash git checkout -b feature/my-feature ``` -------------------------------- ### Transparent Dialog Backdrop Source: https://github.com/deta/surf/blob/main/app/src/renderer/Overlay/overlay.html Sets the dialog backdrop to transparent. Use this to ensure the overlay does not obscure content behind it. ```css .hide-everything dialog::backdrop { background: transparent; } ``` -------------------------------- ### Build with Cargo Feature Source: https://github.com/deta/surf/blob/main/packages/backend/README.md Pass additional `cargo build` arguments to `npm build` or `npm build-*` commands, such as enabling a cargo feature. ```sh npm run build -- --feature=beetle ``` -------------------------------- ### Register Houdini Worklets Source: https://github.com/deta/surf/blob/main/app/src/renderer/Core/core.html Imports the Houdini module and registers it as a paint and layout worklet if supported by the browser. ```javascript import houdini from '@deta/ui/src/lib/utils/houdini.js?url' if ('paintWorklet' in CSS) { CSS.paintWorklet.addModule(houdini) } if ('layoutWorklet' in CSS) { CSS.layoutWorklet.addModule(houdini) } ``` -------------------------------- ### Commit with Signed-off-by Source: https://github.com/deta/surf/blob/main/CONTRIBUTING.md All commits must be signed with a 'Signed-off-by' line to certify contribution rights. This command automatically appends the DCO line. ```bash git commit -s -m "Add new feature" ``` -------------------------------- ### Amend Commit to Add Signoff Source: https://github.com/deta/surf/blob/main/CONTRIBUTING.md If you forgot to sign a previous commit, use this command to amend it and add the 'Signed-off-by' line. ```bash git commit --amend --signoff ``` -------------------------------- ### CSS Variables for Tree Customization Source: https://github.com/deta/surf/blob/main/packages/ui/src/lib/components/Tree/README.md Customize the appearance of the Tree component using these CSS variables. Adjust spacing, row height, and background colors. ```css --tree-indent: 1.5rem --tree-row-height: 2rem --tree-selected-bg: rgba(59, 130, 246, 0.1) --tree-hover-bg: rgba(0, 0, 0, 0.05) /* + many more */ ``` -------------------------------- ### Hide Overlay Elements Source: https://github.com/deta/surf/blob/main/app/src/renderer/Overlay/overlay.html Applies opacity to hide dialog elements. Use this class to make the overlay dialog invisible. ```css .hide-everything dialog { opacity: 0; } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.