@owlmeans/viable-common 0.0.34 → 0.0.36

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 (52) hide show
  1. package/README.md +3 -3
  2. package/agent-meta/manifest.json +2 -2
  3. package/agent-meta/skills/agent-presentation/SKILL.md +1 -1
  4. package/agent-meta/skills/viable-common/SKILL.md +2 -2
  5. package/build/dev/schemas.d.ts.map +1 -1
  6. package/build/dev/schemas.js +5 -0
  7. package/build/dev/schemas.js.map +1 -1
  8. package/build/dev/types.d.ts +2 -0
  9. package/build/dev/types.d.ts.map +1 -1
  10. package/build/preview/types.d.ts +3 -0
  11. package/build/preview/types.d.ts.map +1 -1
  12. package/build/scaffold/consts.d.ts +14 -1
  13. package/build/scaffold/consts.d.ts.map +1 -1
  14. package/build/scaffold/consts.js +10 -0
  15. package/build/scaffold/consts.js.map +1 -1
  16. package/build/scaffold/schemas.d.ts +7 -0
  17. package/build/scaffold/schemas.d.ts.map +1 -1
  18. package/build/scaffold/schemas.js +119 -68
  19. package/build/scaffold/schemas.js.map +1 -1
  20. package/build/scaffold/types.d.ts +62 -24
  21. package/build/scaffold/types.d.ts.map +1 -1
  22. package/build/ux/schemas.js +2 -2
  23. package/build/ux/schemas.js.map +1 -1
  24. package/package.json +1 -1
  25. package/src/dev/schemas.ts +5 -0
  26. package/src/dev/types.ts +2 -0
  27. package/src/preview/types.ts +3 -1
  28. package/src/scaffold/consts.ts +14 -1
  29. package/src/scaffold/schemas.ts +125 -69
  30. package/src/scaffold/types.ts +64 -23
  31. package/src/ux/schemas.ts +2 -2
  32. package/tests/scaffold.spec.ts +73 -13
  33. package/build/ba/schemas.d.ts +0 -13
  34. package/build/ba/schemas.d.ts.map +0 -1
  35. package/build/ba/schemas.js +0 -181
  36. package/build/ba/schemas.js.map +0 -1
  37. package/build/blueprint/case.d.ts +0 -73
  38. package/build/blueprint/case.d.ts.map +0 -1
  39. package/build/blueprint/case.js +0 -286
  40. package/build/blueprint/case.js.map +0 -1
  41. package/build/blueprint/resolve.d.ts +0 -51
  42. package/build/blueprint/resolve.d.ts.map +0 -1
  43. package/build/blueprint/resolve.js +0 -111
  44. package/build/blueprint/resolve.js.map +0 -1
  45. package/build/blueprint/schemas.d.ts +0 -41
  46. package/build/blueprint/schemas.d.ts.map +0 -1
  47. package/build/blueprint/schemas.js +0 -27
  48. package/build/blueprint/schemas.js.map +0 -1
  49. package/build/skills/catalogue.d.ts +0 -47
  50. package/build/skills/catalogue.d.ts.map +0 -1
  51. package/build/skills/catalogue.js +0 -1811
  52. package/build/skills/catalogue.js.map +0 -1
@@ -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: "What's in your pantry?",
76
- hint: 'No account needed',
77
- label: 'Your pantry',
78
- inputs: ['Bread flour', 'Rye flour', 'Butter', 'Eggs', 'Yeast'],
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
  })
@@ -1,13 +0,0 @@
1
- import type { JSONSchemaType } from "ajv";
2
- import type { EntityList, StoryList, Entity, Attribute, MainStoryProbability, MainStoryCandidates, ConnectingStoryDraft, ConnectingStoryList } from "./types.js";
3
- import type { StoryDraft } from "../areas/types.js";
4
- export declare const StoryDraftSchema: JSONSchemaType<StoryDraft>;
5
- export declare const ConnectingStoryDraftSchema: JSONSchemaType<ConnectingStoryDraft>;
6
- export declare const ConnectingStoryListSchema: JSONSchemaType<ConnectingStoryList>;
7
- export declare const EntityListSchema: JSONSchemaType<EntityList>;
8
- export declare const StoryListSchema: JSONSchemaType<StoryList>;
9
- export declare const AttributeSchema: JSONSchemaType<Attribute>;
10
- export declare const EntitySchema: JSONSchemaType<Entity>;
11
- export declare const MainStoryProbabilitySchema: JSONSchemaType<MainStoryProbability>;
12
- export declare const MainStoryCandidatesSchema: JSONSchemaType<MainStoryCandidates>;
13
- //# sourceMappingURL=schemas.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/ba/schemas.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AACzC,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAChK,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAsBnD,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAAC,UAAU,CAiBvD,CAAA;AAED,eAAO,MAAM,0BAA0B,EAAE,cAAc,CAAC,oBAAoB,CAiC3E,CAAA;AAED,eAAO,MAAM,yBAAyB,EAAE,cAAc,CAAC,mBAAmB,CAYzE,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAAC,UAAU,CAevD,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,cAAc,CAAC,SAAS,CAYrD,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,cAAc,CAAC,SAAS,CAgBrD,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,cAAc,CAAC,MAAM,CAqB/C,CAAA;AAED,eAAO,MAAM,0BAA0B,EAAE,cAAc,CAAC,oBAAoB,CAgB3E,CAAA;AAED,eAAO,MAAM,yBAAyB,EAAE,cAAc,CAAC,mBAAmB,CAYzE,CAAA"}
@@ -1,181 +0,0 @@
1
- import { ProjectArea } from "../areas/consts.js";
2
- import { ConnectingStoryKind } from "./consts.js";
3
- /**
4
- * The one rendering of the area field's description.
5
- *
6
- * Every schema that carries an area points at this. Two copies drift, and the drift is invisible:
7
- * both schemas keep validating, and the two prompts that read them start classifying differently.
8
- * It is the same reason `AREA_CLASSIFICATION` is spelled once in the BA helper.
9
- */
10
- const AREA_FIELD_DESCRIPTION = `
11
- Which area of the application the acting user works in:
12
- - guest - the actor is NOT signed in (public visitors, prospects, anonymous readers)
13
- - user - the actor is a signed-in end user consuming the product's value (the front office)
14
- - operator - the actor is staff running the product's business process from the inside (the back office)
15
- - admin - the actor is the owner configuring or managing the application itself
16
- `;
17
- const STORY_BODY_DESCRIPTION = "User story body in format: As a [role], I want to [make something] so that [I get the following results]";
18
- export const StoryDraftSchema = {
19
- type: "object",
20
- title: "StoryDraft",
21
- description: "One user story and the area of the application its actor works in",
22
- properties: {
23
- story: {
24
- type: "string",
25
- description: STORY_BODY_DESCRIPTION
26
- },
27
- area: {
28
- type: "string",
29
- enum: Object.values(ProjectArea),
30
- description: AREA_FIELD_DESCRIPTION
31
- },
32
- },
33
- required: ["story", "area"],
34
- additionalProperties: false
35
- };
36
- export const ConnectingStoryDraftSchema = {
37
- type: "object",
38
- title: "ConnectingStoryDraft",
39
- description: "One user story that connects the numbered steps of the main flow to each other",
40
- properties: {
41
- story: {
42
- type: "string",
43
- description: STORY_BODY_DESCRIPTION
44
- },
45
- area: {
46
- type: "string",
47
- enum: Object.values(ProjectArea),
48
- description: AREA_FIELD_DESCRIPTION
49
- },
50
- kind: {
51
- type: "string",
52
- enum: Object.values(ConnectingStoryKind),
53
- description: `
54
- Which connecting screen this story is:
55
- - queue - the list of records waiting for THIS actor to perform their step on them
56
- - index - the directory of a kind of record, where the actor finds and opens the one they mean
57
- - record - the page of ONE record: everything that has happened to it, and the actions that start from it
58
- - tracker - the actor's own list of what they submitted, and what state each one has reached
59
- `
60
- },
61
- after: {
62
- type: "integer",
63
- minimum: 1,
64
- description: "The NUMBER of the flow user story whose result this story displays - this story belongs immediately after that one. Never 0, and never greater than the number of flow stories given"
65
- },
66
- },
67
- required: ["story", "area", "kind", "after"],
68
- additionalProperties: false
69
- };
70
- export const ConnectingStoryListSchema = {
71
- type: "object",
72
- title: "ConnectingStoryList",
73
- description: "User stories that connect the numbered steps of the main flow to each other",
74
- properties: {
75
- stories: {
76
- type: "array",
77
- items: ConnectingStoryDraftSchema,
78
- description: "The connecting stories, each anchored to the flow story it comes after"
79
- },
80
- },
81
- required: ["stories"]
82
- };
83
- export const EntityListSchema = {
84
- type: "object",
85
- title: "EntityList",
86
- description: "Domain entities",
87
- properties: {
88
- entities: {
89
- type: "array",
90
- items: {
91
- type: "string",
92
- description: "Domain entity name, only alphanumeric characters are allowed no more than 2 words"
93
- },
94
- description: "List of domain entities"
95
- },
96
- },
97
- required: ["entities"]
98
- };
99
- export const StoryListSchema = {
100
- type: "object",
101
- title: "StoryList",
102
- description: "User stories",
103
- properties: {
104
- stories: {
105
- type: "array",
106
- items: StoryDraftSchema,
107
- description: "List of user stories IN FLOW ORDER - the order of the numbered steps they were taken from"
108
- },
109
- },
110
- required: ["stories"]
111
- };
112
- export const AttributeSchema = {
113
- type: "object",
114
- title: "Attribute",
115
- description: "Entity attribute",
116
- properties: {
117
- name: {
118
- type: "string",
119
- description: "Attribute name, should be descriptive and use camelCase"
120
- },
121
- description: {
122
- type: "string",
123
- description: "Detailed description of the attribute in the domain entity"
124
- }
125
- },
126
- required: ["name", "description"],
127
- additionalProperties: false,
128
- };
129
- export const EntitySchema = {
130
- type: "object",
131
- title: "Entity",
132
- description: "Domain entity with attributes",
133
- properties: {
134
- name: {
135
- type: "string",
136
- description: "Entity name, should be descriptive and use PascalCase"
137
- },
138
- description: {
139
- type: "string",
140
- description: "Detailed description of the entity and its role in the domain"
141
- },
142
- attributes: {
143
- type: "array",
144
- items: AttributeSchema,
145
- description: "List of entity attributes"
146
- }
147
- },
148
- required: ["name", "description", "attributes"],
149
- additionalProperties: false,
150
- };
151
- export const MainStoryProbabilitySchema = {
152
- type: "object",
153
- title: "MainStoryProbability",
154
- description: "Probability that the user story describes main action on the home screen",
155
- properties: {
156
- story: {
157
- type: "string",
158
- description: "Exact user story text copied from input"
159
- },
160
- probability: {
161
- type: "number",
162
- description: "Probability scroe — from 0 to 10 — that the user story describes main action on the home screen if we compare with other stories"
163
- }
164
- },
165
- required: ["story", "probability"],
166
- additionalProperties: false,
167
- };
168
- export const MainStoryCandidatesSchema = {
169
- type: "object",
170
- title: "MainStoryCandidates",
171
- description: "List of main story candidates",
172
- properties: {
173
- candidates: {
174
- type: "array",
175
- items: MainStoryProbabilitySchema,
176
- }
177
- },
178
- required: ["candidates"],
179
- additionalProperties: false,
180
- };
181
- //# sourceMappingURL=schemas.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/ba/schemas.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEjD;;;;;;GAMG;AACH,MAAM,sBAAsB,GAAG;;;;;;OAMxB,CAAA;AAEP,MAAM,sBAAsB,GAC1B,0GAA0G,CAAA;AAE5G,MAAM,CAAC,MAAM,gBAAgB,GAA+B;IAC1D,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,mEAAmE;IAChF,UAAU,EAAE;QACV,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,sBAAsB;SACpC;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC;YAChC,WAAW,EAAE,sBAAsB;SACpC;KACF;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YAAY,CAAC;IAC/C,oBAAoB,EAAE,KAAK;CAC5B,CAAA;AAED,MAAM,CAAC,MAAM,0BAA0B,GAAyC;IAC9E,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,sBAAsB;IAC7B,WAAW,EAAE,0EAA0E;IACvF,UAAU,EAAE;QACV,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,yCAAyC;SACvD;QACD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,kIAAkI;SAChJ;KACF;IACD,QAAQ,EAAE,CAAC,OAAO,EAAE,aAAa,CAAC;IAClC,oBAAoB,EAAE,KAAK;CAC5B,CAAA;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAwC;IAC5E,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EAAE,+BAA+B;IAC5C,UAAU,EAAE;QACV,UAAU,EAAE;YACV,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,0BAA0B;SAClC;KACF;IACD,QAAQ,EAAE,CAAC,YAAY,CAAC;IACxB,oBAAoB,EAAE,KAAK;CAC5B,CAAA"}
@@ -1,73 +0,0 @@
1
- import type { BlueprintPatch } from './types.js';
2
- /**
3
- * WHICH KIND of product is being built on a blueprint.
4
- *
5
- * A blueprint says what the STACK is — the language, the framework, the topology, the seeds. A
6
- * case says what is being built ON it, and that is a different question with different consumers:
7
- * the analyst framing the brief, the architect deciding whether a story needs a queue, the coder
8
- * choosing which packages it may import.
9
- *
10
- * Deliberately NOT a second blueprint. Everything a case has to say is already a blueprint field,
11
- * so a case is a PATCH and the resolution order stays base → case → per-run overrides. That is
12
- * also why adding one is a data change: nothing reads `BlueprintCase` except the table below and
13
- * the prompt that classifies a project into it.
14
- */
15
- export declare enum BlueprintCase {
16
- /** A web application whose every feature fits inside a request. No queue, no worker, no agents. */
17
- Web = "web",
18
- /** A web application with work that genuinely belongs off the request path. */
19
- Scalable = "scalable",
20
- /** The product's value comes from ordered, deterministic model-driven steps. */
21
- AiPipeline = "ai-pipeline",
22
- /** The product's value comes from an agent that decides its own path through tools. */
23
- AiAgent = "ai-agent",
24
- /** A browser game: a three.js scene with an ordinary React interface over it. */
25
- Game = "game"
26
- }
27
- /**
28
- * How a game is played, which decides who owns its state.
29
- *
30
- * Recorded beside the case rather than folded into it, because it changes nothing about the
31
- * dependencies and everything about where the logic goes. `OnlineTurn` is the default for
32
- * anything multiplayer unless the brief plainly asks for live play — it is the shape that
33
- * actually builds, and it needs no socket, no tick loop and no reconciliation.
34
- */
35
- export declare enum GameKind {
36
- Casual = "casual",
37
- OnlineTurn = "online-turn",
38
- OnlineLive = "online-live"
39
- }
40
- export interface BlueprintCaseDefinition {
41
- id: BlueprintCase;
42
- title: string;
43
- /**
44
- * What this case is FOR, as the classifier prompt reads it.
45
- *
46
- * A pure constant, like every skill body: it lands in a cached prompt region, and one
47
- * interpolated byte invalidates the prefix for every project classified after it.
48
- */
49
- when: string;
50
- /** Applied between the base blueprint and the run's own overrides. A case is nothing else. */
51
- patch: BlueprintPatch;
52
- }
53
- /**
54
- * The cases the platform ships.
55
- *
56
- * Read as a table: the left column is what a prompt has to look like, the right column is what
57
- * that costs the generated application. Nothing here turns a capability on without also
58
- * installing what makes it real — a blueprint that promises `agents` over a manifest with no
59
- * `@owlmeans/agent` in it produces a story that reports success and a library that will not
60
- * compile.
61
- */
62
- export declare const BLUEPRINT_CASES: Record<BlueprintCase, BlueprintCaseDefinition>;
63
- /**
64
- * The case a reference names, or `undefined`.
65
- *
66
- * Total over anything: an unknown name, a name from a deploy this one does not have, and an
67
- * absent one all read the same way — no patch, which is the base blueprint. That is the only
68
- * answer that cannot take a capability away from a project that already has it.
69
- */
70
- export declare const blueprintCaseOf: (name?: string) => BlueprintCaseDefinition | undefined;
71
- /** Every case the platform ships, in the order a classifier should weigh them. */
72
- export declare const BLUEPRINT_CASE_ORDER: BlueprintCase[];
73
- //# sourceMappingURL=case.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"case.d.ts","sourceRoot":"","sources":["../../src/blueprint/case.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAEhD;;;;;;;;;;;;GAYG;AACH,oBAAY,aAAa;IACvB,mGAAmG;IACnG,GAAG,QAAQ;IACX,+EAA+E;IAC/E,QAAQ,aAAa;IACrB,gFAAgF;IAChF,UAAU,gBAAgB;IAC1B,uFAAuF;IACvF,OAAO,aAAa;IACpB,iFAAiF;IACjF,IAAI,SAAS;CACd;AAED;;;;;;;GAOG;AACH,oBAAY,QAAQ;IAClB,MAAM,WAAW;IACjB,UAAU,gBAAgB;IAC1B,UAAU,gBAAgB;CAC3B;AAED,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,aAAa,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ,8FAA8F;IAC9F,KAAK,EAAE,cAAc,CAAA;CACtB;AAkHD;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,aAAa,EAAE,uBAAuB,CAsH1E,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,UAAW,MAAM,KAAG,uBAAuB,GAAG,SACqB,CAAA;AAE/F,kFAAkF;AAClF,eAAO,MAAM,oBAAoB,EAAE,aAAa,EAM/C,CAAA"}