@batterai/block-sdk 0.1.0
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 +6 -0
- package/LICENSE +21 -0
- package/README.md +22 -0
- package/dist/base-element.d.ts +37 -0
- package/dist/base-element.d.ts.map +1 -0
- package/dist/base-element.js +46 -0
- package/dist/base-element.js.map +1 -0
- package/dist/blocks/callout.css +1 -0
- package/dist/blocks/callout.d.ts +13 -0
- package/dist/blocks/callout.d.ts.map +1 -0
- package/dist/blocks/callout.js +106 -0
- package/dist/blocks/callout.js.map +1 -0
- package/dist/blocks/first-party.d.ts +3 -0
- package/dist/blocks/first-party.d.ts.map +1 -0
- package/dist/blocks/first-party.js +7 -0
- package/dist/blocks/first-party.js.map +1 -0
- package/dist/blocks/form.css +1 -0
- package/dist/blocks/form.d.ts +67 -0
- package/dist/blocks/form.d.ts.map +1 -0
- package/dist/blocks/form.js +199 -0
- package/dist/blocks/form.js.map +1 -0
- package/dist/blocks/image.css +1 -0
- package/dist/blocks/image.d.ts +49 -0
- package/dist/blocks/image.d.ts.map +1 -0
- package/dist/blocks/image.js +238 -0
- package/dist/blocks/image.js.map +1 -0
- package/dist/define.d.ts +9 -0
- package/dist/define.d.ts.map +1 -0
- package/dist/define.js +12 -0
- package/dist/define.js.map +1 -0
- package/dist/html-package.d.ts +16 -0
- package/dist/html-package.d.ts.map +1 -0
- package/dist/html-package.js +104 -0
- package/dist/html-package.js.map +1 -0
- package/dist/i18n.d.ts +88 -0
- package/dist/i18n.d.ts.map +1 -0
- package/dist/i18n.js +93 -0
- package/dist/i18n.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/render-to-dsd.d.ts +18 -0
- package/dist/render-to-dsd.d.ts.map +1 -0
- package/dist/render-to-dsd.js +72 -0
- package/dist/render-to-dsd.js.map +1 -0
- package/dist/tag.d.ts +14 -0
- package/dist/tag.d.ts.map +1 -0
- package/dist/tag.js +25 -0
- package/dist/tag.js.map +1 -0
- package/package.json +43 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @batterai/block-sdk — the framework-neutral block boundary (plan §4 L1).
|
|
3
|
+
* Lit-based base element + pure DSD server render + tag scheme + defineBlock.
|
|
4
|
+
* Imports contract + bind-core only (depcruise-enforced).
|
|
5
|
+
*/
|
|
6
|
+
export * from "./tag.js";
|
|
7
|
+
export * from "./base-element.js";
|
|
8
|
+
export * from "./define.js";
|
|
9
|
+
export * from "./i18n.js";
|
|
10
|
+
export * from "./render-to-dsd.js";
|
|
11
|
+
export * from "./html-package.js";
|
|
12
|
+
export * from "./blocks/callout.js";
|
|
13
|
+
export * from "./blocks/first-party.js";
|
|
14
|
+
export * from "./blocks/form.js";
|
|
15
|
+
export * from "./blocks/image.js";
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,OAAO,CAAC;AACtB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import type { BlockConfig, BlockPackage } from "@batterai/contract";
|
|
3
|
+
export declare function renderBlockToDSD(pkg: BlockPackage, rawConfig: BlockConfig): string;
|
|
4
|
+
/** Assemble a React-free page around pre-rendered block HTML. The client
|
|
5
|
+
* bundle (when any block needs hydration) must import
|
|
6
|
+
* `@lit-labs/ssr-client/lit-element-hydrate-support.js` BEFORE element
|
|
7
|
+
* definitions (invariant A; Phase-1 finding). */
|
|
8
|
+
export declare function assemblePage(opts: {
|
|
9
|
+
/** Omit (or pass "") when headExtra already carries a <title> — an empty
|
|
10
|
+
* duplicate <title></title> would win the browser's first-tag-counts rule. */
|
|
11
|
+
readonly title?: string;
|
|
12
|
+
readonly lang: string;
|
|
13
|
+
readonly blocksHtml: readonly string[];
|
|
14
|
+
readonly clientBundleSrc?: string;
|
|
15
|
+
readonly headExtra?: string;
|
|
16
|
+
}): string;
|
|
17
|
+
export { html };
|
|
18
|
+
//# sourceMappingURL=render-to-dsd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-to-dsd.d.ts","sourceRoot":"","sources":["../src/render-to-dsd.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAE3B,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAgBpE,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,GAAG,MAAM,CAwBlF;AAED;;;iDAGiD;AACjD,wBAAgB,YAAY,CAAC,IAAI,EAAE;IACjC;kFAC8E;IAC9E,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B,GAAG,MAAM,CAUT;AAUD,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server render utilities (contract §7; invariant A). renderPageElementToDSD
|
|
3
|
+
* produces the FULL element markup with a Declarative Shadow DOM template via
|
|
4
|
+
* @lit-labs/ssr, from the SAME element definition the client hydrates —
|
|
5
|
+
* one template, byte-compatible output (proven in Phase 1 Leg 1; enforced by
|
|
6
|
+
* the fixture CI check here).
|
|
7
|
+
*/
|
|
8
|
+
import { render } from "@lit-labs/ssr";
|
|
9
|
+
import { collectResultSync } from "@lit-labs/ssr/lib/render-result.js";
|
|
10
|
+
import { html } from "lit";
|
|
11
|
+
import { unsafeStatic, html as staticHtml } from "lit/static-html.js";
|
|
12
|
+
import { tagFor } from "./tag.js";
|
|
13
|
+
/** Render one block element (tag chosen from the manifest) with its config
|
|
14
|
+
* property bound, to a DSD-carrying HTML string. PURITY CONTRACT: the block's
|
|
15
|
+
* render must not touch window/document/Date.now — the same discipline
|
|
16
|
+
* bind-core's resolver already enforces upstream (resolved values only). */
|
|
17
|
+
/** Invariant L, enforced structurally: renderToDSD is the PUBLIC path — the
|
|
18
|
+
* editor canvas mounts client-side. Editor-session context (editingRegion,
|
|
19
|
+
* bindings, selected) is STRIPPED before serialization so an overlay session
|
|
20
|
+
* cannot leave any trace in published bytes, and editMode is forced false. */
|
|
21
|
+
function publicConfig(config) {
|
|
22
|
+
const { editingRegion: _er, bindings: _b, selected: _s, api: _a, ...rest } = config.context;
|
|
23
|
+
return { ...config, context: { ...rest, editMode: false } };
|
|
24
|
+
}
|
|
25
|
+
export function renderBlockToDSD(pkg, rawConfig) {
|
|
26
|
+
const config = publicConfig(rawConfig);
|
|
27
|
+
const serializedConfig = {
|
|
28
|
+
...config,
|
|
29
|
+
data: config.data.resources?.__blockRuntime
|
|
30
|
+
? { ...config.data, resources: Object.fromEntries(Object.entries(config.data.resources).filter(([key]) => key !== "__blockRuntime")) }
|
|
31
|
+
: config.data,
|
|
32
|
+
};
|
|
33
|
+
const tag = tagFor(pkg.manifest.type, pkg.manifest.version);
|
|
34
|
+
// renderToDSD on the package (author-supplied pure string path) wins when
|
|
35
|
+
// present; otherwise the element itself is SSR'd via lit-labs.
|
|
36
|
+
if (pkg.renderToDSD) {
|
|
37
|
+
const inner = pkg.renderToDSD(config);
|
|
38
|
+
if (pkg.renderMode === "light") {
|
|
39
|
+
return `<${tag} config="${escapeAttribute(JSON.stringify(serializedConfig))}">${inner}</${tag}>`;
|
|
40
|
+
}
|
|
41
|
+
return `<${tag} config="${escapeAttribute(JSON.stringify(serializedConfig))}"><template shadowrootmode="open">${inner}</template></${tag}>`;
|
|
42
|
+
}
|
|
43
|
+
pkg.defineElement();
|
|
44
|
+
const t = unsafeStatic(tag);
|
|
45
|
+
// Attribute (not property) binding: survives DSD serialization so the client
|
|
46
|
+
// hydrates from IDENTICAL data (see BatteryBlockElement.properties note).
|
|
47
|
+
const result = render(staticHtml `<${t} config=${JSON.stringify(config)}></${t}>`);
|
|
48
|
+
return collectResultSync(result);
|
|
49
|
+
}
|
|
50
|
+
/** Assemble a React-free page around pre-rendered block HTML. The client
|
|
51
|
+
* bundle (when any block needs hydration) must import
|
|
52
|
+
* `@lit-labs/ssr-client/lit-element-hydrate-support.js` BEFORE element
|
|
53
|
+
* definitions (invariant A; Phase-1 finding). */
|
|
54
|
+
export function assemblePage(opts) {
|
|
55
|
+
return `<!doctype html>
|
|
56
|
+
<html lang="${opts.lang}">
|
|
57
|
+
<head><meta charset="utf-8">${opts.title ? `<title>${escapeTitle(opts.title)}</title>` : ""}${opts.headExtra ?? ""}</head>
|
|
58
|
+
<body>
|
|
59
|
+
${opts.blocksHtml.join("\n")}
|
|
60
|
+
${opts.clientBundleSrc ? `<script type="module" src="${opts.clientBundleSrc}"></script>` : ""}
|
|
61
|
+
</body>
|
|
62
|
+
</html>
|
|
63
|
+
`;
|
|
64
|
+
}
|
|
65
|
+
function escapeTitle(s) {
|
|
66
|
+
return s.replace(/[&<>]/g, (c) => ({ "&": "&", "<": "<", ">": ">" })[c]);
|
|
67
|
+
}
|
|
68
|
+
function escapeAttribute(s) {
|
|
69
|
+
return s.replace(/[&"<>]/g, (c) => ({ "&": "&", '"': """, "<": "<", ">": ">" })[c]);
|
|
70
|
+
}
|
|
71
|
+
export { html };
|
|
72
|
+
//# sourceMappingURL=render-to-dsd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-to-dsd.js","sourceRoot":"","sources":["../src/render-to-dsd.ts"],"names":[],"mappings":"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"}
|
package/dist/tag.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Element-tag scheme (plan §4): `be-<source>-<name>-v<major>`. First-party
|
|
3
|
+
* source id is `battery`, so first-party tags are `be-battery-…` — which is
|
|
4
|
+
* what keeps the tag scheme and the no-vendor-names test compatible. Per-major
|
|
5
|
+
* tags let two majors coexist (plan D7); tenant filtering is a HOST registry
|
|
6
|
+
* view, not a tag property (a display filter is not a security boundary).
|
|
7
|
+
*/
|
|
8
|
+
export declare function parseBlockType(type: string): {
|
|
9
|
+
source: string;
|
|
10
|
+
name: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function majorOf(version: string): number;
|
|
13
|
+
export declare function tagFor(type: string, version: string): string;
|
|
14
|
+
//# sourceMappingURL=tag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../src/tag.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAQ7E;AAED,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAI/C;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAG5D"}
|
package/dist/tag.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Element-tag scheme (plan §4): `be-<source>-<name>-v<major>`. First-party
|
|
3
|
+
* source id is `battery`, so first-party tags are `be-battery-…` — which is
|
|
4
|
+
* what keeps the tag scheme and the no-vendor-names test compatible. Per-major
|
|
5
|
+
* tags let two majors coexist (plan D7); tenant filtering is a HOST registry
|
|
6
|
+
* view, not a tag property (a display filter is not a security boundary).
|
|
7
|
+
*/
|
|
8
|
+
export function parseBlockType(type) {
|
|
9
|
+
const m = /^([a-z][a-z0-9]*)\.([a-z][a-z0-9-]*)$/.exec(type);
|
|
10
|
+
if (!m) {
|
|
11
|
+
throw new Error(`block type "${type}" must be "<source>.<name>" (lowercase, digits, hyphens in name)`);
|
|
12
|
+
}
|
|
13
|
+
return { source: m[1], name: m[2] };
|
|
14
|
+
}
|
|
15
|
+
export function majorOf(version) {
|
|
16
|
+
const m = /^(\d+)\./.exec(version);
|
|
17
|
+
if (!m)
|
|
18
|
+
throw new Error(`block version "${version}" is not semver`);
|
|
19
|
+
return Number(m[1]);
|
|
20
|
+
}
|
|
21
|
+
export function tagFor(type, version) {
|
|
22
|
+
const { source, name } = parseBlockType(type);
|
|
23
|
+
return `be-${source}-${name}-v${majorOf(version)}`;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=tag.js.map
|
package/dist/tag.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag.js","sourceRoot":"","sources":["../src/tag.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,MAAM,CAAC,GAAG,uCAAuC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7D,IAAI,CAAC,CAAC,EAAE,CAAC;QACP,MAAM,IAAI,KAAK,CACb,eAAe,IAAI,kEAAkE,CACtF,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,CAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAE,EAAE,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,OAAe;IACrC,MAAM,CAAC,GAAG,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACnC,IAAI,CAAC,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,kBAAkB,OAAO,iBAAiB,CAAC,CAAC;IACpE,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACtB,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,IAAY,EAAE,OAAe;IAClD,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IAC9C,OAAO,MAAM,MAAM,IAAI,IAAI,KAAK,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;AACrD,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@batterai/block-sdk",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"import": "./dist/index.js"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"check": "tsc --noEmit",
|
|
14
|
+
"test:e2e": "bun harness/build-fixtures.ts && bun build harness/client.ts --outdir dist --target browser --production && playwright test",
|
|
15
|
+
"build": "node ../../scripts/build-package.mjs",
|
|
16
|
+
"prepack": "bun run build"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@batterai/bind-core": "^0.1.0",
|
|
20
|
+
"@batterai/contract": "^0.1.0",
|
|
21
|
+
"lit": "^3.2.0",
|
|
22
|
+
"@lit-labs/ssr": "^3.3.0",
|
|
23
|
+
"@lit-labs/ssr-client": "^1.1.7"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@playwright/test": "^1.57.0",
|
|
27
|
+
"@types/node": "^22.13.0"
|
|
28
|
+
},
|
|
29
|
+
"main": "./dist/index.js",
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"files": [
|
|
32
|
+
"dist",
|
|
33
|
+
"LICENSE",
|
|
34
|
+
"README.md",
|
|
35
|
+
"CHANGELOG.md"
|
|
36
|
+
],
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=20.11"
|
|
39
|
+
},
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public"
|
|
42
|
+
}
|
|
43
|
+
}
|