@adminiumjs/add-on-contracts 0.2.5 → 0.2.6
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/dist/add-on-block.d.ts +6 -0
- package/dist/add-on-block.d.ts.map +1 -1
- package/dist/contracts.d.ts +9 -2
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +24 -2
- package/dist/contracts.js.map +1 -1
- package/dist/document-render.d.ts +547 -0
- package/dist/document-render.d.ts.map +1 -0
- package/dist/document-render.js +228 -0
- package/dist/document-render.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/slots.d.ts +21 -1
- package/dist/slots.d.ts.map +1 -1
- package/dist/slots.js +94 -1
- package/dist/slots.js.map +1 -1
- package/dist/testing/index.d.ts +61 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +383 -0
- package/dist/testing/index.js.map +1 -1
- package/package.json +1 -1
package/dist/add-on-block.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export declare const providesSchema: z.ZodObject<{
|
|
|
41
41
|
"artwork-source": "artwork-source";
|
|
42
42
|
"shipping-carrier": "shipping-carrier";
|
|
43
43
|
"product-personalizer": "product-personalizer";
|
|
44
|
+
"document-render": "document-render";
|
|
44
45
|
}>;
|
|
45
46
|
version: z.ZodNumber;
|
|
46
47
|
server: z.ZodString;
|
|
@@ -50,6 +51,7 @@ export declare const consumesSchema: z.ZodObject<{
|
|
|
50
51
|
"artwork-source": "artwork-source";
|
|
51
52
|
"shipping-carrier": "shipping-carrier";
|
|
52
53
|
"product-personalizer": "product-personalizer";
|
|
54
|
+
"document-render": "document-render";
|
|
53
55
|
}>;
|
|
54
56
|
version: z.ZodNumber;
|
|
55
57
|
}, z.core.$strict>;
|
|
@@ -67,6 +69,7 @@ export declare const slotFillSchema: z.ZodObject<{
|
|
|
67
69
|
"order.line.actions": "order.line.actions";
|
|
68
70
|
"record.editor.panel": "record.editor.panel";
|
|
69
71
|
"record.actions": "record.actions";
|
|
72
|
+
"shell.overlay": "shell.overlay";
|
|
70
73
|
}>;
|
|
71
74
|
client: z.ZodString;
|
|
72
75
|
order: z.ZodNumber;
|
|
@@ -99,6 +102,7 @@ export declare const addOnBlockSchema: z.ZodObject<{
|
|
|
99
102
|
"artwork-source": "artwork-source";
|
|
100
103
|
"shipping-carrier": "shipping-carrier";
|
|
101
104
|
"product-personalizer": "product-personalizer";
|
|
105
|
+
"document-render": "document-render";
|
|
102
106
|
}>;
|
|
103
107
|
version: z.ZodNumber;
|
|
104
108
|
server: z.ZodString;
|
|
@@ -108,6 +112,7 @@ export declare const addOnBlockSchema: z.ZodObject<{
|
|
|
108
112
|
"artwork-source": "artwork-source";
|
|
109
113
|
"shipping-carrier": "shipping-carrier";
|
|
110
114
|
"product-personalizer": "product-personalizer";
|
|
115
|
+
"document-render": "document-render";
|
|
111
116
|
}>;
|
|
112
117
|
version: z.ZodNumber;
|
|
113
118
|
}, z.core.$strict>>>;
|
|
@@ -125,6 +130,7 @@ export declare const addOnBlockSchema: z.ZodObject<{
|
|
|
125
130
|
"order.line.actions": "order.line.actions";
|
|
126
131
|
"record.editor.panel": "record.editor.panel";
|
|
127
132
|
"record.actions": "record.actions";
|
|
133
|
+
"shell.overlay": "shell.overlay";
|
|
128
134
|
}>;
|
|
129
135
|
client: z.ZodString;
|
|
130
136
|
order: z.ZodNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-on-block.d.ts","sourceRoot":"","sources":["../src/add-on-block.ts"],"names":[],"mappings":"AACA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,+DAAgE,CAAC;AAC/F,eAAO,MAAM,mBAAmB;;;;;;EAA4B,CAAC;AAC7D,MAAM,MAAM,aAAa,GAAG,CAAC,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;;;;;;;;;;;;;;kBAmC1B,CAAC;AAEJ,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,iFAAiF;AACjF,eAAO,MAAM,kBAAkB,wLASrB,CAAC;AACX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
package/dist/contracts.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Provider contract registry v1 — CLOSED (24-marketplace-wave-4.md §5.5).
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Four, not eight. A contract that has no implementation is a guess about a
|
|
5
5
|
* future add-on; the only way a contract gets in is alongside the add-on that
|
|
6
|
-
* implements it.
|
|
6
|
+
* implements it. The fourth was bought on a seven-exhibit dossier
|
|
7
|
+
* (34-invoices-add-on.md Appendix A), not on a shape somebody liked.
|
|
7
8
|
*/
|
|
8
9
|
import { z } from 'zod';
|
|
9
10
|
export interface ContractDefinition {
|
|
@@ -28,6 +29,11 @@ export declare const CONTRACT_REGISTRY: readonly [{
|
|
|
28
29
|
readonly version: 1;
|
|
29
30
|
readonly summary: "Personalization spanning three surfaces — shopper, staff, dashboard — which is why it is a contract rather than a screen.";
|
|
30
31
|
readonly implementations: 1;
|
|
32
|
+
}, {
|
|
33
|
+
readonly id: "document-render";
|
|
34
|
+
readonly version: 1;
|
|
35
|
+
readonly summary: "Kinds of document an add-on can describe (an outline of slots, labelled in eight locales) and render to bytes (html, pdf — per kind). Consumed by the engine document pipeline; the first contract Adminium itself resolves at runtime.";
|
|
36
|
+
readonly implementations: 2;
|
|
31
37
|
}];
|
|
32
38
|
export type ContractId = (typeof CONTRACT_REGISTRY)[number]['id'];
|
|
33
39
|
export declare const CONTRACT_IDS: readonly ContractId[];
|
|
@@ -35,6 +41,7 @@ export declare const contractIdSchema: z.ZodEnum<{
|
|
|
35
41
|
"artwork-source": "artwork-source";
|
|
36
42
|
"shipping-carrier": "shipping-carrier";
|
|
37
43
|
"product-personalizer": "product-personalizer";
|
|
44
|
+
"document-render": "document-render";
|
|
38
45
|
}>;
|
|
39
46
|
export declare function isContractId(v: unknown): v is ContractId;
|
|
40
47
|
/** True when the registry carries this contract AT the declared version. */
|
package/dist/contracts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AACA
|
|
1
|
+
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,gFAAgF;IAChF,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;CAClC;AAED,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;EA4CoB,CAAC;AAEnD,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC;AAElE,eAAO,MAAM,YAAY,EAAyC,SAAS,UAAU,EAAE,CAAC;AAExF,eAAO,MAAM,gBAAgB;;;;;EAE5B,CAAC;AAIF,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,UAAU,CAExD;AAED,4EAA4E;AAC5E,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAGvE"}
|
package/dist/contracts.js
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Provider contract registry v1 — CLOSED (24-marketplace-wave-4.md §5.5).
|
|
4
4
|
*
|
|
5
|
-
*
|
|
5
|
+
* Four, not eight. A contract that has no implementation is a guess about a
|
|
6
6
|
* future add-on; the only way a contract gets in is alongside the add-on that
|
|
7
|
-
* implements it.
|
|
7
|
+
* implements it. The fourth was bought on a seven-exhibit dossier
|
|
8
|
+
* (34-invoices-add-on.md Appendix A), not on a shape somebody liked.
|
|
8
9
|
*/
|
|
9
10
|
import { z } from 'zod';
|
|
10
11
|
export const CONTRACT_REGISTRY = [
|
|
@@ -26,6 +27,27 @@ export const CONTRACT_REGISTRY = [
|
|
|
26
27
|
summary: 'Personalization spanning three surfaces — shopper, staff, dashboard — which is why it is a contract rather than a screen.',
|
|
27
28
|
implementations: 1,
|
|
28
29
|
},
|
|
30
|
+
{
|
|
31
|
+
/*
|
|
32
|
+
* THE FOURTH, BOUGHT 2026-09-10 (34-invoices-add-on.md O1/O11). 25 §5 drew
|
|
33
|
+
* this interface twice and never built it; zero occurrences in either repo
|
|
34
|
+
* until now. Its dossier is 34 Appendix A — seven exhibits, two
|
|
35
|
+
* implementers in the same sub-wave (invoices; barcode-labels wrapping
|
|
36
|
+
* renderLabelSheet), which meets 25 D4's count — and, by 34 O11's ruling,
|
|
37
|
+
* relaxes its "different means" clause for a contract Adminium ITSELF
|
|
38
|
+
* consumes. It PROVIDES kinds of document an add-on can describe and
|
|
39
|
+
* render, as an outline of slots (labels in all eight locales) and bytes
|
|
40
|
+
* (each kind declares its own formats and glyph coverage); it is CONSUMED
|
|
41
|
+
* BY the engine document pipeline (profiles, triggers, the document.render
|
|
42
|
+
* job, the /documents routes) — the first production read of
|
|
43
|
+
* runtime.providers, selected by add-on key, never by resolveProvider's
|
|
44
|
+
* lowest-key choice. "Add-ons compose" runs for real here.
|
|
45
|
+
*/
|
|
46
|
+
id: 'document-render',
|
|
47
|
+
version: 1,
|
|
48
|
+
summary: 'Kinds of document an add-on can describe (an outline of slots, labelled in eight locales) and render to bytes (html, pdf — per kind). Consumed by the engine document pipeline; the first contract Adminium itself resolves at runtime.',
|
|
49
|
+
implementations: 2,
|
|
50
|
+
},
|
|
29
51
|
];
|
|
30
52
|
export const CONTRACT_IDS = CONTRACT_REGISTRY.map((c) => c.id);
|
|
31
53
|
export const contractIdSchema = z.enum(CONTRACT_IDS);
|
package/dist/contracts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B;QACE,EAAE,EAAE,gBAAgB;QACpB,OAAO,EAAE,CAAC;QACV,OAAO,EACL,yJAAyJ;QAC3J,eAAe,EAAE,CAAC;KACnB;IACD;QACE,EAAE,EAAE,kBAAkB;QACtB,OAAO,EAAE,CAAC;QACV,OAAO,EACL,kGAAkG;QACpG,eAAe,EAAE,CAAC;KACnB;IACD;QACE,EAAE,EAAE,sBAAsB;QAC1B,OAAO,EAAE,CAAC;QACV,OAAO,EACL,2HAA2H;QAC7H,eAAe,EAAE,CAAC;KACnB;IACD;QACE;;;;;;;;;;;;;;WAcG;QACH,EAAE,EAAE,iBAAiB;QACrB,OAAO,EAAE,CAAC;QACV,OAAO,EACL,yOAAyO;QAC3O,eAAe,EAAE,CAAC;KACnB;CAC+C,CAAC;AAInD,MAAM,CAAC,MAAM,YAAY,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAA0B,CAAC;AAExF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CACpC,YAAwD,CACzD,CAAC;AAEF,MAAM,KAAK,GAAG,IAAI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