@notis_ai/cli 0.2.17 → 0.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +542 -146
- package/bin/check-runtime.js +15 -0
- package/bin/notis.js +2 -0
- package/config/notis_app_design_rules.json +320 -0
- package/config/portal-route-roots.json +45 -0
- package/dist/agent-hooks/notis-agent-hook.mjs +42323 -18258
- package/dist/base-skills/notis-cli/.notis-base-skill.json +1 -0
- package/dist/base-skills/notis-cli/SKILL.md +51 -280
- package/dist/base-skills/notis-cli/references/app-delivery.md +17 -0
- package/dist/base-skills/notis-cli/references/intelligence.md +94 -0
- package/dist/base-skills/notis-cli/references/native-databases.md +21 -0
- package/dist/base-skills/notis-cli/references/tool-examples.md +56 -0
- package/dist/base-skills/notis-cli/references/troubleshooting.md +67 -0
- package/dist/base-skills/notis-query/.notis-base-skill.json +1 -0
- package/dist/base-skills/notis-query/SKILL.md +35 -699
- package/dist/base-skills/notis-query/references/database-discovery.md +59 -0
- package/dist/base-skills/notis-query/references/documents.md +74 -0
- package/dist/base-skills/notis-query/references/query.md +76 -0
- package/dist/base-skills/notis-spaces/.notis-base-skill.json +1 -0
- package/dist/base-skills/notis-spaces/SKILL.md +218 -0
- package/dist/base-skills/notis-spaces/references/architecture.md +116 -0
- package/dist/base-skills/notis-spaces/references/context.md +81 -0
- package/dist/base-skills/notis-spaces/references/design.md +141 -0
- package/dist/base-skills/notis-spaces/references/fixtures.md +29 -0
- package/dist/base-skills/notis-spaces/references/memory.md +58 -0
- package/dist/base-skills/notis-spaces/references/reading.md +73 -0
- package/dist/base-skills/notis-spaces/references/release.md +120 -0
- package/dist/base-skills/notis-spaces/references/reports.md +77 -0
- package/dist/base-skills/notis-spaces/references/sdk.md +273 -0
- package/dist/base-skills/notis-spaces/references/store.md +118 -0
- package/dist/base-skills/notis-spaces/references/troubleshooting.md +28 -0
- package/dist/base-skills/notis-spaces/references/views.md +229 -0
- package/{template/packages → dist}/sdk/package.json +9 -10
- package/dist/sdk/src/agentContext.ts +36 -0
- package/dist/sdk/src/bundleModule.ts +175 -0
- package/dist/sdk/src/components/Dialog.tsx +103 -0
- package/dist/sdk/src/components/DocumentEditor.tsx +113 -0
- package/dist/sdk/src/components/DocumentPage.tsx +184 -0
- package/{template/packages → dist}/sdk/src/components/Markdown.tsx +9 -3
- package/{template/packages → dist}/sdk/src/components/MarkdownEditor.tsx +26 -5
- package/{template/packages → dist}/sdk/src/components/MultiSelectActionBar.tsx +95 -12
- package/{template/packages → dist}/sdk/src/components/MultiSelectCheckbox.tsx +4 -2
- package/dist/sdk/src/components/NotisCommentBoundary.tsx +172 -0
- package/{template/packages → dist}/sdk/src/components/NotisSelectionBoundary.tsx +9 -5
- package/dist/sdk/src/components/RecordComponents.tsx +111 -0
- package/dist/sdk/src/components/Skeleton.tsx +38 -0
- package/dist/sdk/src/config.ts +31 -0
- package/{template/packages → dist}/sdk/src/documents.ts +21 -6
- package/dist/sdk/src/hooks/useAction.ts +28 -0
- package/dist/sdk/src/hooks/useAgentContext.ts +23 -0
- package/{template/packages → dist}/sdk/src/hooks/useBackend.ts +3 -2
- package/dist/sdk/src/hooks/useCloudComputer.ts +94 -0
- package/dist/sdk/src/hooks/useCloudComputerShell.ts +114 -0
- package/{template/packages → dist}/sdk/src/hooks/useCollectionInteractions.ts +157 -147
- package/dist/sdk/src/hooks/useDatabaseSchema.ts +50 -0
- package/{template/packages → dist}/sdk/src/hooks/useDatabaseSubscription.ts +2 -2
- package/dist/sdk/src/hooks/useDocument.ts +51 -0
- package/{template/packages → dist}/sdk/src/hooks/useDocuments.ts +25 -59
- package/{template/packages → dist}/sdk/src/hooks/useHandover.ts +7 -7
- package/dist/sdk/src/hooks/useLongPressSelection.ts +79 -0
- package/dist/sdk/src/hooks/useMarqueeSelection.ts +194 -0
- package/{template/packages → dist}/sdk/src/hooks/useMultiSelect.ts +2 -8
- package/dist/sdk/src/hooks/useNativeDocumentBody.ts +50 -0
- package/dist/sdk/src/hooks/useNativeDocuments.ts +143 -0
- package/{template/packages → dist}/sdk/src/hooks/useNotis.ts +6 -1
- package/dist/sdk/src/hooks/useNotisNavigation.ts +70 -0
- package/dist/sdk/src/hooks/useQuery.ts +81 -0
- package/dist/sdk/src/hooks/useToolQuery.ts +12 -0
- package/dist/sdk/src/hooks/useTopBarSearch.ts +102 -0
- package/dist/sdk/src/hooks/useTopBarTitleLeaf.ts +75 -0
- package/{template/packages → dist}/sdk/src/hooks/useUpsertDocument.ts +1 -1
- package/dist/sdk/src/hooks/useViewParams.ts +195 -0
- package/dist/sdk/src/hooks/useViewerReads.ts +129 -0
- package/{template/packages → dist}/sdk/src/index.ts +64 -1
- package/{template/packages → dist}/sdk/src/interactions/actions.ts +14 -1
- package/{template/packages → dist}/sdk/src/interactions/shortcuts.tsx +129 -23
- package/dist/sdk/src/interactions/visibility.ts +13 -0
- package/{template/packages → dist}/sdk/src/interactions.ts +5 -1
- package/dist/sdk/src/nativeData.ts +39 -0
- package/{template/packages → dist}/sdk/src/provider.tsx +9 -4
- package/dist/sdk/src/queryCache.ts +292 -0
- package/dist/sdk/src/queryErrors.ts +51 -0
- package/dist/sdk/src/runtime.ts +675 -0
- package/dist/sdk/src/runtimeModules.ts +33 -0
- package/dist/sdk/src/space.ts +442 -0
- package/dist/sdk/src/standardViewParams.ts +36 -0
- package/{template/packages → dist}/sdk/src/styles.css +81 -16
- package/dist/sdk/src/tailwind.ts +66 -0
- package/dist/sdk/src/ui/charts/RenderChartData.tsx +25 -0
- package/dist/sdk/src/ui/engine/core.ts +392 -0
- package/dist/sdk/src/ui/engine/dom.ts +183 -0
- package/dist/sdk/src/ui/engine/hooks.ts +195 -0
- package/dist/sdk/src/ui/engine/instance.ts +63 -0
- package/dist/sdk/src/ui/engine/keycapContext.ts +2 -0
- package/dist/sdk/src/ui/engine/registry.ts +262 -0
- package/dist/sdk/src/ui/engine/types.ts +62 -0
- package/dist/sdk/src/ui/icons.tsx +91 -0
- package/dist/sdk/src/ui/util.ts +83 -0
- package/dist/sdk/src/viewPeriod.ts +26 -0
- package/dist/sdk/src/vite.ts +92 -0
- package/dist/sdk/src/words/actions.ts +295 -0
- package/dist/sdk/src/words/clashes.ts +158 -0
- package/dist/sdk/src/words/format.ts +136 -0
- package/dist/sdk/src/words/index.ts +13 -0
- package/dist/sdk/src/words/keymap.ts +72 -0
- package/dist/sdk/src/words/keys.ts +297 -0
- package/dist/sdk/src/words/shell.ts +46 -0
- package/dist/sdk/src/words/types.ts +65 -0
- package/dist/skill-sync/index.js +832 -151
- package/dist/skill-sync/index.js.map +4 -4
- package/dist/skill-sync-worker.mjs +3941 -0
- package/dist/space-harness/host.js +1460 -0
- package/dist/space-sdk/dist/chunk-ZSN57ATH.js +5 -0
- package/dist/space-sdk/dist/index.js +15 -0
- package/dist/space-sdk/dist/ui.js +18 -0
- package/dist/space-sdk/package.json +33 -0
- package/dist/space-sdk/src/agentContext.d.ts +36 -0
- package/dist/space-sdk/src/components/Dialog.d.ts +20 -0
- package/dist/space-sdk/src/components/DocumentEditor.d.ts +46 -0
- package/dist/space-sdk/src/components/DocumentPage.d.ts +53 -0
- package/dist/space-sdk/src/components/Markdown.d.ts +18 -0
- package/dist/space-sdk/src/components/MarkdownEditor.d.ts +11 -0
- package/dist/space-sdk/src/components/MultiSelectActionBar.d.ts +31 -0
- package/dist/space-sdk/src/components/MultiSelectCheckbox.d.ts +14 -0
- package/dist/space-sdk/src/components/MultiSelectDragOverlay.d.ts +8 -0
- package/dist/space-sdk/src/components/NotisCommentBoundary.d.ts +36 -0
- package/dist/space-sdk/src/components/NotisSelectionBoundary.d.ts +16 -0
- package/dist/space-sdk/src/components/RecordComponents.d.ts +64 -0
- package/dist/space-sdk/src/components/ShortcutHints.d.ts +12 -0
- package/dist/space-sdk/src/components/Skeleton.d.ts +23 -0
- package/dist/space-sdk/src/config.ts +31 -0
- package/dist/space-sdk/src/documents.d.ts +59 -0
- package/dist/space-sdk/src/hooks/useAction.d.ts +8 -0
- package/dist/space-sdk/src/hooks/useActiveResource.d.ts +3 -0
- package/dist/space-sdk/src/hooks/useAgentContext.d.ts +7 -0
- package/dist/space-sdk/src/hooks/useBackend.d.ts +23 -0
- package/dist/space-sdk/src/hooks/useCloudComputer.d.ts +45 -0
- package/dist/space-sdk/src/hooks/useCloudComputerShell.d.ts +49 -0
- package/dist/space-sdk/src/hooks/useCollectionInteractions.d.ts +118 -0
- package/dist/space-sdk/src/hooks/useDatabaseSchema.d.ts +14 -0
- package/dist/space-sdk/src/hooks/useDatabaseSubscription.d.ts +26 -0
- package/dist/space-sdk/src/hooks/useDocument.d.ts +22 -0
- package/dist/space-sdk/src/hooks/useDocuments.d.ts +31 -0
- package/dist/space-sdk/src/hooks/useHandover.d.ts +43 -0
- package/dist/space-sdk/src/hooks/useLongPressSelection.d.ts +9 -0
- package/dist/space-sdk/src/hooks/useMarqueeSelection.d.ts +57 -0
- package/dist/space-sdk/src/hooks/useMultiSelect.d.ts +51 -0
- package/dist/space-sdk/src/hooks/useNativeDocumentBody.d.ts +24 -0
- package/dist/space-sdk/src/hooks/useNativeDocuments.d.ts +55 -0
- package/dist/space-sdk/src/hooks/useNotis.d.ts +25 -0
- package/dist/space-sdk/src/hooks/useNotisNavigation.d.ts +33 -0
- package/dist/space-sdk/src/hooks/useQuery.d.ts +22 -0
- package/dist/space-sdk/src/hooks/useTool.d.ts +20 -0
- package/dist/space-sdk/src/hooks/useToolQuery.d.ts +3 -0
- package/dist/space-sdk/src/hooks/useTools.d.ts +15 -0
- package/dist/space-sdk/src/hooks/useTopBarSearch.d.ts +48 -0
- package/dist/space-sdk/src/hooks/useTopBarTitleLeaf.d.ts +24 -0
- package/dist/space-sdk/src/hooks/useUpsertDocument.d.ts +27 -0
- package/dist/space-sdk/src/hooks/useViewParams.d.ts +76 -0
- package/dist/space-sdk/src/hooks/useViewerReads.d.ts +38 -0
- package/dist/space-sdk/src/index.d.ts +98 -0
- package/dist/space-sdk/src/interactions/actions.d.ts +33 -0
- package/dist/space-sdk/src/interactions/shortcuts.d.ts +42 -0
- package/dist/space-sdk/src/interactions/visibility.d.ts +2 -0
- package/dist/space-sdk/src/nativeData.d.ts +66 -0
- package/dist/space-sdk/src/provider.d.ts +17 -0
- package/dist/space-sdk/src/queryCache.d.ts +45 -0
- package/dist/space-sdk/src/queryErrors.ts +51 -0
- package/dist/space-sdk/src/runtime.d.ts +615 -0
- package/dist/space-sdk/src/runtimeModules.ts +33 -0
- package/dist/space-sdk/src/space.ts +442 -0
- package/dist/space-sdk/src/standardViewParams.d.ts +15 -0
- package/dist/space-sdk/src/tailwind-candidates.d.ts +3418 -0
- package/dist/space-sdk/src/tailwind.ts +66 -0
- package/dist/space-sdk/src/ui/actions/ActionToast.d.ts +15 -0
- package/dist/space-sdk/src/ui/actions/actionWords.d.ts +16 -0
- package/dist/space-sdk/src/ui/actions/index.d.ts +7 -0
- package/dist/space-sdk/src/ui/actions/useActions.d.ts +69 -0
- package/dist/space-sdk/src/ui/actions/useToast.d.ts +41 -0
- package/dist/space-sdk/src/ui/blocks/Tabs.d.ts +139 -0
- package/dist/space-sdk/src/ui/blocks/blocks.d.ts +217 -0
- package/dist/space-sdk/src/ui/blocks/index.d.ts +4 -0
- package/dist/space-sdk/src/ui/board/BoardView.d.ts +36 -0
- package/dist/space-sdk/src/ui/board/boardModel.d.ts +46 -0
- package/dist/space-sdk/src/ui/board/boardWords.d.ts +9 -0
- package/dist/space-sdk/src/ui/board/index.d.ts +5 -0
- package/dist/space-sdk/src/ui/calendar/CalendarView.d.ts +49 -0
- package/dist/space-sdk/src/ui/calendar/DayPicker.d.ts +23 -0
- package/dist/space-sdk/src/ui/calendar/calendarMath.d.ts +81 -0
- package/dist/space-sdk/src/ui/charts/Chart.d.ts +203 -0
- package/dist/space-sdk/src/ui/charts/ChartTable.d.ts +37 -0
- package/dist/space-sdk/src/ui/charts/RenderChartData.d.ts +16 -0
- package/dist/space-sdk/src/ui/charts/StatRow.d.ts +59 -0
- package/dist/space-sdk/src/ui/charts/chartData.d.ts +84 -0
- package/dist/space-sdk/src/ui/comments/CommentPane.d.ts +58 -0
- package/dist/space-sdk/src/ui/comments/commentModel.d.ts +157 -0
- package/dist/space-sdk/src/ui/comments/commentWords.d.ts +60 -0
- package/dist/space-sdk/src/ui/comments/index.d.ts +4 -0
- package/dist/space-sdk/src/ui/comments/useComments.d.ts +146 -0
- package/dist/space-sdk/src/ui/engine/HelpSheet.d.ts +12 -0
- package/dist/space-sdk/src/ui/engine/KeyboardEngine.d.ts +27 -0
- package/dist/space-sdk/src/ui/engine/core.d.ts +73 -0
- package/dist/space-sdk/src/ui/engine/hooks.d.ts +64 -0
- package/dist/space-sdk/src/ui/engine/index.d.ts +14 -0
- package/dist/space-sdk/src/ui/engine/instance.d.ts +21 -0
- package/dist/space-sdk/src/ui/engine/keycapContext.d.ts +2 -0
- package/dist/space-sdk/src/ui/engine/registry.d.ts +77 -0
- package/dist/space-sdk/src/ui/engine/step.d.ts +11 -0
- package/dist/space-sdk/src/ui/engine/types.d.ts +54 -0
- package/dist/space-sdk/src/ui/fields/fieldWords.d.ts +56 -0
- package/dist/space-sdk/src/ui/fields/fields.d.ts +162 -0
- package/dist/space-sdk/src/ui/fields/index.d.ts +5 -0
- package/dist/space-sdk/src/ui/fields/useFieldDraft.d.ts +22 -0
- package/dist/space-sdk/src/ui/gallery/AttachmentGallery.d.ts +53 -0
- package/dist/space-sdk/src/ui/gallery/ImageViewer.d.ts +27 -0
- package/dist/space-sdk/src/ui/gallery/galleryWords.d.ts +95 -0
- package/dist/space-sdk/src/ui/gallery/index.d.ts +5 -0
- package/dist/space-sdk/src/ui/icons.d.ts +13 -0
- package/dist/space-sdk/src/ui/index.d.ts +54 -0
- package/dist/space-sdk/src/ui/keycap/Keycap.d.ts +22 -0
- package/dist/space-sdk/src/ui/keycap/index.d.ts +2 -0
- package/dist/space-sdk/src/ui/layout/Panels.d.ts +50 -0
- package/dist/space-sdk/src/ui/layout/chatPanelEdge.d.ts +77 -0
- package/dist/space-sdk/src/ui/layout/index.d.ts +5 -0
- package/dist/space-sdk/src/ui/layout/panelMath.d.ts +91 -0
- package/dist/space-sdk/src/ui/list/ListReader.d.ts +380 -0
- package/dist/space-sdk/src/ui/list/Row.d.ts +145 -0
- package/dist/space-sdk/src/ui/list/SelectionBar.d.ts +65 -0
- package/dist/space-sdk/src/ui/list/index.d.ts +14 -0
- package/dist/space-sdk/src/ui/list/rowState.d.ts +22 -0
- package/dist/space-sdk/src/ui/list/useListKeys.d.ts +89 -0
- package/dist/space-sdk/src/ui/list/useReorder.d.ts +86 -0
- package/dist/space-sdk/src/ui/list/useSelection.d.ts +90 -0
- package/dist/space-sdk/src/ui/open/OpenAsMenu.d.ts +15 -0
- package/dist/space-sdk/src/ui/open/index.d.ts +6 -0
- package/dist/space-sdk/src/ui/open/openModeStore.d.ts +39 -0
- package/dist/space-sdk/src/ui/open/useOpenMode.d.ts +17 -0
- package/dist/space-sdk/src/ui/overlay/Menu.d.ts +88 -0
- package/dist/space-sdk/src/ui/overlay/Popover.d.ts +28 -0
- package/dist/space-sdk/src/ui/overlay/Tooltip.d.ts +19 -0
- package/dist/space-sdk/src/ui/overlay/index.d.ts +9 -0
- package/dist/space-sdk/src/ui/overlay/layerRoot.d.ts +24 -0
- package/dist/space-sdk/src/ui/overlay/position.d.ts +31 -0
- package/dist/space-sdk/src/ui/period/PeriodPicker.d.ts +30 -0
- package/dist/space-sdk/src/ui/period/dateFormat.d.ts +50 -0
- package/dist/space-sdk/src/ui/period/dateWords.d.ts +88 -0
- package/dist/space-sdk/src/ui/period/periods.d.ts +70 -0
- package/dist/space-sdk/src/ui/period/usePeriod.d.ts +23 -0
- package/dist/space-sdk/src/ui/present/index.d.ts +3 -0
- package/dist/space-sdk/src/ui/present/presentWords.d.ts +27 -0
- package/dist/space-sdk/src/ui/present/screens.d.ts +36 -0
- package/dist/space-sdk/src/ui/present/useAudienceScreen.d.ts +38 -0
- package/dist/space-sdk/src/ui/styles.d.ts +21 -0
- package/dist/space-sdk/src/ui/timeline/TimelineView.d.ts +44 -0
- package/dist/space-sdk/src/ui/timeline/timelineMath.d.ts +123 -0
- package/dist/space-sdk/src/viewPeriod.d.ts +8 -0
- package/dist/space-sdk/src/vite.ts +92 -0
- package/dist/space-sdk/src/words/actions.ts +295 -0
- package/dist/space-sdk/src/words/clashes.ts +158 -0
- package/dist/space-sdk/src/words/format.ts +136 -0
- package/dist/space-sdk/src/words/index.ts +13 -0
- package/dist/space-sdk/src/words/keymap.ts +72 -0
- package/dist/space-sdk/src/words/keys.ts +297 -0
- package/dist/space-sdk/src/words/shell.ts +46 -0
- package/dist/space-sdk/src/words/types.ts +65 -0
- package/dist/view-renderer/dist/host.css +1 -0
- package/dist/view-renderer/dist/host.js +2374 -0
- package/dist/view-renderer/dist/theme.css +73 -0
- package/dist/view-renderer/src/dom.js +212 -0
- package/dist/view-renderer/src/errors.js +8 -0
- package/dist/view-renderer/src/host.tsx +250 -0
- package/dist/view-renderer/src/index.js +4 -0
- package/dist/view-renderer/src/png.js +213 -0
- package/dist/view-renderer/src/pool.js +110 -0
- package/dist/view-renderer/src/remote-broker.js +59 -0
- package/dist/view-renderer/src/renderer.js +271 -0
- package/package.json +21 -11
- package/skills/notis-cli/AGENT_INSTRUCTIONS.md +63 -12
- package/skills/notis-onboarding/BRIEF.md +14 -9
- package/skills/notis-query/cli.md +1 -1
- package/skills/notis-spaces/cli.md +540 -0
- package/src/cli.js +8 -8
- package/src/command-specs/agents.js +121 -8
- package/src/command-specs/auth.js +3 -3
- package/src/command-specs/diagnostics.js +97 -20
- package/src/command-specs/documents.js +158 -0
- package/src/command-specs/files.js +29 -0
- package/src/command-specs/handover.js +331 -79
- package/src/command-specs/helpers.js +50 -40
- package/src/command-specs/index.js +14 -5
- package/src/command-specs/meta.js +38 -9
- package/src/command-specs/onboarding.js +1 -1
- package/src/command-specs/profile.js +42 -1
- package/src/command-specs/skills.js +314 -9
- package/src/command-specs/smoke.js +16 -4
- package/src/command-specs/spaces.js +783 -0
- package/src/command-specs/tools.js +118 -21
- package/src/command-specs/version-history.js +20 -0
- package/src/command-specs/views.js +69 -0
- package/src/runtime/agent-browser.js +178 -267
- package/src/runtime/agent-setup.js +172 -13
- package/src/runtime/app-boundary-validator.js +338 -2
- package/src/runtime/app-data-literals.js +82 -0
- package/src/runtime/app-platform.js +750 -1568
- package/src/runtime/auth-recovery.js +17 -0
- package/src/runtime/base-skills.d.ts +11 -0
- package/src/runtime/base-skills.js +100 -3
- package/src/runtime/computer-identity.d.ts +30 -0
- package/src/runtime/computer-identity.js +151 -0
- package/src/runtime/config-lock.js +135 -0
- package/src/runtime/confined-space-build.js +74 -0
- package/src/runtime/confined-space-verify.js +49 -0
- package/src/runtime/delegated-context.js +5 -21
- package/src/runtime/native-record-files.js +47 -0
- package/src/runtime/oauth.js +342 -31
- package/src/runtime/profiles.js +19 -112
- package/src/runtime/retired-sdk-files.js +24 -0
- package/src/runtime/retry.js +150 -0
- package/src/runtime/skill-sync/cloud-client.ts +33 -8
- package/src/runtime/skill-sync/index.ts +443 -106
- package/src/runtime/skill-sync/local-scanner.ts +248 -32
- package/src/runtime/skill-sync/native-identity.ts +102 -0
- package/src/runtime/skill-sync/native-plan.ts +70 -0
- package/src/runtime/skill-sync/symlink-manager.ts +66 -16
- package/src/runtime/skill-sync/sync-plan.ts +34 -2
- package/src/runtime/skill-sync/types.ts +54 -0
- package/src/runtime/skill-sync/write-cloud-skill.ts +4 -4
- package/src/runtime/skill-sync-service.js +109 -0
- package/src/runtime/source-root.js +32 -0
- package/src/runtime/space-collection-scaffold.js +107 -0
- package/src/runtime/space-database-structures.js +229 -0
- package/src/runtime/space-fixture-broker.js +68 -0
- package/src/runtime/space-lock.js +337 -0
- package/src/runtime/space-platform.js +133 -0
- package/src/runtime/space-source.js +290 -0
- package/src/runtime/space-test-server.js +354 -0
- package/src/runtime/space-verification.js +94 -0
- package/src/runtime/space-verify-browser-worker.js +51 -0
- package/src/runtime/space-view-manifest.js +368 -0
- package/src/runtime/sync-skills.d.ts +5 -1
- package/src/runtime/sync-skills.js +11 -2
- package/src/runtime/tool-confirmation.js +138 -0
- package/src/runtime/transport.js +118 -24
- package/src/runtime/upsell.js +219 -0
- package/src/runtime/view-render.js +49 -0
- package/src/skill-sync-worker-entry.js +2 -0
- package/src/skill-sync-worker.js +114 -0
- package/src/space-harness-host.ts +122 -0
- package/template/.harness/index.html.tmpl +9 -352
- package/template/app/globals.css +29 -3
- package/template/app/layout.tsx +2 -6
- package/template/components/ui/badge.tsx +7 -4
- package/template/components/ui/button.tsx +1 -1
- package/template/components/ui/native-select.tsx +24 -0
- package/template/notis.config.ts +4 -36
- package/template/package-lock.json +1800 -1867
- package/template/package.json +16 -14
- package/template/postcss.config.mjs +1 -1
- package/template/tailwind.config.ts +1 -6
- package/template/tsconfig.json +1 -0
- package/template/vite.config.ts +2 -2
- package/dist/base-skills/notis-apps/SKILL.md +0 -613
- package/skills/notis-apps/cli.md +0 -285
- package/src/command-specs/apps.js +0 -3000
- package/src/runtime/app-changelog.js +0 -79
- package/src/runtime/app-dev-consumers.js +0 -154
- package/src/runtime/app-dev-host-lock.js +0 -80
- package/src/runtime/app-dev-process-identity.js +0 -111
- package/src/runtime/app-dev-roots.js +0 -284
- package/src/runtime/app-dev-server.js +0 -1140
- package/src/runtime/app-dev-sessions.js +0 -185
- package/src/runtime/app-registry-scaffolds.js +0 -367
- package/src/runtime/assets/store-screenshot-dark.png +0 -0
- package/src/runtime/cli-mode.generated.js +0 -5
- package/src/runtime/cli-mode.js +0 -34
- package/src/runtime/store-screenshot.js +0 -143
- package/template/CHANGELOG.md +0 -5
- package/template/app/page.tsx +0 -60
- package/template/components/ui/card.tsx +0 -56
- package/template/packages/sdk/src/components/DocumentEditor.tsx +0 -103
- package/template/packages/sdk/src/config.ts +0 -259
- package/template/packages/sdk/src/hooks/useCloudComputer.ts +0 -97
- package/template/packages/sdk/src/hooks/useDatabaseSchema.ts +0 -85
- package/template/packages/sdk/src/hooks/useDocument.ts +0 -78
- package/template/packages/sdk/src/hooks/useNotisNavigation.ts +0 -52
- package/template/packages/sdk/src/hooks/useTopBarSearch.ts +0 -73
- package/template/packages/sdk/src/runtime.ts +0 -439
- package/template/packages/sdk/src/vite.ts +0 -56
- package/template/packages/sdk/tsconfig.json +0 -15
- /package/{template/packages → dist}/sdk/src/components/MultiSelectDragOverlay.tsx +0 -0
- /package/{template/packages → dist}/sdk/src/components/ShortcutHints.tsx +0 -0
- /package/{template/packages → dist}/sdk/src/hooks/useActiveResource.ts +0 -0
- /package/{template/packages → dist}/sdk/src/hooks/useTool.ts +0 -0
- /package/{template/packages → dist}/sdk/src/hooks/useTools.ts +0 -0
- /package/{template/packages → dist}/sdk/src/ui.ts +0 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shortcut registry: owners, availability, clash checks and dispatch order. Pure (no DOM, no React), so it runs
|
|
3
|
+
* under node in tests and in the design check.
|
|
4
|
+
*/
|
|
5
|
+
import { type ChordSequence, type Clash, type KeySpec, type Locale } from '../../words';
|
|
6
|
+
import type { HelpEntry, OwnerKind, ShortcutDef, ShortcutGroup } from './types';
|
|
7
|
+
export declare const ROOT_OWNER = "notis";
|
|
8
|
+
/** Thrown in dev and by the design check when two defs clash or a Space takes a host key. */
|
|
9
|
+
export declare class NotisKeyClash extends Error {
|
|
10
|
+
readonly clash: Clash;
|
|
11
|
+
constructor(clash: Clash);
|
|
12
|
+
}
|
|
13
|
+
export interface RegisteredShortcut {
|
|
14
|
+
def: ShortcutDef;
|
|
15
|
+
owner: string;
|
|
16
|
+
ownerKind: OwnerKind;
|
|
17
|
+
/** Registration order; later wins within a scope. */
|
|
18
|
+
seq: number;
|
|
19
|
+
/** Scope order plus boost. */
|
|
20
|
+
rank: number;
|
|
21
|
+
/** Parsed alternatives. */
|
|
22
|
+
chords: ChordSequence[];
|
|
23
|
+
}
|
|
24
|
+
export interface RegistryOptions {
|
|
25
|
+
strict: boolean;
|
|
26
|
+
onClash?: (message: string) => void;
|
|
27
|
+
}
|
|
28
|
+
export interface DefineOwnerOptions {
|
|
29
|
+
parent?: string;
|
|
30
|
+
kind?: OwnerKind;
|
|
31
|
+
available?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare class ShortcutRegistry {
|
|
34
|
+
private entries;
|
|
35
|
+
private owners;
|
|
36
|
+
private seq;
|
|
37
|
+
private version;
|
|
38
|
+
private listeners;
|
|
39
|
+
private warned;
|
|
40
|
+
options: RegistryOptions;
|
|
41
|
+
constructor(options?: Partial<RegistryOptions>);
|
|
42
|
+
subscribe(listener: () => void): () => void;
|
|
43
|
+
getVersion(): number;
|
|
44
|
+
notify(): void;
|
|
45
|
+
/** Declares a Space or a retained view. Ref counted: the last release removes it. */
|
|
46
|
+
defineOwner(id: string, options?: DefineOwnerOptions): () => void;
|
|
47
|
+
setOwnerAvailable(id: string, available: boolean): void;
|
|
48
|
+
private inheritedKind;
|
|
49
|
+
ownerKind(id: string): OwnerKind;
|
|
50
|
+
/** Available when it and every owner above it are available. Unknown owners count as available. */
|
|
51
|
+
isOwnerAvailable(id: string): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Registers a def. Returns an unregister function, or null when the def was dropped (production clash).
|
|
54
|
+
* Strict mode throws NotisKeyClash instead of dropping.
|
|
55
|
+
*/
|
|
56
|
+
register(def: ShortcutDef, owner?: string): (() => void) | null;
|
|
57
|
+
private candidate;
|
|
58
|
+
private reject;
|
|
59
|
+
/** All registered entries, registration order. */
|
|
60
|
+
all(): readonly RegisteredShortcut[];
|
|
61
|
+
/**
|
|
62
|
+
* Entries that may answer a key now: owner available, `when` passing, highest rank first, latest first within a
|
|
63
|
+
* rank. `modalOnly` keeps only the modal scope (an open dialog or menu).
|
|
64
|
+
*/
|
|
65
|
+
active(options?: {
|
|
66
|
+
modalOnly?: boolean;
|
|
67
|
+
}): RegisteredShortcut[];
|
|
68
|
+
/** Help sheet rows: available, not hidden, `when` passing, latest def per id. Space group first, then Notis. */
|
|
69
|
+
helpEntries(): HelpEntry[];
|
|
70
|
+
/** Labels for the help sheet in one language, for tests and text hosts. */
|
|
71
|
+
helpText(locale: Locale): Array<{
|
|
72
|
+
group: ShortcutGroup;
|
|
73
|
+
label: string;
|
|
74
|
+
keys: KeySpec[];
|
|
75
|
+
}>;
|
|
76
|
+
}
|
|
77
|
+
export declare function safeWhen(when: () => boolean): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface StepOptions {
|
|
2
|
+
/** Wrap from the last item to the first (and back). Default true. */
|
|
3
|
+
wrap?: boolean;
|
|
4
|
+
/** The key is held (`event.repeat`): never wrap, stop at the edge. */
|
|
5
|
+
repeat?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Next cursor id for J/K stepping. Wraps only on a fresh press, so holding J stops at the last row instead of
|
|
9
|
+
* spinning back to the top. No cursor: J lands on the first item, K on the last.
|
|
10
|
+
*/
|
|
11
|
+
export declare function stepCursor(ids: readonly string[], cursor: string | null | undefined, delta: number, options?: StepOptions): string | null;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { KeySpec, Locale, Platform, Scope, Words } from '../../words';
|
|
2
|
+
export type { KeySpec, Locale, Platform, Scope, Words };
|
|
3
|
+
export type ShortcutGroup = 'space' | 'notis';
|
|
4
|
+
export interface ShortcutDef {
|
|
5
|
+
/** Stable id: 'list.next', 'space:tickets.triage'. */
|
|
6
|
+
id: string;
|
|
7
|
+
/** One spec or alternatives. */
|
|
8
|
+
keys: KeySpec | KeySpec[];
|
|
9
|
+
scope: Scope;
|
|
10
|
+
label: Words;
|
|
11
|
+
/** Help sheet group. Default 'space' under a Space owner, 'notis' otherwise. */
|
|
12
|
+
group?: ShortcutGroup;
|
|
13
|
+
/** Extra gate, evaluated at dispatch (and when the help sheet opens). */
|
|
14
|
+
when?: () => boolean;
|
|
15
|
+
/** Fire on key repeat (a held key). Default false. */
|
|
16
|
+
repeat?: boolean;
|
|
17
|
+
/** Fire while focus is in a text field. Default false. */
|
|
18
|
+
allowInFields?: boolean;
|
|
19
|
+
/** Not listed in the help sheet. */
|
|
20
|
+
hidden?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Added to the scope order (0 to 99). The selection bar registers its actions at `collection` with
|
|
23
|
+
* `boost: 25` while something is selected, so they win over row keys.
|
|
24
|
+
*/
|
|
25
|
+
boost?: number;
|
|
26
|
+
/** Owner override. Default: the nearest `<ShortcutScope>` (or `useShortcutScope`) above, else 'notis'. */
|
|
27
|
+
owner?: string;
|
|
28
|
+
/** Return false when not handled: the engine keeps looking. */
|
|
29
|
+
run: (event: KeyboardEvent) => void | boolean;
|
|
30
|
+
}
|
|
31
|
+
export type OwnerKind = 'space' | 'host';
|
|
32
|
+
export interface ScopeHandle {
|
|
33
|
+
owner: string;
|
|
34
|
+
available: boolean;
|
|
35
|
+
isAvailable(): boolean;
|
|
36
|
+
}
|
|
37
|
+
export type EngineHost = 'portal' | 'preview';
|
|
38
|
+
export interface EngineSettings {
|
|
39
|
+
host: EngineHost;
|
|
40
|
+
locale: Locale;
|
|
41
|
+
platform: Platform;
|
|
42
|
+
/** Dev and design check: clashes throw. Production: the later def is dropped and logged once. */
|
|
43
|
+
strict: boolean;
|
|
44
|
+
/** Production clash log (telemetry). Default console.warn, once per message. */
|
|
45
|
+
onClash?: (message: string) => void;
|
|
46
|
+
}
|
|
47
|
+
export interface HelpEntry {
|
|
48
|
+
id: string;
|
|
49
|
+
keys: KeySpec[];
|
|
50
|
+
label: Words;
|
|
51
|
+
group: ShortcutGroup;
|
|
52
|
+
scope: Scope;
|
|
53
|
+
owner: string;
|
|
54
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/** Words of the editable fields (EN/FR). Kept with the fields until they move into `src/words`. */
|
|
2
|
+
export declare const FIELD_WORDS: Readonly<{
|
|
3
|
+
save: {
|
|
4
|
+
en: string;
|
|
5
|
+
fr: string;
|
|
6
|
+
};
|
|
7
|
+
saving: {
|
|
8
|
+
en: string;
|
|
9
|
+
fr: string;
|
|
10
|
+
};
|
|
11
|
+
cancel: {
|
|
12
|
+
en: string;
|
|
13
|
+
fr: string;
|
|
14
|
+
};
|
|
15
|
+
unsaved: {
|
|
16
|
+
en: string;
|
|
17
|
+
fr: string;
|
|
18
|
+
};
|
|
19
|
+
changed: {
|
|
20
|
+
en: string;
|
|
21
|
+
fr: string;
|
|
22
|
+
};
|
|
23
|
+
empty: {
|
|
24
|
+
en: string;
|
|
25
|
+
fr: string;
|
|
26
|
+
};
|
|
27
|
+
choose: {
|
|
28
|
+
en: string;
|
|
29
|
+
fr: string;
|
|
30
|
+
};
|
|
31
|
+
edit: {
|
|
32
|
+
en: string;
|
|
33
|
+
fr: string;
|
|
34
|
+
};
|
|
35
|
+
done: {
|
|
36
|
+
en: string;
|
|
37
|
+
fr: string;
|
|
38
|
+
};
|
|
39
|
+
saveFailed: {
|
|
40
|
+
en: string;
|
|
41
|
+
fr: string;
|
|
42
|
+
};
|
|
43
|
+
/** A multi-select's search: the entry that adds the typed text, and the line when nothing matches it. */
|
|
44
|
+
add: {
|
|
45
|
+
en: string;
|
|
46
|
+
fr: string;
|
|
47
|
+
};
|
|
48
|
+
noMatch: {
|
|
49
|
+
en: string;
|
|
50
|
+
fr: string;
|
|
51
|
+
};
|
|
52
|
+
addFailed: {
|
|
53
|
+
en: string;
|
|
54
|
+
fr: string;
|
|
55
|
+
};
|
|
56
|
+
}>;
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Editable fields: facts that edit in place. A form is an `EditableFields` around `FieldRow`s; each row holds a
|
|
3
|
+
* control (`FieldText`, `FieldLongText`, `FieldSelect`, `FieldMultiSelect`, `FieldDisclosure`) or any custom node
|
|
4
|
+
* (a slot). The caller owns the values and the dirty state; once something changed the form shows Save and Cancel.
|
|
5
|
+
* `FieldList` lays rows out the same way without the form (facts that save on their own, a read-only sheet).
|
|
6
|
+
* Styled by the fields section of toolkit.css.
|
|
7
|
+
*
|
|
8
|
+
* Keys: Cmd/Ctrl+Enter saves (also from inside a field); Escape in a field leaves the field, Escape again cancels
|
|
9
|
+
* (an escape layer above the reader and the selection, so unsaved edits go before the reader closes).
|
|
10
|
+
*
|
|
11
|
+
* A save that throws or rejects keeps the draft (the form never resets it) and shows a polite status line in the bar
|
|
12
|
+
* until the next save, a cancel or a clean form. Save shows Saving while the returned promise runs.
|
|
13
|
+
*
|
|
14
|
+
* The bar is sticky at the bottom. Only while it sits in the corner of the floating Notis button (bottom right of the
|
|
15
|
+
* window, from the host's --notis-fab-safe-* vars) does it keep Save clear of the button (data-fab).
|
|
16
|
+
*/
|
|
17
|
+
import { type ReactNode } from 'react';
|
|
18
|
+
import { type Words } from '../../words';
|
|
19
|
+
type Text = Words | string;
|
|
20
|
+
/** Escape cancels unsaved edits before the selection clears and the reader closes. */
|
|
21
|
+
export declare const FIELDS_ESCAPE_PRIORITY: number;
|
|
22
|
+
export declare const FIELDS_SAVE_KEYS = "mod+enter";
|
|
23
|
+
export interface EditableFieldsProps {
|
|
24
|
+
/** Something differs from the saved values: shows Save and Cancel and arms the keys. */
|
|
25
|
+
dirty: boolean;
|
|
26
|
+
saving?: boolean;
|
|
27
|
+
/** Save stays visible but cannot run (a required value is missing). */
|
|
28
|
+
saveDisabled?: boolean;
|
|
29
|
+
/** A rejection (or a throw) keeps the draft and shows FIELD_WORDS.saveFailed, unless `error` says more. */
|
|
30
|
+
onSave: () => void | Promise<unknown>;
|
|
31
|
+
onCancel: () => void;
|
|
32
|
+
/** Shown in the bar, above the buttons (a validation or save error), as a polite status line. */
|
|
33
|
+
error?: ReactNode;
|
|
34
|
+
/** Accessible name of the form. */
|
|
35
|
+
label?: Text;
|
|
36
|
+
/** Under the rows, above the bar (a section the caller draws). */
|
|
37
|
+
footer?: ReactNode;
|
|
38
|
+
children: ReactNode;
|
|
39
|
+
className?: string;
|
|
40
|
+
}
|
|
41
|
+
export declare function EditableFields({ dirty, saving, saveDisabled, onSave, onCancel, error, label, footer, children, className, }: EditableFieldsProps): import("react").JSX.Element;
|
|
42
|
+
export interface FieldListProps {
|
|
43
|
+
/** Accessible name of the rows (a group); leave it out when a heading next to them already names them. */
|
|
44
|
+
label?: Text;
|
|
45
|
+
/**
|
|
46
|
+
* A form a visitor fills in from empty (a signup on a Site): each label sits above its field and every input shows
|
|
47
|
+
* its box at rest, so an empty field never reads as a value.
|
|
48
|
+
*/
|
|
49
|
+
filled?: boolean;
|
|
50
|
+
children: ReactNode;
|
|
51
|
+
className?: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* `FieldRow`s laid out as in a form, without Save and Cancel: facts that save on their own (a select that applies at
|
|
55
|
+
* once) or a read-only sheet. The rows take the same columns and the same narrow-width stacking as in a form.
|
|
56
|
+
*/
|
|
57
|
+
export declare function FieldList({ label, filled, children, className }: FieldListProps): import("react").JSX.Element;
|
|
58
|
+
export interface FieldRowProps {
|
|
59
|
+
label: Text;
|
|
60
|
+
/** One muted line under the value. The control in the row is described by it (aria-describedby). */
|
|
61
|
+
hint?: ReactNode;
|
|
62
|
+
/** Label above the value at every width (long text). */
|
|
63
|
+
stacked?: boolean;
|
|
64
|
+
/** Marks a value that differs from the saved one. */
|
|
65
|
+
changed?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* The value is wrong: the hint reads as the error (destructive text) and a text control in the row is marked
|
|
68
|
+
* aria-invalid. Put what is wrong in `hint`.
|
|
69
|
+
*/
|
|
70
|
+
invalid?: boolean;
|
|
71
|
+
children: ReactNode;
|
|
72
|
+
className?: string;
|
|
73
|
+
}
|
|
74
|
+
export declare function FieldRow({ label, hint, stacked, changed, invalid, children, className }: FieldRowProps): import("react").JSX.Element;
|
|
75
|
+
export interface FieldTextProps {
|
|
76
|
+
value: string;
|
|
77
|
+
onChange: (value: string) => void;
|
|
78
|
+
/** Accessible name (the row label). */
|
|
79
|
+
label: Text;
|
|
80
|
+
placeholder?: Text;
|
|
81
|
+
readOnly?: boolean;
|
|
82
|
+
/** 'title' for the name at the top of a reader. */
|
|
83
|
+
size?: 'default' | 'title';
|
|
84
|
+
maxLength?: number;
|
|
85
|
+
/** The value is wrong (aria-invalid). Default: the row's `invalid`. */
|
|
86
|
+
invalid?: boolean;
|
|
87
|
+
/** Ids of what describes the field (aria-describedby). Default: the row's hint. */
|
|
88
|
+
describedBy?: string;
|
|
89
|
+
className?: string;
|
|
90
|
+
}
|
|
91
|
+
export declare function FieldText({ value, onChange, label, placeholder, readOnly, size, maxLength, invalid, describedBy, className, }: FieldTextProps): import("react").JSX.Element;
|
|
92
|
+
export interface FieldLongTextProps extends Omit<FieldTextProps, 'size'> {
|
|
93
|
+
/**
|
|
94
|
+
* Height in lines where the browser cannot fit the box to its text (no `field-sizing`); default 4. Elsewhere the box
|
|
95
|
+
* fits its text, one line at least.
|
|
96
|
+
*/
|
|
97
|
+
rows?: number;
|
|
98
|
+
}
|
|
99
|
+
export declare function FieldLongText({ value, onChange, label, placeholder, readOnly, maxLength, rows, invalid, describedBy, className, }: FieldLongTextProps): import("react").JSX.Element;
|
|
100
|
+
export interface FieldOption<V extends string> {
|
|
101
|
+
value: V;
|
|
102
|
+
label: Text;
|
|
103
|
+
icon?: ReactNode | string;
|
|
104
|
+
/** Muted words after the label (a cost, a short explanation). */
|
|
105
|
+
hint?: Text;
|
|
106
|
+
disabled?: boolean;
|
|
107
|
+
}
|
|
108
|
+
export interface FieldSelectProps<V extends string> {
|
|
109
|
+
value: V | null;
|
|
110
|
+
options: readonly FieldOption<V>[];
|
|
111
|
+
onChange: (value: V) => void;
|
|
112
|
+
/** Accessible name of the button and its menu. */
|
|
113
|
+
label: Text;
|
|
114
|
+
/** Shown when no option matches `value`. */
|
|
115
|
+
placeholder?: Text;
|
|
116
|
+
readOnly?: boolean;
|
|
117
|
+
/** Shown above the options (an upgrade note). */
|
|
118
|
+
menuHeader?: ReactNode;
|
|
119
|
+
className?: string;
|
|
120
|
+
}
|
|
121
|
+
export declare function FieldSelect<V extends string>({ value, options, onChange, label, placeholder, readOnly, menuHeader, className, }: FieldSelectProps<V>): import("react").JSX.Element;
|
|
122
|
+
export interface FieldMultiSelectProps<V extends string> {
|
|
123
|
+
values: readonly V[];
|
|
124
|
+
options: readonly FieldOption<V>[];
|
|
125
|
+
/** Called with the next values, in the options' order. */
|
|
126
|
+
onChange: (values: V[]) => void;
|
|
127
|
+
label: Text;
|
|
128
|
+
placeholder?: Text;
|
|
129
|
+
/** The last value cannot be removed; `onNeedOne` runs instead. */
|
|
130
|
+
minOne?: boolean;
|
|
131
|
+
onNeedOne?: () => void;
|
|
132
|
+
readOnly?: boolean;
|
|
133
|
+
/** A search box above the options, for long lists (case and accents ignored). Implied by `onAdd`. */
|
|
134
|
+
searchable?: boolean;
|
|
135
|
+
/**
|
|
136
|
+
* Offers to add the typed text as a new option (Add "text") when no option is named exactly that. Return the new
|
|
137
|
+
* option's value to select it, and add the option to `options`. A rejection keeps the typed text and says it failed.
|
|
138
|
+
*/
|
|
139
|
+
onAdd?: (text: string) => V | void | Promise<V | void>;
|
|
140
|
+
className?: string;
|
|
141
|
+
}
|
|
142
|
+
/** Applies a toggle of `value` (pure, for the control and its tests). */
|
|
143
|
+
export declare function toggleFieldValue<V extends string>(values: readonly V[], value: V, order: readonly V[], minOne?: boolean): V[] | null;
|
|
144
|
+
export declare function FieldMultiSelect<V extends string>({ values, options, onChange, label, placeholder, minOne, onNeedOne, readOnly, searchable, onAdd, className, }: FieldMultiSelectProps<V>): import("react").JSX.Element;
|
|
145
|
+
export interface FieldDisclosureProps {
|
|
146
|
+
/**
|
|
147
|
+
* The value as words (shown closed, and on the button while open). A long one (a long day, a schedule) wraps
|
|
148
|
+
* in a narrow reader instead of losing its end.
|
|
149
|
+
*/
|
|
150
|
+
summary: ReactNode;
|
|
151
|
+
/** Accessible name of the button. */
|
|
152
|
+
label: Text;
|
|
153
|
+
/** The editor, shown under the summary while open. */
|
|
154
|
+
children: ReactNode;
|
|
155
|
+
open?: boolean;
|
|
156
|
+
defaultOpen?: boolean;
|
|
157
|
+
onOpenChange?: (open: boolean) => void;
|
|
158
|
+
readOnly?: boolean;
|
|
159
|
+
className?: string;
|
|
160
|
+
}
|
|
161
|
+
export declare function FieldDisclosure({ summary, label, children, open, defaultOpen, onOpenChange, readOnly, className, }: FieldDisclosureProps): import("react").JSX.Element;
|
|
162
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { EditableFields, FIELDS_ESCAPE_PRIORITY, FIELDS_SAVE_KEYS, FieldDisclosure, FieldList, FieldLongText, FieldMultiSelect, FieldRow, FieldSelect, FieldText, toggleFieldValue, } from './fields';
|
|
2
|
+
export type { EditableFieldsProps, FieldDisclosureProps, FieldListProps, FieldLongTextProps, FieldMultiSelectProps, FieldOption, FieldRowProps, FieldSelectProps, FieldTextProps, } from './fields';
|
|
3
|
+
export { FIELD_WORDS } from './fieldWords';
|
|
4
|
+
export { changedFieldKeys, useFieldDraft } from './useFieldDraft';
|
|
5
|
+
export type { FieldDraft } from './useFieldDraft';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A draft of a record for `EditableFields`: edits stay local until Save, Cancel goes back to the saved values, and a
|
|
3
|
+
* new saved record (after a save or a refresh) moves under the draft: fields the user edited keep their edits, every
|
|
4
|
+
* other field takes the new saved value.
|
|
5
|
+
*/
|
|
6
|
+
/** Keys whose values differ (compared as JSON, so arrays and plain objects compare by content). */
|
|
7
|
+
export declare function changedFieldKeys<T extends object>(saved: T, draft: T): Array<keyof T>;
|
|
8
|
+
/**
|
|
9
|
+
* The draft drawn from `previousSaved`, moved onto `saved`: the fields edited since `previousSaved` keep their edits,
|
|
10
|
+
* the others take the new saved values, and a field the saved record no longer has (a removed entry) is dropped.
|
|
11
|
+
*/
|
|
12
|
+
export declare function rebaseFieldDraft<T extends object>(previousSaved: T, draft: T, saved: T): T;
|
|
13
|
+
export interface FieldDraft<T extends object> {
|
|
14
|
+
draft: T;
|
|
15
|
+
set: <K extends keyof T>(key: K, value: T[K]) => void;
|
|
16
|
+
patch: (values: Partial<T>) => void;
|
|
17
|
+
dirty: boolean;
|
|
18
|
+
changed: (key: keyof T) => boolean;
|
|
19
|
+
/** Back to the saved values. */
|
|
20
|
+
reset: () => void;
|
|
21
|
+
}
|
|
22
|
+
export declare function useFieldDraft<T extends object>(saved: T): FieldDraft<T>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The attachment row of Notis conversations: 140px cards (image thumbnail or file icon, name, extension) in a
|
|
3
|
+
* horizontal snap scroller with edge fades. Images open the ImageViewer on the gallery's images; other files open in
|
|
4
|
+
* a new tab unless `onOpen` or `renderOpener` takes them.
|
|
5
|
+
*/
|
|
6
|
+
import { type ReactNode } from 'react';
|
|
7
|
+
import { type Words } from '../../words';
|
|
8
|
+
import { type GalleryNoticeTone, type ImageViewerImage } from './ImageViewer';
|
|
9
|
+
export type GalleryItemKind = 'image' | 'video' | 'audio' | 'pdf' | 'file';
|
|
10
|
+
export interface GalleryItem {
|
|
11
|
+
url?: string | null;
|
|
12
|
+
/** File name shown under the thumbnail. Default `file.<extension>`. */
|
|
13
|
+
name?: string | null;
|
|
14
|
+
/** MIME type, used to tell images from other files. */
|
|
15
|
+
type?: string | null;
|
|
16
|
+
/** Extension without the dot; shown as the badge. Default: taken from the name. */
|
|
17
|
+
extension?: string | null;
|
|
18
|
+
size?: number | null;
|
|
19
|
+
/** Overrides the kind found from `type` and `extension`. */
|
|
20
|
+
kind?: GalleryItemKind;
|
|
21
|
+
/** The card icon for non-images: an icon name or a node. Default: by kind. */
|
|
22
|
+
icon?: ReactNode | string;
|
|
23
|
+
/** A smaller picture for the image card. Default: `url`. */
|
|
24
|
+
thumbnailUrl?: string | null;
|
|
25
|
+
}
|
|
26
|
+
export interface GalleryOpenerProps {
|
|
27
|
+
/** The card class; put it on the element that opens the item. */
|
|
28
|
+
className: string;
|
|
29
|
+
/** The card content (thumbnail, name, badge). */
|
|
30
|
+
children: ReactNode;
|
|
31
|
+
index: number;
|
|
32
|
+
}
|
|
33
|
+
export interface AttachmentGalleryProps<T extends GalleryItem = GalleryItem> {
|
|
34
|
+
items: readonly T[];
|
|
35
|
+
/** Accessible name of the row. Default "Attachments". */
|
|
36
|
+
label?: Words | string;
|
|
37
|
+
className?: string;
|
|
38
|
+
/** Opens a non-image item. Default: its url in a new tab. */
|
|
39
|
+
onOpen?: (item: T, index: number) => void;
|
|
40
|
+
/** Renders a custom opener for an item (a preview pill); return undefined to keep the default button. */
|
|
41
|
+
renderOpener?: (item: T, props: GalleryOpenerProps) => ReactNode | undefined;
|
|
42
|
+
/** A small button in the card's top right corner (for example share). */
|
|
43
|
+
itemAction?: (item: T, index: number) => ReactNode;
|
|
44
|
+
/** Extra buttons in the image viewer's control bar. */
|
|
45
|
+
viewerActions?: (image: ImageViewerImage, index: number) => ReactNode;
|
|
46
|
+
/** Copy and download outcomes from the image viewer. */
|
|
47
|
+
onNotice?: (tone: GalleryNoticeTone, text: string) => void;
|
|
48
|
+
}
|
|
49
|
+
/** The kind of an attachment, from its MIME type and extension (a webm voice note is audio). */
|
|
50
|
+
export declare function galleryItemKind(item: GalleryItem): GalleryItemKind;
|
|
51
|
+
/** The name a card shows. */
|
|
52
|
+
export declare function galleryItemName(item: GalleryItem): string;
|
|
53
|
+
export declare function AttachmentGallery<T extends GalleryItem = GalleryItem>({ items, label, className, onOpen, renderOpener, itemAction, viewerActions, onNotice, }: AttachmentGalleryProps<T>): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Full-screen image viewer (the Portal's attachment lightbox): zoom (buttons, wheel, + - 0), drag to pan, arrows
|
|
3
|
+
* between images, download, copy link, Escape or a backdrop click to close. Modal: focus moves in, Tab stays inside,
|
|
4
|
+
* and focus returns on close.
|
|
5
|
+
*/
|
|
6
|
+
import { type ReactNode } from 'react';
|
|
7
|
+
export interface ImageViewerImage {
|
|
8
|
+
src: string;
|
|
9
|
+
/** Alt text, also the download file name. */
|
|
10
|
+
alt?: string;
|
|
11
|
+
}
|
|
12
|
+
export type GalleryNoticeTone = 'success' | 'error';
|
|
13
|
+
export interface ImageViewerProps {
|
|
14
|
+
images: readonly ImageViewerImage[];
|
|
15
|
+
/** The image shown first. Default 0. */
|
|
16
|
+
initialIndex?: number;
|
|
17
|
+
onClose: () => void;
|
|
18
|
+
/** Where the viewer mounts. Default: the pinned layer root, else the page body (inside a Space: its layer root). */
|
|
19
|
+
container?: Element | DocumentFragment | null;
|
|
20
|
+
/** Extra buttons placed first in the control bar for the current image (for example a share button). */
|
|
21
|
+
actions?: (image: ImageViewerImage, index: number) => ReactNode;
|
|
22
|
+
/** Reports copy and download outcomes (a toast). The copy button also shows a check for a moment. */
|
|
23
|
+
onNotice?: (tone: GalleryNoticeTone, text: string) => void;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare const IMAGE_VIEWER_ZOOM_LEVELS: readonly number[];
|
|
27
|
+
export declare function ImageViewer({ container, ...props }: ImageViewerProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/** EN/FR words of the attachment gallery and the image viewer. */
|
|
2
|
+
export declare const GALLERY_WORDS: Readonly<{
|
|
3
|
+
attachments: {
|
|
4
|
+
en: string;
|
|
5
|
+
fr: string;
|
|
6
|
+
};
|
|
7
|
+
open: {
|
|
8
|
+
en: string;
|
|
9
|
+
fr: string;
|
|
10
|
+
};
|
|
11
|
+
scrollBack: {
|
|
12
|
+
en: string;
|
|
13
|
+
fr: string;
|
|
14
|
+
};
|
|
15
|
+
scrollForward: {
|
|
16
|
+
en: string;
|
|
17
|
+
fr: string;
|
|
18
|
+
};
|
|
19
|
+
viewer: {
|
|
20
|
+
en: string;
|
|
21
|
+
fr: string;
|
|
22
|
+
};
|
|
23
|
+
previous: {
|
|
24
|
+
en: string;
|
|
25
|
+
fr: string;
|
|
26
|
+
};
|
|
27
|
+
previousHint: {
|
|
28
|
+
en: string;
|
|
29
|
+
fr: string;
|
|
30
|
+
};
|
|
31
|
+
next: {
|
|
32
|
+
en: string;
|
|
33
|
+
fr: string;
|
|
34
|
+
};
|
|
35
|
+
nextHint: {
|
|
36
|
+
en: string;
|
|
37
|
+
fr: string;
|
|
38
|
+
};
|
|
39
|
+
counter: {
|
|
40
|
+
en: string;
|
|
41
|
+
fr: string;
|
|
42
|
+
};
|
|
43
|
+
zoomIn: {
|
|
44
|
+
en: string;
|
|
45
|
+
fr: string;
|
|
46
|
+
};
|
|
47
|
+
zoomInHint: {
|
|
48
|
+
en: string;
|
|
49
|
+
fr: string;
|
|
50
|
+
};
|
|
51
|
+
zoomOut: {
|
|
52
|
+
en: string;
|
|
53
|
+
fr: string;
|
|
54
|
+
};
|
|
55
|
+
zoomOutHint: {
|
|
56
|
+
en: string;
|
|
57
|
+
fr: string;
|
|
58
|
+
};
|
|
59
|
+
resetZoom: {
|
|
60
|
+
en: string;
|
|
61
|
+
fr: string;
|
|
62
|
+
};
|
|
63
|
+
fit: {
|
|
64
|
+
en: string;
|
|
65
|
+
fr: string;
|
|
66
|
+
};
|
|
67
|
+
download: {
|
|
68
|
+
en: string;
|
|
69
|
+
fr: string;
|
|
70
|
+
};
|
|
71
|
+
copyLink: {
|
|
72
|
+
en: string;
|
|
73
|
+
fr: string;
|
|
74
|
+
};
|
|
75
|
+
linkCopied: {
|
|
76
|
+
en: string;
|
|
77
|
+
fr: string;
|
|
78
|
+
};
|
|
79
|
+
copyFailed: {
|
|
80
|
+
en: string;
|
|
81
|
+
fr: string;
|
|
82
|
+
};
|
|
83
|
+
downloadFailed: {
|
|
84
|
+
en: string;
|
|
85
|
+
fr: string;
|
|
86
|
+
};
|
|
87
|
+
close: {
|
|
88
|
+
en: string;
|
|
89
|
+
fr: string;
|
|
90
|
+
};
|
|
91
|
+
closeHint: {
|
|
92
|
+
en: string;
|
|
93
|
+
fr: string;
|
|
94
|
+
};
|
|
95
|
+
}>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { AttachmentGallery, galleryItemKind, galleryItemName } from './AttachmentGallery';
|
|
2
|
+
export type { AttachmentGalleryProps, GalleryItem, GalleryItemKind, GalleryOpenerProps } from './AttachmentGallery';
|
|
3
|
+
export { IMAGE_VIEWER_ZOOM_LEVELS, ImageViewer } from './ImageViewer';
|
|
4
|
+
export type { GalleryNoticeTone, ImageViewerImage, ImageViewerProps } from './ImageViewer';
|
|
5
|
+
export { GALLERY_WORDS } from './galleryWords';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The toolkit's built-in icons: a small inline SVG set under the Phosphor names the action catalogue uses, so the
|
|
3
|
+
* toolkit has no icon dependency. Every `icon` prop also takes any ReactNode (a Phosphor component, for example).
|
|
4
|
+
*/
|
|
5
|
+
import React, { type ReactNode } from 'react';
|
|
6
|
+
export declare function hasIcon(name: string): boolean;
|
|
7
|
+
/** A built-in icon by name; an unknown name renders nothing. Decorative: the control carries the label. */
|
|
8
|
+
export declare function Icon({ name, className }: {
|
|
9
|
+
name: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
}): React.JSX.Element | null;
|
|
12
|
+
/** Renders an `icon` prop: a name from the set, or any node the caller passes. */
|
|
13
|
+
export declare function renderIcon(icon: ReactNode | string | undefined, className?: string): ReactNode;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @notis/sdk/ui - the Notis toolkit.
|
|
3
|
+
*
|
|
4
|
+
* Host-provided: a Space bundle never contains this code. Its build
|
|
5
|
+
* externalizes `@notis/sdk/ui` and the host shares its own instance as
|
|
6
|
+
* `window.__NotisSDKUI` (see ../runtimeModules.ts). Toolkit modules append
|
|
7
|
+
* their export lines below.
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
10
|
+
export * from './layout';
|
|
11
|
+
export * from './engine';
|
|
12
|
+
export * from './keycap';
|
|
13
|
+
export * from './overlay';
|
|
14
|
+
export * from './list';
|
|
15
|
+
export * from './board';
|
|
16
|
+
export * from './actions';
|
|
17
|
+
export * from './open';
|
|
18
|
+
export * from './blocks';
|
|
19
|
+
export * from './gallery';
|
|
20
|
+
export { Icon, hasIcon, renderIcon } from './icons';
|
|
21
|
+
export { adoptToolkitStyles, getToolkitStyleSheet, getToolkitStyleText, registerToolkitStyles } from './styles';
|
|
22
|
+
export { COMPARES, DEFAULT_COMPARE, DEFAULT_PRESET, PRESETS, compareRange, customPeriod, dayCount, formatPeriodParam, fromIsoDay, isCompareId, isPresetId, normalizePeriod, parsePeriodParam, periodRanges, presetRange, samePeriod, toIsoDay, } from './period/periods';
|
|
23
|
+
export type { CompareId, DateRange as PeriodRange, Period, PresetId } from './period/periods';
|
|
24
|
+
export { dayNumberLabel, formatDateRange, formatDayHeading, formatDelta, formatLongDay, formatMonthYear, formatNumber, formatShortDay, formatValue, intlLocale, weekdayNames, } from './period/dateFormat';
|
|
25
|
+
export type { Delta, DeltaTone } from './period/dateFormat';
|
|
26
|
+
export { CALENDAR_WORDS, CHART_WORDS, COMPARE_WORDS, PERIOD_WORDS, PRESET_WORDS, TIMELINE_WORDS, VS_WORDS, } from './period/dateWords';
|
|
27
|
+
export { usePeriod } from './period/usePeriod';
|
|
28
|
+
export type { UsePeriodOptions, UsePeriodResult } from './period/usePeriod';
|
|
29
|
+
export { PERIOD_PICKER_TWO_MONTHS_MIN, PeriodPicker } from './period/PeriodPicker';
|
|
30
|
+
export type { PeriodPickerProps } from './period/PeriodPicker';
|
|
31
|
+
export { DayPicker } from './calendar/DayPicker';
|
|
32
|
+
export type { DateRange, DayPickerProps, Matcher } from './calendar/DayPicker';
|
|
33
|
+
export { CALENDAR_NARROW_MAX, CALENDAR_TRAY_SIDE_MIN, CalendarView } from './calendar/CalendarView';
|
|
34
|
+
export type { CalendarItemVariant, CalendarViewProps } from './calendar/CalendarView';
|
|
35
|
+
export { CALENDAR_VIEWS } from './calendar/calendarMath';
|
|
36
|
+
export type { CalendarViewKind } from './calendar/calendarMath';
|
|
37
|
+
export { TIMELINE_ZOOMS, layoutTimeline, timelineWindow } from './timeline/timelineMath';
|
|
38
|
+
export type { TimelineLaneInfo, TimelineWindow, TimelineZoom } from './timeline/timelineMath';
|
|
39
|
+
export { TimelineView } from './timeline/TimelineView';
|
|
40
|
+
export type { TimelineViewProps } from './timeline/TimelineView';
|
|
41
|
+
export { Chart, ChartContainer, ChartLegend, ChartStyle, ChartTooltip, ChartTooltipContent, barLabel, barShape, seriesColor, useChart, } from './charts/Chart';
|
|
42
|
+
export type { ChartConfig, ChartContainerProps, ChartKind, ChartLegendItem, ChartLegendProps, ChartProps, ChartSeries, ChartTooltipContentProps, } from './charts/Chart';
|
|
43
|
+
export { buildBins, binUnit, periodSeries, sparkPaths, total } from './charts/chartData';
|
|
44
|
+
export type { Bin, BinUnit, DatedPoint, PeriodChartRow, PeriodSeriesInput } from './charts/chartData';
|
|
45
|
+
export { StatRow, metricView } from './charts/StatRow';
|
|
46
|
+
export type { StatMetric, StatRowProps } from './charts/StatRow';
|
|
47
|
+
export { ChartTable, Sparkline } from './charts/ChartTable';
|
|
48
|
+
export type { ChartTableProps, SparklineProps } from './charts/ChartTable';
|
|
49
|
+
export { RenderChartData } from './charts/RenderChartData';
|
|
50
|
+
export type { RenderChartDataProps } from './charts/RenderChartData';
|
|
51
|
+
export { Area, AreaChart, Bar, BarChart, CartesianGrid, Cell, ComposedChart, LabelList, Legend, Line, LineChart, Pie, PieChart, ReferenceDot, ReferenceLine, ResponsiveContainer, Scatter, XAxis, YAxis, } from './charts/Chart';
|
|
52
|
+
export * from './fields';
|
|
53
|
+
export * from './comments';
|
|
54
|
+
export * from './present';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keycap (toolkit spec 2.2): how a shortcut reads on screen, the same on every Notis surface. Caps are aria-hidden;
|
|
3
|
+
* screen readers get the spelled-out words ("Command A", "G then I").
|
|
4
|
+
*/
|
|
5
|
+
import { type ReactNode } from 'react';
|
|
6
|
+
import { type KeySpec } from '../../words';
|
|
7
|
+
import type { KeycapOn } from '../engine/keycapContext';
|
|
8
|
+
export type { KeycapOn };
|
|
9
|
+
export interface KeycapProps {
|
|
10
|
+
keys: KeySpec | readonly KeySpec[];
|
|
11
|
+
/** Surface the caps sit on. Default from the nearest `KeycapSurface`, else 'surface'. */
|
|
12
|
+
on?: KeycapOn;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function Keycap({ keys, on, className }: KeycapProps): import("react").JSX.Element | null;
|
|
16
|
+
/** Sets the default `on` of every Keycap below (SelectionBar: pill, menus and the help sheet: discreet). */
|
|
17
|
+
export declare function KeycapSurface({ on, children }: {
|
|
18
|
+
on: KeycapOn;
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
21
|
+
/** The shortcut as text in the toolkit locale and platform ("⇧E", "Ctrl+A", "G then I"), for tooltips and titles. */
|
|
22
|
+
export declare function useKeyLabel(keys: KeySpec | readonly KeySpec[]): string;
|