@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/document-render.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
2
|
/**
|
|
3
|
-
* `document-render@1` (
|
|
4
|
-
*
|
|
3
|
+
* `document-render@1` (Appendices A and B) — the fourth contract, and the
|
|
4
|
+
* first one Adminium ITSELF consumes.
|
|
5
5
|
*
|
|
6
6
|
* It provides KINDS OF DOCUMENT an add-on can describe — an outline of slots,
|
|
7
7
|
* every label written in all eight compiled locales — and render to BYTES. The
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
*
|
|
15
15
|
* A provider receives VALUES and returns BYTES. It gets no database handle, no
|
|
16
16
|
* network, and — the one that gets forgotten — no clock: `subject.now` is the
|
|
17
|
-
* only time it may read, which is what makes
|
|
18
|
-
*
|
|
19
|
-
*
|
|
17
|
+
* only time it may read, which is what makes byte-identical claim testable
|
|
18
|
+
* rather than aspirational. `describeDocumentRenderer` renders twice and
|
|
19
|
+
* compares every byte.
|
|
20
20
|
*
|
|
21
21
|
* ── BYTES, NOT A `FileRef` ─────────────────────────────────────────────────
|
|
22
22
|
*
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
* cannot draw Arabic or Han — so a kind declares the glyphs it covers and
|
|
34
34
|
* REFUSES what it cannot draw, typed, as {@link DocumentError} `LATIN_ONLY`
|
|
35
35
|
* carrying the offending glyphs. A silent drop would ship an invoice with a
|
|
36
|
-
* customer's name missing letters
|
|
36
|
+
* customer's name missing letters.
|
|
37
37
|
*
|
|
38
38
|
* ── THE `body` CHANNEL IS A ONE-WAY DOOR, AND IT IS OPEN ───────────────────
|
|
39
39
|
*
|
|
40
|
-
*
|
|
40
|
+
* This module ships verbatim into eighteen repos before the first
|
|
41
41
|
* provider exists, so a field added later is a second eighteen-repo ceremony
|
|
42
42
|
* plus a second contract release. {@link RenderInput.body} is therefore here in
|
|
43
43
|
* the first release. Its shape is O28(a2) — ruled 2026-09-07 as **D54**: an
|
|
@@ -117,10 +117,10 @@ export const OUTLINE_SLOT_TYPES = [
|
|
|
117
117
|
/**
|
|
118
118
|
* Where an unmapped slot's value comes from, if anywhere.
|
|
119
119
|
*
|
|
120
|
-
* `sequence` — the engine's CAS document number, minted after render
|
|
121
|
-
* `connection` — the connection's currency.
|
|
122
|
-
* `
|
|
123
|
-
*
|
|
120
|
+
* `sequence` — the engine's CAS document number, minted after render.
|
|
121
|
+
* `connection` — the connection's currency. `setting` — one of the add-on's
|
|
122
|
+
* own non-secret settings. `now` — `subject.now.iso`, never the provider's own
|
|
123
|
+
* clock.
|
|
124
124
|
*/
|
|
125
125
|
export const OUTLINE_SLOT_DEFAULTS = ['sequence', 'connection', 'setting', 'now'];
|
|
126
126
|
const outlineSlotShape = {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @adminium/add-on-contracts — the shapes an add-on is written
|
|
3
|
-
*
|
|
2
|
+
* @adminium/add-on-contracts — the shapes an add-on is written
|
|
3
|
+
* against.
|
|
4
4
|
*
|
|
5
5
|
* Two halves, kept apart on purpose. THIS half is types, registries and Zod
|
|
6
6
|
* validators with zero `node:` imports, so the storefront, the example-app SPAs
|
|
7
|
-
* and Electron can all use it
|
|
7
|
+
* and Electron can all use it. The conformance suites live behind
|
|
8
8
|
* `@adminium/add-on-contracts/testing`, which may import vitest.
|
|
9
9
|
*/
|
|
10
10
|
export declare const PACKAGE_NAME = "@adminium/add-on-contracts";
|
|
11
11
|
export { fileRefSchema, type FileRef } from './common.js';
|
|
12
12
|
export { SLOT_REGISTRY, SLOT_IDS, SLOT_SURFACES, SLOT_FILLS, slotIdSchema, isSlotId, slotDefinition, type SlotId, type SlotDefinition, type SlotSurface, type SlotFill, } from './slots.js';
|
|
13
13
|
export { CONTRACT_REGISTRY, CONTRACT_IDS, contractIdSchema, isContractId, hasContractVersion, type ContractId, type ContractDefinition, } from './contracts.js';
|
|
14
|
-
export { ADD_ON_CATEGORIES, ADD_ON_ISSUE_CODES, CONNECT_KINDS, addOnBlockSchema, addOnCategorySchema, addOnConnectSchema, addOnEventSchema, addOnNetworkSchema, attachTargetSchema, connectKindSchema, consumesSchema, providesSchema, slotFillSchema, type AddOnBlock, type AddOnCategory, type AddOnIssueCode, type ConnectKind, } from './add-on-block.js';
|
|
14
|
+
export { ADD_ON_CATEGORIES, ADD_ON_ISSUE_CODES, BUILTIN_NAV_GROUP_KEYS, CONNECT_KINDS, DEFAULT_NAV_GROUP, HOST_API_VERSION, addOnBlockSchema, addOnCategorySchema, addOnConnectSchema, addOnEventSchema, addOnNavGroupSchema, addOnNetworkSchema, addOnPageNavSchema, addOnPageSchema, attachTargetSchema, connectKindSchema, consumesSchema, hostApiVersionSchema, i18nMessageSchema, navGroupKeySchema, providesSchema, slotFillSchema, type AddOnBlock, type AddOnCategory, type AddOnIssueCode, type AddOnNavGroup, type AddOnPage, type BuiltinNavGroupKey, type ConnectKind, type I18nMessage, } from './add-on-block.js';
|
|
15
15
|
export { artworkRefSchema, jobSpecSchema, type ArtworkRef, type ArtworkSource, type AvailabilityVerdict, type JobSpec, } from './artwork-source.js';
|
|
16
16
|
export { CarrierError, addressSchema, parcelSchema, rateSchema, shipmentSchema, trackEventSchema, type Address, type OrderRef, type Parcel, type Rate, type Shipment, type ShippingCarrier, type TrackEvent, } from './shipping-carrier.js';
|
|
17
17
|
export { DOCUMENT_COVERAGES, DOCUMENT_ERROR_CODES, DOCUMENT_FORMATS, DOCUMENT_LOCALE_IDS, DOCUMENT_PAPERS, OUTLINE_SLOT_DEFAULTS, OUTLINE_SLOT_TYPES, documentErrorSchema, documentKindSchema, documentOutlineSchema, documentSubjectSchema, isDocumentError, localizedTextSchema, outlineSlotSchema, publicDocumentRequestSchema, renderedDocumentSchema, type DocumentCoverage, type DocumentError, type DocumentErrorCode, type DocumentFormat, type DocumentKind, type DocumentLocaleId, type DocumentOutline, type DocumentPaper, type DocumentRenderer, type DocumentSubject, type LocalizedText, type OutlineSlot, type OutlineSlotDefault, type OutlineSlotType, type PublicDocumentRequest, type RecordRef, type RenderInput, type RenderedDocument, } from './document-render.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,+BAA+B,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAE1D,OAAO,EACL,aAAa,E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AClB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,gBAAgB,GACtB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,QAAQ,GACd,MAAM,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,+BAA+B,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAE1D,OAAO,EACL,aAAa,EACb,QAAQ,EACR,aAAa,EACb,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,cAAc,EACd,KAAK,MAAM,EACX,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,QAAQ,GACd,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,kBAAkB,EAClB,KAAK,UAAU,EACf,KAAK,kBAAkB,GACxB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EACl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EAC1B,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,gBAAgB,GACtB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,QAAQ,GACd,MAAM,2BAA2B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
2
|
/**
|
|
3
|
-
* @adminium/add-on-contracts — the shapes an add-on is written
|
|
4
|
-
*
|
|
3
|
+
* @adminium/add-on-contracts — the shapes an add-on is written
|
|
4
|
+
* against.
|
|
5
5
|
*
|
|
6
6
|
* Two halves, kept apart on purpose. THIS half is types, registries and Zod
|
|
7
7
|
* validators with zero `node:` imports, so the storefront, the example-app SPAs
|
|
8
|
-
* and Electron can all use it
|
|
8
|
+
* and Electron can all use it. The conformance suites live behind
|
|
9
9
|
* `@adminium/add-on-contracts/testing`, which may import vitest.
|
|
10
10
|
*/
|
|
11
11
|
export const PACKAGE_NAME = '@adminium/add-on-contracts';
|
|
12
12
|
export { fileRefSchema } from './common.js';
|
|
13
13
|
export { SLOT_REGISTRY, SLOT_IDS, SLOT_SURFACES, SLOT_FILLS, slotIdSchema, isSlotId, slotDefinition, } from './slots.js';
|
|
14
14
|
export { CONTRACT_REGISTRY, CONTRACT_IDS, contractIdSchema, isContractId, hasContractVersion, } from './contracts.js';
|
|
15
|
-
export { ADD_ON_CATEGORIES, ADD_ON_ISSUE_CODES, CONNECT_KINDS, addOnBlockSchema, addOnCategorySchema, addOnConnectSchema, addOnEventSchema, addOnNetworkSchema, attachTargetSchema, connectKindSchema, consumesSchema, providesSchema, slotFillSchema, } from './add-on-block.js';
|
|
15
|
+
export { ADD_ON_CATEGORIES, ADD_ON_ISSUE_CODES, BUILTIN_NAV_GROUP_KEYS, CONNECT_KINDS, DEFAULT_NAV_GROUP, HOST_API_VERSION, addOnBlockSchema, addOnCategorySchema, addOnConnectSchema, addOnEventSchema, addOnNavGroupSchema, addOnNetworkSchema, addOnPageNavSchema, addOnPageSchema, attachTargetSchema, connectKindSchema, consumesSchema, hostApiVersionSchema, i18nMessageSchema, navGroupKeySchema, providesSchema, slotFillSchema, } from './add-on-block.js';
|
|
16
16
|
export { artworkRefSchema, jobSpecSchema, } from './artwork-source.js';
|
|
17
17
|
export { CarrierError, addressSchema, parcelSchema, rateSchema, shipmentSchema, trackEventSchema, } from './shipping-carrier.js';
|
|
18
18
|
export { DOCUMENT_COVERAGES, DOCUMENT_ERROR_CODES, DOCUMENT_FORMATS, DOCUMENT_LOCALE_IDS, DOCUMENT_PAPERS, OUTLINE_SLOT_DEFAULTS, OUTLINE_SLOT_TYPES, documentErrorSchema, documentKindSchema, documentOutlineSchema, documentSubjectSchema, isDocumentError, localizedTextSchema, outlineSlotSchema, publicDocumentRequestSchema, renderedDocumentSchema, } from './document-render.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,4BAA4B,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAgB,MAAM,aAAa,CAAC;AAE1D,OAAO,EACL,aAAa,EACb,QAAQ,EACR,aAAa,EACb,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,cAAc,GAKf,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,kBAAkB,GAGnB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,4BAA4B,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAgB,MAAM,aAAa,CAAC;AAE1D,OAAO,EACL,aAAa,EACb,QAAQ,EACR,aAAa,EACb,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,cAAc,GAKf,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,kBAAkB,GAGnB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,cAAc,GASf,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,gBAAgB,EAChB,aAAa,GAKd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,UAAU,EACV,cAAc,EACd,gBAAgB,GAQjB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACrB,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,2BAA2B,EAC3B,sBAAsB,GAmBvB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,UAAU,GAUX,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE RAIL'S BUILT-IN GROUPS — the canonical list, and as of 51a the only one
|
|
3
|
+
* that is allowed to grow a copy.
|
|
4
|
+
*
|
|
5
|
+
* The same five keys were written out in five places: the bootstrap
|
|
6
|
+
* schema's `z.enum`, its handler, the dashboard's mirror, the Studio page
|
|
7
|
+
* editor's options and `SidebarNav`, where a `satisfies` made a sixth group a
|
|
8
|
+
* compile error. That closure was deliberate and it was right while the set
|
|
9
|
+
* could only ever be these five. The owner's 2026-09-19 ruling opens it — an
|
|
10
|
+
* add-on may declare a group of its own — so the compile-time guard has to
|
|
11
|
+
* become a refusal that names the bad key instead, and the five have to have
|
|
12
|
+
* one home. 51b rewires the other copies to import this; until then a test at
|
|
13
|
+
* each end holds them equal, which is the same protection with none of the risk.
|
|
14
|
+
*
|
|
15
|
+
* WHY THIS IS ITS OWN MODULE, and why the package exports it as its own
|
|
16
|
+
* subpath (`@adminium/add-on-contracts/nav-groups`). It lived in
|
|
17
|
+
* `add-on-block.ts`, and the dashboard's `app/bootstrap.ts` — which is in the
|
|
18
|
+
* entry chunk — imported it through the package's barrel. One value import of
|
|
19
|
+
* five strings therefore made the WHOLE package statically reachable from the
|
|
20
|
+
* entry: `slots`, `document-render`, `product-personalizer`,
|
|
21
|
+
* `shipping-carrier`, `artwork-source` and `contracts`, plus the zod schemas
|
|
22
|
+
* and ui components they reach, for 10.2 KiB of it that a sidebar cannot use.
|
|
23
|
+
* A host that needs only the group keys must be able to take only the group
|
|
24
|
+
* keys, so they get a module with no imports of their own.
|
|
25
|
+
*/
|
|
26
|
+
export declare const BUILTIN_NAV_GROUP_KEYS: readonly ["workspace", "library", "planning", "people", "account"];
|
|
27
|
+
export type BuiltinNavGroupKey = (typeof BUILTIN_NAV_GROUP_KEYS)[number];
|
|
28
|
+
//# sourceMappingURL=nav-groups.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nav-groups.d.ts","sourceRoot":"","sources":["../src/nav-groups.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,sBAAsB,oEAAqE,CAAC;AACzG,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
/**
|
|
3
|
+
* THE RAIL'S BUILT-IN GROUPS — the canonical list, and as of 51a the only one
|
|
4
|
+
* that is allowed to grow a copy.
|
|
5
|
+
*
|
|
6
|
+
* The same five keys were written out in five places: the bootstrap
|
|
7
|
+
* schema's `z.enum`, its handler, the dashboard's mirror, the Studio page
|
|
8
|
+
* editor's options and `SidebarNav`, where a `satisfies` made a sixth group a
|
|
9
|
+
* compile error. That closure was deliberate and it was right while the set
|
|
10
|
+
* could only ever be these five. The owner's 2026-09-19 ruling opens it — an
|
|
11
|
+
* add-on may declare a group of its own — so the compile-time guard has to
|
|
12
|
+
* become a refusal that names the bad key instead, and the five have to have
|
|
13
|
+
* one home. 51b rewires the other copies to import this; until then a test at
|
|
14
|
+
* each end holds them equal, which is the same protection with none of the risk.
|
|
15
|
+
*
|
|
16
|
+
* WHY THIS IS ITS OWN MODULE, and why the package exports it as its own
|
|
17
|
+
* subpath (`@adminium/add-on-contracts/nav-groups`). It lived in
|
|
18
|
+
* `add-on-block.ts`, and the dashboard's `app/bootstrap.ts` — which is in the
|
|
19
|
+
* entry chunk — imported it through the package's barrel. One value import of
|
|
20
|
+
* five strings therefore made the WHOLE package statically reachable from the
|
|
21
|
+
* entry: `slots`, `document-render`, `product-personalizer`,
|
|
22
|
+
* `shipping-carrier`, `artwork-source` and `contracts`, plus the zod schemas
|
|
23
|
+
* and ui components they reach, for 10.2 KiB of it that a sidebar cannot use.
|
|
24
|
+
* A host that needs only the group keys must be able to take only the group
|
|
25
|
+
* keys, so they get a module with no imports of their own.
|
|
26
|
+
*/
|
|
27
|
+
export const BUILTIN_NAV_GROUP_KEYS = ['workspace', 'library', 'planning', 'people', 'account'];
|
|
28
|
+
//# sourceMappingURL=nav-groups.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nav-groups.js","sourceRoot":"","sources":["../src/nav-groups.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAU,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `product-personalizer@1` (
|
|
3
|
-
*
|
|
2
|
+
* `product-personalizer@1` (added 2026-08-05 with `personalizer`) — the one
|
|
3
|
+
* contract whose implementation spans three surfaces (shopper, staff,
|
|
4
4
|
* dashboard), which is why it is a contract at all rather than a screen.
|
|
5
5
|
*
|
|
6
6
|
* Landed here with wave 4a even though its implementation ships in 4b: the
|
|
7
7
|
* registry is frozen once, before anything ships, rather than widened after a
|
|
8
|
-
* release (
|
|
8
|
+
* release (sequencing note).
|
|
9
9
|
*/
|
|
10
10
|
import { z } from 'zod';
|
|
11
11
|
import type { FileRef } from './common.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
2
|
/**
|
|
3
|
-
* `product-personalizer@1` (
|
|
4
|
-
*
|
|
3
|
+
* `product-personalizer@1` (added 2026-08-05 with `personalizer`) — the one
|
|
4
|
+
* contract whose implementation spans three surfaces (shopper, staff,
|
|
5
5
|
* dashboard), which is why it is a contract at all rather than a screen.
|
|
6
6
|
*
|
|
7
7
|
* Landed here with wave 4a even though its implementation ships in 4b: the
|
|
8
8
|
* registry is frozen once, before anything ships, rather than widened after a
|
|
9
|
-
* release (
|
|
9
|
+
* release (sequencing note).
|
|
10
10
|
*/
|
|
11
11
|
import { z } from 'zod';
|
|
12
12
|
export const zoneSchema = z
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE TYPES of the dashboard's own helpers, as an add-on page sees them.
|
|
3
|
+
*
|
|
4
|
+
* The four library namespaces beside this one need no types from here: an
|
|
5
|
+
* add-on writes `import { Button } from '@adminium/ui'`, keeps the real package
|
|
6
|
+
* as a devDependency for its types, and only the BUILD swaps the specifier for
|
|
7
|
+
* the shim. Aliases are a runtime concern; types are not.
|
|
8
|
+
*
|
|
9
|
+
* `app` has no such package behind it — the dashboard is the implementation —
|
|
10
|
+
* so its signatures are written here, and they are public API. They are narrow
|
|
11
|
+
* on purpose: each one is the shape the first real consumer actually uses, not
|
|
12
|
+
* everything the host happens to export. A name earns its way in when a page
|
|
13
|
+
* needs it.
|
|
14
|
+
*
|
|
15
|
+
* ONE NAME LEFT THIS LIST THE DAY IT WAS WRITTEN, and the reason is worth
|
|
16
|
+
* keeping. `deferredMessagesReady` was here because the invoice surface calls
|
|
17
|
+
* it — to load the engine's `invoices` namespace. It takes the host's CLOSED
|
|
18
|
+
* set of deferred namespaces, so declaring it as `(namespace: string)` did not
|
|
19
|
+
* typecheck against the real one, which is the type system pointing out that an
|
|
20
|
+
* add-on has no business naming an ENGINE namespace. Its own strings ship in
|
|
21
|
+
* its own bundle.
|
|
22
|
+
*
|
|
23
|
+
* NOTHING HOLDS THESE TRUE BY ITSELF, so the host proves it: the dashboard's
|
|
24
|
+
* `add-ons/runtime.ts` publishes its real implementations `satisfies
|
|
25
|
+
* AddOnAppNamespace`, so a signature that drifts fails the DASHBOARD's build
|
|
26
|
+
* rather than an add-on's, in another repository, after a release. Both of the
|
|
27
|
+
* corrections above were found that way, within a minute of writing them.
|
|
28
|
+
*/
|
|
29
|
+
import type { ComponentType, ReactNode } from 'react';
|
|
30
|
+
/** `apiFetch` returns the WHOLE body; these are the verbs a page uses. */
|
|
31
|
+
export interface AddOnApiClient {
|
|
32
|
+
get<T>(path: string): Promise<T>;
|
|
33
|
+
post<T>(path: string, payload?: unknown): Promise<T>;
|
|
34
|
+
put<T>(path: string, payload: unknown): Promise<T>;
|
|
35
|
+
patch<T>(path: string, payload: unknown): Promise<T>;
|
|
36
|
+
delete<T>(path: string, payload?: unknown): Promise<T>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* What `api` rejects with. A page reads it through `instanceof` AND annotates
|
|
40
|
+
* with it, so the shim exports the name as a value and a TYPE both — the first
|
|
41
|
+
* consumer wrote `catch (error: ApiError)` and the value-only export failed
|
|
42
|
+
* with "refers to a value, but is being used as a type here".
|
|
43
|
+
*/
|
|
44
|
+
export interface AddOnApiError extends Error {
|
|
45
|
+
readonly status: number;
|
|
46
|
+
/** SCREAMING_SNAKE canonical code, e.g. `SESSION_EXPIRED`. */
|
|
47
|
+
readonly code: string;
|
|
48
|
+
readonly requestId: string | null;
|
|
49
|
+
readonly details: unknown;
|
|
50
|
+
}
|
|
51
|
+
export interface AddOnApiErrorConstructor {
|
|
52
|
+
new (status: number, code: string, message: string, requestId: string | null, details?: unknown): AddOnApiError;
|
|
53
|
+
readonly prototype: AddOnApiError;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The host's translator. The FALLBACK IS REQUIRED, and that is the contract
|
|
57
|
+
* rather than an oversight: it is what renders before a namespace has loaded,
|
|
58
|
+
* and in a locale that has no translation for the key at all.
|
|
59
|
+
*/
|
|
60
|
+
export type AddOnTranslate = (key: string, fallback: string, args?: Record<string, unknown>) => string;
|
|
61
|
+
/** The button a toast may carry — Undo, Download, Retry. */
|
|
62
|
+
export interface AddOnToastAction {
|
|
63
|
+
label: string;
|
|
64
|
+
onAction: () => void;
|
|
65
|
+
}
|
|
66
|
+
export interface AddOnToast {
|
|
67
|
+
variant?: 'success' | 'error' | 'info' | 'warning' | 'loading' | undefined;
|
|
68
|
+
title: ReactNode;
|
|
69
|
+
description?: ReactNode;
|
|
70
|
+
action?: AddOnToastAction | undefined;
|
|
71
|
+
/** `null` keeps the toast until it is dismissed. */
|
|
72
|
+
duration?: number | null | undefined;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* What `useAppToasts()` answers with — a subset of the kit's queue, and the
|
|
76
|
+
* subset is the point: a page may raise a toast and dismiss one, and has no
|
|
77
|
+
* business reaching the stack's own props or its hover timers.
|
|
78
|
+
*/
|
|
79
|
+
export interface AddOnToastQueue {
|
|
80
|
+
push(toast: AddOnToast): string;
|
|
81
|
+
dismiss(id?: string): void;
|
|
82
|
+
}
|
|
83
|
+
/** The topbar's title, subtitle and back link for the screen being rendered. */
|
|
84
|
+
export interface AddOnPageActionsProps {
|
|
85
|
+
title?: string | undefined;
|
|
86
|
+
subtitle?: string | undefined;
|
|
87
|
+
documentTitle?: string | undefined;
|
|
88
|
+
backTo?: string | undefined;
|
|
89
|
+
titleAdornment?: ReactNode;
|
|
90
|
+
/** The actions themselves — rendered into the shell's own topbar slot. */
|
|
91
|
+
children?: ReactNode;
|
|
92
|
+
}
|
|
93
|
+
export interface AddOnPagePaddingPair {
|
|
94
|
+
x: number;
|
|
95
|
+
y: number;
|
|
96
|
+
}
|
|
97
|
+
export type AddOnPagePadding = 'none' | 'standard' | AddOnPagePaddingPair;
|
|
98
|
+
export type AddOnPageWidth = 'full' | 'narrow' | 'content' | 'page' | 'wide' | 'dash';
|
|
99
|
+
/** The frame every dashboard screen sits in, so an add-on's page looks like one. */
|
|
100
|
+
export interface AddOnPageSurfaceProps {
|
|
101
|
+
padding?: AddOnPagePadding | undefined;
|
|
102
|
+
width?: AddOnPageWidth | undefined;
|
|
103
|
+
fill?: boolean | undefined;
|
|
104
|
+
testId?: string | undefined;
|
|
105
|
+
className?: string | undefined;
|
|
106
|
+
/** Required, as the host requires it: an empty surface is not a screen. */
|
|
107
|
+
children: ReactNode;
|
|
108
|
+
}
|
|
109
|
+
/** The closed set of headings the shortcuts panel groups by. */
|
|
110
|
+
export type AddOnShortcutGroup = 'General' | 'Navigation' | 'Actions' | 'View' | 'Editing' | 'Data';
|
|
111
|
+
export interface AddOnShortcutDef {
|
|
112
|
+
/** Unique id, e.g. `invoices-save`. */
|
|
113
|
+
id: string;
|
|
114
|
+
group: AddOnShortcutGroup;
|
|
115
|
+
/** Already translated at the registration site. */
|
|
116
|
+
label: string;
|
|
117
|
+
/** Display keys; `'then'` marks a chord separator. */
|
|
118
|
+
keys: readonly string[];
|
|
119
|
+
when?: (() => boolean) | undefined;
|
|
120
|
+
handler?: ((event: KeyboardEvent) => void) | undefined;
|
|
121
|
+
}
|
|
122
|
+
/** A lucide icon resolved by name; an unknown name yields the neutral glyph. */
|
|
123
|
+
export type AddOnIconLookup = (name: string) => ComponentType<{
|
|
124
|
+
className?: string;
|
|
125
|
+
}>;
|
|
126
|
+
/** Flat, dotted keys per locale tag: `{ 'de-DE': { 'manager.title': '…' } }`. */
|
|
127
|
+
export type AddOnMessageBundles = Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
128
|
+
/**
|
|
129
|
+
* Hand the host every locale this add-on ships and get back a translator bound
|
|
130
|
+
* to them.
|
|
131
|
+
*
|
|
132
|
+
* The add-on never names the namespace it lands in — the host derives one from
|
|
133
|
+
* the add-on's key — so two add-ons that both think of their words as
|
|
134
|
+
* `documents` cannot read each other's. Call it once, at module scope, and use
|
|
135
|
+
* the function it returns for every string.
|
|
136
|
+
*/
|
|
137
|
+
export type AddOnRegisterMessages = (addOnKey: string, bundles: AddOnMessageBundles) => AddOnTranslate;
|
|
138
|
+
/** Relative time in the session's locale, sharing the host's cached formatters. */
|
|
139
|
+
export type AddOnFormatSince = (epochMs: number | null, localeTag: string, now: number) => string | null;
|
|
140
|
+
/**
|
|
141
|
+
* The BCP-47 tag the viewer is reading in — `de-DE`, `ar-EG`.
|
|
142
|
+
*
|
|
143
|
+
* THIS REPLACED `bootstrapQuery`, and the replacement is the better API for a
|
|
144
|
+
* reason worth keeping. Publishing the query options meant publishing a shape
|
|
145
|
+
* this package cannot name without depending on react-query, so it was typed
|
|
146
|
+
* `unknown` — and `useQuery(bootstrapQuery())` then did not compile at all.
|
|
147
|
+
* Looking at what the page actually wanted from the whole bootstrap payload,
|
|
148
|
+
* it was this one string, for a date formatter.
|
|
149
|
+
*/
|
|
150
|
+
export type AddOnLocaleTag = () => string;
|
|
151
|
+
/** The whole `app` namespace, as one type the host can be checked against. */
|
|
152
|
+
export interface AddOnAppNamespace {
|
|
153
|
+
ApiError: AddOnApiErrorConstructor;
|
|
154
|
+
PageActions: ComponentType<AddOnPageActionsProps>;
|
|
155
|
+
PageSurface: ComponentType<AddOnPageSurfaceProps>;
|
|
156
|
+
api: AddOnApiClient;
|
|
157
|
+
formatSince: AddOnFormatSince;
|
|
158
|
+
lucideByName: AddOnIconLookup;
|
|
159
|
+
registerMessages: AddOnRegisterMessages;
|
|
160
|
+
t: AddOnTranslate;
|
|
161
|
+
useLocaleTag: AddOnLocaleTag;
|
|
162
|
+
useAppToasts: () => AddOnToastQueue;
|
|
163
|
+
useShortcut: (def: AddOnShortcutDef) => void;
|
|
164
|
+
}
|
|
165
|
+
//# sourceMappingURL=app-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-types.d.ts","sourceRoot":"","sources":["../../src/runtime/app-types.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD,0EAA0E;AAC1E,MAAM,WAAW,cAAc;IAC7B,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC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R,MAAM,GAAG,IAAI,CAAC;AAEnB;;;;;;;;;GASG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,MAAM,CAAC;AAE1C,8EAA8E;AAC9E,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,wBAAwB,CAAC;IACnC,WAAW,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IAClD,WAAW,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IAClD,GAAG,EAAE,cAAc,CAAC;IACpB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,YAAY,EAAE,eAAe,CAAC;IAC9B,gBAAgB,EAAE,qBAAqB,CAAC;IACxC,CAAC,EAAE,cAAc,CAAC;IAClB,YAAY,EAAE,cAAc,CAAC;IAC7B,YAAY,EAAE,MAAM,eAAe,CAAC;IACpC,WAAW,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAC9C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-types.js","sourceRoot":"","sources":["../../src/runtime/app-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `@adminium/add-on-sdk` shim: the DASHBOARD's own helpers (51d, O7).
|
|
3
|
+
*
|
|
4
|
+
* Unlike the four library shims beside it, there is no npm package behind
|
|
5
|
+
* this specifier — the host IS the implementation. An add-on page imports its
|
|
6
|
+
* `t`, its API client, its toasts and its page chrome from here, and gets the
|
|
7
|
+
* running dashboard rather than a copy of it: a second `t()` reads a second
|
|
8
|
+
* catalogue, a second API client carries no CSRF token, and a second toast bus
|
|
9
|
+
* renders toasts into a tree nobody is looking at.
|
|
10
|
+
*
|
|
11
|
+
* The names are `ADD_ON_APP_EXPORTS` and nothing else; `add-on-host.test.ts`
|
|
12
|
+
* holds the two equal.
|
|
13
|
+
*/
|
|
14
|
+
import type { AddOnAppNamespace, AddOnApiError } from './app-types.js';
|
|
15
|
+
export type * from './app-types.js';
|
|
16
|
+
declare const app: AddOnAppNamespace;
|
|
17
|
+
export declare const ApiError: import("./app-types.js").AddOnApiErrorConstructor;
|
|
18
|
+
/** The same name as a TYPE, so `catch (e: ApiError)` compiles. */
|
|
19
|
+
export type ApiError = AddOnApiError;
|
|
20
|
+
export declare const PageActions: import("react").ComponentType<import("./app-types.js").AddOnPageActionsProps>;
|
|
21
|
+
export declare const PageSurface: import("react").ComponentType<import("./app-types.js").AddOnPageSurfaceProps>;
|
|
22
|
+
export declare const api: import("./app-types.js").AddOnApiClient;
|
|
23
|
+
export declare const formatSince: import("./app-types.js").AddOnFormatSince;
|
|
24
|
+
export declare const lucideByName: import("./app-types.js").AddOnIconLookup;
|
|
25
|
+
export declare const registerMessages: import("./app-types.js").AddOnRegisterMessages;
|
|
26
|
+
export declare const t: import("./app-types.js").AddOnTranslate;
|
|
27
|
+
export declare const useLocaleTag: import("./app-types.js").AddOnLocaleTag;
|
|
28
|
+
export declare const useAppToasts: () => import("./app-types.js").AddOnToastQueue;
|
|
29
|
+
export declare const useShortcut: (def: import("./app-types.js").AddOnShortcutDef) => void;
|
|
30
|
+
export default app;
|
|
31
|
+
//# sourceMappingURL=app.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/runtime/app.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEvE,mBAAmB,gBAAgB,CAAC;AAEpC,QAAA,MAAM,GAAG,EAAwC,iBAAiB,CAAC;AAEnE,eAAO,MAAM,QAAQ,mDAAe,CAAC;AACrC,kEAAkE;AAClE,MAAM,MAAM,QAAQ,GAAG,aAAa,CAAC;AACrC,eAAO,MAAM,WAAW,+EAAkB,CAAC;AAC3C,eAAO,MAAM,WAAW,+EAAkB,CAAC;AAC3C,eAAO,MAAM,GAAG,yCAAU,CAAC;AAC3B,eAAO,MAAM,WAAW,2CAAkB,CAAC;AAC3C,eAAO,MAAM,YAAY,0CAAmB,CAAC;AAC7C,eAAO,MAAM,gBAAgB,gDAAuB,CAAC;AACrD,eAAO,MAAM,CAAC,yCAAQ,CAAC;AACvB,eAAO,MAAM,YAAY,yCAAmB,CAAC;AAC7C,eAAO,MAAM,YAAY,gDAAmB,CAAC;AAC7C,eAAO,MAAM,WAAW,0DAAkB,CAAC;AAE3C,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
/**
|
|
3
|
+
* The `@adminium/add-on-sdk` shim: the DASHBOARD's own helpers (51d, O7).
|
|
4
|
+
*
|
|
5
|
+
* Unlike the four library shims beside it, there is no npm package behind
|
|
6
|
+
* this specifier — the host IS the implementation. An add-on page imports its
|
|
7
|
+
* `t`, its API client, its toasts and its page chrome from here, and gets the
|
|
8
|
+
* running dashboard rather than a copy of it: a second `t()` reads a second
|
|
9
|
+
* catalogue, a second API client carries no CSRF token, and a second toast bus
|
|
10
|
+
* renders toasts into a tree nobody is looking at.
|
|
11
|
+
*
|
|
12
|
+
* The names are `ADD_ON_APP_EXPORTS` and nothing else; `add-on-host.test.ts`
|
|
13
|
+
* holds the two equal.
|
|
14
|
+
*/
|
|
15
|
+
import { requireAddOnHost } from './index.js';
|
|
16
|
+
const app = requireAddOnHost().app;
|
|
17
|
+
export const ApiError = app.ApiError;
|
|
18
|
+
export const PageActions = app.PageActions;
|
|
19
|
+
export const PageSurface = app.PageSurface;
|
|
20
|
+
export const api = app.api;
|
|
21
|
+
export const formatSince = app.formatSince;
|
|
22
|
+
export const lucideByName = app.lucideByName;
|
|
23
|
+
export const registerMessages = app.registerMessages;
|
|
24
|
+
export const t = app.t;
|
|
25
|
+
export const useLocaleTag = app.useLocaleTag;
|
|
26
|
+
export const useAppToasts = app.useAppToasts;
|
|
27
|
+
export const useShortcut = app.useShortcut;
|
|
28
|
+
export default app;
|
|
29
|
+
//# sourceMappingURL=app.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../src/runtime/app.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAK9C,MAAM,GAAG,GAAG,gBAAgB,EAAE,CAAC,GAAmC,CAAC;AAEnE,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAGrC,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC;AAC3C,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC;AAC3C,MAAM,CAAC,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC;AAC3B,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC;AAC3C,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;AAC7C,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAC,gBAAgB,CAAC;AACrD,MAAM,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;AACvB,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;AAC7C,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;AAC7C,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC;AAE3C,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `react/compiler-runtime` shim (see `./index.ts`). Libraries compiled
|
|
3
|
+
* with the React Compiler import its `c` helper, which React 19 publishes as
|
|
4
|
+
* `__COMPILER_RUNTIME.c` on the React namespace itself.
|
|
5
|
+
*/
|
|
6
|
+
export declare const c: never;
|
|
7
|
+
//# sourceMappingURL=compiler-runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compiler-runtime.d.ts","sourceRoot":"","sources":["../../src/runtime/compiler-runtime.ts"],"names":[],"mappings":"AACA;;;;GAIG;AAMH,eAAO,MAAM,CAAC,EAAkB,KAAK,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
/**
|
|
3
|
+
* The `react/compiler-runtime` shim (see `./index.ts`). Libraries compiled
|
|
4
|
+
* with the React Compiler import its `c` helper, which React 19 publishes as
|
|
5
|
+
* `__COMPILER_RUNTIME.c` on the React namespace itself.
|
|
6
|
+
*/
|
|
7
|
+
import { requireAddOnRuntime } from './index.js';
|
|
8
|
+
const compiler = requireAddOnRuntime().react['__COMPILER_RUNTIME'];
|
|
9
|
+
export const c = compiler?.c;
|
|
10
|
+
//# sourceMappingURL=compiler-runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compiler-runtime.js","sourceRoot":"","sources":["../../src/runtime/compiler-runtime.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC;;;;GAIG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,QAAQ,GAAG,mBAAmB,EAAE,CAAC,KAAK,CAAC,oBAAoB,CAAgC,CAAC;AAElG,MAAM,CAAC,MAAM,CAAC,GAAG,QAAQ,EAAE,CAAU,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `@adminium/i18n` shim a page bundle's build aliases that specifier to
|
|
3
|
+
* (see `./index.ts`), so the page uses the HOST's copy of
|
|
4
|
+
* locale helpers.
|
|
5
|
+
*
|
|
6
|
+
* A second catalogue would answer with a different locale than the chrome around it.
|
|
7
|
+
*
|
|
8
|
+
* The names are `ADD_ON_I18N_EXPORTS` and nothing else: an ES module cannot export a
|
|
9
|
+
* name it does not spell, which is what makes this list the API rather than a
|
|
10
|
+
* description of one. `add-on-host.test.ts` holds the two equal.
|
|
11
|
+
*/
|
|
12
|
+
declare const i18n: Readonly<Record<string, unknown>>;
|
|
13
|
+
export declare const tagForLocale: never;
|
|
14
|
+
export default i18n;
|
|
15
|
+
//# sourceMappingURL=i18n.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/runtime/i18n.ts"],"names":[],"mappings":"AACA;;;;;;;;;;GAUG;AAIH,QAAA,MAAM,IAAI,mCAA0B,CAAC;AAErC,eAAO,MAAM,YAAY,EAA2B,KAAK,CAAC;AAE1D,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
/**
|
|
3
|
+
* The `@adminium/i18n` shim a page bundle's build aliases that specifier to
|
|
4
|
+
* (see `./index.ts`), so the page uses the HOST's copy of
|
|
5
|
+
* locale helpers.
|
|
6
|
+
*
|
|
7
|
+
* A second catalogue would answer with a different locale than the chrome around it.
|
|
8
|
+
*
|
|
9
|
+
* The names are `ADD_ON_I18N_EXPORTS` and nothing else: an ES module cannot export a
|
|
10
|
+
* name it does not spell, which is what makes this list the API rather than a
|
|
11
|
+
* description of one. `add-on-host.test.ts` holds the two equal.
|
|
12
|
+
*/
|
|
13
|
+
import { requireAddOnHost } from './index.js';
|
|
14
|
+
const i18n = requireAddOnHost().i18n;
|
|
15
|
+
export const tagForLocale = i18n['tagForLocale'];
|
|
16
|
+
export default i18n;
|
|
17
|
+
//# sourceMappingURL=i18n.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../src/runtime/i18n.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C,MAAM,IAAI,GAAG,gBAAgB,EAAE,CAAC,IAAI,CAAC;AAErC,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,cAAc,CAAU,CAAC;AAE1D,eAAe,IAAI,CAAC"}
|