@notis_ai/cli 0.2.31 → 0.2.32
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 +14 -0
- package/config/notis_app_design_rules.json +22 -0
- package/dist/agent-hooks/notis-agent-hook.mjs +352 -27
- package/dist/base-skills/notis-spaces/.notis-base-skill.json +1 -1
- package/dist/base-skills/notis-spaces/SKILL.md +4 -1
- package/dist/base-skills/notis-spaces/references/fixtures.md +4 -2
- package/dist/base-skills/notis-spaces/references/reading.md +3 -1
- package/dist/base-skills/notis-spaces/references/release.md +3 -1
- package/dist/base-skills/notis-spaces/references/sdk.md +25 -5
- package/dist/sdk/src/ui/icons.tsx +17 -1
- package/dist/space-harness/host.js +83 -79
- package/dist/space-sdk/dist/{chunk-3DFOGU26.js → chunk-I4Z4UFGB.js} +1 -1
- package/dist/space-sdk/dist/index.js +1 -1
- package/dist/space-sdk/dist/ui.js +5 -5
- package/dist/space-sdk/src/tailwind-candidates.d.ts +42 -0
- package/dist/space-sdk/src/ui/blocks/blocks.d.ts +18 -0
- package/dist/space-sdk/src/ui/blocks/index.d.ts +2 -2
- package/dist/space-sdk/src/ui/icons.d.ts +6 -0
- package/dist/space-sdk/src/ui/index.d.ts +1 -1
- package/dist/space-sdk/src/ui/list/ListReader.d.ts +8 -0
- package/dist/view-renderer/dist/host.js +151 -147
- package/package.json +3 -3
- package/skills/notis-spaces/cli.md +14 -0
- package/src/command-specs/spaces.js +67 -0
- package/src/runtime/app-boundary-validator.js +248 -3
- package/src/runtime/app-data-literals.js +32 -23
- package/src/runtime/space-test-server.js +22 -3
|
@@ -49,7 +49,8 @@ rather than from a copy.
|
|
|
49
49
|
`OpenAsMenu`, `Keycap`. `ListReader` draws the whole list chrome from props:
|
|
50
50
|
`search` (the host top bar field), `tabs` (pills in one 44px row), `title`
|
|
51
51
|
(a short status with its count at the start of that row, such as "23 to
|
|
52
|
-
triage"), `create` (the "+" at its end), `viewMenu`, `infoLine`,
|
|
52
|
+
triage"), `create` (the "+" at its end), `viewMenu`, `infoLine`, `filters` (removable
|
|
53
|
+
`FilterChip`s, each `{ id, label, onClear }`, at the start of the info line),
|
|
53
54
|
`readerLabel` and `readerActions` (the reader bar), `crumbLabel` (the open
|
|
54
55
|
item in the top bar crumb), `crumbRecordKey` (its record key when the items
|
|
55
56
|
are records of the Space's `collection`), `readerLayout` (`'fill'` lays a
|
|
@@ -125,7 +126,7 @@ rather than from a copy.
|
|
|
125
126
|
previews, a timer). The browser asks once to place windows on screens; the
|
|
126
127
|
desktop app never asks. Leaving the view closes the audience window.
|
|
127
128
|
- **Blocks**: `Section`, `Badge`, `Button`, `ToggleGroup`, `SegmentedControl`,
|
|
128
|
-
`NativeSelect`, `EmptyState`, `Notice`, `Metric`. A `Section`'s `kind`
|
|
129
|
+
`NativeSelect`, `EmptyState`, `Notice`, `Metric`, `FilterChip`. A `Section`'s `kind`
|
|
129
130
|
is `bar` (period and filters), `stats`, `chart`, `data` (a table) or `form`,
|
|
130
131
|
and its head takes `title`, `count`, `meta`, `tabs` and `actions`. There is no
|
|
131
132
|
page heading: the host top bar shows the title. One toggle is a `Button` with
|
|
@@ -134,9 +135,28 @@ rather than from a copy.
|
|
|
134
135
|
(`TabRow`, which folds the pills that do not fit into More); a
|
|
135
136
|
`SegmentedControl` is only a mode switch inside a section. `Tabs` scroll
|
|
136
137
|
sideways on a phone; `wrap` puts the tabs that do not fit on a next line.
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
A removable filter that is not a tab (a contact, a tag) is a `FilterChip`
|
|
139
|
+
(`label`, `onClear`); over a list, pass them as `ListReader`'s `filters`.
|
|
140
|
+
`Icon` draws a toolkit icon by name, and every `icon` prop or field (a
|
|
141
|
+
`Button`, a reader action, a menu item) takes the same names.
|
|
142
|
+
`notis spaces build` refuses any other name written there as a string
|
|
143
|
+
and suggests the closest ones. The names: `archive`, `arrow-bend-up-right`,
|
|
144
|
+
`arrow-clockwise`, `arrow-counter-clockwise`, `arrow-left`,
|
|
145
|
+
`arrow-square-out`, `arrows-clockwise`, `arrows-left-right`, `arrows-out`,
|
|
146
|
+
`caret-down`, `caret-left`, `caret-right`, `caret-up`, `chart-line-up`,
|
|
147
|
+
`chat-circle-text`, `chats`, `check`, `check-circle`, `check-circle-fill`,
|
|
148
|
+
`circle`, `circle-dashed`, `circle-half`, `circle-three-quarter`,
|
|
149
|
+
`clipboard-text`, `clock`, `clock-countdown`, `copy`, `corners-out`,
|
|
150
|
+
`dots-three`, `download-simple`, `envelope-open`, `envelope-simple`, `file`,
|
|
151
|
+
`file-audio`, `file-image`, `file-text`, `file-video`, `flask`,
|
|
152
|
+
`fork-knife`, `funnel-simple`, `hourglass`, `info`, `kanban`, `link`,
|
|
153
|
+
`magnifying-glass-minus`, `magnifying-glass-plus`, `minus-circle`,
|
|
154
|
+
`paper-plane-right`, `paper-plane-tilt`, `paperclip`, `pause`,
|
|
155
|
+
`pencil-simple`, `play`, `plus`, `rocket-launch`, `sidebar-simple`,
|
|
156
|
+
`sparkle`, `square-center`, `star`, `star-fill`, `toggle-left`,
|
|
157
|
+
`toggle-right`, `trash`, `tray-arrow-up`, `user-plus`, `x`,
|
|
158
|
+
`x-circle-fill`. For any other icon, pass a `@phosphor-icons/react` element as the `icon` (the template depends on it),
|
|
159
|
+
never a second icon set.
|
|
140
160
|
A `Notice` is read politely, danger too; pass `urgent` only for a problem the
|
|
141
161
|
person must act on now (it becomes an alert that interrupts the screen reader).
|
|
142
162
|
- **Fields**: `EditableFields` (a form; Save and Cancel show once something
|
|
@@ -56,6 +56,7 @@ const SHAPES: Record<string, Shape> = {
|
|
|
56
56
|
'check-circle-fill': <g><circle {...F} cx="8" cy="8" r="6.5" /><path d="M5 8.2l2 2 4-4" fill="none" stroke="hsl(var(--background))" strokeWidth={1.5} strokeLinecap="round" strokeLinejoin="round" /></g>,
|
|
57
57
|
'minus-circle': <g {...S}><circle cx="8" cy="8" r="6" /><path d="M5.5 8h5" /></g>,
|
|
58
58
|
'paper-plane-right': <path {...S} d="M2.5 2.8l11 5.2-11 5.2 1.8-5.2zM4.3 8h4.7" />,
|
|
59
|
+
'paper-plane-tilt': <path {...S} d="M2.3 6.7l11.2-4.2-4.2 11.2-2.2-4.8zM7.1 8.9l3.3-3.3" />,
|
|
59
60
|
paperclip: <path {...S} d="M10.5 5l-4.6 4.6a1.1 1.1 0 001.6 1.6l5-5a2.3 2.3 0 00-3.2-3.2l-5 5a3.4 3.4 0 004.8 4.8L13 8.9" />,
|
|
60
61
|
'clipboard-text': <g {...S}><path d="M10.5 3h2a.5.5 0 01.5.5v10a.5.5 0 01-.5.5h-9a.5.5 0 01-.5-.5v-10a.5.5 0 01.5-.5h2" /><rect x="5.5" y="2" width="5" height="2.5" rx=".75" /><path d="M6 8h4M6 10.5h4" /></g>,
|
|
61
62
|
'x-circle-fill': <g><circle {...F} cx="8" cy="8" r="6.5" /><path d="M5.8 5.8l4.4 4.4M10.2 5.8l-4.4 4.4" fill="none" stroke="hsl(var(--background))" strokeWidth={1.5} strokeLinecap="round" /></g>,
|
|
@@ -63,14 +64,29 @@ const SHAPES: Record<string, Shape> = {
|
|
|
63
64
|
'magnifying-glass-minus': <path {...S} d="M7 12A5 5 0 107 2a5 5 0 000 10zM10.6 10.6L14 14M5 7h4" />,
|
|
64
65
|
'download-simple': <path {...S} d="M8 2.5v7.5M4.5 6.5L8 10l3.5-3.5M2.5 10v3a.5.5 0 00.5.5h10a.5.5 0 00.5-.5v-3" />,
|
|
65
66
|
info: <g {...S}><circle cx="8" cy="8" r="6.5" /><path d="M8 7.5V11M8 5.25v.01" /></g>,
|
|
67
|
+
'arrow-square-out': <path {...S} d="M12.5 9v3.5a.5.5 0 01-.5.5H3.5a.5.5 0 01-.5-.5V4a.5.5 0 01.5-.5H7M9.5 2.5h4v4M13.5 2.5L8 8" />,
|
|
68
|
+
'funnel-simple': <path {...S} d="M2.5 4.5h11M4.5 8h7M6.5 11.5h3" />,
|
|
66
69
|
link: <path {...S} d="M6.8 9.2l2.4-2.4M7.6 4.6l1.2-1.2a2.8 2.8 0 014 4l-1.2 1.2M8.4 11.4l-1.2 1.2a2.8 2.8 0 01-4-4l1.2-1.2" />,
|
|
67
70
|
file: <path {...S} d="M9.5 2H4a.5.5 0 00-.5.5v11a.5.5 0 00.5.5h8a.5.5 0 00.5-.5V5zM9.5 2v3h3" />,
|
|
68
71
|
'file-image': <g {...S}><path d="M9.5 2H4a.5.5 0 00-.5.5v11a.5.5 0 00.5.5h8a.5.5 0 00.5-.5V5zM9.5 2v3h3" /><path d="M3.5 12l3-3 2 2 1.5-1.5 2.5 2.5" /><circle cx="6.5" cy="6.75" r=".75" /></g>,
|
|
69
72
|
'file-video': <g {...S}><path d="M9.5 2H4a.5.5 0 00-.5.5v11a.5.5 0 00.5.5h8a.5.5 0 00.5-.5V5zM9.5 2v3h3" /><path d="M6.5 8v3.5L9.5 9.75z" /></g>,
|
|
70
73
|
'file-audio': <g {...S}><path d="M9.5 2H4a.5.5 0 00-.5.5v11a.5.5 0 00.5.5h8a.5.5 0 00.5-.5V5zM9.5 2v3h3" /><path d="M6 9.5v1.5h1.25L9 12.25v-4.5L7.25 9H6M10.5 8.5a1.8 1.8 0 010 2.5" /></g>,
|
|
71
74
|
'fork-knife': <path {...S} d="M3.5 2v3.5a1.5 1.5 0 003 0V2M5 2v12M11.5 14V2c-1.4.9-2.2 3-2.2 6.5h2.2" />,
|
|
75
|
+
'check-circle': <g {...S}><circle cx="8" cy="8" r="6" /><path d="M5.5 8.2l1.8 1.8 3.4-3.6" /></g>,
|
|
76
|
+
'chart-line-up': <path {...S} d="M2.5 2.5v11h11M4.5 10.5l3-3 2 2 4-4.5M10.5 5h3v3" />,
|
|
77
|
+
sparkle: <path {...S} d="M7 3.5l1.2 3.3 3.3 1.2-3.3 1.2L7 12.5 5.8 9.2 2.5 8l3.3-1.2zM12.5 1.75v2.5M11.25 3h2.5" />,
|
|
78
|
+
'rocket-launch': <g {...S}><path d="M5.2 7.3l4.4-4.4C11 1.5 13.5 2 14 2c0 .5.5 3-.9 4.4l-4.4 4.4zM5.2 7.3H3l2-2.3h2.8M8.7 10.8V13l2.3-2V8.2M5.3 10.7c-1.3.4-2.3 1.5-2.8 2.8 1.3-.5 2.4-1.5 2.8-2.8z" /><circle cx="10.8" cy="5.2" r=".9" /></g>,
|
|
79
|
+
chats: <g {...S}><path d="M3 3h6.5a.5.5 0 01.5.5v5a.5.5 0 01-.5.5H5.2L2.5 11V3.5A.5.5 0 013 3z" /><path d="M10 6h3a.5.5 0 01.5.5V14l-2.6-2H7a.5.5 0 01-.5-.5V9" /></g>,
|
|
80
|
+
kanban: <g {...S}><rect x="2.5" y="2.5" width="3" height="10" rx=".5" /><rect x="6.5" y="2.5" width="3" height="6" rx=".5" /><rect x="10.5" y="2.5" width="3" height="8" rx=".5" /></g>,
|
|
72
81
|
};
|
|
73
82
|
|
|
83
|
+
/**
|
|
84
|
+
* Every name the set draws, in the order above. `notis spaces build` refuses an `icon` or `<Icon name>` string that is
|
|
85
|
+
* not one of them; the CLI and the server read the same list from `server/config/notis_app_design_rules.json`, kept
|
|
86
|
+
* equal to this one by `icons.test.tsx`.
|
|
87
|
+
*/
|
|
88
|
+
export const ICON_NAMES: readonly string[] = Object.freeze(Object.keys(SHAPES));
|
|
89
|
+
|
|
74
90
|
export function hasIcon(name: string): boolean {
|
|
75
91
|
return Object.prototype.hasOwnProperty.call(SHAPES, name);
|
|
76
92
|
}
|
|
@@ -81,7 +97,7 @@ const warned = new Set<string>();
|
|
|
81
97
|
function warnUnknown(name: string): void {
|
|
82
98
|
if (warned.has(name) || typeof console === 'undefined') return;
|
|
83
99
|
warned.add(name);
|
|
84
|
-
console.warn(`[notis/ui] Unknown icon "${name}": it renders nothing. Use a name from the toolkit set (${
|
|
100
|
+
console.warn(`[notis/ui] Unknown icon "${name}": it renders nothing. Use a name from the toolkit set (${ICON_NAMES.length} icons, listed in the design system) or pass a Phosphor component.`);
|
|
85
101
|
}
|
|
86
102
|
|
|
87
103
|
/** A built-in icon by name; an unknown name renders nothing and warns once. Decorative: the control carries the label. */
|