@owlmeans/viable-common 0.0.34 → 0.0.35
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 +2 -2
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/agent-presentation/SKILL.md +1 -1
- package/agent-meta/skills/viable-common/SKILL.md +2 -2
- package/build/scaffold/consts.d.ts +14 -1
- package/build/scaffold/consts.d.ts.map +1 -1
- package/build/scaffold/consts.js +10 -0
- package/build/scaffold/consts.js.map +1 -1
- package/build/scaffold/schemas.d.ts +7 -0
- package/build/scaffold/schemas.d.ts.map +1 -1
- package/build/scaffold/schemas.js +119 -68
- package/build/scaffold/schemas.js.map +1 -1
- package/build/scaffold/types.d.ts +62 -24
- package/build/scaffold/types.d.ts.map +1 -1
- package/build/ux/schemas.js +2 -2
- package/build/ux/schemas.js.map +1 -1
- package/package.json +1 -1
- package/src/scaffold/consts.ts +14 -1
- package/src/scaffold/schemas.ts +125 -69
- package/src/scaffold/types.ts +64 -23
- package/src/ux/schemas.ts +2 -2
- package/tests/scaffold.spec.ts +73 -13
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ filesystem, no inference SDK. It is safe to import from a browser bundle.
|
|
|
21
21
|
## Installation
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
bun add @owlmeans/viable-common@^0.0.
|
|
24
|
+
bun add @owlmeans/viable-common@^0.0.35
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
## Rules worth knowing before you change something
|
|
@@ -39,7 +39,7 @@ means "inherit" has no other spelling. `tests/convert.spec.ts` walks every expor
|
|
|
39
39
|
both faults, and for draft-04 tuple `items`.
|
|
40
40
|
|
|
41
41
|
**A field that crosses a version skew carries no `enum`.** A connector is installed with
|
|
42
|
-
`npx -y @owlmeans/viable-mcp@^0.1.18-rc.
|
|
42
|
+
`npx -y @owlmeans/viable-mcp@^0.1.18-rc.32` and talks to a separately deployed platform, so an executor kind it
|
|
43
43
|
sends must remain an unused capability on an older platform rather than a refused session.
|
|
44
44
|
|
|
45
45
|
**A ceiling exists once.** The inquiry answer cap here equals `DEFAULT_INQUIRY_ANSWER_CHARS` in
|
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"package": "@owlmeans/viable-common",
|
|
4
|
-
"version": "0.0.
|
|
5
|
-
"generatedAt": "2026-09-
|
|
4
|
+
"version": "0.0.35",
|
|
5
|
+
"generatedAt": "2026-09-25T12:22:06.208Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -6,7 +6,7 @@ description: Shared, runtime-free taxonomy for presenting OwlMeans Viable agent
|
|
|
6
6
|
|
|
7
7
|
# Agent output presentation
|
|
8
8
|
|
|
9
|
-
**Install:** `"@owlmeans/viable-common": "^0.0.
|
|
9
|
+
**Install:** `"@owlmeans/viable-common": "^0.0.35"` in `dependencies`
|
|
10
10
|
|
|
11
11
|
`@owlmeans/viable-common`'s `agent/presentation.ts` owns the browser-safe vocabulary for agent
|
|
12
12
|
output. Keep the server and every client on `classifyAgentMessage()`; consumers may refine a
|
|
@@ -8,7 +8,7 @@ user-invocable: false
|
|
|
8
8
|
# @owlmeans/viable-common
|
|
9
9
|
|
|
10
10
|
**Layer:** Cross-cutting domain (contracts only)
|
|
11
|
-
**Install:** `"@owlmeans/viable-common": "^0.0.
|
|
11
|
+
**Install:** `"@owlmeans/viable-common": "^0.0.35"` in `dependencies`
|
|
12
12
|
**Subpaths:** `.` · `./slot` · `./connect` · `./convert` · `./integrity` · `./intent`
|
|
13
13
|
**Runtime-free:** no `@langchain/*`, no filesystem, no Ajv at run time (a devDependency, for the
|
|
14
14
|
tests that compile the schemas). It depends on `@owlmeans/planning`, `@owlmeans/resource`,
|
|
@@ -263,7 +263,7 @@ code, never as `minItems`/`maxItems`. The descriptions are what the planning mod
|
|
|
263
263
|
state each field's purpose and bounds; `gate.target` is filled by code and described as such.
|
|
264
264
|
|
|
265
265
|
**A field that crosses a version skew carries no `enum`.** Users run
|
|
266
|
-
`npx -y @owlmeans/viable-mcp@^0.1.18-rc.
|
|
266
|
+
`npx -y @owlmeans/viable-mcp@^0.1.18-rc.32` (the moving prerelease tag) against a separately deployed
|
|
267
267
|
platform, so `ConnectCapabilitiesSchema.executors.items`
|
|
268
268
|
is a bare string: a newer executor kind must stay an unused capability on an older platform, never
|
|
269
269
|
a refused session. Apply the same reasoning to anything else a newer connector may send an older
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BentoFragmentKind } from './types.js';
|
|
1
|
+
import type { BentoFragmentKind, LandingGateFieldKind } from './types.js';
|
|
2
2
|
/**
|
|
3
3
|
* The shapes a drawn widget can take.
|
|
4
4
|
*
|
|
@@ -30,4 +30,17 @@ export declare const AREA_SECTION_CAP = 6;
|
|
|
30
30
|
* value nothing can draw is a tile with an empty bottom.
|
|
31
31
|
*/
|
|
32
32
|
export declare const BENTO_FRAGMENT_KINDS: BentoFragmentKind[];
|
|
33
|
+
/**
|
|
34
|
+
* The controls a landing-gate field can be — the simplest native inputs, and no picker of any
|
|
35
|
+
* kind. A closed set for the same reason as {@link BENTO_FRAGMENT_KINDS}: each value is one plain
|
|
36
|
+
* element the seed's gate knows how to draw.
|
|
37
|
+
*/
|
|
38
|
+
export declare const LANDING_GATE_FIELD_KINDS: LandingGateFieldKind[];
|
|
39
|
+
/** The most fields a landing gate carries. A form longer than this is a screen, not an entry. */
|
|
40
|
+
export declare const LANDING_GATE_MAX_FIELDS = 3;
|
|
41
|
+
/** The options a `select` field carries: fewer is no choice, more is a list to browse. */
|
|
42
|
+
export declare const LANDING_GATE_OPTIONS: {
|
|
43
|
+
readonly min: 2;
|
|
44
|
+
readonly max: 6;
|
|
45
|
+
};
|
|
33
46
|
//# sourceMappingURL=consts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../src/scaffold/consts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../src/scaffold/consts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAEzE;;;;;;;GAOG;AACH,oBAAY,UAAU;IACpB,6DAA6D;IAC7D,IAAI,SAAS;IACb,gEAAgE;IAChE,KAAK,UAAU;IACf,mCAAmC;IACnC,IAAI,SAAS;IACb,yCAAyC;IACzC,KAAK,UAAU;IACf,+DAA+D;IAC/D,IAAI,SAAS;CACd;AAED,yEAAyE;AACzE,eAAO,MAAM,oBAAoB,IAAI,CAAA;AAErC,uEAAuE;AACvE,eAAO,MAAM,gBAAgB,IAAI,CAAA;AAEjC;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,EAAE,iBAAiB,EAAwC,CAAA;AAE5F;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,oBAAoB,EAAyC,CAAA;AAEpG,iGAAiG;AACjG,eAAO,MAAM,uBAAuB,IAAI,CAAA;AAExC,0FAA0F;AAC1F,eAAO,MAAM,oBAAoB;aAAK,GAAG,EAAE,CAAC;aAAE,GAAG,EAAE,CAAC;CAAW,CAAA"}
|
package/build/scaffold/consts.js
CHANGED
|
@@ -30,4 +30,14 @@ export const AREA_SECTION_CAP = 6;
|
|
|
30
30
|
* value nothing can draw is a tile with an empty bottom.
|
|
31
31
|
*/
|
|
32
32
|
export const BENTO_FRAGMENT_KINDS = ['list', 'note', 'people', 'steps'];
|
|
33
|
+
/**
|
|
34
|
+
* The controls a landing-gate field can be — the simplest native inputs, and no picker of any
|
|
35
|
+
* kind. A closed set for the same reason as {@link BENTO_FRAGMENT_KINDS}: each value is one plain
|
|
36
|
+
* element the seed's gate knows how to draw.
|
|
37
|
+
*/
|
|
38
|
+
export const LANDING_GATE_FIELD_KINDS = ['text', 'select', 'number', 'date'];
|
|
39
|
+
/** The most fields a landing gate carries. A form longer than this is a screen, not an entry. */
|
|
40
|
+
export const LANDING_GATE_MAX_FIELDS = 3;
|
|
41
|
+
/** The options a `select` field carries: fewer is no choice, more is a list to browse. */
|
|
42
|
+
export const LANDING_GATE_OPTIONS = { min: 2, max: 6 };
|
|
33
43
|
//# sourceMappingURL=consts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../../src/scaffold/consts.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,UAWX;AAXD,WAAY,UAAU;IACpB,6DAA6D;IAC7D,2BAAa,CAAA;IACb,gEAAgE;IAChE,6BAAe,CAAA;IACf,mCAAmC;IACnC,2BAAa,CAAA;IACb,yCAAyC;IACzC,6BAAe,CAAA;IACf,+DAA+D;IAC/D,2BAAa,CAAA;AACf,CAAC,EAXW,UAAU,KAAV,UAAU,QAWrB;AAED,yEAAyE;AACzE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAA;AAErC,uEAAuE;AACvE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAA;AAEjC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAwB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA"}
|
|
1
|
+
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../../src/scaffold/consts.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,UAWX;AAXD,WAAY,UAAU;IACpB,6DAA6D;IAC7D,2BAAa,CAAA;IACb,gEAAgE;IAChE,6BAAe,CAAA;IACf,mCAAmC;IACnC,2BAAa,CAAA;IACb,yCAAyC;IACzC,6BAAe,CAAA;IACf,+DAA+D;IAC/D,2BAAa,CAAA;AACf,CAAC,EAXW,UAAU,KAAV,UAAU,QAWrB;AAED,yEAAyE;AACzE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAA;AAErC,uEAAuE;AACvE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAA;AAEjC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAwB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;AAE5F;;;;GAIG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAA2B,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAA;AAEpG,iGAAiG;AACjG,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAA;AAExC,0FAA0F;AAC1F,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAW,CAAA"}
|
|
@@ -2,4 +2,11 @@ import type { JSONSchemaType } from 'ajv';
|
|
|
2
2
|
import type { ProductIdentity, ScaffoldPlan } from './types.js';
|
|
3
3
|
export declare const ProductIdentitySchema: JSONSchemaType<ProductIdentity>;
|
|
4
4
|
export declare const ScaffoldPlanSchema: JSONSchemaType<ScaffoldPlan>;
|
|
5
|
+
/**
|
|
6
|
+
* The plan as the planning MODEL answers it — {@link ScaffoldPlanSchema} with the gate held to the
|
|
7
|
+
* form. The stored schema keeps the pre-form gate keys optional so an old plan still validates;
|
|
8
|
+
* offering them to the model would let it write a chip picker again. Typed as the stored plan
|
|
9
|
+
* because every answer is one: the answer's gate is a subset of the stored gate.
|
|
10
|
+
*/
|
|
11
|
+
export declare const ScaffoldPlanAnswerSchema: JSONSchemaType<ScaffoldPlan>;
|
|
5
12
|
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/scaffold/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AAIzC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/scaffold/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AAIzC,OAAO,KAAK,EAC0E,eAAe,EACjF,YAAY,EAC/B,MAAM,YAAY,CAAA;AA+fnB,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAAC,eAAe,CAkBjE,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAC,YAAY,CA6B3D,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,EAiBrB,cAAc,CAAC,YAAY,CAAC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProjectArea } from '../areas/consts.js';
|
|
2
|
-
import { BENTO_FRAGMENT_KINDS, WidgetKind } from './consts.js';
|
|
2
|
+
import { BENTO_FRAGMENT_KINDS, LANDING_GATE_FIELD_KINDS, WidgetKind } from './consts.js';
|
|
3
3
|
const SketchContentSchema = {
|
|
4
4
|
type: 'object',
|
|
5
5
|
title: 'SketchContent',
|
|
@@ -75,7 +75,8 @@ const ScaffoldStoryPlanSchema = {
|
|
|
75
75
|
screen: {
|
|
76
76
|
type: 'string',
|
|
77
77
|
description: 'The main screen this story will need, named "{section}/{purpose}" -'
|
|
78
|
-
+ ' e.g. "Requests/Submit
|
|
78
|
+
+ ' e.g. "Requests/Submit request". The purpose is one or two words, never a sentence.'
|
|
79
|
+
+ ' The section part must equal the section above'
|
|
79
80
|
},
|
|
80
81
|
widget: {
|
|
81
82
|
type: 'object',
|
|
@@ -213,99 +214,125 @@ const BentoFragmentSchema = {
|
|
|
213
214
|
required: ['kind', 'rows'],
|
|
214
215
|
additionalProperties: false,
|
|
215
216
|
};
|
|
216
|
-
const
|
|
217
|
+
const LandingGateFieldSchema = {
|
|
217
218
|
type: 'object',
|
|
218
|
-
title: '
|
|
219
|
-
description: '
|
|
220
|
-
+ ' call-to-action buttons: a guest makes a few picks, sees sample results ranked against them,'
|
|
221
|
-
+ ' and signs in to continue with the picks carried over. Every text is in the end user\'s words',
|
|
219
|
+
title: 'LandingGateField',
|
|
220
|
+
description: 'One simple, non-sensitive field of the landing gate',
|
|
222
221
|
properties: {
|
|
223
|
-
|
|
222
|
+
name: {
|
|
224
223
|
type: 'string',
|
|
225
|
-
description: 'The
|
|
224
|
+
description: 'The camelCase key its value travels under, one word - e.g. "dish"'
|
|
226
225
|
},
|
|
227
|
-
|
|
228
|
-
type: 'string', nullable: true,
|
|
229
|
-
description: 'Leave it out - the platform fills it'
|
|
230
|
-
},
|
|
231
|
-
question: {
|
|
226
|
+
label: {
|
|
232
227
|
type: 'string',
|
|
233
|
-
description: 'The
|
|
234
|
-
+ ' in your pantry?"'
|
|
228
|
+
description: 'The visible label in the end user\'s words, 2-5 words - e.g. "What are you baking?"'
|
|
235
229
|
},
|
|
236
|
-
|
|
237
|
-
label: {
|
|
230
|
+
kind: {
|
|
238
231
|
type: 'string',
|
|
239
|
-
|
|
232
|
+
enum: LANDING_GATE_FIELD_KINDS,
|
|
233
|
+
description: 'text (a short line, the default), select (ONE choice out of 2-6 plain options),'
|
|
234
|
+
+ ' number, or date. Nothing else exists: no chips, no toggles, no multiple choice'
|
|
240
235
|
},
|
|
241
|
-
|
|
242
|
-
type: '
|
|
243
|
-
|
|
244
|
-
description: '5 to 8 things a guest can pick, 1-3 words each, from the story\'s own domain.'
|
|
245
|
-
+ ' Nothing personal, nothing sensitive, nothing that needs an account'
|
|
236
|
+
placeholder: {
|
|
237
|
+
type: 'string', nullable: true,
|
|
238
|
+
description: 'text or number only: an example value, e.g. "Rye sourdough". Never personal'
|
|
246
239
|
},
|
|
247
|
-
|
|
248
|
-
type: 'array',
|
|
240
|
+
options: {
|
|
241
|
+
type: 'array', nullable: true,
|
|
249
242
|
items: { type: 'string' },
|
|
250
|
-
description: '
|
|
251
|
-
+ ' already shows results'
|
|
243
|
+
description: 'select only: 2 to 6 plain options, 1-3 words each'
|
|
252
244
|
},
|
|
245
|
+
},
|
|
246
|
+
required: ['name', 'label', 'kind'],
|
|
247
|
+
additionalProperties: false,
|
|
248
|
+
};
|
|
249
|
+
/** What the gate's texts tell the planning model — one place, shared by the answer and stored schemas. */
|
|
250
|
+
const GATE_TEXT = {
|
|
251
|
+
description: 'The working entry into the key end-user workflow, drawn in the hero instead of the'
|
|
252
|
+
+ ' call-to-action buttons: ONE SMALL FORM - a heading, one to three simple non-sensitive'
|
|
253
|
+
+ ' fields, one button. A guest fills it in, signs in, and continues with what they entered.'
|
|
254
|
+
+ ' No choices to browse, no sample results, no counts, no previews. Every text is in the end'
|
|
255
|
+
+ ' user\'s words',
|
|
256
|
+
story: 'The code of the landing story, copied EXACTLY as given to you. Never shown',
|
|
257
|
+
target: 'Leave it out - the platform fills it',
|
|
258
|
+
question: 'The heading of the form, 3-6 words, in the end user\'s words - e.g. "What are you'
|
|
259
|
+
+ ' baking?"',
|
|
260
|
+
fields: 'The fields, AS FEW AS POSSIBLE: one whenever one is enough, never more than three. They'
|
|
261
|
+
+ ' are the first things the story\'s own screen asks for, in the same words',
|
|
262
|
+
cta: 'The button label, a verb first, 2-3 words and an arrow - e.g. "Start my post →"',
|
|
263
|
+
note: 'One short muted line under the form: no account is needed yet and what was entered comes'
|
|
264
|
+
+ ' along - e.g. "No account needed. What you enter comes with you."',
|
|
265
|
+
};
|
|
266
|
+
/** The pre-form keys of a stored gate: optional, described as history, never offered to the model. */
|
|
267
|
+
const LEGACY_GATE_NOTE = 'Pre-form shape, never written';
|
|
268
|
+
/**
|
|
269
|
+
* What the planning MODEL answers for the gate: the form and nothing older. The stored schema below
|
|
270
|
+
* adds the pre-form keys as optional, so a plan written before the gate became a form still
|
|
271
|
+
* validates; the model is never offered them.
|
|
272
|
+
*/
|
|
273
|
+
const LandingGateAnswerSchema = {
|
|
274
|
+
type: 'object',
|
|
275
|
+
title: 'LandingGatePlan',
|
|
276
|
+
description: GATE_TEXT.description,
|
|
277
|
+
properties: {
|
|
278
|
+
story: { type: 'string', description: GATE_TEXT.story },
|
|
279
|
+
target: { type: 'string', nullable: true, description: GATE_TEXT.target },
|
|
280
|
+
question: { type: 'string', description: GATE_TEXT.question },
|
|
281
|
+
fields: { type: 'array', items: LandingGateFieldSchema, description: GATE_TEXT.fields },
|
|
282
|
+
cta: { type: 'string', description: GATE_TEXT.cta },
|
|
283
|
+
note: { type: 'string', description: GATE_TEXT.note },
|
|
284
|
+
},
|
|
285
|
+
required: ['story', 'question', 'fields', 'cta', 'note'],
|
|
286
|
+
additionalProperties: false,
|
|
287
|
+
};
|
|
288
|
+
/**
|
|
289
|
+
* The gate as a plan may STORE it: the form, plus the pre-form keys (chips, sample records, a live
|
|
290
|
+
* count) as optional. A schema that validates a stored document only ever grows optional.
|
|
291
|
+
*/
|
|
292
|
+
const LandingGatePlanSchema = {
|
|
293
|
+
type: 'object',
|
|
294
|
+
title: 'LandingGatePlan',
|
|
295
|
+
description: GATE_TEXT.description,
|
|
296
|
+
properties: {
|
|
297
|
+
story: { type: 'string', description: GATE_TEXT.story },
|
|
298
|
+
target: { type: 'string', nullable: true, description: GATE_TEXT.target },
|
|
299
|
+
question: { type: 'string', description: GATE_TEXT.question },
|
|
300
|
+
fields: { type: 'array', nullable: true, items: LandingGateFieldSchema, description: GATE_TEXT.fields },
|
|
301
|
+
cta: { type: 'string', description: GATE_TEXT.cta },
|
|
302
|
+
note: { type: 'string', description: GATE_TEXT.note },
|
|
303
|
+
hint: { type: 'string', nullable: true, description: LEGACY_GATE_NOTE },
|
|
304
|
+
label: { type: 'string', nullable: true, description: LEGACY_GATE_NOTE },
|
|
305
|
+
inputs: { type: 'array', nullable: true, items: { type: 'string' }, description: LEGACY_GATE_NOTE },
|
|
306
|
+
selected: { type: 'array', nullable: true, items: { type: 'string' }, description: LEGACY_GATE_NOTE },
|
|
253
307
|
results: {
|
|
254
|
-
type: 'array',
|
|
308
|
+
type: 'array', nullable: true,
|
|
255
309
|
items: {
|
|
256
310
|
type: 'object',
|
|
257
311
|
properties: {
|
|
258
|
-
title: { type: 'string'
|
|
259
|
-
meta: {
|
|
260
|
-
|
|
261
|
-
description: 'One short line: how well it fits and one fact, e.g. "Uses all 3 · 3 h 20 min"'
|
|
262
|
-
},
|
|
263
|
-
needs: {
|
|
264
|
-
type: 'array',
|
|
265
|
-
items: { type: 'string' },
|
|
266
|
-
description: '2-4 of the inputs above, copied exactly, that this record uses'
|
|
267
|
-
},
|
|
312
|
+
title: { type: 'string' },
|
|
313
|
+
meta: { type: 'string' },
|
|
314
|
+
needs: { type: 'array', items: { type: 'string' } },
|
|
268
315
|
},
|
|
269
316
|
required: ['title', 'meta', 'needs'],
|
|
270
317
|
additionalProperties: false,
|
|
271
318
|
},
|
|
272
|
-
description:
|
|
319
|
+
description: LEGACY_GATE_NOTE
|
|
273
320
|
},
|
|
274
321
|
count: {
|
|
275
|
-
type: 'object',
|
|
322
|
+
type: 'object', nullable: true,
|
|
276
323
|
properties: {
|
|
277
|
-
one: { type: 'string'
|
|
278
|
-
many: { type: 'string'
|
|
279
|
-
none: { type: 'string'
|
|
324
|
+
one: { type: 'string' },
|
|
325
|
+
many: { type: 'string' },
|
|
326
|
+
none: { type: 'string' },
|
|
280
327
|
},
|
|
281
328
|
required: ['one', 'many', 'none'],
|
|
282
329
|
additionalProperties: false,
|
|
283
|
-
description:
|
|
284
|
-
},
|
|
285
|
-
empty: {
|
|
286
|
-
type: 'string',
|
|
287
|
-
description: 'One line shown when nothing matches, saying what to pick - e.g. "Pick two or more'
|
|
288
|
-
+ ' ingredients to see what you can bake."'
|
|
289
|
-
},
|
|
290
|
-
note: {
|
|
291
|
-
type: 'string',
|
|
292
|
-
description: 'One short line beside the button: signing in is by email and the picks come'
|
|
293
|
-
+ ' along - e.g. "Sign in with your email. Your picks come with you."'
|
|
294
|
-
},
|
|
295
|
-
cta: {
|
|
296
|
-
type: 'string',
|
|
297
|
-
description: 'The button label, a verb first, 2-3 words and an arrow - e.g. "Open recipes →"'
|
|
298
|
-
},
|
|
299
|
-
lock: {
|
|
300
|
-
type: 'string',
|
|
301
|
-
description: 'What unlocks after sign-in, as the accessible name of a lock icon - e.g. "Full'
|
|
302
|
-
+ ' method after sign-in"'
|
|
330
|
+
description: LEGACY_GATE_NOTE
|
|
303
331
|
},
|
|
332
|
+
empty: { type: 'string', nullable: true, description: LEGACY_GATE_NOTE },
|
|
333
|
+
lock: { type: 'string', nullable: true, description: LEGACY_GATE_NOTE },
|
|
304
334
|
},
|
|
305
|
-
required: [
|
|
306
|
-
'story', 'question', 'hint', 'label', 'inputs', 'selected', 'results', 'count', 'empty',
|
|
307
|
-
'note', 'cta', 'lock',
|
|
308
|
-
],
|
|
335
|
+
required: ['story', 'question', 'cta', 'note'],
|
|
309
336
|
additionalProperties: false,
|
|
310
337
|
};
|
|
311
338
|
const GuestHomePlanSchema = {
|
|
@@ -520,4 +547,28 @@ export const ScaffoldPlanSchema = {
|
|
|
520
547
|
required: ['identity', 'guestHome', 'areas', 'stories', 'motifs'],
|
|
521
548
|
additionalProperties: false,
|
|
522
549
|
};
|
|
550
|
+
/**
|
|
551
|
+
* The plan as the planning MODEL answers it — {@link ScaffoldPlanSchema} with the gate held to the
|
|
552
|
+
* form. The stored schema keeps the pre-form gate keys optional so an old plan still validates;
|
|
553
|
+
* offering them to the model would let it write a chip picker again. Typed as the stored plan
|
|
554
|
+
* because every answer is one: the answer's gate is a subset of the stored gate.
|
|
555
|
+
*/
|
|
556
|
+
export const ScaffoldPlanAnswerSchema = {
|
|
557
|
+
...ScaffoldPlanSchema,
|
|
558
|
+
properties: {
|
|
559
|
+
...ScaffoldPlanSchema.properties,
|
|
560
|
+
guestHome: {
|
|
561
|
+
...GuestHomePlanSchema,
|
|
562
|
+
properties: {
|
|
563
|
+
...GuestHomePlanSchema.properties,
|
|
564
|
+
gate: {
|
|
565
|
+
...LandingGateAnswerSchema,
|
|
566
|
+
nullable: true,
|
|
567
|
+
description: 'ONLY when you were given a landing story; omit it otherwise. '
|
|
568
|
+
+ LandingGateAnswerSchema.description,
|
|
569
|
+
},
|
|
570
|
+
},
|
|
571
|
+
},
|
|
572
|
+
},
|
|
573
|
+
};
|
|
523
574
|
//# sourceMappingURL=schemas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/scaffold/schemas.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAM9D,MAAM,mBAAmB,GAAkC;IACzD,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,oDAAoD;IACjE,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,0CAA0C,EAAE;QACrF,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,0DAA0D;SACxE;QACD,KAAK,EAAE;YACL,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI;YAC7B,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACzB,WAAW,EAAE,iFAAiF;SAC/F;QACD,OAAO,EAAE;YACP,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI;YAC7B,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACzB,WAAW,EAAE,qCAAqC;SACnD;QACD,MAAM,EAAE;YACN,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI;YAC7B,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACzB,WAAW,EAAE,oCAAoC;SAClD;QACD,MAAM,EAAE;YACN,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI;YAC7B,KAAK,EAAE;gBACL,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MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,iFAAiF;kBAC1F,wFAAwF;kBACxF,sFAAsF;kBACtF,mFAAmF;kBACnF,uEAAuE;SAC5E;KACF;IACD,QAAQ,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC;IACjE,oBAAoB,EAAE,KAAK;CAC5B,CAAA;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,GAAG,kBAAkB;IACrB,UAAU,EAAE;QACV,GAAG,kBAAkB,CAAC,UAAU;QAChC,SAAS,EAAE;YACT,GAAG,mBAAmB;YACtB,UAAU,EAAE;gBACV,GAAG,mBAAmB,CAAC,UAAU;gBACjC,IAAI,EAAE;oBACJ,GAAG,uBAAuB;oBAC1B,QAAQ,EAAE,IAAI;oBACd,WAAW,EAAE,+DAA+D;0BACxE,uBAAuB,CAAC,WAAW;iBACxC;aACF;SACF;KACF;CACyC,CAAA"}
|
|
@@ -127,50 +127,88 @@ export interface BentoFragment {
|
|
|
127
127
|
value?: string;
|
|
128
128
|
}[];
|
|
129
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* What kind of control a landing-gate field is. A CLOSED set of the simplest native inputs: each
|
|
132
|
+
* value is one plain element, so there is nothing here a visitor has to learn, and nothing that
|
|
133
|
+
* can grow into a picker, a chip group or a preview.
|
|
134
|
+
*/
|
|
135
|
+
export type LandingGateFieldKind = 'text' | 'select' | 'number' | 'date';
|
|
136
|
+
/** One simple, non-sensitive field of the landing gate. */
|
|
137
|
+
export interface LandingGateField {
|
|
138
|
+
/** The camelCase key the entered value travels under in the landing handoff: "dish". */
|
|
139
|
+
name: string;
|
|
140
|
+
/** The visible label, in the end user's words: "What are you baking?". */
|
|
141
|
+
label: string;
|
|
142
|
+
kind: LandingGateFieldKind;
|
|
143
|
+
/** An example value shown inside an empty text or number field — never a personal one. */
|
|
144
|
+
placeholder?: string;
|
|
145
|
+
/** `select` only: 2–6 plain options. */
|
|
146
|
+
options?: string[];
|
|
147
|
+
}
|
|
130
148
|
/**
|
|
131
149
|
* The landing gate — the working entry into the product's key END-USER workflow, drawn in the
|
|
132
150
|
* hero where the call-to-action pills would otherwise be.
|
|
133
151
|
*
|
|
134
|
-
* A guest
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
* an address the model invented — `target` is filled by
|
|
152
|
+
* A guest fills in one to three simple non-sensitive fields on the landing page and signs in to
|
|
153
|
+
* continue on the story's full-scale screen with what they entered already in place. It is a small
|
|
154
|
+
* form and nothing more: no choices to browse, no sample results, no counts. Every text is copy in
|
|
155
|
+
* the end user's own words; nothing here is an address the model invented — `target` is filled by
|
|
156
|
+
* code.
|
|
157
|
+
*
|
|
158
|
+
* The keys after `note` are the shape a plan had before the gate became a form (chips, sample
|
|
159
|
+
* records, a live count). They stay so a plan STORED under the old shape still validates and
|
|
160
|
+
* still reads; nothing writes them and nothing draws from them, and a gate that carries no
|
|
161
|
+
* `fields` is drawn as no gate at all.
|
|
138
162
|
*/
|
|
139
163
|
export interface LandingGatePlan {
|
|
140
164
|
/** The key end-user story's code — never rendered. */
|
|
141
165
|
story: string;
|
|
142
166
|
/** Entrypoint ALIAS of the story's full-scale screen in the user area (filled by code, not the model). */
|
|
143
167
|
target?: string;
|
|
144
|
-
/** The
|
|
168
|
+
/** The heading of the form, in the end user's words: "What are you baking?". */
|
|
145
169
|
question: string;
|
|
146
|
-
/** The
|
|
147
|
-
|
|
148
|
-
/** The
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
|
|
170
|
+
/** The fields, one to three — one whenever one is enough. Absent only on a plan stored under the old shape. */
|
|
171
|
+
fields?: LandingGateField[];
|
|
172
|
+
/** The one button's label: "Start my post →". */
|
|
173
|
+
cta: string;
|
|
174
|
+
/** The muted line under the form: "No account needed. What you enter comes with you.". */
|
|
175
|
+
note: string;
|
|
176
|
+
/** @deprecated Pre-form shape, kept for stored plans only. */
|
|
177
|
+
hint?: string;
|
|
178
|
+
/** @deprecated Pre-form shape, kept for stored plans only. */
|
|
179
|
+
label?: string;
|
|
180
|
+
/** @deprecated Pre-form shape, kept for stored plans only. */
|
|
181
|
+
inputs?: string[];
|
|
182
|
+
/** @deprecated Pre-form shape, kept for stored plans only. */
|
|
183
|
+
selected?: string[];
|
|
184
|
+
/** @deprecated Pre-form shape, kept for stored plans only. */
|
|
185
|
+
results?: {
|
|
156
186
|
title: string;
|
|
157
187
|
meta: string;
|
|
158
188
|
needs: string[];
|
|
159
189
|
}[];
|
|
160
|
-
/**
|
|
161
|
-
count
|
|
190
|
+
/** @deprecated Pre-form shape, kept for stored plans only. */
|
|
191
|
+
count?: {
|
|
162
192
|
one: string;
|
|
163
193
|
many: string;
|
|
164
194
|
none: string;
|
|
165
195
|
};
|
|
166
|
-
/**
|
|
167
|
-
empty
|
|
168
|
-
/**
|
|
169
|
-
|
|
170
|
-
|
|
196
|
+
/** @deprecated Pre-form shape, kept for stored plans only. */
|
|
197
|
+
empty?: string;
|
|
198
|
+
/** @deprecated Pre-form shape, kept for stored plans only. */
|
|
199
|
+
lock?: string;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* The gate as the planning MODEL answers it: the form, and none of the pre-form keys. Assignable
|
|
203
|
+
* to {@link LandingGatePlan}, which is what a plan stores.
|
|
204
|
+
*/
|
|
205
|
+
export interface LandingGateAnswer {
|
|
206
|
+
story: string;
|
|
207
|
+
target?: string;
|
|
208
|
+
question: string;
|
|
209
|
+
fields: LandingGateField[];
|
|
171
210
|
cta: string;
|
|
172
|
-
|
|
173
|
-
lock: string;
|
|
211
|
+
note: string;
|
|
174
212
|
}
|
|
175
213
|
/** The guest area's landing page — the product's public face. */
|
|
176
214
|
export interface GuestHomePlan {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/sc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A;IACzB,SAAS,EAAE,aAAa,CAAA;IACxB,KAAK,EAAE,gBAAgB,EAAE,CAAA;IACzB,OAAO,EAAE,iBAAiB,EAAE,CAAA;IAC5B;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAA;CACf"}
|
package/build/ux/schemas.js
CHANGED
|
@@ -8,7 +8,7 @@ export const UXScreenListSchema = {
|
|
|
8
8
|
type: "array",
|
|
9
9
|
items: {
|
|
10
10
|
type: "string",
|
|
11
|
-
description: "Technical screen name, no spaces, kebab-case notation with slashes allowed"
|
|
11
|
+
description: "Technical screen name, no spaces, kebab-case notation with slashes allowed; every part is one or two words"
|
|
12
12
|
},
|
|
13
13
|
description: "List of screens"
|
|
14
14
|
},
|
|
@@ -25,7 +25,7 @@ export const UXComponentListSchema = {
|
|
|
25
25
|
type: "array",
|
|
26
26
|
items: {
|
|
27
27
|
type: "string",
|
|
28
|
-
description: "Technical component name, no spaces, kebab-case notation with slashes allowed"
|
|
28
|
+
description: "Technical component name, no spaces, kebab-case notation with slashes allowed; every part is one or two words"
|
|
29
29
|
},
|
|
30
30
|
description: "List of components"
|
|
31
31
|
},
|
package/build/ux/schemas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/ux/schemas.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAE9C,MAAM,CAAC,MAAM,kBAAkB,GAAiC;IAC9D,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,yBAAyB;IACtC,UAAU,EAAE;QACV,OAAO,EAAE;YACP,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/ux/schemas.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,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SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,yCAAyC;SACvD;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,sCAAsC;SACpD;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC;YACrC,WAAW,EAAE,uDAAuD;SACrE;KACF;IACD,QAAQ,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC;IACvD,oBAAoB,EAAE,KAAK;CAC5B,CAAA;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAqC;IACtE,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,6BAA6B;IAC1C,UAAU,EAAE;QACV,WAAW,EAAE;YACX,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,kBAAkB;YACzB,WAAW,EAAE,aAAa;SAC3B;KACF;IACD,QAAQ,EAAE,CAAC,aAAa,CAAC;IACzB,oBAAoB,EAAE,KAAK;CAC5B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmeans/viable-common",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.35",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Runtime-free contracts of the OwlMeans Viable platform — the analysis, design and metadata shapes of a generated project, its target-shape manifest, the slot command vocabulary, the connector protocol and the conversion vocabulary, and the intent-first hand-off from the public site to the platform.",
|
|
6
6
|
"type": "module",
|
package/src/scaffold/consts.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BentoFragmentKind } from './types.js'
|
|
1
|
+
import type { BentoFragmentKind, LandingGateFieldKind } from './types.js'
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* The shapes a drawn widget can take.
|
|
@@ -34,3 +34,16 @@ export const AREA_SECTION_CAP = 6
|
|
|
34
34
|
* value nothing can draw is a tile with an empty bottom.
|
|
35
35
|
*/
|
|
36
36
|
export const BENTO_FRAGMENT_KINDS: BentoFragmentKind[] = ['list', 'note', 'people', 'steps']
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* The controls a landing-gate field can be — the simplest native inputs, and no picker of any
|
|
40
|
+
* kind. A closed set for the same reason as {@link BENTO_FRAGMENT_KINDS}: each value is one plain
|
|
41
|
+
* element the seed's gate knows how to draw.
|
|
42
|
+
*/
|
|
43
|
+
export const LANDING_GATE_FIELD_KINDS: LandingGateFieldKind[] = ['text', 'select', 'number', 'date']
|
|
44
|
+
|
|
45
|
+
/** The most fields a landing gate carries. A form longer than this is a screen, not an entry. */
|
|
46
|
+
export const LANDING_GATE_MAX_FIELDS = 3
|
|
47
|
+
|
|
48
|
+
/** The options a `select` field carries: fewer is no choice, more is a list to browse. */
|
|
49
|
+
export const LANDING_GATE_OPTIONS = { min: 2, max: 6 } as const
|
package/src/scaffold/schemas.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { JSONSchemaType } from 'ajv'
|
|
2
2
|
|
|
3
3
|
import { ProjectArea } from '../areas/consts.js'
|
|
4
|
-
import { BENTO_FRAGMENT_KINDS, WidgetKind } from './consts.js'
|
|
4
|
+
import { BENTO_FRAGMENT_KINDS, LANDING_GATE_FIELD_KINDS, WidgetKind } from './consts.js'
|
|
5
5
|
import type {
|
|
6
|
-
BentoFragment, GuestHomePlan, LandingGatePlan, ProductIdentity,
|
|
6
|
+
BentoFragment, GuestHomePlan, LandingGateAnswer, LandingGateField, LandingGatePlan, ProductIdentity,
|
|
7
7
|
ScaffoldAreaPlan, ScaffoldPlan, ScaffoldStoryPlan, SketchContent,
|
|
8
8
|
} from './types.js'
|
|
9
9
|
|
|
@@ -83,7 +83,8 @@ const ScaffoldStoryPlanSchema: JSONSchemaType<ScaffoldStoryPlan> = {
|
|
|
83
83
|
screen: {
|
|
84
84
|
type: 'string',
|
|
85
85
|
description: 'The main screen this story will need, named "{section}/{purpose}" -'
|
|
86
|
-
+ ' e.g. "Requests/Submit
|
|
86
|
+
+ ' e.g. "Requests/Submit request". The purpose is one or two words, never a sentence.'
|
|
87
|
+
+ ' The section part must equal the section above'
|
|
87
88
|
},
|
|
88
89
|
widget: {
|
|
89
90
|
type: 'object',
|
|
@@ -225,99 +226,129 @@ const BentoFragmentSchema: JSONSchemaType<BentoFragment> = {
|
|
|
225
226
|
additionalProperties: false,
|
|
226
227
|
}
|
|
227
228
|
|
|
228
|
-
const
|
|
229
|
+
const LandingGateFieldSchema: JSONSchemaType<LandingGateField> = {
|
|
229
230
|
type: 'object',
|
|
230
|
-
title: '
|
|
231
|
-
description: '
|
|
232
|
-
+ ' call-to-action buttons: a guest makes a few picks, sees sample results ranked against them,'
|
|
233
|
-
+ ' and signs in to continue with the picks carried over. Every text is in the end user\'s words',
|
|
231
|
+
title: 'LandingGateField',
|
|
232
|
+
description: 'One simple, non-sensitive field of the landing gate',
|
|
234
233
|
properties: {
|
|
235
|
-
|
|
234
|
+
name: {
|
|
236
235
|
type: 'string',
|
|
237
|
-
description: 'The
|
|
236
|
+
description: 'The camelCase key its value travels under, one word - e.g. "dish"'
|
|
238
237
|
},
|
|
239
|
-
|
|
240
|
-
type: 'string', nullable: true,
|
|
241
|
-
description: 'Leave it out - the platform fills it'
|
|
242
|
-
},
|
|
243
|
-
question: {
|
|
238
|
+
label: {
|
|
244
239
|
type: 'string',
|
|
245
|
-
description: 'The
|
|
246
|
-
+ ' in your pantry?"'
|
|
240
|
+
description: 'The visible label in the end user\'s words, 2-5 words - e.g. "What are you baking?"'
|
|
247
241
|
},
|
|
248
|
-
|
|
249
|
-
label: {
|
|
242
|
+
kind: {
|
|
250
243
|
type: 'string',
|
|
251
|
-
|
|
244
|
+
enum: LANDING_GATE_FIELD_KINDS,
|
|
245
|
+
description: 'text (a short line, the default), select (ONE choice out of 2-6 plain options),'
|
|
246
|
+
+ ' number, or date. Nothing else exists: no chips, no toggles, no multiple choice'
|
|
252
247
|
},
|
|
253
|
-
|
|
254
|
-
type: '
|
|
255
|
-
|
|
256
|
-
description: '5 to 8 things a guest can pick, 1-3 words each, from the story\'s own domain.'
|
|
257
|
-
+ ' Nothing personal, nothing sensitive, nothing that needs an account'
|
|
248
|
+
placeholder: {
|
|
249
|
+
type: 'string', nullable: true,
|
|
250
|
+
description: 'text or number only: an example value, e.g. "Rye sourdough". Never personal'
|
|
258
251
|
},
|
|
259
|
-
|
|
260
|
-
type: 'array',
|
|
252
|
+
options: {
|
|
253
|
+
type: 'array', nullable: true,
|
|
261
254
|
items: { type: 'string' },
|
|
262
|
-
description: '
|
|
263
|
-
+ ' already shows results'
|
|
255
|
+
description: 'select only: 2 to 6 plain options, 1-3 words each'
|
|
264
256
|
},
|
|
257
|
+
},
|
|
258
|
+
required: ['name', 'label', 'kind'],
|
|
259
|
+
additionalProperties: false,
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/** What the gate's texts tell the planning model — one place, shared by the answer and stored schemas. */
|
|
263
|
+
const GATE_TEXT = {
|
|
264
|
+
description: 'The working entry into the key end-user workflow, drawn in the hero instead of the'
|
|
265
|
+
+ ' call-to-action buttons: ONE SMALL FORM - a heading, one to three simple non-sensitive'
|
|
266
|
+
+ ' fields, one button. A guest fills it in, signs in, and continues with what they entered.'
|
|
267
|
+
+ ' No choices to browse, no sample results, no counts, no previews. Every text is in the end'
|
|
268
|
+
+ ' user\'s words',
|
|
269
|
+
story: 'The code of the landing story, copied EXACTLY as given to you. Never shown',
|
|
270
|
+
target: 'Leave it out - the platform fills it',
|
|
271
|
+
question: 'The heading of the form, 3-6 words, in the end user\'s words - e.g. "What are you'
|
|
272
|
+
+ ' baking?"',
|
|
273
|
+
fields: 'The fields, AS FEW AS POSSIBLE: one whenever one is enough, never more than three. They'
|
|
274
|
+
+ ' are the first things the story\'s own screen asks for, in the same words',
|
|
275
|
+
cta: 'The button label, a verb first, 2-3 words and an arrow - e.g. "Start my post →"',
|
|
276
|
+
note: 'One short muted line under the form: no account is needed yet and what was entered comes'
|
|
277
|
+
+ ' along - e.g. "No account needed. What you enter comes with you."',
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/** The pre-form keys of a stored gate: optional, described as history, never offered to the model. */
|
|
281
|
+
const LEGACY_GATE_NOTE = 'Pre-form shape, never written'
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* What the planning MODEL answers for the gate: the form and nothing older. The stored schema below
|
|
285
|
+
* adds the pre-form keys as optional, so a plan written before the gate became a form still
|
|
286
|
+
* validates; the model is never offered them.
|
|
287
|
+
*/
|
|
288
|
+
const LandingGateAnswerSchema: JSONSchemaType<LandingGateAnswer> = {
|
|
289
|
+
type: 'object',
|
|
290
|
+
title: 'LandingGatePlan',
|
|
291
|
+
description: GATE_TEXT.description,
|
|
292
|
+
properties: {
|
|
293
|
+
story: { type: 'string', description: GATE_TEXT.story },
|
|
294
|
+
target: { type: 'string', nullable: true, description: GATE_TEXT.target },
|
|
295
|
+
question: { type: 'string', description: GATE_TEXT.question },
|
|
296
|
+
fields: { type: 'array', items: LandingGateFieldSchema, description: GATE_TEXT.fields },
|
|
297
|
+
cta: { type: 'string', description: GATE_TEXT.cta },
|
|
298
|
+
note: { type: 'string', description: GATE_TEXT.note },
|
|
299
|
+
},
|
|
300
|
+
required: ['story', 'question', 'fields', 'cta', 'note'],
|
|
301
|
+
additionalProperties: false,
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* The gate as a plan may STORE it: the form, plus the pre-form keys (chips, sample records, a live
|
|
306
|
+
* count) as optional. A schema that validates a stored document only ever grows optional.
|
|
307
|
+
*/
|
|
308
|
+
const LandingGatePlanSchema: JSONSchemaType<LandingGatePlan> = {
|
|
309
|
+
type: 'object',
|
|
310
|
+
title: 'LandingGatePlan',
|
|
311
|
+
description: GATE_TEXT.description,
|
|
312
|
+
properties: {
|
|
313
|
+
story: { type: 'string', description: GATE_TEXT.story },
|
|
314
|
+
target: { type: 'string', nullable: true, description: GATE_TEXT.target },
|
|
315
|
+
question: { type: 'string', description: GATE_TEXT.question },
|
|
316
|
+
fields: { type: 'array', nullable: true, items: LandingGateFieldSchema, description: GATE_TEXT.fields },
|
|
317
|
+
cta: { type: 'string', description: GATE_TEXT.cta },
|
|
318
|
+
note: { type: 'string', description: GATE_TEXT.note },
|
|
319
|
+
hint: { type: 'string', nullable: true, description: LEGACY_GATE_NOTE },
|
|
320
|
+
label: { type: 'string', nullable: true, description: LEGACY_GATE_NOTE },
|
|
321
|
+
inputs: { type: 'array', nullable: true, items: { type: 'string' }, description: LEGACY_GATE_NOTE },
|
|
322
|
+
selected: { type: 'array', nullable: true, items: { type: 'string' }, description: LEGACY_GATE_NOTE },
|
|
265
323
|
results: {
|
|
266
|
-
type: 'array',
|
|
324
|
+
type: 'array', nullable: true,
|
|
267
325
|
items: {
|
|
268
326
|
type: 'object',
|
|
269
327
|
properties: {
|
|
270
|
-
title: { type: 'string'
|
|
271
|
-
meta: {
|
|
272
|
-
|
|
273
|
-
description: 'One short line: how well it fits and one fact, e.g. "Uses all 3 · 3 h 20 min"'
|
|
274
|
-
},
|
|
275
|
-
needs: {
|
|
276
|
-
type: 'array',
|
|
277
|
-
items: { type: 'string' },
|
|
278
|
-
description: '2-4 of the inputs above, copied exactly, that this record uses'
|
|
279
|
-
},
|
|
328
|
+
title: { type: 'string' },
|
|
329
|
+
meta: { type: 'string' },
|
|
330
|
+
needs: { type: 'array', items: { type: 'string' } },
|
|
280
331
|
},
|
|
281
332
|
required: ['title', 'meta', 'needs'],
|
|
282
333
|
additionalProperties: false,
|
|
283
334
|
},
|
|
284
|
-
description:
|
|
335
|
+
description: LEGACY_GATE_NOTE
|
|
285
336
|
},
|
|
286
337
|
count: {
|
|
287
|
-
type: 'object',
|
|
338
|
+
type: 'object', nullable: true,
|
|
288
339
|
properties: {
|
|
289
|
-
one: { type: 'string'
|
|
290
|
-
many: { type: 'string'
|
|
291
|
-
none: { type: 'string'
|
|
340
|
+
one: { type: 'string' },
|
|
341
|
+
many: { type: 'string' },
|
|
342
|
+
none: { type: 'string' },
|
|
292
343
|
},
|
|
293
344
|
required: ['one', 'many', 'none'],
|
|
294
345
|
additionalProperties: false,
|
|
295
|
-
description:
|
|
296
|
-
},
|
|
297
|
-
empty: {
|
|
298
|
-
type: 'string',
|
|
299
|
-
description: 'One line shown when nothing matches, saying what to pick - e.g. "Pick two or more'
|
|
300
|
-
+ ' ingredients to see what you can bake."'
|
|
301
|
-
},
|
|
302
|
-
note: {
|
|
303
|
-
type: 'string',
|
|
304
|
-
description: 'One short line beside the button: signing in is by email and the picks come'
|
|
305
|
-
+ ' along - e.g. "Sign in with your email. Your picks come with you."'
|
|
306
|
-
},
|
|
307
|
-
cta: {
|
|
308
|
-
type: 'string',
|
|
309
|
-
description: 'The button label, a verb first, 2-3 words and an arrow - e.g. "Open recipes →"'
|
|
310
|
-
},
|
|
311
|
-
lock: {
|
|
312
|
-
type: 'string',
|
|
313
|
-
description: 'What unlocks after sign-in, as the accessible name of a lock icon - e.g. "Full'
|
|
314
|
-
+ ' method after sign-in"'
|
|
346
|
+
description: LEGACY_GATE_NOTE
|
|
315
347
|
},
|
|
348
|
+
empty: { type: 'string', nullable: true, description: LEGACY_GATE_NOTE },
|
|
349
|
+
lock: { type: 'string', nullable: true, description: LEGACY_GATE_NOTE },
|
|
316
350
|
},
|
|
317
|
-
required: [
|
|
318
|
-
'story', 'question', 'hint', 'label', 'inputs', 'selected', 'results', 'count', 'empty',
|
|
319
|
-
'note', 'cta', 'lock',
|
|
320
|
-
],
|
|
351
|
+
required: ['story', 'question', 'cta', 'note'],
|
|
321
352
|
additionalProperties: false,
|
|
322
353
|
}
|
|
323
354
|
|
|
@@ -535,3 +566,28 @@ export const ScaffoldPlanSchema: JSONSchemaType<ScaffoldPlan> = {
|
|
|
535
566
|
required: ['identity', 'guestHome', 'areas', 'stories', 'motifs'],
|
|
536
567
|
additionalProperties: false,
|
|
537
568
|
}
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* The plan as the planning MODEL answers it — {@link ScaffoldPlanSchema} with the gate held to the
|
|
572
|
+
* form. The stored schema keeps the pre-form gate keys optional so an old plan still validates;
|
|
573
|
+
* offering them to the model would let it write a chip picker again. Typed as the stored plan
|
|
574
|
+
* because every answer is one: the answer's gate is a subset of the stored gate.
|
|
575
|
+
*/
|
|
576
|
+
export const ScaffoldPlanAnswerSchema = {
|
|
577
|
+
...ScaffoldPlanSchema,
|
|
578
|
+
properties: {
|
|
579
|
+
...ScaffoldPlanSchema.properties,
|
|
580
|
+
guestHome: {
|
|
581
|
+
...GuestHomePlanSchema,
|
|
582
|
+
properties: {
|
|
583
|
+
...GuestHomePlanSchema.properties,
|
|
584
|
+
gate: {
|
|
585
|
+
...LandingGateAnswerSchema,
|
|
586
|
+
nullable: true,
|
|
587
|
+
description: 'ONLY when you were given a landing story; omit it otherwise. '
|
|
588
|
+
+ LandingGateAnswerSchema.description,
|
|
589
|
+
},
|
|
590
|
+
},
|
|
591
|
+
},
|
|
592
|
+
},
|
|
593
|
+
} as unknown as JSONSchemaType<ScaffoldPlan>
|
package/src/scaffold/types.ts
CHANGED
|
@@ -119,42 +119,83 @@ export interface BentoFragment {
|
|
|
119
119
|
rows: { label: string, value?: string }[]
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
/**
|
|
123
|
+
* What kind of control a landing-gate field is. A CLOSED set of the simplest native inputs: each
|
|
124
|
+
* value is one plain element, so there is nothing here a visitor has to learn, and nothing that
|
|
125
|
+
* can grow into a picker, a chip group or a preview.
|
|
126
|
+
*/
|
|
127
|
+
export type LandingGateFieldKind = 'text' | 'select' | 'number' | 'date'
|
|
128
|
+
|
|
129
|
+
/** One simple, non-sensitive field of the landing gate. */
|
|
130
|
+
export interface LandingGateField {
|
|
131
|
+
/** The camelCase key the entered value travels under in the landing handoff: "dish". */
|
|
132
|
+
name: string
|
|
133
|
+
/** The visible label, in the end user's words: "What are you baking?". */
|
|
134
|
+
label: string
|
|
135
|
+
kind: LandingGateFieldKind
|
|
136
|
+
/** An example value shown inside an empty text or number field — never a personal one. */
|
|
137
|
+
placeholder?: string
|
|
138
|
+
/** `select` only: 2–6 plain options. */
|
|
139
|
+
options?: string[]
|
|
140
|
+
}
|
|
141
|
+
|
|
122
142
|
/**
|
|
123
143
|
* The landing gate — the working entry into the product's key END-USER workflow, drawn in the
|
|
124
144
|
* hero where the call-to-action pills would otherwise be.
|
|
125
145
|
*
|
|
126
|
-
* A guest
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
* an address the model invented — `target` is filled by
|
|
146
|
+
* A guest fills in one to three simple non-sensitive fields on the landing page and signs in to
|
|
147
|
+
* continue on the story's full-scale screen with what they entered already in place. It is a small
|
|
148
|
+
* form and nothing more: no choices to browse, no sample results, no counts. Every text is copy in
|
|
149
|
+
* the end user's own words; nothing here is an address the model invented — `target` is filled by
|
|
150
|
+
* code.
|
|
151
|
+
*
|
|
152
|
+
* The keys after `note` are the shape a plan had before the gate became a form (chips, sample
|
|
153
|
+
* records, a live count). They stay so a plan STORED under the old shape still validates and
|
|
154
|
+
* still reads; nothing writes them and nothing draws from them, and a gate that carries no
|
|
155
|
+
* `fields` is drawn as no gate at all.
|
|
130
156
|
*/
|
|
131
157
|
export interface LandingGatePlan {
|
|
132
158
|
/** The key end-user story's code — never rendered. */
|
|
133
159
|
story: string
|
|
134
160
|
/** Entrypoint ALIAS of the story's full-scale screen in the user area (filled by code, not the model). */
|
|
135
161
|
target?: string
|
|
136
|
-
/** The
|
|
162
|
+
/** The heading of the form, in the end user's words: "What are you baking?". */
|
|
137
163
|
question: string
|
|
138
|
-
/** The
|
|
139
|
-
|
|
140
|
-
/** The
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
inputs: string[]
|
|
144
|
-
/** 4–5 of `inputs`, pre-selected so the first view already shows results. */
|
|
145
|
-
selected: string[]
|
|
146
|
-
/** 3–4 sample records; `needs` is the subset of `inputs` each one uses. */
|
|
147
|
-
results: { title: string, meta: string, needs: string[] }[]
|
|
148
|
-
/** The live count label; `{n}` is replaced by the number ("{n} bakes match"). */
|
|
149
|
-
count: { one: string, many: string, none: string }
|
|
150
|
-
/** The line shown when nothing matches the picks. */
|
|
151
|
-
empty: string
|
|
152
|
-
/** The line beside the CTA: "Sign in with your email. Your picks come with you.". */
|
|
164
|
+
/** The fields, one to three — one whenever one is enough. Absent only on a plan stored under the old shape. */
|
|
165
|
+
fields?: LandingGateField[]
|
|
166
|
+
/** The one button's label: "Start my post →". */
|
|
167
|
+
cta: string
|
|
168
|
+
/** The muted line under the form: "No account needed. What you enter comes with you.". */
|
|
153
169
|
note: string
|
|
154
|
-
/**
|
|
170
|
+
/** @deprecated Pre-form shape, kept for stored plans only. */
|
|
171
|
+
hint?: string
|
|
172
|
+
/** @deprecated Pre-form shape, kept for stored plans only. */
|
|
173
|
+
label?: string
|
|
174
|
+
/** @deprecated Pre-form shape, kept for stored plans only. */
|
|
175
|
+
inputs?: string[]
|
|
176
|
+
/** @deprecated Pre-form shape, kept for stored plans only. */
|
|
177
|
+
selected?: string[]
|
|
178
|
+
/** @deprecated Pre-form shape, kept for stored plans only. */
|
|
179
|
+
results?: { title: string, meta: string, needs: string[] }[]
|
|
180
|
+
/** @deprecated Pre-form shape, kept for stored plans only. */
|
|
181
|
+
count?: { one: string, many: string, none: string }
|
|
182
|
+
/** @deprecated Pre-form shape, kept for stored plans only. */
|
|
183
|
+
empty?: string
|
|
184
|
+
/** @deprecated Pre-form shape, kept for stored plans only. */
|
|
185
|
+
lock?: string
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* The gate as the planning MODEL answers it: the form, and none of the pre-form keys. Assignable
|
|
190
|
+
* to {@link LandingGatePlan}, which is what a plan stores.
|
|
191
|
+
*/
|
|
192
|
+
export interface LandingGateAnswer {
|
|
193
|
+
story: string
|
|
194
|
+
target?: string
|
|
195
|
+
question: string
|
|
196
|
+
fields: LandingGateField[]
|
|
155
197
|
cta: string
|
|
156
|
-
|
|
157
|
-
lock: string
|
|
198
|
+
note: string
|
|
158
199
|
}
|
|
159
200
|
|
|
160
201
|
/** The guest area's landing page — the product's public face. */
|
package/src/ux/schemas.ts
CHANGED
|
@@ -11,7 +11,7 @@ export const UXScreenListSchema: JSONSchemaType<UXScreenList> = {
|
|
|
11
11
|
type: "array",
|
|
12
12
|
items: {
|
|
13
13
|
type: "string",
|
|
14
|
-
description: "Technical screen name, no spaces, kebab-case notation with slashes allowed"
|
|
14
|
+
description: "Technical screen name, no spaces, kebab-case notation with slashes allowed; every part is one or two words"
|
|
15
15
|
},
|
|
16
16
|
description: "List of screens"
|
|
17
17
|
},
|
|
@@ -29,7 +29,7 @@ export const UXComponentListSchema: JSONSchemaType<UXComponentList> = {
|
|
|
29
29
|
type: "array",
|
|
30
30
|
items: {
|
|
31
31
|
type: "string",
|
|
32
|
-
description: "Technical component name, no spaces, kebab-case notation with slashes allowed"
|
|
32
|
+
description: "Technical component name, no spaces, kebab-case notation with slashes allowed; every part is one or two words"
|
|
33
33
|
},
|
|
34
34
|
description: "List of components"
|
|
35
35
|
},
|
package/tests/scaffold.spec.ts
CHANGED
|
@@ -3,8 +3,8 @@ import Ajv from 'ajv'
|
|
|
3
3
|
import { validateSpecificationBody } from '@owlmeans/planning'
|
|
4
4
|
import { ProjectArea } from '../src/areas/consts.js'
|
|
5
5
|
import { ViableSpecCategory, VIABLE_PROJECT_SLOTS } from '../src/planning/index.js'
|
|
6
|
-
import { BENTO_FRAGMENT_KINDS, WidgetKind } from '../src/scaffold/consts.js'
|
|
7
|
-
import { ScaffoldPlanSchema } from '../src/scaffold/schemas.js'
|
|
6
|
+
import { BENTO_FRAGMENT_KINDS, LANDING_GATE_FIELD_KINDS, WidgetKind } from '../src/scaffold/consts.js'
|
|
7
|
+
import { ScaffoldPlanAnswerSchema, ScaffoldPlanSchema } from '../src/scaffold/schemas.js'
|
|
8
8
|
import type { ScaffoldPlan } from '../src/scaffold/types.js'
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -72,22 +72,32 @@ const newPlan = (): ScaffoldPlan => {
|
|
|
72
72
|
gate: {
|
|
73
73
|
story: 'US-ABC12',
|
|
74
74
|
target: 'web:bake-finder',
|
|
75
|
-
question:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
selected: ['Bread flour', 'Rye flour', 'Butter', 'Yeast'],
|
|
80
|
-
results: [{ title: 'Seeded rye loaf', meta: 'Uses all 3 · 3 h 20 min', needs: ['Bread flour', 'Rye flour', 'Yeast'] }],
|
|
81
|
-
count: { one: '{n} bake matches', many: '{n} bakes match', none: 'No matches yet' },
|
|
82
|
-
empty: 'Pick two or more ingredients.',
|
|
83
|
-
note: 'Sign in with your email. Your picks come with you.',
|
|
84
|
-
cta: 'Open recipes →',
|
|
85
|
-
lock: 'Full method after sign-in',
|
|
75
|
+
question: 'What are you baking?',
|
|
76
|
+
fields: [{ name: 'dish', label: 'What are you baking?', kind: 'text', placeholder: 'Rye sourdough' }],
|
|
77
|
+
cta: 'Start my bake →',
|
|
78
|
+
note: 'No account needed. What you enter comes with you.',
|
|
86
79
|
},
|
|
87
80
|
},
|
|
88
81
|
}
|
|
89
82
|
}
|
|
90
83
|
|
|
84
|
+
/** The gate a plan stored BEFORE it became a form: chips, sample records, a live count. */
|
|
85
|
+
const legacyGate = (): NonNullable<ScaffoldPlan['guestHome']['gate']> => ({
|
|
86
|
+
story: 'US-ABC12',
|
|
87
|
+
target: 'web:bake-finder',
|
|
88
|
+
question: "What's in your pantry?",
|
|
89
|
+
hint: 'No account needed',
|
|
90
|
+
label: 'Your pantry',
|
|
91
|
+
inputs: ['Bread flour', 'Rye flour', 'Butter', 'Eggs', 'Yeast'],
|
|
92
|
+
selected: ['Bread flour', 'Rye flour', 'Butter', 'Yeast'],
|
|
93
|
+
results: [{ title: 'Seeded rye loaf', meta: 'Uses all 3 · 3 h 20 min', needs: ['Bread flour', 'Rye flour', 'Yeast'] }],
|
|
94
|
+
count: { one: '{n} bake matches', many: '{n} bakes match', none: 'No matches yet' },
|
|
95
|
+
empty: 'Pick two or more ingredients.',
|
|
96
|
+
note: 'Sign in with your email. Your picks come with you.',
|
|
97
|
+
cta: 'Open recipes →',
|
|
98
|
+
lock: 'Full method after sign-in',
|
|
99
|
+
})
|
|
100
|
+
|
|
91
101
|
describe('viable-common - the scaffold plan schema', () => {
|
|
92
102
|
const validate = new Ajv({ strict: false, allErrors: true }).compile(ScaffoldPlanSchema)
|
|
93
103
|
const slot = VIABLE_PROJECT_SLOTS.find(entry => entry.category === ViableSpecCategory.Scaffold)!
|
|
@@ -128,4 +138,54 @@ describe('viable-common - the scaffold plan schema', () => {
|
|
|
128
138
|
expect(text).not.toContain('maxItems')
|
|
129
139
|
expect(BENTO_FRAGMENT_KINDS).toEqual(['list', 'note', 'people', 'steps'])
|
|
130
140
|
})
|
|
141
|
+
|
|
142
|
+
test('a plan stored under the chip-gate shape still validates', () => {
|
|
143
|
+
const stored = newPlan()
|
|
144
|
+
stored.guestHome.gate = legacyGate()
|
|
145
|
+
|
|
146
|
+
expect(validate(stored), JSON.stringify(validate.errors)).toBe(true)
|
|
147
|
+
expect(() => validateSpecificationBody(slot, JSON.stringify(stored))).not.toThrow()
|
|
148
|
+
})
|
|
149
|
+
|
|
150
|
+
test('a field kind nothing can draw is refused', () => {
|
|
151
|
+
const plan = newPlan()
|
|
152
|
+
plan.guestHome.gate!.fields![0] = { name: 'dish', label: 'Dish', kind: 'multiselect' as never }
|
|
153
|
+
|
|
154
|
+
expect(validate(plan)).toBe(false)
|
|
155
|
+
expect(LANDING_GATE_FIELD_KINDS).toEqual(['text', 'select', 'number', 'date'])
|
|
156
|
+
})
|
|
157
|
+
})
|
|
158
|
+
|
|
159
|
+
describe('viable-common - the scaffold plan the model answers', () => {
|
|
160
|
+
const answer = new Ajv({ strict: false, allErrors: true }).compile(ScaffoldPlanAnswerSchema)
|
|
161
|
+
|
|
162
|
+
test('accepts the form gate', () => {
|
|
163
|
+
expect(answer(newPlan()), JSON.stringify(answer.errors)).toBe(true)
|
|
164
|
+
})
|
|
165
|
+
|
|
166
|
+
test('accepts an unset optional written as null, and no gate at all', () => {
|
|
167
|
+
const nulled = newPlan()
|
|
168
|
+
;(nulled.guestHome.gate!.fields![0] as unknown as Record<string, unknown>).options = null
|
|
169
|
+
expect(answer(nulled), JSON.stringify(answer.errors)).toBe(true)
|
|
170
|
+
|
|
171
|
+
const none = newPlan()
|
|
172
|
+
delete none.guestHome.gate
|
|
173
|
+
expect(answer(none), JSON.stringify(answer.errors)).toBe(true)
|
|
174
|
+
})
|
|
175
|
+
|
|
176
|
+
test('is never offered the chip-gate keys, and requires the form\'s fields', () => {
|
|
177
|
+
const chips = newPlan()
|
|
178
|
+
chips.guestHome.gate = legacyGate()
|
|
179
|
+
expect(answer(chips)).toBe(false)
|
|
180
|
+
|
|
181
|
+
const bare = newPlan()
|
|
182
|
+
delete bare.guestHome.gate!.fields
|
|
183
|
+
expect(answer(bare)).toBe(false)
|
|
184
|
+
|
|
185
|
+
const text = JSON.stringify(ScaffoldPlanAnswerSchema)
|
|
186
|
+
expect(text).not.toContain('"inputs"')
|
|
187
|
+
expect(text).not.toContain('"results"')
|
|
188
|
+
expect(text).not.toContain('minItems')
|
|
189
|
+
expect(text).not.toContain('maxItems')
|
|
190
|
+
})
|
|
131
191
|
})
|