@adminiumjs/add-on-contracts 0.2.9 → 0.3.0-rc.1
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 +134 -6
- package/dist/add-on-block.d.ts.map +1 -1
- package/dist/add-on-block.js +173 -7
- package/dist/add-on-block.js.map +1 -1
- package/dist/artwork-source.d.ts +2 -2
- package/dist/artwork-source.js +2 -2
- package/dist/contracts.d.ts +3 -3
- package/dist/contracts.js +16 -16
- package/dist/document-render.d.ts +17 -17
- package/dist/document-render.d.ts.map +1 -1
- package/dist/document-render.js +11 -11
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/nav-groups.d.ts +28 -0
- package/dist/nav-groups.d.ts.map +1 -0
- package/dist/nav-groups.js +28 -0
- package/dist/nav-groups.js.map +1 -0
- package/dist/product-personalizer.d.ts +3 -3
- package/dist/product-personalizer.js +3 -3
- package/dist/runtime/app-types.d.ts +165 -0
- package/dist/runtime/app-types.d.ts.map +1 -0
- package/dist/runtime/app-types.js +2 -0
- package/dist/runtime/app-types.js.map +1 -0
- package/dist/runtime/app.d.ts +31 -0
- package/dist/runtime/app.d.ts.map +1 -0
- package/dist/runtime/app.js +29 -0
- package/dist/runtime/app.js.map +1 -0
- package/dist/runtime/compiler-runtime.d.ts +7 -0
- package/dist/runtime/compiler-runtime.d.ts.map +1 -0
- package/dist/runtime/compiler-runtime.js +10 -0
- package/dist/runtime/compiler-runtime.js.map +1 -0
- package/dist/runtime/i18n.d.ts +15 -0
- package/dist/runtime/i18n.d.ts.map +1 -0
- package/dist/runtime/i18n.js +17 -0
- package/dist/runtime/i18n.js.map +1 -0
- package/dist/runtime/index.d.ts +189 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +272 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/jsx-runtime.d.ts +12 -0
- package/dist/runtime/jsx-runtime.d.ts.map +1 -0
- package/dist/runtime/jsx-runtime.js +15 -0
- package/dist/runtime/jsx-runtime.js.map +1 -0
- package/dist/runtime/query.d.ts +19 -0
- package/dist/runtime/query.d.ts.map +1 -0
- package/dist/runtime/query.js +21 -0
- package/dist/runtime/query.js.map +1 -0
- package/dist/runtime/react-dom.d.ts +22 -0
- package/dist/runtime/react-dom.d.ts.map +1 -0
- package/dist/runtime/react-dom.js +28 -0
- package/dist/runtime/react-dom.js.map +1 -0
- package/dist/runtime/react.d.ts +56 -0
- package/dist/runtime/react.d.ts.map +1 -0
- package/dist/runtime/react.js +58 -0
- package/dist/runtime/react.js.map +1 -0
- package/dist/runtime/router.d.ts +18 -0
- package/dist/runtime/router.d.ts.map +1 -0
- package/dist/runtime/router.js +20 -0
- package/dist/runtime/router.js.map +1 -0
- package/dist/runtime/ui.d.ts +36 -0
- package/dist/runtime/ui.d.ts.map +1 -0
- package/dist/runtime/ui.js +38 -0
- package/dist/runtime/ui.js.map +1 -0
- package/dist/shipping-carrier.d.ts +2 -2
- package/dist/shipping-carrier.js +2 -2
- package/dist/slots.d.ts +2 -3
- package/dist/slots.d.ts.map +1 -1
- package/dist/slots.js +13 -15
- package/dist/slots.js.map +1 -1
- package/dist/testing/index.d.ts +6 -6
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +8 -8
- package/dist/testing/index.js.map +1 -1
- package/package.json +45 -1
package/dist/add-on-block.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The `addOn` manifest block
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* The `addOn` manifest block and its validation rules. Lives here rather than
|
|
3
|
+
* in `@adminium/manifest` because the rules are assertions ABOUT the registries
|
|
4
|
+
* in this package — a slot id or a contract id is only meaningful against the
|
|
5
|
+
* closed lists in `slots.ts` / `contracts.ts`.
|
|
6
6
|
*
|
|
7
7
|
* `@adminium/manifest` imports this to build the `kind: "add-on"` branch of its
|
|
8
8
|
* discriminated union.
|
|
9
9
|
*/
|
|
10
10
|
import { z } from 'zod';
|
|
11
|
+
import { type BuiltinNavGroupKey } from './nav-groups.js';
|
|
11
12
|
/**
|
|
12
13
|
* Add-ons get their OWN closed category vocabulary (D2), because an add-on is
|
|
13
14
|
* not a vertical and forcing it into the app facet set would make a carrier a
|
|
@@ -23,7 +24,7 @@ export declare const addOnCategorySchema: z.ZodEnum<{
|
|
|
23
24
|
data: "data";
|
|
24
25
|
}>;
|
|
25
26
|
export type AddOnCategory = (typeof ADD_ON_CATEGORIES)[number];
|
|
26
|
-
/** How the shop supplies credentials, if at all
|
|
27
|
+
/** How the shop supplies credentials, if at all. */
|
|
27
28
|
export declare const CONNECT_KINDS: readonly ["none", "api-key", "oauth2"];
|
|
28
29
|
export declare const connectKindSchema: z.ZodEnum<{
|
|
29
30
|
none: "none";
|
|
@@ -91,6 +92,109 @@ export declare const addOnConnectSchema: z.ZodObject<{
|
|
|
91
92
|
export declare const addOnNetworkSchema: z.ZodObject<{
|
|
92
93
|
allow: z.ZodArray<z.ZodString>;
|
|
93
94
|
}, z.core.$strict>;
|
|
95
|
+
/**
|
|
96
|
+
* An i18n message: a catalog key plus the English fallback rendered when the
|
|
97
|
+
* key is absent.
|
|
98
|
+
*
|
|
99
|
+
* MOVED HERE FROM `@adminium/manifest` by 51a, which now re-exports it under
|
|
100
|
+
* the same name. One definition rather than two, because both ends need it: a
|
|
101
|
+
* page title and a nav-group label are written in a manifest and validated
|
|
102
|
+
* there, and read back by a host through the schemas in THIS package. Two
|
|
103
|
+
* four-line copies of the same shape are exactly the duplicate that drifts in a
|
|
104
|
+
* field nobody reads — `max(400)` here and `max(200)` there — and then the
|
|
105
|
+
* stricter copy refuses first, for a reason no message names.
|
|
106
|
+
*/
|
|
107
|
+
export declare const i18nMessageSchema: z.ZodObject<{
|
|
108
|
+
key: z.ZodString;
|
|
109
|
+
fallback: z.ZodString;
|
|
110
|
+
}, z.core.$strict>;
|
|
111
|
+
export type I18nMessage = z.infer<typeof i18nMessageSchema>;
|
|
112
|
+
/**
|
|
113
|
+
* THE RAIL'S BUILT-IN GROUPS now live in `nav-groups.ts`, re-exported here so
|
|
114
|
+
* this module's public surface is unchanged. They moved so that a host needing
|
|
115
|
+
* only the five keys — the dashboard's entry-chunk `app/bootstrap.ts` — can
|
|
116
|
+
* import them without making this whole module, and everything the barrel
|
|
117
|
+
* reaches from it, statically reachable. See that file's note.
|
|
118
|
+
*/
|
|
119
|
+
export { BUILTIN_NAV_GROUP_KEYS, type BuiltinNavGroupKey } from './nav-groups.js';
|
|
120
|
+
/**
|
|
121
|
+
* Where a page goes when its manifest asks for no group (the owner's ruling,
|
|
122
|
+
* 51 D-nav). Applied at PARSE, so what a host reads is already resolved and the
|
|
123
|
+
* rail never has to guess.
|
|
124
|
+
*
|
|
125
|
+
* The alternative is what generated pages do today, and it is worse: an app
|
|
126
|
+
* page whose `navGroup` is not in the closed set is dropped into `hidden` at
|
|
127
|
+
* `bootstrap/handlers.ts:146` — the page exists, nothing links to it, and
|
|
128
|
+
* nothing says why. An add-on that omits a group has not made a mistake, so it
|
|
129
|
+
* gets a home rather than a silence.
|
|
130
|
+
*/
|
|
131
|
+
export declare const DEFAULT_NAV_GROUP: BuiltinNavGroupKey;
|
|
132
|
+
/**
|
|
133
|
+
* A group key, built-in or declared. Kebab-case, because it appears in no URL
|
|
134
|
+
* but is compared against the built-in five, which are kebab.
|
|
135
|
+
*/
|
|
136
|
+
export declare const navGroupKeySchema: z.ZodString;
|
|
137
|
+
/**
|
|
138
|
+
* The host API an add-on's client code is written against.
|
|
139
|
+
*
|
|
140
|
+
* A version rather than a boolean because publishing `Modal` and `useNavigate`
|
|
141
|
+
* to code the engine did not build makes them public API: the day that surface
|
|
142
|
+
* changes shape, an add-on built against the old one must be REFUSED with its
|
|
143
|
+
* version named, not mounted into a blank screen. `z.literal(1)` becomes a
|
|
144
|
+
* union the first time there is a 2 — and there is deliberately no `"*"`.
|
|
145
|
+
*/
|
|
146
|
+
export declare const hostApiVersionSchema: z.ZodLiteral<1>;
|
|
147
|
+
export declare const HOST_API_VERSION = 1;
|
|
148
|
+
/**
|
|
149
|
+
* A rail row. Omit `nav` entirely and the page is routable but unlisted —
|
|
150
|
+
* a detail screen an add-on links to itself.
|
|
151
|
+
*/
|
|
152
|
+
export declare const addOnPageNavSchema: z.ZodObject<{
|
|
153
|
+
group: z.ZodDefault<z.ZodString>;
|
|
154
|
+
order: z.ZodNumber;
|
|
155
|
+
adminOnly: z.ZodOptional<z.ZodBoolean>;
|
|
156
|
+
}, z.core.$strict>;
|
|
157
|
+
/**
|
|
158
|
+
* A page an add-on renders from its OWN bundle.
|
|
159
|
+
*
|
|
160
|
+
* NOT `pageSchema` in `@adminium/manifest`, which is a generated page: a
|
|
161
|
+
* `template` the engine renders with `bindings` and `config`. This is code. The
|
|
162
|
+
* two deliberately do not share a name in the same document — an add-on's live
|
|
163
|
+
* under `addOn.pages` — because "page" meaning both a template row and a
|
|
164
|
+
* JavaScript module in one manifest is how a reader ends up writing `template`
|
|
165
|
+
* here and waiting for a screen that never comes.
|
|
166
|
+
*/
|
|
167
|
+
export declare const addOnPageSchema: z.ZodObject<{
|
|
168
|
+
ref: z.ZodString;
|
|
169
|
+
title: z.ZodObject<{
|
|
170
|
+
key: z.ZodString;
|
|
171
|
+
fallback: z.ZodString;
|
|
172
|
+
}, z.core.$strict>;
|
|
173
|
+
icon: z.ZodString;
|
|
174
|
+
client: z.ZodString;
|
|
175
|
+
nav: z.ZodOptional<z.ZodObject<{
|
|
176
|
+
group: z.ZodDefault<z.ZodString>;
|
|
177
|
+
order: z.ZodNumber;
|
|
178
|
+
adminOnly: z.ZodOptional<z.ZodBoolean>;
|
|
179
|
+
}, z.core.$strict>>;
|
|
180
|
+
detail: z.ZodOptional<z.ZodBoolean>;
|
|
181
|
+
}, z.core.$strict>;
|
|
182
|
+
export type AddOnPage = z.infer<typeof addOnPageSchema>;
|
|
183
|
+
/**
|
|
184
|
+
* A group this add-on brings with it. Its label travels WITH the add-on — a key
|
|
185
|
+
* plus an English fallback, resolved against the add-on's own translations —
|
|
186
|
+
* which is the whole reason the engine does not have to own
|
|
187
|
+
* `nav.group.<whatever>` in eight locales to let somebody name a group.
|
|
188
|
+
*/
|
|
189
|
+
export declare const addOnNavGroupSchema: z.ZodObject<{
|
|
190
|
+
key: z.ZodString;
|
|
191
|
+
label: z.ZodObject<{
|
|
192
|
+
key: z.ZodString;
|
|
193
|
+
fallback: z.ZodString;
|
|
194
|
+
}, z.core.$strict>;
|
|
195
|
+
order: z.ZodNumber;
|
|
196
|
+
}, z.core.$strict>;
|
|
197
|
+
export type AddOnNavGroup = z.infer<typeof addOnNavGroupSchema>;
|
|
94
198
|
export declare const addOnBlockSchema: z.ZodObject<{
|
|
95
199
|
attaches: z.ZodArray<z.ZodObject<{
|
|
96
200
|
app: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodString]>;
|
|
@@ -155,9 +259,33 @@ export declare const addOnBlockSchema: z.ZodObject<{
|
|
|
155
259
|
}, z.core.$strict>>;
|
|
156
260
|
publicSettings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
157
261
|
demoTransport: z.ZodOptional<z.ZodString>;
|
|
262
|
+
pages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
263
|
+
ref: z.ZodString;
|
|
264
|
+
title: z.ZodObject<{
|
|
265
|
+
key: z.ZodString;
|
|
266
|
+
fallback: z.ZodString;
|
|
267
|
+
}, z.core.$strict>;
|
|
268
|
+
icon: z.ZodString;
|
|
269
|
+
client: z.ZodString;
|
|
270
|
+
nav: z.ZodOptional<z.ZodObject<{
|
|
271
|
+
group: z.ZodDefault<z.ZodString>;
|
|
272
|
+
order: z.ZodNumber;
|
|
273
|
+
adminOnly: z.ZodOptional<z.ZodBoolean>;
|
|
274
|
+
}, z.core.$strict>>;
|
|
275
|
+
detail: z.ZodOptional<z.ZodBoolean>;
|
|
276
|
+
}, z.core.$strict>>>;
|
|
277
|
+
navGroups: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
278
|
+
key: z.ZodString;
|
|
279
|
+
label: z.ZodObject<{
|
|
280
|
+
key: z.ZodString;
|
|
281
|
+
fallback: z.ZodString;
|
|
282
|
+
}, z.core.$strict>;
|
|
283
|
+
order: z.ZodNumber;
|
|
284
|
+
}, z.core.$strict>>>;
|
|
285
|
+
hostApi: z.ZodOptional<z.ZodLiteral<1>>;
|
|
158
286
|
}, z.core.$strict>;
|
|
159
287
|
export type AddOnBlock = z.infer<typeof addOnBlockSchema>;
|
|
160
|
-
/** Issue codes the validators emit
|
|
288
|
+
/** Issue codes the validators emit. */
|
|
161
289
|
export declare const ADD_ON_ISSUE_CODES: readonly ["ATTACH_TARGET_UNKNOWN", "SLOT_UNKNOWN", "CONTRACT_UNKNOWN", "SCOPE_OUT_OF_RANGE", "NETWORK_ALLOW_REQUIRED", "CAPABILITY_CONFLICT", "FRONTEND_SECRET_LEAK", "SLOT_CONFLICT"];
|
|
162
290
|
export type AddOnIssueCode = (typeof ADD_ON_ISSUE_CODES)[number];
|
|
163
291
|
//# sourceMappingURL=add-on-block.d.ts.map
|
|
@@ -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;
|
|
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;AAIxB,OAAO,EAA0B,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAElF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,+DAAgE,CAAC;AAC/F,eAAO,MAAM,mBAAmB;;;;;;EAA4B,CAAC;AAC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AAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;;;;;;kBAOrB,CAAC;AACZ,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAwG1B,CAAC;AAEJ,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,uCAAuC;AACvC,eAAO,MAAM,kBAAkB,wLAgBrB,CAAC;AACX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
package/dist/add-on-block.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
2
|
/**
|
|
3
|
-
* The `addOn` manifest block
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
* The `addOn` manifest block and its validation rules. Lives here rather than
|
|
4
|
+
* in `@adminium/manifest` because the rules are assertions ABOUT the registries
|
|
5
|
+
* in this package — a slot id or a contract id is only meaningful against the
|
|
6
|
+
* closed lists in `slots.ts` / `contracts.ts`.
|
|
7
7
|
*
|
|
8
8
|
* `@adminium/manifest` imports this to build the `kind: "add-on"` branch of its
|
|
9
9
|
* discriminated union.
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import { z } from 'zod';
|
|
12
12
|
import { contractIdSchema, hasContractVersion } from './contracts.js';
|
|
13
13
|
import { slotIdSchema } from './slots.js';
|
|
14
|
+
import { BUILTIN_NAV_GROUP_KEYS } from './nav-groups.js';
|
|
14
15
|
/**
|
|
15
16
|
* Add-ons get their OWN closed category vocabulary (D2), because an add-on is
|
|
16
17
|
* not a vertical and forcing it into the app facet set would make a carrier a
|
|
@@ -19,7 +20,7 @@ import { slotIdSchema } from './slots.js';
|
|
|
19
20
|
*/
|
|
20
21
|
export const ADD_ON_CATEGORIES = ['artwork', 'delivery', 'payments', 'email', 'data'];
|
|
21
22
|
export const addOnCategorySchema = z.enum(ADD_ON_CATEGORIES);
|
|
22
|
-
/** How the shop supplies credentials, if at all
|
|
23
|
+
/** How the shop supplies credentials, if at all. */
|
|
23
24
|
export const CONNECT_KINDS = ['none', 'api-key', 'oauth2'];
|
|
24
25
|
export const connectKindSchema = z.enum(CONNECT_KINDS);
|
|
25
26
|
const SEMVER_RANGE = /^[\^~]?(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$|^\*$/;
|
|
@@ -79,6 +80,112 @@ export const addOnNetworkSchema = z
|
|
|
79
80
|
allow: z.array(z.string().regex(HOSTNAME, 'must be an exact https hostname')),
|
|
80
81
|
})
|
|
81
82
|
.strict();
|
|
83
|
+
// ── pages and navigation ─────────────────────────────────────────────────────
|
|
84
|
+
/**
|
|
85
|
+
* An i18n message: a catalog key plus the English fallback rendered when the
|
|
86
|
+
* key is absent.
|
|
87
|
+
*
|
|
88
|
+
* MOVED HERE FROM `@adminium/manifest` by 51a, which now re-exports it under
|
|
89
|
+
* the same name. One definition rather than two, because both ends need it: a
|
|
90
|
+
* page title and a nav-group label are written in a manifest and validated
|
|
91
|
+
* there, and read back by a host through the schemas in THIS package. Two
|
|
92
|
+
* four-line copies of the same shape are exactly the duplicate that drifts in a
|
|
93
|
+
* field nobody reads — `max(400)` here and `max(200)` there — and then the
|
|
94
|
+
* stricter copy refuses first, for a reason no message names.
|
|
95
|
+
*/
|
|
96
|
+
export const i18nMessageSchema = z
|
|
97
|
+
.object({
|
|
98
|
+
key: z.string().min(1).max(120),
|
|
99
|
+
fallback: z.string().min(1).max(400),
|
|
100
|
+
})
|
|
101
|
+
.strict();
|
|
102
|
+
/**
|
|
103
|
+
* THE RAIL'S BUILT-IN GROUPS now live in `nav-groups.ts`, re-exported here so
|
|
104
|
+
* this module's public surface is unchanged. They moved so that a host needing
|
|
105
|
+
* only the five keys — the dashboard's entry-chunk `app/bootstrap.ts` — can
|
|
106
|
+
* import them without making this whole module, and everything the barrel
|
|
107
|
+
* reaches from it, statically reachable. See that file's note.
|
|
108
|
+
*/
|
|
109
|
+
export { BUILTIN_NAV_GROUP_KEYS } from './nav-groups.js';
|
|
110
|
+
/**
|
|
111
|
+
* Where a page goes when its manifest asks for no group (the owner's ruling,
|
|
112
|
+
* 51 D-nav). Applied at PARSE, so what a host reads is already resolved and the
|
|
113
|
+
* rail never has to guess.
|
|
114
|
+
*
|
|
115
|
+
* The alternative is what generated pages do today, and it is worse: an app
|
|
116
|
+
* page whose `navGroup` is not in the closed set is dropped into `hidden` at
|
|
117
|
+
* `bootstrap/handlers.ts:146` — the page exists, nothing links to it, and
|
|
118
|
+
* nothing says why. An add-on that omits a group has not made a mistake, so it
|
|
119
|
+
* gets a home rather than a silence.
|
|
120
|
+
*/
|
|
121
|
+
export const DEFAULT_NAV_GROUP = 'library';
|
|
122
|
+
/**
|
|
123
|
+
* A group key, built-in or declared. Kebab-case, because it appears in no URL
|
|
124
|
+
* but is compared against the built-in five, which are kebab.
|
|
125
|
+
*/
|
|
126
|
+
export const navGroupKeySchema = z
|
|
127
|
+
.string()
|
|
128
|
+
.regex(/^[a-z][a-z0-9-]{0,39}$/, 'a nav group key must be kebab-case, 1–40 characters');
|
|
129
|
+
/**
|
|
130
|
+
* The host API an add-on's client code is written against.
|
|
131
|
+
*
|
|
132
|
+
* A version rather than a boolean because publishing `Modal` and `useNavigate`
|
|
133
|
+
* to code the engine did not build makes them public API: the day that surface
|
|
134
|
+
* changes shape, an add-on built against the old one must be REFUSED with its
|
|
135
|
+
* version named, not mounted into a blank screen. `z.literal(1)` becomes a
|
|
136
|
+
* union the first time there is a 2 — and there is deliberately no `"*"`.
|
|
137
|
+
*/
|
|
138
|
+
export const hostApiVersionSchema = z.literal(1);
|
|
139
|
+
export const HOST_API_VERSION = 1;
|
|
140
|
+
/**
|
|
141
|
+
* A rail row. Omit `nav` entirely and the page is routable but unlisted —
|
|
142
|
+
* a detail screen an add-on links to itself.
|
|
143
|
+
*/
|
|
144
|
+
export const addOnPageNavSchema = z
|
|
145
|
+
.object({
|
|
146
|
+
group: navGroupKeySchema.default(DEFAULT_NAV_GROUP),
|
|
147
|
+
order: z.number().int(),
|
|
148
|
+
/** Same audience the engine's own admin-only rail rows have. */
|
|
149
|
+
adminOnly: z.boolean().optional(),
|
|
150
|
+
})
|
|
151
|
+
.strict();
|
|
152
|
+
/**
|
|
153
|
+
* A page an add-on renders from its OWN bundle.
|
|
154
|
+
*
|
|
155
|
+
* NOT `pageSchema` in `@adminium/manifest`, which is a generated page: a
|
|
156
|
+
* `template` the engine renders with `bindings` and `config`. This is code. The
|
|
157
|
+
* two deliberately do not share a name in the same document — an add-on's live
|
|
158
|
+
* under `addOn.pages` — because "page" meaning both a template row and a
|
|
159
|
+
* JavaScript module in one manifest is how a reader ends up writing `template`
|
|
160
|
+
* here and waiting for a screen that never comes.
|
|
161
|
+
*/
|
|
162
|
+
export const addOnPageSchema = z
|
|
163
|
+
.object({
|
|
164
|
+
/** The last segment of `/add-ons/<key>/<ref>`. */
|
|
165
|
+
ref: z.string().regex(/^[a-z][a-z0-9-]*$/, 'page ref must be a kebab-case identifier'),
|
|
166
|
+
title: i18nMessageSchema,
|
|
167
|
+
icon: z.string().min(1).max(60),
|
|
168
|
+
/** A path the bundle route will serve; its default export is the page. */
|
|
169
|
+
client: z.string().min(1),
|
|
170
|
+
nav: addOnPageNavSchema.optional(),
|
|
171
|
+
/** Reserve `/add-ons/<key>/<ref>/*` for the page's own sub-routes. */
|
|
172
|
+
detail: z.boolean().optional(),
|
|
173
|
+
})
|
|
174
|
+
.strict();
|
|
175
|
+
/**
|
|
176
|
+
* A group this add-on brings with it. Its label travels WITH the add-on — a key
|
|
177
|
+
* plus an English fallback, resolved against the add-on's own translations —
|
|
178
|
+
* which is the whole reason the engine does not have to own
|
|
179
|
+
* `nav.group.<whatever>` in eight locales to let somebody name a group.
|
|
180
|
+
*/
|
|
181
|
+
export const addOnNavGroupSchema = z
|
|
182
|
+
.object({
|
|
183
|
+
key: navGroupKeySchema,
|
|
184
|
+
label: i18nMessageSchema,
|
|
185
|
+
/** Orders the trailing add-on band only; built-in groups do not move. */
|
|
186
|
+
order: z.number().int(),
|
|
187
|
+
})
|
|
188
|
+
.strict();
|
|
82
189
|
export const addOnBlockSchema = z
|
|
83
190
|
.object({
|
|
84
191
|
attaches: z.array(attachTargetSchema).min(1),
|
|
@@ -94,8 +201,60 @@ export const addOnBlockSchema = z
|
|
|
94
201
|
publicSettings: z.array(z.string().min(1)).optional(),
|
|
95
202
|
/** D11 — required to ship a demo that makes no real third-party call. */
|
|
96
203
|
demoTransport: z.string().min(1).optional(),
|
|
204
|
+
/**
|
|
205
|
+
* Dashboard pages this add-on renders itself, and the groups it brings for
|
|
206
|
+
* them. Both optional and additive: every manifest written before this
|
|
207
|
+
* validates unchanged, which is the same promise `kind` kept when the
|
|
208
|
+
* add-on branch itself was added.
|
|
209
|
+
*/
|
|
210
|
+
pages: z.array(addOnPageSchema).min(1).optional(),
|
|
211
|
+
navGroups: z.array(addOnNavGroupSchema).min(1).optional(),
|
|
212
|
+
/** Required once `pages` is present; see {@link hostApiVersionSchema}. */
|
|
213
|
+
hostApi: hostApiVersionSchema.optional(),
|
|
97
214
|
})
|
|
98
215
|
.strict()
|
|
216
|
+
// A ref is a URL segment, so two pages sharing one is two screens at one
|
|
217
|
+
// address — and the loser is whichever the host's lookup happens to find.
|
|
218
|
+
.refine((b) => new Set((b.pages ?? []).map((p) => p.ref)).size === (b.pages ?? []).length, {
|
|
219
|
+
message: 'duplicate page ref',
|
|
220
|
+
path: ['pages'],
|
|
221
|
+
})
|
|
222
|
+
.refine((b) => new Set((b.navGroups ?? []).map((g) => g.key)).size === (b.navGroups ?? []).length, {
|
|
223
|
+
message: 'duplicate nav group key',
|
|
224
|
+
path: ['navGroups'],
|
|
225
|
+
})
|
|
226
|
+
// A declared group may not shadow a built-in one: the built-in label comes
|
|
227
|
+
// from the engine's catalogue and the declared one from the add-on, so a
|
|
228
|
+
// collision is two labels for one heading with no rule about which wins.
|
|
229
|
+
.refine((b) => !(b.navGroups ?? []).some((g) => BUILTIN_NAV_GROUP_KEYS.includes(g.key)), {
|
|
230
|
+
message: `a nav group key may not be one of the built-in groups (${BUILTIN_NAV_GROUP_KEYS.join(', ')})`,
|
|
231
|
+
path: ['navGroups'],
|
|
232
|
+
})
|
|
233
|
+
// NAV_GROUP_UNKNOWN, refused at parse rather than resolved at render. A group
|
|
234
|
+
// nobody defines is the one failure this whole block exists to prevent: the
|
|
235
|
+
// rail would draw a raw key as a heading, or drop the row into `hidden` the
|
|
236
|
+
// way an unknown app group is dropped today, and both look like the add-on
|
|
237
|
+
// simply not working.
|
|
238
|
+
.refine((b) => (b.pages ?? []).every((p) => p.nav === undefined ||
|
|
239
|
+
BUILTIN_NAV_GROUP_KEYS.includes(p.nav.group) ||
|
|
240
|
+
(b.navGroups ?? []).some((g) => g.key === p.nav?.group)), {
|
|
241
|
+
message: 'a page names a nav group that is neither built in nor declared in navGroups',
|
|
242
|
+
path: ['pages'],
|
|
243
|
+
})
|
|
244
|
+
// The mirror of the rule above. A declared group no page uses renders as
|
|
245
|
+
// nothing, so it is a typo in one of the two places — and refusing here names
|
|
246
|
+
// it, where a silent empty heading would not.
|
|
247
|
+
.refine((b) => (b.navGroups ?? []).every((g) => (b.pages ?? []).some((p) => p.nav?.group === g.key)), {
|
|
248
|
+
message: 'a declared nav group is used by none of this add-on’s pages',
|
|
249
|
+
path: ['navGroups'],
|
|
250
|
+
})
|
|
251
|
+
// Pages are code the host runs against a published API surface. An add-on
|
|
252
|
+
// that does not say which version it was built against cannot be refused
|
|
253
|
+
// later on version grounds, which is the entire point of having a version.
|
|
254
|
+
.refine((b) => b.pages === undefined || b.hostApi !== undefined, {
|
|
255
|
+
message: 'an add-on that declares pages must declare the hostApi version it is built against',
|
|
256
|
+
path: ['hostApi'],
|
|
257
|
+
})
|
|
99
258
|
// Every `provides[].contract` must be in the registry AT the declared version.
|
|
100
259
|
.refine((b) => (b.provides ?? []).every((p) => hasContractVersion(p.contract, p.version)), {
|
|
101
260
|
message: 'CONTRACT_UNKNOWN: a provided contract is not in the registry at that version',
|
|
@@ -105,13 +264,13 @@ export const addOnBlockSchema = z
|
|
|
105
264
|
message: 'CONTRACT_UNKNOWN: a consumed contract is not in the registry at that version',
|
|
106
265
|
path: ['consumes'],
|
|
107
266
|
})
|
|
108
|
-
//
|
|
267
|
+
// An oauth2 connect must name where it authorizes.
|
|
109
268
|
.refine((b) => b.connect.kind !== 'oauth2' ||
|
|
110
269
|
(b.connect.authorizeUrl !== undefined && b.connect.tokenUrl !== undefined), {
|
|
111
270
|
message: 'an oauth2 connect must declare authorizeUrl and tokenUrl',
|
|
112
271
|
path: ['connect'],
|
|
113
272
|
});
|
|
114
|
-
/** Issue codes the validators emit
|
|
273
|
+
/** Issue codes the validators emit. */
|
|
115
274
|
export const ADD_ON_ISSUE_CODES = [
|
|
116
275
|
'ATTACH_TARGET_UNKNOWN',
|
|
117
276
|
'SLOT_UNKNOWN',
|
|
@@ -121,5 +280,12 @@ export const ADD_ON_ISSUE_CODES = [
|
|
|
121
280
|
'CAPABILITY_CONFLICT',
|
|
122
281
|
'FRONTEND_SECRET_LEAK',
|
|
123
282
|
'SLOT_CONFLICT',
|
|
283
|
+
/*
|
|
284
|
+
* 51a adds no code for a bad nav group on purpose. `addOnBlockSchema` refuses
|
|
285
|
+
* an undeclared group itself, and the cross-block rules in
|
|
286
|
+
* `@adminium/manifest` run only after that schema has parsed — so a code here
|
|
287
|
+
* would name a state no manifest can be in. The refusal is a schema issue
|
|
288
|
+
* carrying the message, which is what a reader gets either way.
|
|
289
|
+
*/
|
|
124
290
|
];
|
|
125
291
|
//# sourceMappingURL=add-on-block.js.map
|
package/dist/add-on-block.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-on-block.js","sourceRoot":"","sources":["../src/add-on-block.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"add-on-block.js","sourceRoot":"","sources":["../src/add-on-block.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAA2B,MAAM,iBAAiB,CAAC;AAElF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,CAAU,CAAC;AAC/F,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;AAG7D,oDAAoD;AACpD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAU,CAAC;AACpE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;AAGvD,MAAM,YAAY,GAAG,uDAAuD,CAAC;AAE7E;;;;;;GAMG;AACH,MAAM,QAAQ,GAAG,0EAA0E,CAAC;AAE5F,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC;KAChC,MAAM,CAAC;IACN,wEAAwE;IACx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artwork that is not a
|
|
3
|
+
* plain upload.
|
|
4
4
|
*
|
|
5
5
|
* The asymmetry that makes this contract worth having: the HOST, not the
|
|
6
6
|
* add-on, runs the artwork checks on the returned `ArtworkRef`. Design Studio's
|
package/dist/artwork-source.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
2
|
/**
|
|
3
|
-
* `artwork-source@1`
|
|
4
|
-
*
|
|
3
|
+
* `artwork-source@1` — a way for a customer to supply artwork that is not a
|
|
4
|
+
* plain upload.
|
|
5
5
|
*
|
|
6
6
|
* The asymmetry that makes this contract worth having: the HOST, not the
|
|
7
7
|
* add-on, runs the artwork checks on the returned `ArtworkRef`. Design Studio's
|
package/dist/contracts.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Provider contract registry v1 — CLOSED
|
|
2
|
+
* Provider contract registry v1 — CLOSED.
|
|
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. The fourth was bought on a seven-exhibit dossier
|
|
7
|
-
*
|
|
6
|
+
* implements it. The fourth was bought on a seven-exhibit dossier, not on a
|
|
7
|
+
* shape somebody liked.
|
|
8
8
|
*/
|
|
9
9
|
import { z } from 'zod';
|
|
10
10
|
export interface ContractDefinition {
|
package/dist/contracts.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
2
|
/**
|
|
3
|
-
* Provider contract registry v1 — CLOSED
|
|
3
|
+
* Provider contract registry v1 — CLOSED.
|
|
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. The fourth was bought on a seven-exhibit dossier
|
|
8
|
-
*
|
|
7
|
+
* implements it. The fourth was bought on a seven-exhibit dossier, not on a
|
|
8
|
+
* shape somebody liked.
|
|
9
9
|
*/
|
|
10
10
|
import { z } from 'zod';
|
|
11
11
|
export const CONTRACT_REGISTRY = [
|
|
@@ -29,19 +29,19 @@ export const CONTRACT_REGISTRY = [
|
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
/*
|
|
32
|
-
* THE FOURTH, BOUGHT 2026-09-10
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
32
|
+
* THE FOURTH, BOUGHT 2026-09-10. This interface had been drawn twice and
|
|
33
|
+
* never built; zero occurrences in either repo until now. Its dossier is
|
|
34
|
+
* seven exhibits and two implementers in the same sub-wave (invoices;
|
|
35
|
+
* barcode-labels wrapping renderLabelSheet), which meets the count a new
|
|
36
|
+
* contract has to clear — and, by the owner's ruling, relaxes the
|
|
37
|
+
* "different means" clause for a contract Adminium ITSELF consumes. It PROVIDES kinds of document an add-on can
|
|
38
|
+
* describe and render, as an outline of slots (labels in all eight
|
|
39
|
+
* locales) and bytes (each kind declares its own formats and glyph
|
|
40
|
+
* coverage); it is CONSUMED BY the engine document pipeline (profiles,
|
|
41
|
+
* triggers, the document.render job, the /documents routes) — the first
|
|
42
|
+
* production read of runtime.providers, selected by add-on key, never by
|
|
43
|
+
* resolveProvider's lowest-key choice. "Add-ons compose" runs for real
|
|
44
|
+
* here.
|
|
45
45
|
*/
|
|
46
46
|
id: 'document-render',
|
|
47
47
|
version: 1,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `document-render@1` (
|
|
3
|
-
*
|
|
2
|
+
* `document-render@1` (Appendices A and B) — the fourth contract, and the
|
|
3
|
+
* first one Adminium ITSELF consumes.
|
|
4
4
|
*
|
|
5
5
|
* It provides KINDS OF DOCUMENT an add-on can describe — an outline of slots,
|
|
6
6
|
* every label written in all eight compiled locales — and render to BYTES. The
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
*
|
|
14
14
|
* A provider receives VALUES and returns BYTES. It gets no database handle, no
|
|
15
15
|
* network, and — the one that gets forgotten — no clock: `subject.now` is the
|
|
16
|
-
* only time it may read, which is what makes
|
|
17
|
-
*
|
|
18
|
-
*
|
|
16
|
+
* only time it may read, which is what makes byte-identical claim testable
|
|
17
|
+
* rather than aspirational. `describeDocumentRenderer` renders twice and
|
|
18
|
+
* compares every byte.
|
|
19
19
|
*
|
|
20
20
|
* ── BYTES, NOT A `FileRef` ─────────────────────────────────────────────────
|
|
21
21
|
*
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
* cannot draw Arabic or Han — so a kind declares the glyphs it covers and
|
|
33
33
|
* REFUSES what it cannot draw, typed, as {@link DocumentError} `LATIN_ONLY`
|
|
34
34
|
* carrying the offending glyphs. A silent drop would ship an invoice with a
|
|
35
|
-
* customer's name missing letters
|
|
35
|
+
* customer's name missing letters.
|
|
36
36
|
*
|
|
37
37
|
* ── THE `body` CHANNEL IS A ONE-WAY DOOR, AND IT IS OPEN ───────────────────
|
|
38
38
|
*
|
|
39
|
-
*
|
|
39
|
+
* This module ships verbatim into eighteen repos before the first
|
|
40
40
|
* provider exists, so a field added later is a second eighteen-repo ceremony
|
|
41
41
|
* plus a second contract release. {@link RenderInput.body} is therefore here in
|
|
42
42
|
* the first release. Its shape is O28(a2) — ruled 2026-09-07 as **D54**: an
|
|
@@ -73,7 +73,7 @@ export type DocumentLocaleId = (typeof DOCUMENT_LOCALE_IDS)[number];
|
|
|
73
73
|
* (0.3 trap 19), because the Studio profile editor renders these labels
|
|
74
74
|
* directly and a hole in one language becomes a raw slot id on somebody's
|
|
75
75
|
* screen. The server half of an add-on carries its own strings — the engine
|
|
76
|
-
* needs no bundle from it
|
|
76
|
+
* needs no bundle from it.
|
|
77
77
|
*/
|
|
78
78
|
export type LocalizedText = Readonly<Record<DocumentLocaleId, string>>;
|
|
79
79
|
export declare const localizedTextSchema: z.ZodObject<{
|
|
@@ -146,10 +146,10 @@ export type OutlineSlotType = (typeof OUTLINE_SLOT_TYPES)[number];
|
|
|
146
146
|
/**
|
|
147
147
|
* Where an unmapped slot's value comes from, if anywhere.
|
|
148
148
|
*
|
|
149
|
-
* `sequence` — the engine's CAS document number, minted after render
|
|
150
|
-
* `connection` — the connection's currency.
|
|
151
|
-
* `
|
|
152
|
-
*
|
|
149
|
+
* `sequence` — the engine's CAS document number, minted after render.
|
|
150
|
+
* `connection` — the connection's currency. `setting` — one of the add-on's
|
|
151
|
+
* own non-secret settings. `now` — `subject.now.iso`, never the provider's own
|
|
152
|
+
* clock.
|
|
153
153
|
*/
|
|
154
154
|
export declare const OUTLINE_SLOT_DEFAULTS: readonly ["sequence", "connection", "setting", "now"];
|
|
155
155
|
export type OutlineSlotDefault = (typeof OUTLINE_SLOT_DEFAULTS)[number];
|
|
@@ -391,7 +391,7 @@ export declare const documentOutlineSchema: z.ZodObject<{
|
|
|
391
391
|
* Structurally the same object as `@adminium/meta`'s `recordRefSchema`
|
|
392
392
|
* (`json-payloads.ts:17-25`), which is the AUTHORITY for the shape; it is
|
|
393
393
|
* restated here because this package has no `node:` and no meta dependency by
|
|
394
|
-
* design
|
|
394
|
+
* design. A file that imports both should alias one — they are two
|
|
395
395
|
* declarations of one shape, not two shapes.
|
|
396
396
|
*/
|
|
397
397
|
export interface RecordRef {
|
|
@@ -404,9 +404,9 @@ export interface RecordRef {
|
|
|
404
404
|
label: string;
|
|
405
405
|
}
|
|
406
406
|
/**
|
|
407
|
-
* What a PUBLIC caller may send
|
|
408
|
-
*
|
|
409
|
-
*
|
|
407
|
+
* What a PUBLIC caller may send: values, and nothing that decides anything.
|
|
408
|
+
* The server stamps `business`, `now`, `currency`, `entity: null` and
|
|
409
|
+
* `number: null` itself — a request that carries one of them is refused
|
|
410
410
|
* `INVALID_REQUEST` rather than quietly overwritten, so a customer cannot
|
|
411
411
|
* post a document that claims to come from a different business or to have
|
|
412
412
|
* been issued last year.
|
|
@@ -443,7 +443,7 @@ export interface DocumentSubject {
|
|
|
443
443
|
lines: readonly string[];
|
|
444
444
|
logoDataUrl?: string;
|
|
445
445
|
};
|
|
446
|
-
/** `null` for request-shaped intents
|
|
446
|
+
/** `null` for request-shaped intents. */
|
|
447
447
|
entity: RecordRef | null;
|
|
448
448
|
/** `null` until minted; a re-render carries the number it already has. */
|
|
449
449
|
number: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-render.d.ts","sourceRoot":"","sources":["../src/document-render.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mBAAmB,mFAStB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC,CAAC;AAEvE,eAAO,MAAM,mBAAmB;;;;;;;;;kBAMrB,CAAC;AAEZ,sCAAsC;AACtC,eAAO,MAAM,gBAAgB,0BAA2B,CAAC;AACzD,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D,iFAAiF;AACjF,eAAO,MAAM,eAAe,2CAA4C,CAAC;AACzE,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,sCAAuC,CAAC;AACvE,MAAM,MAAM,gBAAgB,GAAG,CA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