@notis_ai/cli 0.2.0-beta.19.1 → 0.2.0-beta.196.1

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.
Files changed (216) hide show
  1. package/README.md +822 -135
  2. package/bin/check-runtime.js +15 -0
  3. package/bin/notis.js +2 -0
  4. package/config/notis_app_boundary_rules.json +50 -0
  5. package/config/notis_app_design_rules.json +135 -0
  6. package/config/portal-route-roots.json +48 -0
  7. package/dist/agent-hooks/notis-agent-hook.mjs +45587 -0
  8. package/dist/base-skills/notis-apps/SKILL.md +93 -0
  9. package/dist/base-skills/notis-apps/references/architecture.md +114 -0
  10. package/dist/base-skills/notis-apps/references/context.md +81 -0
  11. package/dist/base-skills/notis-apps/references/design.md +97 -0
  12. package/dist/base-skills/notis-apps/references/memory.md +58 -0
  13. package/dist/base-skills/notis-apps/references/reading.md +67 -0
  14. package/dist/base-skills/notis-apps/references/release.md +107 -0
  15. package/dist/base-skills/notis-apps/references/sdk.md +116 -0
  16. package/dist/base-skills/notis-apps/references/troubleshooting.md +24 -0
  17. package/dist/base-skills/notis-apps/references/views.md +142 -0
  18. package/dist/base-skills/notis-cli/SKILL.md +154 -0
  19. package/dist/base-skills/notis-cli/references/app-delivery.md +19 -0
  20. package/dist/base-skills/notis-cli/references/intelligence.md +94 -0
  21. package/dist/base-skills/notis-cli/references/native-databases.md +21 -0
  22. package/dist/base-skills/notis-cli/references/tool-examples.md +56 -0
  23. package/dist/base-skills/notis-cli/references/troubleshooting.md +39 -0
  24. package/dist/base-skills/notis-query/SKILL.md +41 -0
  25. package/dist/base-skills/notis-query/references/database-discovery.md +60 -0
  26. package/dist/base-skills/notis-query/references/documents.md +63 -0
  27. package/dist/base-skills/notis-query/references/query.md +76 -0
  28. package/{template/packages/notis-sdk → dist/sdk}/package.json +14 -4
  29. package/dist/sdk/src/agentContext.ts +36 -0
  30. package/dist/sdk/src/bundleModule.ts +79 -0
  31. package/dist/sdk/src/components/Dialog.tsx +46 -0
  32. package/dist/sdk/src/components/DocumentEditor.tsx +106 -0
  33. package/dist/sdk/src/components/DocumentPage.tsx +141 -0
  34. package/dist/sdk/src/components/Markdown.tsx +60 -0
  35. package/dist/sdk/src/components/MarkdownEditor.tsx +121 -0
  36. package/dist/sdk/src/components/MultiSelectActionBar.tsx +285 -0
  37. package/dist/sdk/src/components/MultiSelectCheckbox.tsx +97 -0
  38. package/dist/sdk/src/components/MultiSelectDragOverlay.tsx +39 -0
  39. package/dist/sdk/src/components/NotisCommentBoundary.tsx +172 -0
  40. package/dist/sdk/src/components/NotisSelectionBoundary.tsx +59 -0
  41. package/dist/sdk/src/components/RecordComponents.tsx +33 -0
  42. package/dist/sdk/src/components/RenderChartData.tsx +19 -0
  43. package/dist/sdk/src/components/ShortcutHints.tsx +56 -0
  44. package/dist/sdk/src/components/Skeleton.tsx +24 -0
  45. package/dist/sdk/src/config.ts +239 -0
  46. package/dist/sdk/src/documents.ts +258 -0
  47. package/dist/sdk/src/hooks/useAction.ts +28 -0
  48. package/dist/sdk/src/hooks/useActiveResource.ts +19 -0
  49. package/dist/sdk/src/hooks/useAgentContext.ts +23 -0
  50. package/dist/sdk/src/hooks/useCloudComputer.ts +95 -0
  51. package/dist/sdk/src/hooks/useCloudComputerShell.ts +114 -0
  52. package/dist/sdk/src/hooks/useCollectionInteractions.ts +838 -0
  53. package/dist/sdk/src/hooks/useDatabaseSchema.ts +49 -0
  54. package/dist/sdk/src/hooks/useDatabaseSubscription.ts +76 -0
  55. package/dist/sdk/src/hooks/useDocument.ts +43 -0
  56. package/dist/sdk/src/hooks/useDocuments.ts +84 -0
  57. package/dist/sdk/src/hooks/useHandover.ts +78 -0
  58. package/dist/sdk/src/hooks/useLongPressSelection.ts +79 -0
  59. package/dist/sdk/src/hooks/useMultiSelect.ts +95 -0
  60. package/dist/sdk/src/hooks/useNativeDocumentBody.ts +50 -0
  61. package/dist/sdk/src/hooks/useNativeDocuments.ts +83 -0
  62. package/dist/sdk/src/hooks/useNotis.ts +42 -0
  63. package/dist/sdk/src/hooks/useNotisNavigation.ts +67 -0
  64. package/dist/sdk/src/hooks/useQuery.ts +74 -0
  65. package/dist/sdk/src/hooks/useTool.ts +65 -0
  66. package/dist/sdk/src/hooks/useToolQuery.ts +12 -0
  67. package/dist/sdk/src/hooks/useTopBarSearch.ts +81 -0
  68. package/dist/sdk/src/hooks/useUpsertDocument.ts +95 -0
  69. package/dist/sdk/src/hooks/useViewParams.ts +121 -0
  70. package/dist/sdk/src/hooks/useViewerReads.ts +129 -0
  71. package/dist/sdk/src/index.ts +200 -0
  72. package/dist/sdk/src/interactions/actions.ts +59 -0
  73. package/dist/sdk/src/interactions/shortcuts.tsx +740 -0
  74. package/dist/sdk/src/interactions/visibility.ts +13 -0
  75. package/dist/sdk/src/interactions.ts +45 -0
  76. package/dist/sdk/src/nativeData.ts +39 -0
  77. package/dist/sdk/src/presentation.tsx +82 -0
  78. package/dist/sdk/src/provider.tsx +49 -0
  79. package/dist/sdk/src/queryCache.ts +172 -0
  80. package/dist/sdk/src/queryErrors.ts +51 -0
  81. package/dist/sdk/src/runtime.ts +603 -0
  82. package/dist/sdk/src/space.ts +425 -0
  83. package/dist/sdk/src/styles.css +290 -0
  84. package/dist/sdk/src/tailwind.ts +66 -0
  85. package/dist/sdk/src/vite.ts +83 -0
  86. package/dist/skill-sync/index.js +2143 -0
  87. package/dist/skill-sync/index.js.map +7 -0
  88. package/dist/skill-sync-worker.mjs +3487 -0
  89. package/dist/space-harness/host.js +66 -0
  90. package/dist/view-renderer/dist/host.css +1 -0
  91. package/dist/view-renderer/dist/host.js +1042 -0
  92. package/dist/view-renderer/dist/theme.css +73 -0
  93. package/dist/view-renderer/src/dom.js +180 -0
  94. package/dist/view-renderer/src/errors.js +8 -0
  95. package/dist/view-renderer/src/host.tsx +173 -0
  96. package/dist/view-renderer/src/index.js +4 -0
  97. package/dist/view-renderer/src/pool.js +76 -0
  98. package/dist/view-renderer/src/remote-broker.js +59 -0
  99. package/dist/view-renderer/src/renderer.js +201 -0
  100. package/package.json +25 -8
  101. package/skills/notis-apps/cli.md +406 -0
  102. package/skills/notis-cli/AGENT_INSTRUCTIONS.md +39 -0
  103. package/skills/notis-onboarding/BRIEF.md +133 -0
  104. package/skills/notis-query/cli.md +39 -0
  105. package/src/agent-hook-entry.js +5 -0
  106. package/src/cli.js +294 -25
  107. package/src/command-specs/agents.js +392 -0
  108. package/src/command-specs/apps.js +1476 -203
  109. package/src/command-specs/auth.js +114 -137
  110. package/src/command-specs/diagnostics.js +730 -0
  111. package/src/command-specs/files.js +29 -0
  112. package/src/command-specs/handover.js +374 -0
  113. package/src/command-specs/helpers.js +86 -82
  114. package/src/command-specs/index.js +31 -6
  115. package/src/command-specs/meta.js +150 -18
  116. package/src/command-specs/onboarding.js +290 -0
  117. package/src/command-specs/profile.js +358 -0
  118. package/src/command-specs/skills.js +304 -0
  119. package/src/command-specs/smoke.js +386 -0
  120. package/src/command-specs/spaces.js +572 -0
  121. package/src/command-specs/tools.js +455 -139
  122. package/src/command-specs/views.js +69 -0
  123. package/src/runtime/agent-browser.js +700 -0
  124. package/src/runtime/agent-memory-state.js +126 -0
  125. package/src/runtime/agent-setup.js +383 -0
  126. package/src/runtime/app-boundary-validator.js +407 -0
  127. package/src/runtime/app-changelog.js +79 -0
  128. package/src/runtime/app-data-literals.js +82 -0
  129. package/src/runtime/app-platform.js +2752 -237
  130. package/src/runtime/app-registry-scaffolds.js +367 -0
  131. package/src/runtime/app-test-server.js +293 -0
  132. package/src/runtime/assets/store-screenshot-dark.png +0 -0
  133. package/src/runtime/auth-recovery.js +110 -0
  134. package/src/runtime/base-skills.d.ts +20 -0
  135. package/src/runtime/base-skills.js +167 -0
  136. package/src/runtime/channel.js +133 -0
  137. package/src/runtime/confined-space-build.js +74 -0
  138. package/src/runtime/confined-space-verify.js +49 -0
  139. package/src/runtime/delegated-context.js +68 -0
  140. package/src/runtime/errors.js +1 -0
  141. package/src/runtime/git.js +233 -0
  142. package/src/runtime/login-listener.js +15 -0
  143. package/src/runtime/native-record-files.js +47 -0
  144. package/src/runtime/oauth.js +2622 -0
  145. package/src/runtime/output.js +37 -5
  146. package/src/runtime/ports.js +31 -0
  147. package/src/runtime/profiles.js +906 -55
  148. package/src/runtime/retired-sdk-files.js +20 -0
  149. package/src/runtime/screenshot-framing.js +85 -0
  150. package/src/runtime/skill-sync/cloud-client.ts +121 -0
  151. package/src/runtime/skill-sync/index.ts +905 -0
  152. package/src/runtime/skill-sync/local-scanner.ts +1259 -0
  153. package/src/runtime/skill-sync/native-identity.ts +102 -0
  154. package/src/runtime/skill-sync/native-plan.ts +59 -0
  155. package/src/runtime/skill-sync/symlink-manager.ts +433 -0
  156. package/src/runtime/skill-sync/sync-plan.ts +54 -0
  157. package/src/runtime/skill-sync/types.ts +157 -0
  158. package/src/runtime/skill-sync/write-cloud-skill.ts +50 -0
  159. package/src/runtime/skill-sync-service.js +109 -0
  160. package/src/runtime/source-root.js +32 -0
  161. package/src/runtime/space-collection-scaffold.js +66 -0
  162. package/src/runtime/space-database-structures.js +229 -0
  163. package/src/runtime/space-fixture-broker.js +50 -0
  164. package/src/runtime/space-lock.js +337 -0
  165. package/src/runtime/space-platform.js +105 -0
  166. package/src/runtime/space-source.js +281 -0
  167. package/src/runtime/space-test-server.js +327 -0
  168. package/src/runtime/space-verification.js +89 -0
  169. package/src/runtime/space-verify-browser-worker.js +51 -0
  170. package/src/runtime/space-view-manifest.js +254 -0
  171. package/src/runtime/store-screenshot.js +146 -0
  172. package/src/runtime/sync-skills.d.ts +37 -0
  173. package/src/runtime/sync-skills.js +231 -0
  174. package/src/runtime/telemetry.js +92 -0
  175. package/src/runtime/transport.js +331 -45
  176. package/src/runtime/view-render.js +49 -0
  177. package/src/skill-sync-worker-entry.js +2 -0
  178. package/src/skill-sync-worker.js +50 -0
  179. package/src/space-harness-host.ts +103 -0
  180. package/template/.harness/index.html.tmpl +435 -0
  181. package/template/CHANGELOG.md +5 -0
  182. package/template/app/globals.css +29 -3
  183. package/template/app/layout.tsx +6 -3
  184. package/template/app/page.tsx +49 -42
  185. package/template/components/page-heading.tsx +23 -0
  186. package/template/components/ui/badge.tsx +7 -4
  187. package/template/components/ui/button.tsx +1 -1
  188. package/template/components/ui/card.tsx +24 -11
  189. package/template/components/ui/native-select.tsx +24 -0
  190. package/template/notis.config.ts +24 -6
  191. package/template/package-lock.json +3642 -0
  192. package/template/package.json +19 -16
  193. package/template/postcss.config.mjs +1 -1
  194. package/template/tailwind.config.ts +1 -6
  195. package/template/tsconfig.json +1 -0
  196. package/src/command-specs/db.js +0 -163
  197. package/src/runtime/app-preview-server.js +0 -312
  198. package/template/packages/notis-sdk/src/config.ts +0 -48
  199. package/template/packages/notis-sdk/src/helpers.ts +0 -131
  200. package/template/packages/notis-sdk/src/hooks/useAppState.ts +0 -50
  201. package/template/packages/notis-sdk/src/hooks/useCollectionItem.ts +0 -58
  202. package/template/packages/notis-sdk/src/hooks/useDatabase.ts +0 -87
  203. package/template/packages/notis-sdk/src/hooks/useDocument.ts +0 -61
  204. package/template/packages/notis-sdk/src/hooks/useNotis.ts +0 -31
  205. package/template/packages/notis-sdk/src/hooks/useNotisNavigation.ts +0 -49
  206. package/template/packages/notis-sdk/src/hooks/useTool.ts +0 -49
  207. package/template/packages/notis-sdk/src/hooks/useUpsertDocument.ts +0 -57
  208. package/template/packages/notis-sdk/src/index.ts +0 -47
  209. package/template/packages/notis-sdk/src/provider.tsx +0 -44
  210. package/template/packages/notis-sdk/src/runtime.ts +0 -159
  211. package/template/packages/notis-sdk/src/styles.css +0 -123
  212. package/template/packages/notis-sdk/src/vite.ts +0 -54
  213. package/template/packages/notis-sdk/tsconfig.json +0 -15
  214. /package/{template/packages/notis-sdk → dist/sdk}/src/hooks/useBackend.ts +0 -0
  215. /package/{template/packages/notis-sdk → dist/sdk}/src/hooks/useTools.ts +0 -0
  216. /package/{template/packages/notis-sdk → dist/sdk}/src/ui.ts +0 -0
@@ -1,159 +0,0 @@
1
- /**
2
- * NotisRuntime is the bridge between app code running in the browser and the
3
- * Notis platform. It is injected as `window.__NOTIS_RUNTIME__` into every app
4
- * page -- both in local preview (with mock implementations) and in the portal
5
- * (with real server-backed implementations).
6
- *
7
- * App code should never access `window.__NOTIS_RUNTIME__` directly. Instead,
8
- * use the hooks from `@notis/sdk` (useDatabase, useTool, etc.) which read
9
- * from the NotisProvider context.
10
- */
11
-
12
- // ---------------------------------------------------------------------------
13
- // Database types
14
- // ---------------------------------------------------------------------------
15
-
16
- export interface DatabaseProperty {
17
- name: string;
18
- type: 'title' | 'rich_text' | 'number' | 'checkbox' | 'date' | 'select' | 'multi_select' | 'status' | 'relation' | 'formula' | 'files';
19
- description?: string;
20
- options?: Array<{ name: string; id?: string }>;
21
- }
22
-
23
- export interface DatabaseDescriptor {
24
- slug: string;
25
- title: string;
26
- description?: string | null;
27
- icon?: string | null;
28
- properties: DatabaseProperty[];
29
- }
30
-
31
- export interface DocumentRecord {
32
- id: string;
33
- title: string;
34
- properties: Record<string, unknown>;
35
- icon?: string | null;
36
- databaseSlug?: string;
37
- }
38
-
39
- // ---------------------------------------------------------------------------
40
- // Tool types
41
- // ---------------------------------------------------------------------------
42
-
43
- export interface ToolDescriptor {
44
- name: string;
45
- description?: string;
46
- input_schema?: Record<string, unknown>;
47
- }
48
-
49
- // ---------------------------------------------------------------------------
50
- // Route types
51
- // ---------------------------------------------------------------------------
52
-
53
- export interface RouteDescriptor {
54
- slug: string;
55
- path: string;
56
- name: string;
57
- icon?: string | null;
58
- default?: boolean;
59
- collection?: {
60
- database: string;
61
- titleProperty: string;
62
- } | null;
63
- }
64
-
65
- export interface CollectionItem {
66
- id: string;
67
- title: string;
68
- icon?: string | null;
69
- }
70
-
71
- // ---------------------------------------------------------------------------
72
- // App descriptor
73
- // ---------------------------------------------------------------------------
74
-
75
- export interface AppDescriptor {
76
- id: string;
77
- name: string;
78
- icon?: string | null;
79
- description?: string | null;
80
- }
81
-
82
- // ---------------------------------------------------------------------------
83
- // Query types
84
- // ---------------------------------------------------------------------------
85
-
86
- export interface QueryFilter {
87
- filters?: Array<{
88
- property: string;
89
- operator: string;
90
- value: unknown;
91
- }>;
92
- sorts?: Array<{
93
- property: string;
94
- direction: 'asc' | 'desc';
95
- }>;
96
- page_size?: number;
97
- }
98
-
99
- // ---------------------------------------------------------------------------
100
- // NotisRuntime -- the window.__NOTIS_RUNTIME__ contract
101
- // ---------------------------------------------------------------------------
102
-
103
- export interface NotisRuntime {
104
- app: AppDescriptor;
105
- route: RouteDescriptor;
106
- databases: DatabaseDescriptor[];
107
-
108
- navigate?: (payload: { kind: string; [key: string]: unknown }) => void;
109
-
110
- listTools(): Promise<ToolDescriptor[]>;
111
- callTool(name: string, args?: Record<string, unknown>): Promise<unknown>;
112
-
113
- queryDatabase(args: {
114
- databaseSlug: string;
115
- query?: QueryFilter;
116
- offset?: number;
117
- }): Promise<{ documents: DocumentRecord[] }>;
118
-
119
- getDocument(args: {
120
- documentId: string;
121
- }): Promise<DocumentRecord>;
122
-
123
- upsertDocument(args: {
124
- databaseSlug: string;
125
- documentId?: string;
126
- title?: string;
127
- properties?: Record<string, unknown>;
128
- }): Promise<{ status: string; document: DocumentRecord }>;
129
-
130
- listCollectionItems(args?: {
131
- databaseSlug?: string;
132
- pageSize?: number;
133
- }): Promise<{ items: CollectionItem[] }>;
134
-
135
- request(path: string, options?: {
136
- method?: string;
137
- headers?: Record<string, string>;
138
- body?: unknown;
139
- }): Promise<unknown>;
140
- }
141
-
142
- // ---------------------------------------------------------------------------
143
- // Globals
144
- // ---------------------------------------------------------------------------
145
-
146
- declare global {
147
- interface Window {
148
- __NOTIS_RUNTIME__?: NotisRuntime;
149
- }
150
- }
151
-
152
- /**
153
- * Read the injected runtime from the window. Returns null during SSR or if the
154
- * runtime hasn't been injected yet (e.g. during `next dev` without preview).
155
- */
156
- export function getRuntime(): NotisRuntime | null {
157
- if (typeof window === 'undefined') return null;
158
- return window.__NOTIS_RUNTIME__ ?? null;
159
- }
@@ -1,123 +0,0 @@
1
- /**
2
- * Notis theme CSS variables.
3
- *
4
- * These match the portal's globals.css so that apps rendered inside the portal
5
- * iframe have identical styling. Import this in your root layout:
6
- *
7
- * import '@notis/sdk/styles.css';
8
- *
9
- * Then use Tailwind classes as normal -- shadcn components will pick up these
10
- * variables automatically.
11
- */
12
-
13
- @tailwind base;
14
- @tailwind components;
15
- @tailwind utilities;
16
-
17
- @layer base {
18
- :root {
19
- --background: 0 0% 100%;
20
- --foreground: 222.2 84% 4.9%;
21
- --card: 0 0% 100%;
22
- --card-foreground: 222.2 84% 4.9%;
23
- --popover: 0 0% 100%;
24
- --popover-foreground: 222.2 84% 4.9%;
25
- --primary: 222.2 47.4% 11.2%;
26
- --primary-foreground: 210 40% 98%;
27
- --secondary: 210 40% 96.1%;
28
- --secondary-foreground: 222.2 47.4% 11.2%;
29
- --muted: 210 40% 96.1%;
30
- --muted-foreground: 0 0% 46.9%;
31
- --accent: 210 40% 96.1%;
32
- --accent-foreground: 222.2 47.4% 11.2%;
33
- --destructive: 0 84.2% 60.2%;
34
- --destructive-foreground: 210 40% 98%;
35
- --border: 214.3 31.8% 91.4%;
36
- --input: 214.3 31.8% 91.4%;
37
- --ring: 222.2 84% 4.9%;
38
- --radius: 0.5rem;
39
- --sidebar-background: 0 0% 7.5%;
40
- --sidebar-foreground: 240 4.8% 95.9%;
41
- --sidebar-primary: 0 0% 7.5%;
42
- --sidebar-primary-foreground: 240 4.8% 95.9%;
43
- --sidebar-accent: 240 3.7% 15.9%;
44
- --sidebar-accent-foreground: 240 4.8% 95.9%;
45
- --sidebar-border: 0 0% 23.5%;
46
- --sidebar-ring: 217.2 91.2% 59.8%;
47
- --chart-1: 210 100% 49%;
48
- --chart-2: 173 58% 39%;
49
- --chart-3: 197 37% 24%;
50
- --chart-4: 43 74% 66%;
51
- --chart-5: 27 87% 67%;
52
- --code-block-background: #f6f6f6;
53
- --code-block-foreground: #27272a;
54
- --portal-page-max-width: 1100px;
55
- --portal-page-gutter-mobile: 1rem;
56
- --portal-page-gutter-desktop: 1rem;
57
- --portal-page-top-mobile: 1rem;
58
- --portal-page-top-desktop: 1.5rem;
59
- --portal-surface-pad-x-mobile: 1rem;
60
- --portal-surface-pad-x-desktop: 1.5rem;
61
- --portal-surface-pad-bottom: 1.5rem;
62
- }
63
-
64
- .dark {
65
- --background: 0 0% 13%;
66
- --foreground: 210 40% 98%;
67
- --card: 0 0% 13%;
68
- --card-foreground: 210 40% 98%;
69
- --popover: 0 0% 13%;
70
- --popover-foreground: 210 40% 98%;
71
- --primary: 210 40% 98%;
72
- --primary-foreground: 222.2 47.4% 11.2%;
73
- --secondary: 0 0% 18%;
74
- --secondary-foreground: 210 40% 98%;
75
- --muted: 0 0% 18%;
76
- --muted-foreground: 0 0% 65.1%;
77
- --accent: 0 0% 18%;
78
- --accent-foreground: 210 40% 98%;
79
- --destructive: 0 84.2% 60.2%;
80
- --destructive-foreground: 210 40% 98%;
81
- --border: 0 0% 23.5%;
82
- --input: 0 0% 23.5%;
83
- --ring: 212.7 26.8% 83.9%;
84
- --sidebar-background: 0 0% 7.5%;
85
- --sidebar-foreground: 240 4.8% 95.9%;
86
- --sidebar-primary: 224.3 76.3% 48%;
87
- --sidebar-primary-foreground: 0 0% 100%;
88
- --sidebar-accent: 240 3.7% 15.9%;
89
- --sidebar-accent-foreground: 240 4.8% 95.9%;
90
- --sidebar-border: 0 0% 23.5%;
91
- --sidebar-ring: 217.2 91.2% 59.8%;
92
- --chart-1: 210 100% 49%;
93
- --chart-2: 160 60% 45%;
94
- --chart-3: 30 80% 55%;
95
- --chart-4: 280 65% 60%;
96
- --chart-5: 340 75% 55%;
97
- --code-block-background: #1e1e1e;
98
- --code-block-foreground: #e4e4e7;
99
- }
100
- }
101
-
102
- @layer base {
103
- * {
104
- @apply border-border;
105
- }
106
- body {
107
- @apply bg-background text-foreground;
108
- }
109
- }
110
-
111
- @layer components {
112
- .notis-app-shell {
113
- @apply mx-auto w-full max-w-[var(--portal-page-max-width)] px-4 py-6 md:px-4 md:py-8;
114
- }
115
-
116
- .notis-app-surface {
117
- @apply rounded-2xl border border-border bg-card text-card-foreground shadow-sm;
118
- }
119
-
120
- .notis-app-section {
121
- @apply p-5 md:p-6;
122
- }
123
- }
@@ -1,54 +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/jsx-runtime'],
32
- output: {
33
- globals: {
34
- react: 'window.React',
35
- 'react-dom': 'window.ReactDOM',
36
- 'react/jsx-runtime': 'window.React',
37
- },
38
- assetFileNames: 'app[extname]',
39
- },
40
- },
41
- outDir: '.notis/output/bundle',
42
- emptyOutDir: true,
43
- cssCodeSplit: false,
44
- },
45
- resolve: {
46
- alias: {
47
- '@': process.cwd(),
48
- },
49
- },
50
- define: {
51
- 'process.env.NODE_ENV': JSON.stringify('production'),
52
- },
53
- };
54
- }
@@ -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
- }