@12ui/design 0.2.25 → 0.2.27
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/SKILL.md +1 -1
- package/dist/branch-client.d.ts +7 -0
- package/dist/branch-client.d.ts.map +1 -1
- package/dist/branch-client.js +1 -0
- package/dist/branch-client.js.map +1 -1
- package/dist/branch-completion.d.ts +8 -0
- package/dist/branch-completion.d.ts.map +1 -1
- package/dist/branch-completion.js +48 -3
- package/dist/branch-completion.js.map +1 -1
- package/dist/branch-execution.d.ts +8 -0
- package/dist/branch-execution.d.ts.map +1 -1
- package/dist/branch-execution.js +37 -6
- package/dist/branch-execution.js.map +1 -1
- package/dist/branch-page-conversion.d.ts +5 -0
- package/dist/branch-page-conversion.d.ts.map +1 -1
- package/dist/branch-page-conversion.js +24 -13
- package/dist/branch-page-conversion.js.map +1 -1
- package/dist/branch-plan.d.ts +38 -0
- package/dist/branch-plan.d.ts.map +1 -1
- package/dist/branch-plan.js +83 -17
- package/dist/branch-plan.js.map +1 -1
- package/dist/branch-progress.d.ts.map +1 -1
- package/dist/branch-progress.js +13 -0
- package/dist/branch-progress.js.map +1 -1
- package/dist/branch-run-record.d.ts +27 -1
- package/dist/branch-run-record.d.ts.map +1 -1
- package/dist/branch-run-record.js.map +1 -1
- package/dist/cli-usage.js +1 -1
- package/dist/conversion-client.d.ts.map +1 -1
- package/dist/conversion-client.js +23 -3
- package/dist/conversion-client.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/operation-poll-policy.d.ts +89 -0
- package/dist/operation-poll-policy.d.ts.map +1 -0
- package/dist/operation-poll-policy.js +99 -0
- package/dist/operation-poll-policy.js.map +1 -0
- package/dist/package-client.d.ts.map +1 -1
- package/dist/package-client.js +48 -9
- package/dist/package-client.js.map +1 -1
- package/dist/package-submission.d.ts.map +1 -1
- package/dist/package-submission.js +30 -2
- package/dist/package-submission.js.map +1 -1
- package/dist/responsive-quality.d.ts +65 -14
- package/dist/responsive-quality.d.ts.map +1 -1
- package/dist/responsive-quality.js +58 -50
- package/dist/responsive-quality.js.map +1 -1
- package/open-design.json +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responsive-quality.d.ts","sourceRoot":"","sources":["../src/responsive-quality.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,+BAA+B,8BAA+B,CAAC;AAC5E,MAAM,MAAM,2BAA2B,GAAG,OAAO,+BAA+B,CAAC,MAAM,CAAC,CAAC;AACzF,eAAO,MAAM,yCAAyC,0CAA2C,CAAC;AAClG,MAAM,MAAM,oCAAoC,GAAG,OAAO,yCAAyC,CAAC,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"responsive-quality.d.ts","sourceRoot":"","sources":["../src/responsive-quality.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,+BAA+B,8BAA+B,CAAC;AAC5E,MAAM,MAAM,2BAA2B,GAAG,OAAO,+BAA+B,CAAC,MAAM,CAAC,CAAC;AACzF,eAAO,MAAM,yCAAyC,0CAA2C,CAAC;AAClG,MAAM,MAAM,oCAAoC,GAAG,OAAO,yCAAyC,CAAC,MAAM,CAAC,CAAC;AAE5G;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gCAAgC,kDAAmD,CAAC;AACjG,MAAM,MAAM,4BAA4B,GAAG,OAAO,gCAAgC,CAAC,MAAM,CAAC,CAAC;AAC3F,eAAO,MAAM,uCAAuC,0BAA2B,CAAC;AAChF,eAAO,MAAM,gDAAgD,kBAAmB,CAAC;AACjF,eAAO,MAAM,wCAAwC,kDAAmD,CAAC;AAEzG,eAAO,MAAM,6BAA6B,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,2BAEvE,CAAC;AAEF,eAAO,MAAM,sCAAsC,GACjD,OAAO,OAAO,KACb,KAAK,IAAI,oCAGX,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,EAAE,EAAE,4BAA4B,CAAC;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,OAAO,uCAAuC,CAAC,MAAM,CAAC,CAAC;IAClE,iBAAiB,EAAE,OAAO,gDAAgD,CAAC,MAAM,CAAC,CAAC;IACnF,UAAU,EAAE,OAAO,wCAAwC,CAAC,MAAM,CAAC,CAAC;CACrE,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC;;;;;;;;OAQG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,oCAAoC,CAAC;IAC9C,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,0BAA0B,EAAE,CAAC;CACvC,CAAC;AAcF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,6BAA6B,GAAI,OAAO,OAAO,KAAG,wBAoB9D,CAAC"}
|
|
@@ -1,65 +1,73 @@
|
|
|
1
1
|
export const RESPONSIVE_CONVERSION_QUALITIES = ['standard', 'pro'];
|
|
2
2
|
export const PERSISTED_RESPONSIVE_CONVERSION_QUALITIES = ['standard', 'enhanced', 'pro'];
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
/**
|
|
4
|
+
* The anchor vocabulary the published contract declares.
|
|
5
|
+
*
|
|
6
|
+
* These three lists are the closed sets in
|
|
7
|
+
* `packages/design-contract/src/conversion.ts` → `ResponsiveConversionAnchor`,
|
|
8
|
+
* mirrored here because this package publishes standalone and cannot depend on
|
|
9
|
+
* the contract workspace. `workers/api/test/conversionResponsivePlanContract.test.ts`
|
|
10
|
+
* asserts the mirror against every anchor the service can actually emit, so a
|
|
11
|
+
* new direction, generator, or image size fails a local test rather than a
|
|
12
|
+
* customer's install.
|
|
13
|
+
*/
|
|
14
|
+
export const RESPONSIVE_CONVERSION_ANCHOR_IDS = ['mobile', 'tablet', 'compact-desktop'];
|
|
15
|
+
export const RESPONSIVE_CONVERSION_ANCHOR_GENERATORS = ['gpt-image-2'];
|
|
16
|
+
export const RESPONSIVE_CONVERSION_ANCHOR_GENERATOR_QUALITIES = ['low'];
|
|
17
|
+
export const RESPONSIVE_CONVERSION_ANCHOR_IMAGE_SIZES = ['1024x3072', '1536x2048', '2048x1536'];
|
|
9
18
|
export const isResponsiveConversionQuality = (value) => (typeof value === 'string' && RESPONSIVE_CONVERSION_QUALITIES.includes(value));
|
|
10
19
|
export const isPersistedResponsiveConversionQuality = (value) => (typeof value === 'string'
|
|
11
20
|
&& PERSISTED_RESPONSIVE_CONVERSION_QUALITIES.includes(value));
|
|
12
|
-
const THREE_TIER_ANCHORS = [
|
|
13
|
-
{ id: 'mobile', viewport_width: 390 },
|
|
14
|
-
{ id: 'tablet', viewport_width: 768 },
|
|
15
|
-
{ id: 'compact-desktop', viewport_width: 1024 },
|
|
16
|
-
];
|
|
17
|
-
const CURRENT_ANCHORS = [
|
|
18
|
-
{ id: 'mobile', viewport_width: 390, image_size: '1024x3072' },
|
|
19
|
-
{ id: 'tablet', viewport_width: 768, image_size: '1536x2048' },
|
|
20
|
-
{ id: 'compact-desktop', viewport_width: 1280, image_size: '2048x1536' },
|
|
21
|
-
];
|
|
22
21
|
const isRecord = (value) => (typeof value === 'object' && value !== null && !Array.isArray(value));
|
|
22
|
+
const isPositiveInteger = (value) => (Number.isSafeInteger(value) && Number(value) > 0);
|
|
23
|
+
const oneOf = (value, allowed) => (typeof value === 'string' && allowed.includes(value));
|
|
24
|
+
/**
|
|
25
|
+
* Validate the SHAPE of a responsive plan, and only the shape.
|
|
26
|
+
*
|
|
27
|
+
* ## Why there is no revision list here
|
|
28
|
+
*
|
|
29
|
+
* A plan names which anchor directions a quality bought at a given native
|
|
30
|
+
* width — a *service pricing decision*. Until 0.2.26 this parser refused any
|
|
31
|
+
* `revision` outside a closed `v1…v6` list and, worse, recomputed the topology
|
|
32
|
+
* the service had chosen and asserted equality. That made every published
|
|
33
|
+
* client a reader that must know every derivation the service will ever use,
|
|
34
|
+
* by name.
|
|
35
|
+
*
|
|
36
|
+
* On 2026-08-15 the service shipped `responsive-anchor-plan-v7` (pipeline
|
|
37
|
+
* v175, `workers/api/src/conversion/responsiveAnchorPlan.ts`). From that deploy
|
|
38
|
+
* every API-key client refused the whole conversion operation with
|
|
39
|
+
* "Conversion operation has an invalid responsive plan" — including operations
|
|
40
|
+
* for responsive exports it had already paid for and that had already
|
|
41
|
+
* succeeded, so `--export html`, `convert --output html`, and `resume --output
|
|
42
|
+
* html` all failed and the delivered work could not even be collected. The
|
|
43
|
+
* payload had not changed shape: a Standard v6 plan and a Standard v7 plan for
|
|
44
|
+
* the same source are byte-identical apart from that one string.
|
|
45
|
+
*
|
|
46
|
+
* So: `revision` is opaque, anchor *topology* is not re-derived, and what is
|
|
47
|
+
* checked is what this package actually reads — the declared vocabulary of
|
|
48
|
+
* `packages/design-contract/src/conversion.ts`. A malformed plan still refuses.
|
|
49
|
+
*
|
|
50
|
+
* The fence against this returning is
|
|
51
|
+
* `workers/api/test/conversionResponsivePlanContract.test.ts`: it walks every
|
|
52
|
+
* plan the service can emit, current and every frozen compatibility
|
|
53
|
+
* derivation, through this function.
|
|
54
|
+
*/
|
|
23
55
|
export const parseResponsiveConversionPlan = (value) => {
|
|
24
|
-
if (!isRecord(value)
|
|
25
|
-
|
|
26
|
-
&& value.revision !== RASTER_WIDTH_RESPONSIVE_ANCHOR_PLAN_REVISION
|
|
27
|
-
&& value.revision !== THREE_TIER_RESPONSIVE_ANCHOR_PLAN_REVISION
|
|
28
|
-
&& value.revision !== PRE_NATIVE_RESPONSIVE_ANCHOR_PLAN_REVISION
|
|
29
|
-
&& value.revision !== LEGACY_RESPONSIVE_ANCHOR_PLAN_REVISION)
|
|
56
|
+
if (!isRecord(value)
|
|
57
|
+
|| typeof value.revision !== 'string' || value.revision.trim() === ''
|
|
30
58
|
|| !isPersistedResponsiveConversionQuality(value.quality)
|
|
31
|
-
|| !
|
|
32
|
-
|| !Array.isArray(value.anchors)) {
|
|
59
|
+
|| !isPositiveInteger(value.native_width)
|
|
60
|
+
|| !Array.isArray(value.anchors) || value.anchors.length === 0) {
|
|
33
61
|
throw new TypeError('Invalid responsive conversion plan.');
|
|
34
62
|
}
|
|
35
|
-
const nativeWidth = Number(value.native_width);
|
|
36
|
-
const currentTopologyRevision = value.revision === RESPONSIVE_ANCHOR_PLAN_REVISION
|
|
37
|
-
|| value.revision === LOGICAL_WIDTH_RESPONSIVE_ANCHOR_PLAN_REVISION
|
|
38
|
-
|| value.revision === RASTER_WIDTH_RESPONSIVE_ANCHOR_PLAN_REVISION;
|
|
39
|
-
if (currentTopologyRevision && value.quality === 'enhanced') {
|
|
40
|
-
throw new TypeError('Current responsive conversion plans do not support Enhanced quality.');
|
|
41
|
-
}
|
|
42
|
-
const oldLimit = value.quality === 'standard' ? 1 : value.quality === 'enhanced' ? 2 : 3;
|
|
43
|
-
const oldBudget = THREE_TIER_ANCHORS.slice(0, oldLimit);
|
|
44
|
-
const expected = currentTopologyRevision
|
|
45
|
-
? CURRENT_ANCHORS.slice(0, value.quality === 'standard' ? 1 : nativeWidth > 1440 ? 3 : 2)
|
|
46
|
-
: value.revision === LEGACY_RESPONSIVE_ANCHOR_PLAN_REVISION
|
|
47
|
-
? oldBudget.filter((anchor) => anchor.viewport_width < nativeWidth)
|
|
48
|
-
: oldBudget;
|
|
49
|
-
if (value.anchors.length !== expected.length || expected.length === 0) {
|
|
50
|
-
throw new TypeError('Responsive conversion plan has an invalid anchor count.');
|
|
51
|
-
}
|
|
52
63
|
for (const [index, anchorValue] of value.anchors.entries()) {
|
|
53
64
|
const anchor = isRecord(anchorValue) ? anchorValue : null;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|| anchor.
|
|
60
|
-
|| anchor.generator !== 'gpt-image-2'
|
|
61
|
-
|| anchor.generator_quality !== 'low'
|
|
62
|
-
|| anchor.image_size !== expectedImageSize) {
|
|
65
|
+
if (!anchor
|
|
66
|
+
|| !oneOf(anchor.id, RESPONSIVE_CONVERSION_ANCHOR_IDS)
|
|
67
|
+
|| !isPositiveInteger(anchor.viewport_width)
|
|
68
|
+
|| !oneOf(anchor.generator, RESPONSIVE_CONVERSION_ANCHOR_GENERATORS)
|
|
69
|
+
|| !oneOf(anchor.generator_quality, RESPONSIVE_CONVERSION_ANCHOR_GENERATOR_QUALITIES)
|
|
70
|
+
|| !oneOf(anchor.image_size, RESPONSIVE_CONVERSION_ANCHOR_IMAGE_SIZES)) {
|
|
63
71
|
throw new TypeError(`Responsive conversion plan anchor ${index} is invalid.`);
|
|
64
72
|
}
|
|
65
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responsive-quality.js","sourceRoot":"","sources":["../src/responsive-quality.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,UAAU,EAAE,KAAK,CAAU,CAAC;AAE5E,MAAM,CAAC,MAAM,yCAAyC,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,CAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"responsive-quality.js","sourceRoot":"","sources":["../src/responsive-quality.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,UAAU,EAAE,KAAK,CAAU,CAAC;AAE5E,MAAM,CAAC,MAAM,yCAAyC,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,CAAU,CAAC;AAGlG;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,CAAU,CAAC;AAEjG,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAAC,aAAa,CAAU,CAAC;AAChF,MAAM,CAAC,MAAM,gDAAgD,GAAG,CAAC,KAAK,CAAU,CAAC;AACjF,MAAM,CAAC,MAAM,wCAAwC,GAA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CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACjE,MAAM,IAAI,SAAS,CAAC,qCAAqC,CAAC,CAAC;IAC7D,CAAC;IACD,KAAK,MAAM,CAAC,KAAK,EAAE,WAAW,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;QAC3D,MAAM,MAAM,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC;QAC1D,IAAI,CAAC,MAAM;eACN,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,gCAAgC,CAAC;eACnD,CAAC,iBAAiB,CAAC,MAAM,CAAC,cAAc,CAAC;eACzC,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,EAAE,uCAAuC,CAAC;eACjE,CAAC,KAAK,CAAC,MAAM,CAAC,iBAAiB,EAAE,gDAAgD,CAAC;eAClF,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,EAAE,wCAAwC,CAAC,EAAE,CAAC;YACzE,MAAM,IAAI,SAAS,CAAC,qCAAqC,KAAK,cAAc,CAAC,CAAC;QAChF,CAAC;IACH,CAAC;IACD,OAAO,KAAiC,CAAC;AAC3C,CAAC,CAAC"}
|
package/open-design.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"specVersion": "1.0.0",
|
|
4
4
|
"name": "12ui-design",
|
|
5
5
|
"title": "12UI Design",
|
|
6
|
-
"version": "0.2.
|
|
6
|
+
"version": "0.2.27",
|
|
7
7
|
"description": "Explore corpus-grounded interface directions, choose one, and convert it into production-ready responsive or native artifacts with 12UI.",
|
|
8
8
|
"author": {
|
|
9
9
|
"name": "Just Every",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"command": "npx",
|
|
50
50
|
"args": [
|
|
51
51
|
"-y",
|
|
52
|
-
"@12ui/design@0.2.
|
|
52
|
+
"@12ui/design@0.2.27",
|
|
53
53
|
"mcp"
|
|
54
54
|
]
|
|
55
55
|
}
|