@notis_ai/cli 0.2.14 → 0.2.15
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 +82 -20
- package/dist/agent-hooks/notis-agent-hook.mjs +19750 -0
- package/{skills → dist/base-skills}/notis-apps/SKILL.md +84 -53
- package/{skills → dist/base-skills}/notis-cli/SKILL.md +9 -9
- package/dist/base-skills/notis-query/SKILL.md +705 -0
- package/dist/skill-sync/index.js +1528 -0
- package/dist/skill-sync/index.js.map +7 -0
- package/package.json +5 -2
- package/skills/notis-apps/cli.md +38 -17
- package/skills/notis-cli/AGENT_INSTRUCTIONS.md +39 -0
- package/skills/notis-onboarding/BRIEF.md +16 -0
- package/src/agent-hook-entry.js +5 -0
- package/src/cli.js +23 -14
- package/src/command-specs/agents.js +392 -0
- package/src/command-specs/apps.js +871 -387
- package/src/command-specs/auth.js +63 -10
- package/src/command-specs/index.js +6 -0
- package/src/command-specs/onboarding.js +69 -5
- package/src/command-specs/skills.js +56 -0
- package/src/runtime/agent-memory-state.js +126 -0
- package/src/runtime/agent-setup.js +383 -0
- package/src/runtime/app-dev-consumers.js +154 -0
- package/src/runtime/app-dev-host-lock.js +80 -0
- package/src/runtime/app-dev-roots.js +284 -0
- package/src/runtime/app-dev-server.js +212 -22
- package/src/runtime/app-dev-sessions.js +105 -145
- package/src/runtime/app-platform.js +1291 -165
- package/src/runtime/app-registry-scaffolds.js +367 -0
- package/src/runtime/base-skills.d.ts +20 -0
- package/src/runtime/base-skills.js +167 -0
- package/src/runtime/login-listener.js +15 -0
- package/src/runtime/oauth.js +1506 -141
- package/src/runtime/output.js +7 -0
- package/src/runtime/ports.js +16 -0
- package/src/runtime/profiles.js +0 -5
- package/src/runtime/skill-sync/cloud-client.ts +96 -0
- package/src/runtime/skill-sync/index.ts +644 -0
- package/src/runtime/skill-sync/local-scanner.ts +1046 -0
- package/src/runtime/skill-sync/symlink-manager.ts +383 -0
- package/src/runtime/skill-sync/sync-plan.ts +22 -0
- package/src/runtime/skill-sync/types.ts +103 -0
- package/src/runtime/skill-sync/write-cloud-skill.ts +50 -0
- package/src/runtime/store-screenshot.js +6 -1
- package/src/runtime/sync-skills.d.ts +37 -0
- package/src/runtime/sync-skills.js +215 -0
- package/template/app/layout.tsx +5 -1
- package/template/notis.config.ts +1 -0
- package/template/packages/sdk/package.json +2 -1
- package/template/packages/sdk/src/components/DocumentEditor.tsx +13 -3
- package/template/packages/sdk/src/components/MarkdownEditor.tsx +121 -0
- package/template/packages/sdk/src/components/MultiSelectActionBar.tsx +37 -119
- package/template/packages/sdk/src/components/MultiSelectCheckbox.tsx +5 -1
- package/template/packages/sdk/src/components/MultiSelectDragOverlay.tsx +1 -1
- package/template/packages/sdk/src/components/NotisSelectionBoundary.tsx +55 -0
- package/template/packages/sdk/src/components/ShortcutHints.tsx +56 -0
- package/template/packages/sdk/src/config.ts +19 -0
- package/template/packages/sdk/src/documents.ts +7 -1
- package/template/packages/sdk/src/hooks/useActiveResource.ts +19 -0
- package/template/packages/sdk/src/hooks/useCollectionInteractions.ts +709 -0
- package/template/packages/sdk/src/hooks/useHandover.ts +3 -0
- package/template/packages/sdk/src/hooks/useMultiSelect.ts +44 -482
- package/template/packages/sdk/src/hooks/useTool.ts +5 -4
- package/template/packages/sdk/src/index.ts +47 -2
- package/template/packages/sdk/src/interactions/actions.ts +46 -0
- package/template/packages/sdk/src/interactions/shortcuts.tsx +628 -0
- package/template/packages/sdk/src/interactions.ts +41 -0
- package/template/packages/sdk/src/provider.tsx +2 -1
- package/template/packages/sdk/src/runtime.ts +89 -4
- package/dist/scaffolds/notis-database/CHANGELOG.md +0 -5
- package/dist/scaffolds/notis-database/app/globals.css +0 -44
- package/dist/scaffolds/notis-database/app/layout.tsx +0 -6
- package/dist/scaffolds/notis-database/app/page.tsx +0 -1088
- package/dist/scaffolds/notis-database/components/ui/badge.tsx +0 -28
- package/dist/scaffolds/notis-database/components/ui/button.tsx +0 -53
- package/dist/scaffolds/notis-database/components/ui/card.tsx +0 -56
- package/dist/scaffolds/notis-database/components/ui/table.tsx +0 -120
- package/dist/scaffolds/notis-database/components.json +0 -20
- package/dist/scaffolds/notis-database/index.html +0 -12
- package/dist/scaffolds/notis-database/lib/types.ts +0 -132
- package/dist/scaffolds/notis-database/lib/utils.ts +0 -6
- package/dist/scaffolds/notis-database/metadata/screenshot-1.png +0 -0
- package/dist/scaffolds/notis-database/metadata/screenshot-2.png +0 -0
- package/dist/scaffolds/notis-database/metadata/screenshot-3.png +0 -0
- package/dist/scaffolds/notis-database/metadata/screenshot-4.png +0 -0
- package/dist/scaffolds/notis-database/metadata/screenshot-5.png +0 -0
- package/dist/scaffolds/notis-database/metadata/screenshot-fixtures.json +0 -1839
- package/dist/scaffolds/notis-database/notis.config.ts +0 -73
- package/dist/scaffolds/notis-database/package-lock.json +0 -3935
- package/dist/scaffolds/notis-database/package.json +0 -32
- package/dist/scaffolds/notis-database/packages/sdk/package.json +0 -36
- package/dist/scaffolds/notis-database/packages/sdk/src/components/DocumentEditor.tsx +0 -93
- package/dist/scaffolds/notis-database/packages/sdk/src/components/Markdown.tsx +0 -60
- package/dist/scaffolds/notis-database/packages/sdk/src/components/MultiSelectActionBar.tsx +0 -278
- package/dist/scaffolds/notis-database/packages/sdk/src/components/MultiSelectCheckbox.tsx +0 -91
- package/dist/scaffolds/notis-database/packages/sdk/src/components/MultiSelectDragOverlay.tsx +0 -39
- package/dist/scaffolds/notis-database/packages/sdk/src/config.ts +0 -234
- package/dist/scaffolds/notis-database/packages/sdk/src/documents.ts +0 -250
- package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useBackend.ts +0 -41
- package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useCloudComputer.ts +0 -97
- package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useDatabaseSchema.ts +0 -85
- package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useDatabaseSubscription.ts +0 -76
- package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useDocument.ts +0 -78
- package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useDocuments.ts +0 -121
- package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useHandover.ts +0 -75
- package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useMultiSelect.ts +0 -539
- package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useNotis.ts +0 -34
- package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useNotisNavigation.ts +0 -49
- package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useTool.ts +0 -64
- package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useTools.ts +0 -56
- package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useTopBarSearch.ts +0 -73
- package/dist/scaffolds/notis-database/packages/sdk/src/hooks/useUpsertDocument.ts +0 -95
- package/dist/scaffolds/notis-database/packages/sdk/src/index.ts +0 -100
- package/dist/scaffolds/notis-database/packages/sdk/src/provider.tsx +0 -43
- package/dist/scaffolds/notis-database/packages/sdk/src/runtime.ts +0 -351
- package/dist/scaffolds/notis-database/packages/sdk/src/styles.css +0 -186
- package/dist/scaffolds/notis-database/packages/sdk/src/ui.ts +0 -15
- package/dist/scaffolds/notis-database/packages/sdk/src/vite.ts +0 -56
- package/dist/scaffolds/notis-database/packages/sdk/tsconfig.json +0 -15
- package/dist/scaffolds/notis-database/postcss.config.mjs +0 -8
- package/dist/scaffolds/notis-database/src/dev-main.tsx +0 -23
- package/dist/scaffolds/notis-database/src/mock-runtime.ts +0 -561
- package/dist/scaffolds/notis-database/tailwind.config.ts +0 -59
- package/dist/scaffolds/notis-database/tsconfig.json +0 -23
- package/dist/scaffolds/notis-database/vite.config.ts +0 -22
- package/dist/scaffolds/notis-journal/CHANGELOG.md +0 -29
- package/dist/scaffolds/notis-journal/app/globals.css +0 -37
- package/dist/scaffolds/notis-journal/app/insights/page.tsx +0 -513
- package/dist/scaffolds/notis-journal/app/journal-core.tsx +0 -362
- package/dist/scaffolds/notis-journal/app/journal-ui.tsx +0 -337
- package/dist/scaffolds/notis-journal/app/layout.tsx +0 -6
- package/dist/scaffolds/notis-journal/app/page.tsx +0 -486
- package/dist/scaffolds/notis-journal/components/ui/badge.tsx +0 -28
- package/dist/scaffolds/notis-journal/components/ui/button.tsx +0 -53
- package/dist/scaffolds/notis-journal/components/ui/card.tsx +0 -56
- package/dist/scaffolds/notis-journal/components.json +0 -20
- package/dist/scaffolds/notis-journal/index.html +0 -12
- package/dist/scaffolds/notis-journal/lib/utils.ts +0 -6
- package/dist/scaffolds/notis-journal/metadata/screenshot-1.png +0 -0
- package/dist/scaffolds/notis-journal/metadata/screenshot-2.png +0 -0
- package/dist/scaffolds/notis-journal/metadata/screenshot-3.png +0 -0
- package/dist/scaffolds/notis-journal/metadata/screenshot-4.png +0 -0
- package/dist/scaffolds/notis-journal/metadata/screenshot-5.png +0 -0
- package/dist/scaffolds/notis-journal/metadata/screenshot-6.png +0 -0
- package/dist/scaffolds/notis-journal/metadata/screenshot-fixtures.json +0 -132
- package/dist/scaffolds/notis-journal/notis.config.ts +0 -93
- package/dist/scaffolds/notis-journal/package-lock.json +0 -4615
- package/dist/scaffolds/notis-journal/package.json +0 -34
- package/dist/scaffolds/notis-journal/packages/sdk/package.json +0 -36
- package/dist/scaffolds/notis-journal/packages/sdk/src/components/DocumentEditor.tsx +0 -93
- package/dist/scaffolds/notis-journal/packages/sdk/src/components/Markdown.tsx +0 -60
- package/dist/scaffolds/notis-journal/packages/sdk/src/components/MultiSelectActionBar.tsx +0 -278
- package/dist/scaffolds/notis-journal/packages/sdk/src/components/MultiSelectCheckbox.tsx +0 -91
- package/dist/scaffolds/notis-journal/packages/sdk/src/components/MultiSelectDragOverlay.tsx +0 -39
- package/dist/scaffolds/notis-journal/packages/sdk/src/config.ts +0 -234
- package/dist/scaffolds/notis-journal/packages/sdk/src/documents.ts +0 -250
- package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useBackend.ts +0 -41
- package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useCloudComputer.ts +0 -97
- package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useDatabaseSchema.ts +0 -85
- package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useDatabaseSubscription.ts +0 -76
- package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useDocument.ts +0 -78
- package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useDocuments.ts +0 -121
- package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useHandover.ts +0 -75
- package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useMultiSelect.ts +0 -539
- package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useNotis.ts +0 -34
- package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useNotisNavigation.ts +0 -49
- package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useTool.ts +0 -64
- package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useTools.ts +0 -56
- package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useTopBarSearch.ts +0 -73
- package/dist/scaffolds/notis-journal/packages/sdk/src/hooks/useUpsertDocument.ts +0 -95
- package/dist/scaffolds/notis-journal/packages/sdk/src/index.ts +0 -100
- package/dist/scaffolds/notis-journal/packages/sdk/src/provider.tsx +0 -43
- package/dist/scaffolds/notis-journal/packages/sdk/src/runtime.ts +0 -351
- package/dist/scaffolds/notis-journal/packages/sdk/src/styles.css +0 -186
- package/dist/scaffolds/notis-journal/packages/sdk/src/ui.ts +0 -15
- package/dist/scaffolds/notis-journal/packages/sdk/src/vite.ts +0 -56
- package/dist/scaffolds/notis-journal/packages/sdk/tsconfig.json +0 -15
- package/dist/scaffolds/notis-journal/postcss.config.mjs +0 -8
- package/dist/scaffolds/notis-journal/skills/journal-onboarding/SKILL.md +0 -120
- package/dist/scaffolds/notis-journal/src/dev-main.tsx +0 -58
- package/dist/scaffolds/notis-journal/src/mock-runtime.ts +0 -199
- package/dist/scaffolds/notis-journal/tailwind.config.ts +0 -58
- package/dist/scaffolds/notis-journal/tsconfig.json +0 -23
- package/dist/scaffolds/notis-journal/vite.config.ts +0 -10
- package/dist/scaffolds/notis-notes/CHANGELOG.md +0 -5
- package/dist/scaffolds/notis-notes/app/globals.css +0 -3
- package/dist/scaffolds/notis-notes/app/layout.tsx +0 -6
- package/dist/scaffolds/notis-notes/app/page.tsx +0 -1943
- package/dist/scaffolds/notis-notes/app/phosphor-icons.ts +0 -596
- package/dist/scaffolds/notis-notes/components/ui/badge.tsx +0 -28
- package/dist/scaffolds/notis-notes/components/ui/button.tsx +0 -53
- package/dist/scaffolds/notis-notes/components/ui/card.tsx +0 -56
- package/dist/scaffolds/notis-notes/components.json +0 -20
- package/dist/scaffolds/notis-notes/lib/utils.ts +0 -6
- package/dist/scaffolds/notis-notes/lib/visible-properties.ts +0 -144
- package/dist/scaffolds/notis-notes/metadata/screenshot-1.png +0 -0
- package/dist/scaffolds/notis-notes/metadata/screenshot-2.png +0 -0
- package/dist/scaffolds/notis-notes/metadata/screenshot-3.png +0 -0
- package/dist/scaffolds/notis-notes/metadata/screenshot-4.png +0 -0
- package/dist/scaffolds/notis-notes/metadata/screenshot-5.png +0 -0
- package/dist/scaffolds/notis-notes/metadata/screenshot-fixtures.json +0 -752
- package/dist/scaffolds/notis-notes/notis.config.ts +0 -80
- package/dist/scaffolds/notis-notes/package-lock.json +0 -4636
- package/dist/scaffolds/notis-notes/package.json +0 -35
- package/dist/scaffolds/notis-notes/packages/sdk/package.json +0 -36
- package/dist/scaffolds/notis-notes/packages/sdk/src/components/DocumentEditor.tsx +0 -93
- package/dist/scaffolds/notis-notes/packages/sdk/src/components/Markdown.tsx +0 -60
- package/dist/scaffolds/notis-notes/packages/sdk/src/components/MultiSelectActionBar.tsx +0 -278
- package/dist/scaffolds/notis-notes/packages/sdk/src/components/MultiSelectCheckbox.tsx +0 -91
- package/dist/scaffolds/notis-notes/packages/sdk/src/components/MultiSelectDragOverlay.tsx +0 -39
- package/dist/scaffolds/notis-notes/packages/sdk/src/config.ts +0 -234
- package/dist/scaffolds/notis-notes/packages/sdk/src/documents.ts +0 -250
- package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useBackend.ts +0 -41
- package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useCloudComputer.ts +0 -97
- package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useDatabaseSchema.ts +0 -85
- package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useDatabaseSubscription.ts +0 -76
- package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useDocument.ts +0 -78
- package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useDocuments.ts +0 -121
- package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useHandover.ts +0 -75
- package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useMultiSelect.ts +0 -539
- package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useNotis.ts +0 -34
- package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useNotisNavigation.ts +0 -49
- package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useTool.ts +0 -64
- package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useTools.ts +0 -56
- package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useTopBarSearch.ts +0 -73
- package/dist/scaffolds/notis-notes/packages/sdk/src/hooks/useUpsertDocument.ts +0 -95
- package/dist/scaffolds/notis-notes/packages/sdk/src/index.ts +0 -100
- package/dist/scaffolds/notis-notes/packages/sdk/src/provider.tsx +0 -43
- package/dist/scaffolds/notis-notes/packages/sdk/src/runtime.ts +0 -351
- package/dist/scaffolds/notis-notes/packages/sdk/src/styles.css +0 -186
- package/dist/scaffolds/notis-notes/packages/sdk/src/ui.ts +0 -15
- package/dist/scaffolds/notis-notes/packages/sdk/src/vite.ts +0 -56
- package/dist/scaffolds/notis-notes/packages/sdk/tsconfig.json +0 -15
- package/dist/scaffolds/notis-notes/postcss.config.mjs +0 -8
- package/dist/scaffolds/notis-notes/tailwind.config.ts +0 -58
- package/dist/scaffolds/notis-notes/tsconfig.json +0 -23
- package/dist/scaffolds/notis-notes/vite.config.ts +0 -10
- package/dist/scaffolds/notis-random/CHANGELOG.md +0 -15
- package/dist/scaffolds/notis-random/README.md +0 -33
- package/dist/scaffolds/notis-random/app/globals.css +0 -11
- package/dist/scaffolds/notis-random/app/history/page.tsx +0 -67
- package/dist/scaffolds/notis-random/app/layout.tsx +0 -7
- package/dist/scaffolds/notis-random/app/page.tsx +0 -289
- package/dist/scaffolds/notis-random/components/ui/button.tsx +0 -50
- package/dist/scaffolds/notis-random/components/ui/card.tsx +0 -16
- package/dist/scaffolds/notis-random/components/ui/input.tsx +0 -23
- package/dist/scaffolds/notis-random/components.json +0 -20
- package/dist/scaffolds/notis-random/index.html +0 -12
- package/dist/scaffolds/notis-random/lib/notis-tools.ts +0 -128
- package/dist/scaffolds/notis-random/lib/rng.ts +0 -202
- package/dist/scaffolds/notis-random/lib/roll-record.ts +0 -189
- package/dist/scaffolds/notis-random/lib/utils.ts +0 -25
- package/dist/scaffolds/notis-random/metadata/screenshot-1.png +0 -0
- package/dist/scaffolds/notis-random/metadata/screenshot-2.png +0 -0
- package/dist/scaffolds/notis-random/metadata/screenshot-3.png +0 -0
- package/dist/scaffolds/notis-random/metadata/screenshot-4.png +0 -0
- package/dist/scaffolds/notis-random/metadata/screenshot-5.png +0 -0
- package/dist/scaffolds/notis-random/metadata/screenshot-fixtures.json +0 -753
- package/dist/scaffolds/notis-random/notis.config.ts +0 -86
- package/dist/scaffolds/notis-random/package-lock.json +0 -4513
- package/dist/scaffolds/notis-random/package.json +0 -36
- package/dist/scaffolds/notis-random/packages/sdk/package.json +0 -36
- package/dist/scaffolds/notis-random/packages/sdk/src/components/DocumentEditor.tsx +0 -93
- package/dist/scaffolds/notis-random/packages/sdk/src/components/Markdown.tsx +0 -60
- package/dist/scaffolds/notis-random/packages/sdk/src/components/MultiSelectActionBar.tsx +0 -278
- package/dist/scaffolds/notis-random/packages/sdk/src/components/MultiSelectCheckbox.tsx +0 -91
- package/dist/scaffolds/notis-random/packages/sdk/src/components/MultiSelectDragOverlay.tsx +0 -39
- package/dist/scaffolds/notis-random/packages/sdk/src/config.ts +0 -234
- package/dist/scaffolds/notis-random/packages/sdk/src/documents.ts +0 -250
- package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useBackend.ts +0 -41
- package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useCloudComputer.ts +0 -97
- package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useDatabaseSchema.ts +0 -85
- package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useDatabaseSubscription.ts +0 -76
- package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useDocument.ts +0 -78
- package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useDocuments.ts +0 -121
- package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useHandover.ts +0 -75
- package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useMultiSelect.ts +0 -539
- package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useNotis.ts +0 -34
- package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useNotisNavigation.ts +0 -49
- package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useTool.ts +0 -64
- package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useTools.ts +0 -56
- package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useTopBarSearch.ts +0 -73
- package/dist/scaffolds/notis-random/packages/sdk/src/hooks/useUpsertDocument.ts +0 -95
- package/dist/scaffolds/notis-random/packages/sdk/src/index.ts +0 -100
- package/dist/scaffolds/notis-random/packages/sdk/src/provider.tsx +0 -43
- package/dist/scaffolds/notis-random/packages/sdk/src/runtime.ts +0 -351
- package/dist/scaffolds/notis-random/packages/sdk/src/styles.css +0 -186
- package/dist/scaffolds/notis-random/packages/sdk/src/ui.ts +0 -15
- package/dist/scaffolds/notis-random/packages/sdk/src/vite.ts +0 -56
- package/dist/scaffolds/notis-random/packages/sdk/tsconfig.json +0 -15
- package/dist/scaffolds/notis-random/postcss.config.mjs +0 -6
- package/dist/scaffolds/notis-random/src/dev-main.tsx +0 -70
- package/dist/scaffolds/notis-random/src/mock-runtime.ts +0 -129
- package/dist/scaffolds/notis-random/tailwind.config.ts +0 -50
- package/dist/scaffolds/notis-random/tsconfig.json +0 -23
- package/dist/scaffolds/notis-random/vite.config.ts +0 -11
- package/dist/scaffolds.json +0 -49
|
@@ -1,351 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* NotisRuntime is the bridge between app code running in the browser and the
|
|
3
|
-
* Notis platform. The portal owns the runtime and injects it through
|
|
4
|
-
* `NotisProvider` when the app is rendered.
|
|
5
|
-
*
|
|
6
|
-
* App code should never reach for globals. Use the hooks from `@notis/sdk`
|
|
7
|
-
* (useTool, useNotis, etc.) which read from the NotisProvider context.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import type { ComponentType } from 'react';
|
|
11
|
-
|
|
12
|
-
// ---------------------------------------------------------------------------
|
|
13
|
-
// Database types
|
|
14
|
-
// ---------------------------------------------------------------------------
|
|
15
|
-
|
|
16
|
-
export type DatabasePropertyType =
|
|
17
|
-
| 'title'
|
|
18
|
-
| 'rich_text'
|
|
19
|
-
| 'text'
|
|
20
|
-
| 'number'
|
|
21
|
-
| 'checkbox'
|
|
22
|
-
| 'date'
|
|
23
|
-
| 'select'
|
|
24
|
-
| 'multi_select'
|
|
25
|
-
| 'status'
|
|
26
|
-
| 'relation'
|
|
27
|
-
| 'formula'
|
|
28
|
-
| 'files'
|
|
29
|
-
| 'secret';
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* The value of a `secret` property. The platform stores a pointer to a
|
|
33
|
-
* credential held elsewhere and never the credential itself, so there is
|
|
34
|
-
* deliberately nothing here to read the secret material from — only whether
|
|
35
|
-
* one is attached, which credential it is, and its lifecycle state.
|
|
36
|
-
*/
|
|
37
|
-
export interface SecretPropertyValue {
|
|
38
|
-
present: boolean;
|
|
39
|
-
reference: string | null;
|
|
40
|
-
status: string | null;
|
|
41
|
-
metadata: Record<string, unknown> | null;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface DatabasePropertyOption {
|
|
45
|
-
id?: string | null;
|
|
46
|
-
name: string;
|
|
47
|
-
color?: string | null;
|
|
48
|
-
order?: number;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export interface DatabaseProperty {
|
|
52
|
-
id?: string | null;
|
|
53
|
-
name: string;
|
|
54
|
-
type: DatabasePropertyType;
|
|
55
|
-
description?: string | null;
|
|
56
|
-
options?: DatabasePropertyOption[];
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export interface DatabaseDescriptor {
|
|
60
|
-
slug: string;
|
|
61
|
-
title: string;
|
|
62
|
-
description?: string | null;
|
|
63
|
-
icon?: string | null;
|
|
64
|
-
properties: DatabaseProperty[];
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* A document's content is typed. `markdown` documents carry rich text as
|
|
69
|
-
* BlockNote JSON (canonical) with a derived markdown projection; `file`
|
|
70
|
-
* documents carry an uploaded file whose format is in `fileType`
|
|
71
|
-
* (pdf, xlsx, pptx, ...). Future content types (canvas, ...) extend this
|
|
72
|
-
* union without changing the component contracts.
|
|
73
|
-
*/
|
|
74
|
-
export type DocumentContentType = 'markdown' | 'file';
|
|
75
|
-
|
|
76
|
-
export interface DocumentRecord {
|
|
77
|
-
id: string;
|
|
78
|
-
title: string;
|
|
79
|
-
properties: Record<string, unknown>;
|
|
80
|
-
url?: string | null;
|
|
81
|
-
icon?: string | null;
|
|
82
|
-
cover?: string | null;
|
|
83
|
-
databaseSlug?: string;
|
|
84
|
-
contentType?: DocumentContentType | null;
|
|
85
|
-
fileType?: string | null;
|
|
86
|
-
contentBlocknote?: Array<Record<string, unknown>> | null;
|
|
87
|
-
contentMarkdown?: string | null;
|
|
88
|
-
plainText?: string | null;
|
|
89
|
-
createdAt?: string | null;
|
|
90
|
-
lastEditedTime?: string | null;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// ---------------------------------------------------------------------------
|
|
94
|
-
// Tool types
|
|
95
|
-
// ---------------------------------------------------------------------------
|
|
96
|
-
|
|
97
|
-
export type ToolInputSchema = Record<string, unknown>;
|
|
98
|
-
|
|
99
|
-
export interface ToolDescriptor {
|
|
100
|
-
name: string;
|
|
101
|
-
description?: string;
|
|
102
|
-
inputSchema?: ToolInputSchema;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// ---------------------------------------------------------------------------
|
|
106
|
-
// Route types
|
|
107
|
-
// ---------------------------------------------------------------------------
|
|
108
|
-
|
|
109
|
-
export interface RouteDescriptor {
|
|
110
|
-
slug: string;
|
|
111
|
-
path: string;
|
|
112
|
-
name: string;
|
|
113
|
-
icon?: string | null;
|
|
114
|
-
parentSlug?: string | null;
|
|
115
|
-
default?: boolean;
|
|
116
|
-
collection?: {
|
|
117
|
-
database: string;
|
|
118
|
-
titleProperty: string;
|
|
119
|
-
parentProperty?: string | null;
|
|
120
|
-
sidebar?: {
|
|
121
|
-
mode: 'flat-list' | 'tree';
|
|
122
|
-
allowCreate: boolean;
|
|
123
|
-
} | null;
|
|
124
|
-
} | null;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export interface CollectionItem {
|
|
128
|
-
id: string;
|
|
129
|
-
title: string;
|
|
130
|
-
icon?: string | null;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export interface CollectionItemDetail extends CollectionItem {
|
|
134
|
-
properties: Record<string, unknown>;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
// ---------------------------------------------------------------------------
|
|
138
|
-
// App descriptor
|
|
139
|
-
// ---------------------------------------------------------------------------
|
|
140
|
-
|
|
141
|
-
export interface AppDescriptor {
|
|
142
|
-
id: string;
|
|
143
|
-
name: string;
|
|
144
|
-
icon?: string | null;
|
|
145
|
-
description?: string | null;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
export interface QueryFilter {
|
|
149
|
-
filters?: Array<{
|
|
150
|
-
property: string;
|
|
151
|
-
operator: string;
|
|
152
|
-
type?: string;
|
|
153
|
-
value: unknown;
|
|
154
|
-
}>;
|
|
155
|
-
sorts?: Array<{
|
|
156
|
-
property: string;
|
|
157
|
-
direction: 'asc' | 'desc';
|
|
158
|
-
}>;
|
|
159
|
-
page_size?: number;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
export interface NotisRuntimeContext {
|
|
163
|
-
collectionItem?: CollectionItemDetail | null;
|
|
164
|
-
/**
|
|
165
|
-
* Set when the app is being rendered by the screenshot harness (`notis apps
|
|
166
|
-
* screenshot`) for the named listing scenario. Lets apps and SDK components
|
|
167
|
-
* hide dev-only chrome from listing images.
|
|
168
|
-
*/
|
|
169
|
-
screenshotScenario?: string | null;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
// ---------------------------------------------------------------------------
|
|
173
|
-
// Host-provided UI
|
|
174
|
-
// ---------------------------------------------------------------------------
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* Props for the host-provided document editor. The host implementation
|
|
178
|
-
* dispatches on the document's content type (markdown -> rich text editor,
|
|
179
|
-
* file -> matching viewer/editor), so this contract stays stable as new
|
|
180
|
-
* content types ship.
|
|
181
|
-
*/
|
|
182
|
-
export interface NotisDocumentEditorProps {
|
|
183
|
-
documentId: string;
|
|
184
|
-
/** 'full' renders icon/title/cover above the content; 'body' renders content only. */
|
|
185
|
-
variant?: 'full' | 'body';
|
|
186
|
-
readOnly?: boolean;
|
|
187
|
-
className?: string;
|
|
188
|
-
onDirtyChange?: (dirty: boolean) => void;
|
|
189
|
-
onSavingChange?: (saving: boolean) => void;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* Components the host (portal) injects through the runtime. Apps consume them
|
|
194
|
-
* via the SDK wrappers (e.g. `DocumentEditor`), which fall back gracefully
|
|
195
|
-
* when a host component is unavailable (standalone dev harness, snapshots).
|
|
196
|
-
*/
|
|
197
|
-
export interface NotisRuntimeUI {
|
|
198
|
-
DocumentEditor?: ComponentType<NotisDocumentEditorProps>;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
// ---------------------------------------------------------------------------
|
|
202
|
-
// NotisRuntime
|
|
203
|
-
// ---------------------------------------------------------------------------
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* Options for `NotisRuntime.subscribeDatabase`.
|
|
207
|
-
*/
|
|
208
|
-
export interface SubscribeDatabaseOptions {
|
|
209
|
-
/**
|
|
210
|
-
* Called with `true` once a live change feed is attached, and with `false`
|
|
211
|
-
* when it drops or is torn down. Hosts without a change feed (dev harness,
|
|
212
|
-
* screenshot stub, vite preview) never call it, so `live` stays false there.
|
|
213
|
-
*/
|
|
214
|
-
onStatusChange?: (live: boolean) => void;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* Work an app hands to the Notis manager chat through `NotisRuntime.handover`.
|
|
219
|
-
*/
|
|
220
|
-
export interface HandoverPayload {
|
|
221
|
-
/** The message the manager should act on. */
|
|
222
|
-
prompt: string;
|
|
223
|
-
/**
|
|
224
|
-
* Key of a skill declared in `notis.config.ts` -> `skills[].key`. The host
|
|
225
|
-
* rejects a key this app does not declare. Omit to hand over plain work.
|
|
226
|
-
*/
|
|
227
|
-
skill?: string;
|
|
228
|
-
/**
|
|
229
|
-
* Accepted for forward compatibility. The portal never submits a composer on
|
|
230
|
-
* the user's behalf today, so every handover resolves `drafted`; `sent` is
|
|
231
|
-
* reserved for a host that can genuinely dispatch the run.
|
|
232
|
-
*/
|
|
233
|
-
autoSend?: boolean;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
export interface HandoverResult {
|
|
237
|
-
/** `drafted` when the user still has to press send, `sent` when it went straight through. */
|
|
238
|
-
status: 'drafted' | 'sent';
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* The user's cloud computer, as far as an app may see it.
|
|
243
|
-
*
|
|
244
|
-
* `exists` is false when the user has never had a sandbox provisioned. A
|
|
245
|
-
* `status` of anything other than `'running'` means the VM is asleep; reading
|
|
246
|
-
* these facts never wakes it.
|
|
247
|
-
*/
|
|
248
|
-
export interface CloudComputerSandboxFacts {
|
|
249
|
-
exists: boolean;
|
|
250
|
-
status: string | null;
|
|
251
|
-
provider: string | null;
|
|
252
|
-
created_at: string | null;
|
|
253
|
-
updated_at: string | null;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* Whether a CLI inside the cloud computer is signed in.
|
|
258
|
-
*
|
|
259
|
-
* `authenticated: null` means *unknown*, never *signed out*: the sandbox was
|
|
260
|
-
* not running, or the probe could not answer. `reason` says which
|
|
261
|
-
* (`'sandbox_not_running'`, `'no_sandbox'`, `'sandbox_status_unknown'`,
|
|
262
|
-
* `'probe_failed'`, `'not_signed_in'`).
|
|
263
|
-
*/
|
|
264
|
-
export interface CloudComputerCliAuthFacts {
|
|
265
|
-
authenticated: boolean | null;
|
|
266
|
-
account: string | null;
|
|
267
|
-
checked_at: string | null;
|
|
268
|
-
reason: string | null;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
export interface CloudComputerFacts {
|
|
272
|
-
/**
|
|
273
|
-
* False when this host cannot answer at all — no cloud computer on the user's
|
|
274
|
-
* plan, or the platform could not resolve the facts. Render whatever the app
|
|
275
|
-
* did before rather than an error.
|
|
276
|
-
*/
|
|
277
|
-
available: boolean;
|
|
278
|
-
reason?: string | null;
|
|
279
|
-
sandbox: CloudComputerSandboxFacts | null;
|
|
280
|
-
cli_auth: { gh: CloudComputerCliAuthFacts };
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
export interface NotisRuntime {
|
|
284
|
-
app: AppDescriptor;
|
|
285
|
-
route: RouteDescriptor;
|
|
286
|
-
databases: DatabaseDescriptor[];
|
|
287
|
-
context: NotisRuntimeContext;
|
|
288
|
-
ui?: NotisRuntimeUI;
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* Subscribe to changes on an app-owned database. Returns an unsubscribe.
|
|
292
|
-
*
|
|
293
|
-
* The change notification is only a signal — it carries no rows. Consumers
|
|
294
|
-
* react by refetching through the normal tool path, so app scoping,
|
|
295
|
-
* permissions and billing are unchanged. Use the `useDatabaseSubscription`
|
|
296
|
-
* hook rather than calling this directly.
|
|
297
|
-
*/
|
|
298
|
-
subscribeDatabase?(
|
|
299
|
-
slug: string,
|
|
300
|
-
onChange: () => void,
|
|
301
|
-
options?: SubscribeDatabaseOptions,
|
|
302
|
-
): () => void;
|
|
303
|
-
|
|
304
|
-
/**
|
|
305
|
-
* Hand a piece of work to the Notis manager chat. The app cannot run an
|
|
306
|
-
* agent itself: it describes the job, and the manager surface owns progress,
|
|
307
|
-
* billing, cancellation and the transcript. Results come back to the app
|
|
308
|
-
* through its own databases (see `useDatabaseSubscription`).
|
|
309
|
-
*
|
|
310
|
-
* Use the `useHandover` hook rather than calling this directly. Hosts
|
|
311
|
-
* without a manager chat (the dev harness, the vite preview) leave it
|
|
312
|
-
* undefined, so keep whatever fallback the app already offers.
|
|
313
|
-
*/
|
|
314
|
-
handover?(payload: HandoverPayload): Promise<HandoverResult>;
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
* Read-only facts about the user's cloud computer. Requires
|
|
318
|
-
* `capabilities.cloudComputer: 'read'` in `notis.config.ts` plus the user's
|
|
319
|
-
* approval; resolving it never creates, resumes or commands a sandbox.
|
|
320
|
-
*
|
|
321
|
-
* Use the `useCloudComputer` hook rather than calling this directly. Hosts
|
|
322
|
-
* without a cloud computer (the dev harness, the vite preview) answer
|
|
323
|
-
* `{ available: false }`, so keep whatever fallback the app already has.
|
|
324
|
-
* `{ refresh: true }` bypasses the host's short answer cache — the hook's
|
|
325
|
-
* refresh() sends it so a just-completed sign-in becomes visible.
|
|
326
|
-
*/
|
|
327
|
-
cloudComputerFacts?(options?: { refresh?: boolean }): Promise<CloudComputerFacts>;
|
|
328
|
-
|
|
329
|
-
navigate?: (payload: { kind: string; [key: string]: unknown }) => void;
|
|
330
|
-
|
|
331
|
-
registerTopBarSearch?: (
|
|
332
|
-
config:
|
|
333
|
-
| {
|
|
334
|
-
onChange: (value: string) => void;
|
|
335
|
-
placeholder?: string;
|
|
336
|
-
onSubmit?: () => void | Promise<void>;
|
|
337
|
-
}
|
|
338
|
-
| null,
|
|
339
|
-
) => void;
|
|
340
|
-
setTopBarSearchValue?: (value: string) => void;
|
|
341
|
-
setTopBarSearchLoading?: (loading: boolean) => void;
|
|
342
|
-
|
|
343
|
-
listTools(): Promise<ToolDescriptor[]>;
|
|
344
|
-
callTool<TResult = unknown>(name: string, args?: Record<string, unknown>): Promise<TResult>;
|
|
345
|
-
|
|
346
|
-
request(path: string, options?: {
|
|
347
|
-
method?: string;
|
|
348
|
-
headers?: Record<string, string>;
|
|
349
|
-
body?: unknown;
|
|
350
|
-
}): Promise<unknown>;
|
|
351
|
-
}
|
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Notis theme CSS variables.
|
|
3
|
-
*
|
|
4
|
-
* Import this in your app layout:
|
|
5
|
-
*
|
|
6
|
-
* import '@notis/sdk/styles.css';
|
|
7
|
-
*
|
|
8
|
-
* The portal injects the live Notis theme variables at render time.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
@tailwind base;
|
|
12
|
-
@tailwind components;
|
|
13
|
-
@tailwind utilities;
|
|
14
|
-
|
|
15
|
-
@layer base {
|
|
16
|
-
* {
|
|
17
|
-
@apply border-border;
|
|
18
|
-
}
|
|
19
|
-
[data-notis-app-root] {
|
|
20
|
-
color: hsl(var(--foreground));
|
|
21
|
-
display: block;
|
|
22
|
-
min-height: 100%;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
@layer components {
|
|
27
|
-
.notis-app-shell {
|
|
28
|
-
@apply mx-auto w-full max-w-[var(--portal-page-max-width)] px-4 py-6 md:px-4 md:py-8;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.notis-app-surface {
|
|
32
|
-
@apply rounded-2xl border border-border bg-card text-card-foreground shadow-sm;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.notis-app-section {
|
|
36
|
-
@apply p-5 md:p-6;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/*
|
|
41
|
-
* Markdown value-type rendering (see the `Markdown` component). Plain CSS on
|
|
42
|
-
* theme variables so it works inside the portal shadow root and the dev
|
|
43
|
-
* harness without depending on the app's Tailwind content scan.
|
|
44
|
-
*/
|
|
45
|
-
.notis-markdown {
|
|
46
|
-
font-size: 14px;
|
|
47
|
-
line-height: 1.65;
|
|
48
|
-
color: hsl(var(--foreground));
|
|
49
|
-
overflow-wrap: break-word;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.notis-markdown--sm {
|
|
53
|
-
font-size: 13px;
|
|
54
|
-
line-height: 1.55;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.notis-markdown > :first-child {
|
|
58
|
-
margin-top: 0;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.notis-markdown > :last-child {
|
|
62
|
-
margin-bottom: 0;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.notis-markdown p {
|
|
66
|
-
margin: 0.625em 0;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.notis-markdown h1,
|
|
70
|
-
.notis-markdown h2,
|
|
71
|
-
.notis-markdown h3,
|
|
72
|
-
.notis-markdown h4,
|
|
73
|
-
.notis-markdown h5,
|
|
74
|
-
.notis-markdown h6 {
|
|
75
|
-
margin: 1.25em 0 0.5em;
|
|
76
|
-
font-weight: 650;
|
|
77
|
-
letter-spacing: -0.01em;
|
|
78
|
-
line-height: 1.3;
|
|
79
|
-
color: hsl(var(--foreground));
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.notis-markdown h1 { font-size: 1.5em; }
|
|
83
|
-
.notis-markdown h2 { font-size: 1.25em; }
|
|
84
|
-
.notis-markdown h3 { font-size: 1.1em; }
|
|
85
|
-
.notis-markdown h4,
|
|
86
|
-
.notis-markdown h5,
|
|
87
|
-
.notis-markdown h6 { font-size: 1em; }
|
|
88
|
-
|
|
89
|
-
.notis-markdown ul,
|
|
90
|
-
.notis-markdown ol {
|
|
91
|
-
margin: 0.625em 0;
|
|
92
|
-
padding-left: 1.5em;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.notis-markdown ul { list-style-type: disc; }
|
|
96
|
-
.notis-markdown ol { list-style-type: decimal; }
|
|
97
|
-
|
|
98
|
-
.notis-markdown li {
|
|
99
|
-
margin: 0.25em 0;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.notis-markdown li > ul,
|
|
103
|
-
.notis-markdown li > ol {
|
|
104
|
-
margin: 0.25em 0;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.notis-markdown ul.contains-task-list {
|
|
108
|
-
list-style: none;
|
|
109
|
-
padding-left: 0.375em;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.notis-markdown li.task-list-item input[type='checkbox'] {
|
|
113
|
-
margin-right: 0.5em;
|
|
114
|
-
accent-color: hsl(var(--primary));
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.notis-markdown blockquote {
|
|
118
|
-
margin: 0.75em 0;
|
|
119
|
-
padding: 0.125em 0 0.125em 0.875em;
|
|
120
|
-
border-left: 3px solid hsl(var(--border));
|
|
121
|
-
color: hsl(var(--muted-foreground));
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.notis-markdown a {
|
|
125
|
-
color: hsl(var(--primary));
|
|
126
|
-
text-decoration: underline;
|
|
127
|
-
text-decoration-color: hsl(var(--primary) / 0.35);
|
|
128
|
-
text-underline-offset: 2px;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.notis-markdown a:hover {
|
|
132
|
-
text-decoration-color: hsl(var(--primary));
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.notis-markdown code {
|
|
136
|
-
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
137
|
-
font-size: 0.875em;
|
|
138
|
-
padding: 0.125em 0.375em;
|
|
139
|
-
border-radius: 0.25rem;
|
|
140
|
-
background: hsl(var(--muted));
|
|
141
|
-
color: hsl(var(--foreground));
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.notis-markdown pre {
|
|
145
|
-
margin: 0.75em 0;
|
|
146
|
-
padding: 0.75em 1em;
|
|
147
|
-
border-radius: 0.5rem;
|
|
148
|
-
background: hsl(var(--muted));
|
|
149
|
-
overflow-x: auto;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.notis-markdown pre code {
|
|
153
|
-
padding: 0;
|
|
154
|
-
background: transparent;
|
|
155
|
-
font-size: 0.875em;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.notis-markdown hr {
|
|
159
|
-
margin: 1.25em 0;
|
|
160
|
-
border: 0;
|
|
161
|
-
border-top: 1px solid hsl(var(--border));
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.notis-markdown img {
|
|
165
|
-
max-width: 100%;
|
|
166
|
-
border-radius: 0.5rem;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.notis-markdown table {
|
|
170
|
-
margin: 0.75em 0;
|
|
171
|
-
width: 100%;
|
|
172
|
-
border-collapse: collapse;
|
|
173
|
-
font-size: 0.95em;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.notis-markdown th,
|
|
177
|
-
.notis-markdown td {
|
|
178
|
-
padding: 0.375em 0.75em;
|
|
179
|
-
border: 1px solid hsl(var(--border));
|
|
180
|
-
text-align: left;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.notis-markdown th {
|
|
184
|
-
background: hsl(var(--muted));
|
|
185
|
-
font-weight: 600;
|
|
186
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @notis/sdk/ui - Re-exported shadcn components for Notis apps.
|
|
3
|
-
*
|
|
4
|
-
* Apps include shadcn via their own `components.json` and `@/components/ui/*`
|
|
5
|
-
* imports. This entrypoint is provided as a convenience for apps that want to
|
|
6
|
-
* import directly from the SDK without setting up shadcn locally.
|
|
7
|
-
*
|
|
8
|
-
* For now, this is a placeholder. The scaffold template sets up shadcn
|
|
9
|
-
* directly in the app project, so components come from `@/components/ui/*`.
|
|
10
|
-
* This file can be expanded later to re-export a curated set of components
|
|
11
|
-
* pre-themed for Notis.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
// Placeholder -- apps use shadcn directly via their project's components/ui/
|
|
15
|
-
export {};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Vite config builder for Notis apps.
|
|
3
|
-
*
|
|
4
|
-
* Usage:
|
|
5
|
-
* ```ts
|
|
6
|
-
* // vite.config.ts
|
|
7
|
-
* import { notisViteConfig } from '@notis/sdk/vite';
|
|
8
|
-
* import appConfig from './notis.config';
|
|
9
|
-
* export default notisViteConfig(appConfig);
|
|
10
|
-
* ```
|
|
11
|
-
*
|
|
12
|
-
* Produces a library-mode ES module bundle with React externalized.
|
|
13
|
-
* Output: .notis/output/bundle/app.js + app.css
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
import type { NotisAppConfig } from './config';
|
|
17
|
-
|
|
18
|
-
export function notisViteConfig(appConfig: NotisAppConfig) {
|
|
19
|
-
return {
|
|
20
|
-
plugins: [
|
|
21
|
-
// @vitejs/plugin-react is added by the consumer's vite.config.ts
|
|
22
|
-
// or auto-detected. We provide the config shape only.
|
|
23
|
-
],
|
|
24
|
-
build: {
|
|
25
|
-
lib: {
|
|
26
|
-
entry: '.notis/_entry.tsx',
|
|
27
|
-
formats: ['es'] as const,
|
|
28
|
-
fileName: () => 'app.js',
|
|
29
|
-
},
|
|
30
|
-
rollupOptions: {
|
|
31
|
-
external: ['react', 'react-dom', 'react-dom/client', 'react/jsx-runtime', 'react/jsx-dev-runtime'],
|
|
32
|
-
output: {
|
|
33
|
-
globals: {
|
|
34
|
-
react: 'window.React',
|
|
35
|
-
'react-dom': 'window.ReactDOM',
|
|
36
|
-
'react-dom/client': 'window.ReactDOMClient',
|
|
37
|
-
'react/jsx-runtime': 'window.React',
|
|
38
|
-
},
|
|
39
|
-
assetFileNames: 'app[extname]',
|
|
40
|
-
inlineDynamicImports: true,
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
outDir: '.notis/output/bundle',
|
|
44
|
-
emptyOutDir: true,
|
|
45
|
-
cssCodeSplit: false,
|
|
46
|
-
},
|
|
47
|
-
resolve: {
|
|
48
|
-
alias: {
|
|
49
|
-
'@': process.cwd(),
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
define: {
|
|
53
|
-
'process.env.NODE_ENV': JSON.stringify('production'),
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"module": "ESNext",
|
|
5
|
-
"moduleResolution": "bundler",
|
|
6
|
-
"jsx": "react-jsx",
|
|
7
|
-
"strict": true,
|
|
8
|
-
"esModuleInterop": true,
|
|
9
|
-
"skipLibCheck": true,
|
|
10
|
-
"declaration": true,
|
|
11
|
-
"outDir": "dist",
|
|
12
|
-
"rootDir": "src"
|
|
13
|
-
},
|
|
14
|
-
"include": ["src"]
|
|
15
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
// Dev entrypoint: mounts the app pages with a tiny hash-router and the mock
|
|
2
|
-
// runtime. Not used in production — `vite build` uses .notis/_entry.tsx.
|
|
3
|
-
import { StrictMode, useEffect, useState } from 'react';
|
|
4
|
-
import { createRoot } from 'react-dom/client';
|
|
5
|
-
import { NotisProvider } from '@notis/sdk';
|
|
6
|
-
import AppShell from '../app/layout';
|
|
7
|
-
import HomePage from '../app/page';
|
|
8
|
-
import HistoryPage from '../app/history/page';
|
|
9
|
-
import { installMockRuntime, setMockRoute } from './mock-runtime';
|
|
10
|
-
|
|
11
|
-
const runtime = installMockRuntime(hashRoute());
|
|
12
|
-
|
|
13
|
-
function hashRoute(): 'home' | 'history' {
|
|
14
|
-
return window.location.hash === '#/history' ? 'history' : 'home';
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function DevApp() {
|
|
18
|
-
const [route, setRoute] = useState<'home' | 'history'>(hashRoute());
|
|
19
|
-
|
|
20
|
-
useEffect(() => {
|
|
21
|
-
const onChange = () => {
|
|
22
|
-
const next = hashRoute();
|
|
23
|
-
setRoute(next);
|
|
24
|
-
setMockRoute(next);
|
|
25
|
-
};
|
|
26
|
-
window.addEventListener('hashchange', onChange);
|
|
27
|
-
return () => window.removeEventListener('hashchange', onChange);
|
|
28
|
-
}, []);
|
|
29
|
-
|
|
30
|
-
const Page = route === 'history' ? HistoryPage : HomePage;
|
|
31
|
-
|
|
32
|
-
return (
|
|
33
|
-
<AppShell>
|
|
34
|
-
<div className="mx-auto max-w-4xl px-4 pt-4">
|
|
35
|
-
<nav className="flex items-center gap-2 rounded-full border border-border bg-card p-1 text-sm w-fit">
|
|
36
|
-
<a
|
|
37
|
-
href="#/"
|
|
38
|
-
className={
|
|
39
|
-
(route === 'home' ? 'bg-accent text-accent-foreground ' : 'text-muted-foreground hover:text-foreground ') +
|
|
40
|
-
'rounded-full px-3 py-1 transition'
|
|
41
|
-
}
|
|
42
|
-
>
|
|
43
|
-
Generator
|
|
44
|
-
</a>
|
|
45
|
-
<a
|
|
46
|
-
href="#/history"
|
|
47
|
-
className={
|
|
48
|
-
(route === 'history' ? 'bg-accent text-accent-foreground ' : 'text-muted-foreground hover:text-foreground ') +
|
|
49
|
-
'rounded-full px-3 py-1 transition'
|
|
50
|
-
}
|
|
51
|
-
>
|
|
52
|
-
History
|
|
53
|
-
</a>
|
|
54
|
-
<span className="pl-2 pr-3 text-[10px] uppercase tracking-wide text-muted-foreground">dev preview</span>
|
|
55
|
-
</nav>
|
|
56
|
-
</div>
|
|
57
|
-
<Page />
|
|
58
|
-
</AppShell>
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
const root = document.getElementById('root');
|
|
63
|
-
if (!root) throw new Error('#root element missing from index.html');
|
|
64
|
-
createRoot(root).render(
|
|
65
|
-
<StrictMode>
|
|
66
|
-
<NotisProvider runtime={runtime}>
|
|
67
|
-
<DevApp />
|
|
68
|
-
</NotisProvider>
|
|
69
|
-
</StrictMode>,
|
|
70
|
-
);
|