create-nisc 0.8.1 → 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.
- package/CHANGELOG.md +16 -0
- package/README.md +89 -13
- package/dist/chunk-B3L4UJDN.js +316 -0
- package/dist/chunk-B3L4UJDN.js.map +1 -0
- package/dist/cli.js +86 -42
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +61 -6
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/templates/base/files/src/ui/kit.css +232 -0
- package/templates/base/item.json +31 -0
- package/templates/{moss-dom → classic/files}/src/app/actions/surfaces/welcome.action.ts +1 -1
- package/templates/classic/item.json +32 -0
- package/templates/{moss-dom → dom/files}/index.html +1 -1
- package/templates/dom/files/src/ui/kit.ts +109 -0
- package/templates/{shell-dom → dom/files}/src/ui/registry.ts +2 -2
- package/templates/{shell-dom → dom/files}/tsconfig.json +3 -14
- package/templates/dom/item.json +24 -0
- package/templates/model-first/agents-section.md +42 -0
- package/templates/model-first/files/src/app/action-catalog.ts +10 -0
- package/templates/model-first/files/src/app/actions/answer/text.action.ts +17 -0
- package/templates/model-first/files/src/app/actions/answer/text.layout.ts +3 -0
- package/templates/model-first/files/src/app/actions/ask/dock.action.ts +58 -0
- package/templates/model-first/files/src/app/actions/ask/dock.layout.ts +59 -0
- package/templates/model-first/files/src/app/actions/guide/checklist.action.ts +24 -0
- package/templates/model-first/files/src/app/actions/guide/checklist.layout.ts +17 -0
- package/templates/model-first/files/src/app/actions/guide/counter.action.ts +22 -0
- package/templates/model-first/files/src/app/actions/guide/counter.layout.ts +19 -0
- package/templates/model-first/files/src/app/actions/guide/guide.actions.ts +144 -0
- package/templates/model-first/files/src/app/actions/guide/guide.layouts.ts +31 -0
- package/templates/model-first/files/src/app/actions/guide/quiz.action.ts +25 -0
- package/templates/model-first/files/src/app/actions/guide/quiz.layout.ts +33 -0
- package/templates/model-first/files/src/app/app.ts +11 -0
- package/templates/model-first/files/src/app/arrangements.ts +17 -0
- package/templates/model-first/files/src/app/charter/assignments.ts +1 -0
- package/templates/model-first/files/src/app/charter/charter.ts +10 -0
- package/templates/model-first/files/src/app/screens.ts +87 -0
- package/templates/model-first/files/src/app/shell/areas.ts +3 -0
- package/templates/model-first/files/src/app/shell/frame.layout.ts +6 -0
- package/templates/model-first/files/src/app/shell/shell.ts +20 -0
- package/templates/model-first/files/src/app/vex/index.ts +3 -0
- package/templates/model-first/files/src/db/schema.ts +3 -0
- package/templates/{moss-react → model-first/files}/src/dev/all-checks.ts +3 -2
- package/templates/model-first/files/src/dev/artifacts-check.ts +95 -0
- package/templates/model-first/files/src/dev/checks.ts +13 -0
- package/templates/model-first/files/src/dev/compose-check.ts +191 -0
- package/templates/model-first/files/src/dev/guide-check.ts +90 -0
- package/templates/model-first/files/src/dev/live-ask.ts +185 -0
- package/templates/model-first/files/src/dev/scripted.ts +208 -0
- package/templates/{shell-dom → model-first/files}/src/dev/strata.ts +7 -1
- package/templates/model-first/files/src/server/boot.ts +24 -0
- package/templates/model-first/files/src/server/compose/answer.ts +145 -0
- package/templates/model-first/files/src/server/compose/catalog.ts +46 -0
- package/templates/model-first/files/src/server/compose/composer.agent.ts +18 -0
- package/templates/model-first/files/src/server/compose/history.ts +45 -0
- package/templates/model-first/files/src/server/compose/index.ts +170 -0
- package/templates/model-first/files/src/server/compose/knowledge.ts +57 -0
- package/templates/model-first/files/src/server/compose/layout.ts +70 -0
- package/templates/model-first/files/src/server/compose/pick.ts +44 -0
- package/templates/model-first/files/src/server/compose/plan.ts +45 -0
- package/templates/model-first/files/src/server/compose/record.ts +3 -0
- package/templates/model-first/files/src/server/compose/reply.schema.ts +70 -0
- package/templates/model-first/files/src/server/compose/screen.ts +40 -0
- package/templates/model-first/files/src/server/models/index.ts +35 -0
- package/templates/model-first/files/src/server/runs/index.ts +20 -0
- package/templates/model-first/item.json +84 -0
- package/templates/{moss-dom → moss/files}/README.md +1 -1
- package/templates/moss/item.json +40 -0
- package/templates/{shell-dom → page/files}/README.md +1 -1
- package/templates/page/item.json +37 -0
- package/templates/questions.json +5 -0
- package/templates/{moss-react → react/files}/index.html +1 -1
- package/templates/react/files/src/ui/kit.tsx +221 -0
- package/templates/{moss-react → react/files}/src/ui/registry.ts +2 -2
- package/templates/react/item.json +31 -0
- package/dist/chunk-6FL5A3LS.js +0 -174
- package/dist/chunk-6FL5A3LS.js.map +0 -1
- package/templates/moss-dom/package.json +0 -39
- package/templates/moss-dom/src/app/actions/surfaces/welcome.layout.ts +0 -25
- package/templates/moss-dom/src/ui/kit.css +0 -42
- package/templates/moss-dom/src/ui/kit.ts +0 -35
- package/templates/moss-dom/src/ui/registry.ts +0 -15
- package/templates/moss-dom/tsconfig.json +0 -27
- package/templates/moss-react/README.md +0 -15
- package/templates/moss-react/nisc.config.ts +0 -11
- package/templates/moss-react/package.json +0 -42
- package/templates/moss-react/src/app/action-catalog.ts +0 -6
- package/templates/moss-react/src/app/actions/surfaces/welcome.action.ts +0 -10
- package/templates/moss-react/src/app/app.ts +0 -7
- package/templates/moss-react/src/app/charter/assignments.ts +0 -2
- package/templates/moss-react/src/app/charter/charter.ts +0 -5
- package/templates/moss-react/src/app/shell/frame.layout.ts +0 -3
- package/templates/moss-react/src/app/shell/shell.ts +0 -7
- package/templates/moss-react/src/dev/artifacts-check.ts +0 -49
- package/templates/moss-react/src/dev/strata.ts +0 -21
- package/templates/moss-react/src/dev/welcome-check.ts +0 -38
- package/templates/moss-react/src/server/boot.ts +0 -6
- package/templates/moss-react/src/server/runtime.ts +0 -13
- package/templates/moss-react/src/ui/kit.css +0 -42
- package/templates/moss-react/src/ui/kit.tsx +0 -39
- package/templates/moss-react/strata.lock.json +0 -6
- package/templates/shell-dom/index.html +0 -12
- package/templates/shell-dom/package.json +0 -35
- package/templates/shell-dom/src/app/action-catalog.ts +0 -6
- package/templates/shell-dom/src/app/actions/surfaces/welcome.action.ts +0 -10
- package/templates/shell-dom/src/app/actions/surfaces/welcome.layout.ts +0 -32
- package/templates/shell-dom/src/app/shell/frame.layout.ts +0 -3
- package/templates/shell-dom/src/ui/kit.css +0 -42
- package/templates/shell-dom/src/ui/kit.ts +0 -35
- package/templates/shell-dom/strata.lock.json +0 -6
- package/templates/shell-dom/vite.config.ts +0 -5
- package/templates/shell-react/README.md +0 -16
- package/templates/shell-react/index.html +0 -12
- package/templates/shell-react/package.json +0 -40
- package/templates/shell-react/src/app/action-catalog.ts +0 -6
- package/templates/shell-react/src/app/actions/surfaces/welcome.action.ts +0 -10
- package/templates/shell-react/src/app/shell/frame.layout.ts +0 -3
- package/templates/shell-react/src/app/shell/shell.ts +0 -7
- package/templates/shell-react/src/boot.ts +0 -13
- package/templates/shell-react/src/dev/all-checks.ts +0 -17
- package/templates/shell-react/src/dev/artifacts-check.ts +0 -45
- package/templates/shell-react/src/dev/strata.ts +0 -21
- package/templates/shell-react/src/dev/welcome-check.ts +0 -21
- package/templates/shell-react/src/ui/kit.css +0 -42
- package/templates/shell-react/src/ui/kit.tsx +0 -39
- package/templates/shell-react/src/ui/registry.ts +0 -12
- package/templates/shell-react/strata.lock.json +0 -6
- package/templates/shell-react/tsconfig.json +0 -28
- package/templates/shell-react/vite.config.ts +0 -8
- /package/templates/{moss-dom → base/files}/strata.lock.json +0 -0
- /package/templates/{moss-dom → classic/files}/src/app/action-catalog.ts +0 -0
- /package/templates/{moss-dom → classic/files}/src/app/shell/frame.layout.ts +0 -0
- /package/templates/{moss-dom → classic/files}/src/dev/strata.ts +0 -0
- /package/templates/{moss-react → classic/with/moss}/src/app/actions/surfaces/welcome.layout.ts +0 -0
- /package/templates/{moss-dom → classic/with/moss}/src/app/app.ts +0 -0
- /package/templates/{moss-dom → classic/with/moss}/src/app/charter/assignments.ts +0 -0
- /package/templates/{moss-dom → classic/with/moss}/src/app/charter/charter.ts +0 -0
- /package/templates/{moss-dom → classic/with/moss}/src/app/shell/shell.ts +0 -0
- /package/templates/{moss-dom → classic/with/moss}/src/dev/all-checks.ts +0 -0
- /package/templates/{moss-dom → classic/with/moss}/src/dev/artifacts-check.ts +0 -0
- /package/templates/{moss-dom → classic/with/moss}/src/dev/welcome-check.ts +0 -0
- /package/templates/{moss-dom → classic/with/moss}/src/server/boot.ts +0 -0
- /package/templates/{shell-react → classic/with/page}/src/app/actions/surfaces/welcome.layout.ts +0 -0
- /package/templates/{shell-dom → classic/with/page}/src/app/shell/shell.ts +0 -0
- /package/templates/{shell-dom → classic/with/page}/src/boot.ts +0 -0
- /package/templates/{shell-dom → classic/with/page}/src/dev/all-checks.ts +0 -0
- /package/templates/{shell-dom → classic/with/page}/src/dev/artifacts-check.ts +0 -0
- /package/templates/{shell-dom → classic/with/page}/src/dev/welcome-check.ts +0 -0
- /package/templates/{moss-dom → dom/files}/vite.config.ts +0 -0
- /package/templates/{moss-dom → dom/with/moss}/src/main.ts +0 -0
- /package/templates/{moss-dom → dom/with/moss}/src/server/document.ts +0 -0
- /package/templates/{shell-dom → dom/with/page}/nisc.config.ts +0 -0
- /package/templates/{shell-dom → dom/with/page}/src/main.ts +0 -0
- /package/templates/{shell-dom → dom/with/page}/src/ui/screen.ts +0 -0
- /package/templates/{moss-dom → moss/files}/nisc.config.ts +0 -0
- /package/templates/{moss-dom → moss/files}/src/server/runtime.ts +0 -0
- /package/templates/{moss-react → react/files}/tsconfig.json +0 -0
- /package/templates/{moss-react → react/files}/vite.config.ts +0 -0
- /package/templates/{moss-react → react/with/moss}/src/main.tsx +0 -0
- /package/templates/{moss-react → react/with/moss}/src/server/document.ts +0 -0
- /package/templates/{shell-react → react/with/page}/nisc.config.ts +0 -0
- /package/templates/{shell-react → react/with/page}/src/main.tsx +0 -0
- /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,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
|
-
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/templates/{moss-react → classic/with/moss}/src/app/actions/surfaces/welcome.layout.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/templates/{shell-react → classic/with/page}/src/app/actions/surfaces/welcome.layout.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|