@eldrajs/theme-core 0.3.0 → 0.3.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/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,10 @@ Release-please writes the generated notes from commit messages and does not repl
|
|
|
5
5
|
|
|
6
6
|
## Unreleased
|
|
7
7
|
|
|
8
|
+
- **`buildToken` client option (WS-403).** `createEldraClient({ buildToken })` sends
|
|
9
|
+
`X-Eldra-Build-Token` on every read; pass a read-only build token (`eldra_bld_…`, Studio →
|
|
10
|
+
Settings → Developers → Build tokens), never the deploy token. Server and build only.
|
|
11
|
+
|
|
8
12
|
- **`createAnalytics`, `normalizeAnalyticsProps`, `truncateUtf8`.** Framework-free custom-event layer
|
|
9
13
|
over the Eldra tracker's `window.eldra('event', ...)`: props stringified and cut to the platform's
|
|
10
14
|
limits, events queued (50) until the script loads, a no-op when disabled, `pageview` rejected.
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ColorLiteral, ColorSelection, ContainerOverride, ContainerPreset, CssTo
|
|
|
2
2
|
import { a as buildDynamicRoutePath, c as parseDynamicRoutePattern, d as resolvePagePath, i as RouteTemplateLike, l as resolveRoute, n as MAX_DYNAMIC_ROUTE_PATTERN_BYTES, o as catalogRouteTarget, r as ParsedDynamicRoutePattern, s as matchDynamicRoutePattern, t as DynamicRouteResolution, u as PageLike } from "./dynamicRoute-pRTBoYT6.js";
|
|
3
3
|
import { a as ImageFraming, c as focalBand, d as imageFramingAttrs, f as imageFramingStyle, h as unscaledFrameRect, i as IMAGE_FRAMING_MIN_ZOOM, l as framingDrag, m as parseImageFramingValueAttr, n as FrameRect, o as clampFocal, p as normalizeImageFraming, r as IMAGE_FRAMING_MAX_ZOOM, s as clampImageFraming, t as DEFAULT_IMAGE_FRAMING, u as framingZoom } from "./imageFraming-BUZ-yqho.js";
|
|
4
4
|
import { StegaMeta, decodeStega, encodeStega, stripStega } from "./stega.js";
|
|
5
|
-
import { C as ResolveEntryListBody, S as PageMeta, _ as EldraClientOptions, a as TemplateLayoutDocument, b as EntryList, c as TemplateLayoutRenderNode, d as CatalogDoc, f as CatalogList, g as EldraClientError, h as EldraClient, i as TemplateLayoutContext, l as buildTemplateBlockRenames, m as EldraCatalogReader, n as TemplateBlockFieldDefinition, o as TemplateLayoutNode, p as CatalogQuery, r as TemplateBlockNode, s as TemplateLayoutRenderModel, t as TemplateBlockDefinition, u as createTemplateLayoutRenderModel, v as EldraRetryOptions, x as EntryQuery, y as EntryDoc } from "./templateLayout-
|
|
5
|
+
import { C as ResolveEntryListBody, S as PageMeta, _ as EldraClientOptions, a as TemplateLayoutDocument, b as EntryList, c as TemplateLayoutRenderNode, d as CatalogDoc, f as CatalogList, g as EldraClientError, h as EldraClient, i as TemplateLayoutContext, l as buildTemplateBlockRenames, m as EldraCatalogReader, n as TemplateBlockFieldDefinition, o as TemplateLayoutNode, p as CatalogQuery, r as TemplateBlockNode, s as TemplateLayoutRenderModel, t as TemplateBlockDefinition, u as createTemplateLayoutRenderModel, v as EldraRetryOptions, x as EntryQuery, y as EntryDoc } from "./templateLayout-7rT_TH_E.js";
|
|
6
6
|
import { A as generateLayoutCss, C as Responsive, D as WidthLength, E as Spacing, F as resolveLayoutBreakpoints, I as resolveLayoutDocument, L as validateLayoutDocument, M as layoutNodeClass, N as layoutRenderNodeId, O as activeLayoutBreakpoint, P as normalizeLayoutDocument, S as ResolvedLayoutStyle, T as SlotValidationContext, _ as LayoutValidationError, a as LAYOUT_BREAKPOINTS, b as ResolvedLayoutDocument, c as LayoutBreakpoints, d as LayoutNode, f as LayoutRenderBlockNode, g as LayoutValidationCode, h as LayoutStyle, i as EDIT_MODE_HIDDEN_OPACITY, j as hiddenLayoutBreakpoints, k as createLayoutRenderModel, l as LayoutContainerNode, m as LayoutRenderNode, n as CssLength, o as LayoutBlockNode, p as LayoutRenderModel, r as DEFAULT_LAYOUT_BREAKPOINTS, s as LayoutBreakpoint, t as BlockSlotDefinition, u as LayoutDocument, v as LayoutValidationIssue, w as SizingLength, x as ResolvedLayoutNode, y as NormalizedLayoutResult } from "./layout-CWq_v6ws.js";
|
|
7
7
|
import { a as RichTextRenderStateChange, c as NegotiatedEditorCapabilities, d as PreviewRouterMessageType, f as createPreviewMessageRouter, i as RichTextFieldIdentity, l as PREVIEW_ROUTER_MESSAGE_TYPES, n as OverlayRuntime, o as classifyBeforeInput, r as OverlayRuntimeOptions, s as createOverlayRuntime, t as BeforeInputClassification, u as PreviewMessageRouter } from "./overlay-Bgi0tIbN.js";
|
|
8
8
|
import { a as ReusableComponentRevision, i as ReusableComponentResolver, n as ReusableComponentPlacement, o as ReusableRenderIdentity, r as ReusableComponentProjection, s as createProjectionResolver, t as ReusableComponentBinding } from "./reusableExpansion-CXvs_ckx.js";
|
package/dist/index.js
CHANGED
|
@@ -531,6 +531,7 @@ function createEldraClient(opts) {
|
|
|
531
531
|
const headers = new Headers(init?.headers);
|
|
532
532
|
headers.set("X-Org-Id", opts.orgId);
|
|
533
533
|
if (previewToken !== null) headers.set("X-Preview-Token", previewToken);
|
|
534
|
+
if (opts.buildToken) headers.set("X-Eldra-Build-Token", opts.buildToken);
|
|
534
535
|
const merged = {
|
|
535
536
|
...init,
|
|
536
537
|
headers
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as TemplateLayoutDocument, c as TemplateLayoutRenderNode, i as TemplateLayoutContext, l as buildTemplateBlockRenames, n as TemplateBlockFieldDefinition, o as TemplateLayoutNode, r as TemplateBlockNode, s as TemplateLayoutRenderModel, t as TemplateBlockDefinition, u as createTemplateLayoutRenderModel } from "./templateLayout-
|
|
1
|
+
import { a as TemplateLayoutDocument, c as TemplateLayoutRenderNode, i as TemplateLayoutContext, l as buildTemplateBlockRenames, n as TemplateBlockFieldDefinition, o as TemplateLayoutNode, r as TemplateBlockNode, s as TemplateLayoutRenderModel, t as TemplateBlockDefinition, u as createTemplateLayoutRenderModel } from "./templateLayout-7rT_TH_E.js";
|
|
2
2
|
import { n as ReusableComponentPlacement, o as ReusableRenderIdentity, r as ReusableComponentProjection } from "./reusableExpansion-CXvs_ckx.js";
|
|
3
3
|
export { type ReusableComponentPlacement, type ReusableComponentProjection, type ReusableRenderIdentity, TemplateBlockDefinition, TemplateBlockFieldDefinition, TemplateBlockNode, TemplateLayoutContext, TemplateLayoutDocument, TemplateLayoutNode, TemplateLayoutRenderModel, TemplateLayoutRenderNode, buildTemplateBlockRenames, createTemplateLayoutRenderModel };
|
|
@@ -26,6 +26,13 @@ interface EldraClientOptions {
|
|
|
26
26
|
stega?: boolean;
|
|
27
27
|
fetch?: typeof globalThis.fetch;
|
|
28
28
|
retry?: EldraRetryOptions;
|
|
29
|
+
/**
|
|
30
|
+
* The organisation's read-only build token (`eldra_bld_…`, Studio → Settings → Developers →
|
|
31
|
+
* Build tokens), sent as `X-Eldra-Build-Token` on every request so the gateway counts a
|
|
32
|
+
* theme build's reads against the build's own rate-limit budget. Server and build only: never
|
|
33
|
+
* pass it from browser code or a public config. Omitted or empty sends no header.
|
|
34
|
+
*/
|
|
35
|
+
buildToken?: string;
|
|
29
36
|
/**
|
|
30
37
|
* The organisation's default content locale (e.g. `"en-US"`). A `link`
|
|
31
38
|
* field's value is a per-locale record, and this drives a per-field
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eldrajs/theme-core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Framework-free core of the Eldra theme SDK: the Studio preview bridge, stega encoding, the overlay runtime, layout CSS, rich-text positions, design tokens and image framing.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cms",
|