create-nisc 0.8.0 → 0.8.2

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 (163) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +89 -13
  3. package/dist/chunk-B3L4UJDN.js +316 -0
  4. package/dist/chunk-B3L4UJDN.js.map +1 -0
  5. package/dist/cli.js +86 -42
  6. package/dist/cli.js.map +1 -1
  7. package/dist/index.d.ts +61 -6
  8. package/dist/index.js +1 -1
  9. package/package.json +1 -1
  10. package/templates/base/files/src/ui/kit.css +232 -0
  11. package/templates/base/item.json +31 -0
  12. package/templates/{moss-dom → classic/files}/src/app/actions/surfaces/welcome.action.ts +1 -1
  13. package/templates/classic/item.json +32 -0
  14. package/templates/{moss-dom → dom/files}/index.html +1 -1
  15. package/templates/dom/files/src/ui/kit.ts +109 -0
  16. package/templates/{shell-dom → dom/files}/src/ui/registry.ts +2 -2
  17. package/templates/{shell-dom → dom/files}/tsconfig.json +3 -14
  18. package/templates/dom/item.json +24 -0
  19. package/templates/model-first/agents-section.md +42 -0
  20. package/templates/model-first/files/src/app/action-catalog.ts +10 -0
  21. package/templates/model-first/files/src/app/actions/answer/text.action.ts +17 -0
  22. package/templates/model-first/files/src/app/actions/answer/text.layout.ts +3 -0
  23. package/templates/model-first/files/src/app/actions/ask/dock.action.ts +58 -0
  24. package/templates/model-first/files/src/app/actions/ask/dock.layout.ts +59 -0
  25. package/templates/model-first/files/src/app/actions/guide/checklist.action.ts +24 -0
  26. package/templates/model-first/files/src/app/actions/guide/checklist.layout.ts +17 -0
  27. package/templates/model-first/files/src/app/actions/guide/counter.action.ts +22 -0
  28. package/templates/model-first/files/src/app/actions/guide/counter.layout.ts +19 -0
  29. package/templates/model-first/files/src/app/actions/guide/guide.actions.ts +144 -0
  30. package/templates/model-first/files/src/app/actions/guide/guide.layouts.ts +31 -0
  31. package/templates/model-first/files/src/app/actions/guide/quiz.action.ts +25 -0
  32. package/templates/model-first/files/src/app/actions/guide/quiz.layout.ts +33 -0
  33. package/templates/model-first/files/src/app/app.ts +11 -0
  34. package/templates/model-first/files/src/app/arrangements.ts +17 -0
  35. package/templates/model-first/files/src/app/charter/assignments.ts +1 -0
  36. package/templates/model-first/files/src/app/charter/charter.ts +10 -0
  37. package/templates/model-first/files/src/app/screens.ts +87 -0
  38. package/templates/model-first/files/src/app/shell/areas.ts +3 -0
  39. package/templates/model-first/files/src/app/shell/frame.layout.ts +6 -0
  40. package/templates/model-first/files/src/app/shell/shell.ts +20 -0
  41. package/templates/model-first/files/src/app/vex/index.ts +3 -0
  42. package/templates/model-first/files/src/db/schema.ts +3 -0
  43. package/templates/{moss-react → model-first/files}/src/dev/all-checks.ts +3 -2
  44. package/templates/model-first/files/src/dev/artifacts-check.ts +95 -0
  45. package/templates/model-first/files/src/dev/checks.ts +13 -0
  46. package/templates/model-first/files/src/dev/compose-check.ts +191 -0
  47. package/templates/model-first/files/src/dev/guide-check.ts +90 -0
  48. package/templates/model-first/files/src/dev/live-ask.ts +185 -0
  49. package/templates/model-first/files/src/dev/scripted.ts +208 -0
  50. package/templates/{shell-dom → model-first/files}/src/dev/strata.ts +7 -1
  51. package/templates/model-first/files/src/server/boot.ts +24 -0
  52. package/templates/model-first/files/src/server/compose/answer.ts +145 -0
  53. package/templates/model-first/files/src/server/compose/catalog.ts +46 -0
  54. package/templates/model-first/files/src/server/compose/composer.agent.ts +18 -0
  55. package/templates/model-first/files/src/server/compose/history.ts +45 -0
  56. package/templates/model-first/files/src/server/compose/index.ts +170 -0
  57. package/templates/model-first/files/src/server/compose/knowledge.ts +57 -0
  58. package/templates/model-first/files/src/server/compose/layout.ts +70 -0
  59. package/templates/model-first/files/src/server/compose/pick.ts +44 -0
  60. package/templates/model-first/files/src/server/compose/plan.ts +45 -0
  61. package/templates/model-first/files/src/server/compose/record.ts +3 -0
  62. package/templates/model-first/files/src/server/compose/reply.schema.ts +70 -0
  63. package/templates/model-first/files/src/server/compose/screen.ts +40 -0
  64. package/templates/model-first/files/src/server/models/index.ts +35 -0
  65. package/templates/model-first/files/src/server/runs/index.ts +20 -0
  66. package/templates/model-first/item.json +84 -0
  67. package/templates/{moss-dom → moss/files}/README.md +1 -1
  68. package/templates/moss/item.json +40 -0
  69. package/templates/{shell-dom → page/files}/README.md +1 -1
  70. package/templates/page/item.json +37 -0
  71. package/templates/questions.json +5 -0
  72. package/templates/{moss-react → react/files}/index.html +1 -1
  73. package/templates/react/files/src/ui/kit.tsx +221 -0
  74. package/templates/{moss-react → react/files}/src/ui/registry.ts +2 -2
  75. package/templates/react/item.json +31 -0
  76. package/dist/chunk-RU5ATATK.js +0 -174
  77. package/dist/chunk-RU5ATATK.js.map +0 -1
  78. package/templates/moss-dom/package.json +0 -39
  79. package/templates/moss-dom/src/app/actions/surfaces/welcome.layout.ts +0 -25
  80. package/templates/moss-dom/src/ui/kit.css +0 -42
  81. package/templates/moss-dom/src/ui/kit.ts +0 -35
  82. package/templates/moss-dom/src/ui/registry.ts +0 -15
  83. package/templates/moss-dom/tsconfig.json +0 -27
  84. package/templates/moss-react/README.md +0 -15
  85. package/templates/moss-react/nisc.config.ts +0 -11
  86. package/templates/moss-react/package.json +0 -42
  87. package/templates/moss-react/src/app/action-catalog.ts +0 -6
  88. package/templates/moss-react/src/app/actions/surfaces/welcome.action.ts +0 -10
  89. package/templates/moss-react/src/app/app.ts +0 -7
  90. package/templates/moss-react/src/app/charter/assignments.ts +0 -2
  91. package/templates/moss-react/src/app/charter/charter.ts +0 -5
  92. package/templates/moss-react/src/app/shell/frame.layout.ts +0 -3
  93. package/templates/moss-react/src/app/shell/shell.ts +0 -7
  94. package/templates/moss-react/src/dev/artifacts-check.ts +0 -49
  95. package/templates/moss-react/src/dev/strata.ts +0 -21
  96. package/templates/moss-react/src/dev/welcome-check.ts +0 -38
  97. package/templates/moss-react/src/server/boot.ts +0 -6
  98. package/templates/moss-react/src/server/runtime.ts +0 -13
  99. package/templates/moss-react/src/ui/kit.css +0 -42
  100. package/templates/moss-react/src/ui/kit.tsx +0 -39
  101. package/templates/moss-react/strata.lock.json +0 -6
  102. package/templates/shell-dom/index.html +0 -12
  103. package/templates/shell-dom/package.json +0 -35
  104. package/templates/shell-dom/src/app/action-catalog.ts +0 -6
  105. package/templates/shell-dom/src/app/actions/surfaces/welcome.action.ts +0 -10
  106. package/templates/shell-dom/src/app/actions/surfaces/welcome.layout.ts +0 -32
  107. package/templates/shell-dom/src/app/shell/frame.layout.ts +0 -3
  108. package/templates/shell-dom/src/ui/kit.css +0 -42
  109. package/templates/shell-dom/src/ui/kit.ts +0 -35
  110. package/templates/shell-dom/strata.lock.json +0 -6
  111. package/templates/shell-dom/vite.config.ts +0 -5
  112. package/templates/shell-react/README.md +0 -16
  113. package/templates/shell-react/index.html +0 -12
  114. package/templates/shell-react/package.json +0 -40
  115. package/templates/shell-react/src/app/action-catalog.ts +0 -6
  116. package/templates/shell-react/src/app/actions/surfaces/welcome.action.ts +0 -10
  117. package/templates/shell-react/src/app/shell/frame.layout.ts +0 -3
  118. package/templates/shell-react/src/app/shell/shell.ts +0 -7
  119. package/templates/shell-react/src/boot.ts +0 -13
  120. package/templates/shell-react/src/dev/all-checks.ts +0 -17
  121. package/templates/shell-react/src/dev/artifacts-check.ts +0 -45
  122. package/templates/shell-react/src/dev/strata.ts +0 -21
  123. package/templates/shell-react/src/dev/welcome-check.ts +0 -21
  124. package/templates/shell-react/src/ui/kit.css +0 -42
  125. package/templates/shell-react/src/ui/kit.tsx +0 -39
  126. package/templates/shell-react/src/ui/registry.ts +0 -12
  127. package/templates/shell-react/strata.lock.json +0 -6
  128. package/templates/shell-react/tsconfig.json +0 -28
  129. package/templates/shell-react/vite.config.ts +0 -8
  130. /package/templates/{moss-dom → base/files}/strata.lock.json +0 -0
  131. /package/templates/{moss-dom → classic/files}/src/app/action-catalog.ts +0 -0
  132. /package/templates/{moss-dom → classic/files}/src/app/shell/frame.layout.ts +0 -0
  133. /package/templates/{moss-dom → classic/files}/src/dev/strata.ts +0 -0
  134. /package/templates/{moss-react → classic/with/moss}/src/app/actions/surfaces/welcome.layout.ts +0 -0
  135. /package/templates/{moss-dom → classic/with/moss}/src/app/app.ts +0 -0
  136. /package/templates/{moss-dom → classic/with/moss}/src/app/charter/assignments.ts +0 -0
  137. /package/templates/{moss-dom → classic/with/moss}/src/app/charter/charter.ts +0 -0
  138. /package/templates/{moss-dom → classic/with/moss}/src/app/shell/shell.ts +0 -0
  139. /package/templates/{moss-dom → classic/with/moss}/src/dev/all-checks.ts +0 -0
  140. /package/templates/{moss-dom → classic/with/moss}/src/dev/artifacts-check.ts +0 -0
  141. /package/templates/{moss-dom → classic/with/moss}/src/dev/welcome-check.ts +0 -0
  142. /package/templates/{moss-dom → classic/with/moss}/src/server/boot.ts +0 -0
  143. /package/templates/{shell-react → classic/with/page}/src/app/actions/surfaces/welcome.layout.ts +0 -0
  144. /package/templates/{shell-dom → classic/with/page}/src/app/shell/shell.ts +0 -0
  145. /package/templates/{shell-dom → classic/with/page}/src/boot.ts +0 -0
  146. /package/templates/{shell-dom → classic/with/page}/src/dev/all-checks.ts +0 -0
  147. /package/templates/{shell-dom → classic/with/page}/src/dev/artifacts-check.ts +0 -0
  148. /package/templates/{shell-dom → classic/with/page}/src/dev/welcome-check.ts +0 -0
  149. /package/templates/{moss-dom → dom/files}/vite.config.ts +0 -0
  150. /package/templates/{moss-dom → dom/with/moss}/src/main.ts +0 -0
  151. /package/templates/{moss-dom → dom/with/moss}/src/server/document.ts +0 -0
  152. /package/templates/{shell-dom → dom/with/page}/nisc.config.ts +0 -0
  153. /package/templates/{shell-dom → dom/with/page}/src/main.ts +0 -0
  154. /package/templates/{shell-dom → dom/with/page}/src/ui/screen.ts +0 -0
  155. /package/templates/{moss-dom → moss/files}/nisc.config.ts +0 -0
  156. /package/templates/{moss-dom → moss/files}/src/server/runtime.ts +0 -0
  157. /package/templates/{moss-react → react/files}/tsconfig.json +0 -0
  158. /package/templates/{moss-react → react/files}/vite.config.ts +0 -0
  159. /package/templates/{moss-react → react/with/moss}/src/main.tsx +0 -0
  160. /package/templates/{moss-react → react/with/moss}/src/server/document.ts +0 -0
  161. /package/templates/{shell-react → react/with/page}/nisc.config.ts +0 -0
  162. /package/templates/{shell-react → react/with/page}/src/main.tsx +0 -0
  163. /package/templates/{shell-react → react/with/page}/src/ui/screen.tsx +0 -0
@@ -1,39 +0,0 @@
1
- import { z } from 'zod';
2
- import { useNovaDispatch } from '@niscorp/nova/adapters/react';
3
- import type { NovaComponent } from '@niscorp/nova/adapters/react';
4
-
5
- const parsed = <T,>(schema: z.ZodType<T>, props: unknown, fallback: T): T => {
6
- const result = schema.safeParse(props);
7
- return result.success ? result.data : fallback;
8
- };
9
-
10
- const PageProps = z.object({}).describe('The page: a centred column with the app’s background.');
11
- export const Page: NovaComponent = ({ children }) => <main className="k-page">{children}</main>;
12
- Page.meta = { description: 'The page: a centred column.', propsSchema: PageProps };
13
-
14
- const RowProps = z.object({}).describe('Children side by side, centred.');
15
- export const Row: NovaComponent = ({ children }) => <div className="k-row">{children}</div>;
16
- Row.meta = { description: 'Children side by side.', propsSchema: RowProps };
17
-
18
- const HeadingProps = z.object({}).describe('The page’s title.');
19
- export const Heading: NovaComponent = ({ children }) => <h1 className="k-heading">{children}</h1>;
20
- Heading.meta = { description: 'The page’s title.', propsSchema: HeadingProps };
21
-
22
- const TextProps = z.object({ tone: z.enum(['default', 'muted']).optional().describe('default | muted') });
23
- export const Text: NovaComponent = ({ children, novaRef: _ref, novaModel: _model, ...props }) => {
24
- const { tone } = parsed(TextProps, props, {});
25
- return <p className={tone === 'muted' ? 'k-text k-muted' : 'k-text'}>{children}</p>;
26
- };
27
- Text.meta = { description: 'A paragraph.', propsSchema: TextProps };
28
-
29
- const ButtonProps = z.object({ label: z.string().optional().describe('What the button says; falls back to its children.') });
30
- export const Button: NovaComponent = ({ children, novaRef, novaModel: _model, ...props }) => {
31
- const dispatch = useNovaDispatch();
32
- const { label } = parsed(ButtonProps, props, {});
33
- return (
34
- <button type="button" className="k-button" data-ref={novaRef} onClick={() => dispatch({ type: 'ui:click', ...(novaRef !== undefined ? { ref: novaRef } : {}) })}>
35
- {label ?? children}
36
- </button>
37
- );
38
- };
39
- Button.meta = { description: 'A button; dispatches ui:click with its ref.', propsSchema: ButtonProps };
@@ -1,12 +0,0 @@
1
- import { createComponentRegistry } from '@niscorp/nova';
2
- import type { ComponentRegistry } from '@niscorp/nova';
3
- import { ActionSlot, CanvasSlot } from '@niscorp/nova/adapters/react/components';
4
- import type { NovaComponent } from '@niscorp/nova/adapters/react';
5
- import { Button, Heading, Page, Row, Text } from './kit';
6
-
7
- export const buildRegistry = (): ComponentRegistry<NovaComponent> => {
8
- const registry = createComponentRegistry<NovaComponent>();
9
- registry.registerAll({ CanvasSlot, ActionSlot });
10
- registry.registerAll({ Page, Row, Heading, Text, Button });
11
- return registry;
12
- };
@@ -1,6 +0,0 @@
1
- {
2
- "grammar": {
3
- "nisc.nova": 2,
4
- "nisc.prism": 3
5
- }
6
- }
@@ -1,28 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "module": "ESNext",
5
- "moduleResolution": "Bundler",
6
- "lib": [
7
- "DOM",
8
- "DOM.Iterable",
9
- "ES2022"
10
- ],
11
- "jsx": "react-jsx",
12
- "strict": true,
13
- "noUncheckedIndexedAccess": true,
14
- "verbatimModuleSyntax": true,
15
- "isolatedModules": true,
16
- "skipLibCheck": true,
17
- "noEmit": true,
18
- "types": [
19
- "node",
20
- "vite/client"
21
- ]
22
- },
23
- "include": [
24
- "src",
25
- "nisc.config.ts",
26
- "vite.config.ts"
27
- ]
28
- }
@@ -1,8 +0,0 @@
1
- // A default export, which the style guide otherwise bans: vite reads its config
2
- // from one, so this file has to match vite's shape (AGENTS.md rule 16, a shim).
3
- import { defineConfig } from 'vite';
4
- import react from '@vitejs/plugin-react';
5
-
6
- export default defineConfig({
7
- plugins: [react()],
8
- });