@saacms/blocks-essentials 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.
Files changed (44) hide show
  1. package/README.md +59 -0
  2. package/dist/code-block/CodeBlock.block.d.ts +25 -0
  3. package/dist/code-block/CodeBlock.block.d.ts.map +1 -0
  4. package/dist/code-block/CodeBlock.d.ts +34 -0
  5. package/dist/code-block/CodeBlock.d.ts.map +1 -0
  6. package/dist/hero/Hero.block.d.ts +28 -0
  7. package/dist/hero/Hero.block.d.ts.map +1 -0
  8. package/dist/hero/Hero.block.js +25 -0
  9. package/dist/hero/Hero.d.ts +23 -0
  10. package/dist/hero/Hero.d.ts.map +1 -0
  11. package/dist/hero/Hero.js +82 -0
  12. package/dist/image/Image.block.d.ts +28 -0
  13. package/dist/image/Image.block.d.ts.map +1 -0
  14. package/dist/image/Image.d.ts +28 -0
  15. package/dist/image/Image.d.ts.map +1 -0
  16. package/dist/index.d.ts +23 -0
  17. package/dist/index.d.ts.map +1 -0
  18. package/dist/index.js +778 -0
  19. package/dist/internal/html-element-base.d.ts +17 -0
  20. package/dist/internal/html-element-base.d.ts.map +1 -0
  21. package/dist/internal/safe-href.d.ts +17 -0
  22. package/dist/internal/safe-href.d.ts.map +1 -0
  23. package/dist/internal/sanitize-html.d.ts +25 -0
  24. package/dist/internal/sanitize-html.d.ts.map +1 -0
  25. package/dist/pricing-table/PricingTable.block.d.ts +36 -0
  26. package/dist/pricing-table/PricingTable.block.d.ts.map +1 -0
  27. package/dist/pricing-table/PricingTable.d.ts +37 -0
  28. package/dist/pricing-table/PricingTable.d.ts.map +1 -0
  29. package/dist/raw-html/RawHtml.block.d.ts +31 -0
  30. package/dist/raw-html/RawHtml.block.d.ts.map +1 -0
  31. package/dist/raw-html/RawHtml.d.ts +31 -0
  32. package/dist/raw-html/RawHtml.d.ts.map +1 -0
  33. package/dist/register.d.ts +19 -0
  34. package/dist/register.d.ts.map +1 -0
  35. package/dist/register.js +18 -0
  36. package/dist/rich-text/RichText.block.d.ts +22 -0
  37. package/dist/rich-text/RichText.block.d.ts.map +1 -0
  38. package/dist/rich-text/RichText.d.ts +25 -0
  39. package/dist/rich-text/RichText.d.ts.map +1 -0
  40. package/dist/video/Video.block.d.ts +31 -0
  41. package/dist/video/Video.block.d.ts.map +1 -0
  42. package/dist/video/Video.d.ts +54 -0
  43. package/dist/video/Video.d.ts.map +1 -0
  44. package/package.json +36 -0
package/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # @saacms/blocks-essentials
2
+
3
+ **Status:** scaffold (v0.1.0). Not yet wired into a host app.
4
+
5
+ The built-in Block library shipped with saacms. Currently exports the `Hero` block.
6
+
7
+ ## Authoring mode
8
+
9
+ All built-in blocks are authored as **Web Components** (Mode 1 per
10
+ [ADR 0004 — Block authoring: dual mode](../../docs/adr/0004-block-authoring-dual-mode-with-preview-fetch.md)).
11
+
12
+ Web Components are framework-agnostic by construction: the same `<saacms-hero>` element
13
+ renders identically whether the host framework is Astro, Next.js, SvelteKit, or Nuxt.
14
+ This is why the built-ins choose Mode 1 — one bundle, every host.
15
+
16
+ Block authors who want host-framework-native ergonomics (React hooks, Svelte stores,
17
+ scoped CSS) should choose Mode 2 (framework-native) for their own blocks. The built-ins
18
+ stay portable.
19
+
20
+ ## Reactivity
21
+
22
+ Reactive state inside the Web Components uses the cross-framework `signal` primitive
23
+ from `@preact/signals-core` per
24
+ [ADR 0023 — Frontend state and backend-driven sync](../../docs/adr/0023-frontend-state-and-backend-sync.md).
25
+ The eventual migration target is the TC39 Signals proposal; the wrapper is a one-line swap.
26
+
27
+ ## Usage
28
+
29
+ ```ts
30
+ import { register } from "@saacms/blocks-essentials"
31
+
32
+ // Call once at app boot — registers all built-in custom elements.
33
+ register()
34
+ ```
35
+
36
+ After registration, the elements are available as standard custom elements:
37
+
38
+ ```html
39
+ <saacms-hero
40
+ title="Ship faster"
41
+ subtitle="A CMS that respects your stack."
42
+ cta-label="Get started"
43
+ cta-href="/signup"
44
+ ></saacms-hero>
45
+ ```
46
+
47
+ ## Notes on this scaffold
48
+
49
+ - **No shadow DOM** — the Hero component renders into its light DOM for v1 simplicity.
50
+ This means the host page's CSS reaches in and styles the block, which is the
51
+ intentional v1 behaviour (matches editor preview ergonomics). Shadow DOM with slotted
52
+ content is a candidate for a v2 hardening pass once the styling story crystallises.
53
+ - **Observed attributes** are kebab-case per the HTML standard
54
+ (`title`, `subtitle`, `cta-label`, `cta-href`); the block schema uses camelCase
55
+ (`ctaLabel`, `ctaHref`) and saacms's compile step bridges the two.
56
+
57
+ ## Known reconciliation TODO
58
+
59
+ `src/hero/Hero.block.ts` defines a local `BlockDef` type. Once `@saacms/core`'s `defineBlock` is fully exported and the contract test suite locks the shape, swap the local type for the canonical import.
@@ -0,0 +1,25 @@
1
+ /**
2
+ * CodeBlock block definition (saacms Block).
3
+ *
4
+ * Authoring mode: web-component (ADR 0004 Mode 1). The canonical `component`
5
+ * field is the custom-element TAG NAME (`saacms-code-block`).
6
+ *
7
+ * No syntax-highlighting library ships with this block. The element emits the
8
+ * conventional `language-<lang>` class on `<code>`, so a host can layer Prism,
9
+ * Shiki, highlight.js, etc. over the rendered output without this package
10
+ * pulling a highlighter dependency.
11
+ */
12
+ import { Schema } from "effect";
13
+ declare const CodeBlockSchema: Schema.Struct<{
14
+ code: typeof Schema.String;
15
+ lang: Schema.optional<typeof Schema.String>;
16
+ showLineNumbers: Schema.optional<typeof Schema.Boolean>;
17
+ }>;
18
+ export type CodeBlockProps = Schema.Schema.Type<typeof CodeBlockSchema>;
19
+ export declare const CodeBlockBlock: import("@saacms/core").BlockDef<Schema.Struct<{
20
+ code: typeof Schema.String;
21
+ lang: Schema.optional<typeof Schema.String>;
22
+ showLineNumbers: Schema.optional<typeof Schema.Boolean>;
23
+ }>>;
24
+ export {};
25
+ //# sourceMappingURL=CodeBlock.block.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodeBlock.block.d.ts","sourceRoot":"","sources":["../../src/code-block/CodeBlock.block.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAG/B,QAAA,MAAM,eAAe;;;;EAInB,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,eAAe,CAAC,CAAA;AAEvE,eAAO,MAAM,cAAc;;;;GAKzB,CAAA"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * <saacms-code-block> — built-in CodeBlock block (ADR 0004 Mode 1).
3
+ *
4
+ * Renders `<pre><code class="language-<lang>">…</code></pre>` into the light DOM.
5
+ * The `code` prop is untrusted text and is NEVER assigned via `innerHTML`: the
6
+ * DOM is built with `createElement` + `textContent`, so the browser escapes the
7
+ * content for us and `<script>` in source code is inert by construction.
8
+ *
9
+ * `escapeCode` is exported as the equivalent pure primitive for hosts that render
10
+ * this block to a static HTML string (SSR) instead of mounting the element.
11
+ *
12
+ * No syntax-highlighting library is bundled — the `language-<lang>` class lets a
13
+ * host layer Prism / Shiki / highlight.js on top of the emitted markup.
14
+ */
15
+ import { HTMLElementBase } from "../internal/html-element-base.ts";
16
+ /**
17
+ * HTML-escape untrusted code for safe interpolation into a string template.
18
+ * `&` is escaped FIRST so an already-present `<` becoming `&lt;` is not
19
+ * re-escaped into `&amp;lt;` (correct entity handling, no double-escaping bug).
20
+ */
21
+ export declare function escapeCode(value: string): string;
22
+ export declare class CodeBlock extends HTMLElementBase {
23
+ static get observedAttributes(): readonly string[];
24
+ get code(): string;
25
+ set code(value: string);
26
+ get lang(): string;
27
+ set lang(value: string);
28
+ get showLineNumbers(): boolean;
29
+ set showLineNumbers(value: boolean);
30
+ connectedCallback(): void;
31
+ attributeChangedCallback(name: string, _oldValue: string | null, _newValue: string | null): void;
32
+ private render;
33
+ }
34
+ //# sourceMappingURL=CodeBlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodeBlock.d.ts","sourceRoot":"","sources":["../../src/code-block/CodeBlock.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAKlE;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOhD;AAMD,qBAAa,SAAU,SAAQ,eAAe;IAC5C,MAAM,KAAK,kBAAkB,IAAI,SAAS,MAAM,EAAE,CAEjD;IAGD,IAAI,IAAI,IAAI,MAAM,CAEjB;IACD,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,EAErB;IAID,IAAI,IAAI,IAAI,MAAM,CAEjB;IACD,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,EAGrB;IAED,IAAI,eAAe,IAAI,OAAO,CAE7B;IACD,IAAI,eAAe,CAAC,KAAK,EAAE,OAAO,EAGjC;IAED,iBAAiB,IAAI,IAAI;IAIzB,wBAAwB,CACtB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,SAAS,EAAE,MAAM,GAAG,IAAI,GACvB,IAAI;IAOP,OAAO,CAAC,MAAM;CA+Bf"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Hero block definition (saacms Block).
3
+ *
4
+ * Authoring mode: web-component (ADR 0004 Mode 1). In `web-component` mode the
5
+ * canonical `component` field is the custom-element TAG NAME (`saacms-hero`),
6
+ * not a module path — see `BlockDef` in `@saacms/core`. The saacms compile step
7
+ * ensures the matching element class (registered via `register()` in this
8
+ * package) ships in the host bundle before any page using it renders.
9
+ *
10
+ * Per ADR 0005 the block contract is owned by `@saacms/core`; this def is built
11
+ * with the canonical `defineBlock` helper (the single source of truth).
12
+ */
13
+ import { Schema } from "effect";
14
+ export type { BlockDef } from "@saacms/core";
15
+ declare const HeroSchema: Schema.Struct<{
16
+ title: typeof Schema.String;
17
+ subtitle: Schema.optional<typeof Schema.String>;
18
+ ctaLabel: typeof Schema.String;
19
+ ctaHref: typeof Schema.String;
20
+ }>;
21
+ export type HeroProps = Schema.Schema.Type<typeof HeroSchema>;
22
+ export declare const HeroBlock: import("@saacms/core").BlockDef<Schema.Struct<{
23
+ title: typeof Schema.String;
24
+ subtitle: Schema.optional<typeof Schema.String>;
25
+ ctaLabel: typeof Schema.String;
26
+ ctaHref: typeof Schema.String;
27
+ }>>;
28
+ //# sourceMappingURL=Hero.block.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Hero.block.d.ts","sourceRoot":"","sources":["../../src/hero/Hero.block.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAK/B,YAAY,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAE5C,QAAA,MAAM,UAAU;;;;;EAKd,CAAA;AAEF,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAA;AAE7D,eAAO,MAAM,SAAS;;;;;GAKpB,CAAA"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Hero block definition (saacms Block).
3
+ *
4
+ * Authoring mode: web-component (ADR 0004 Mode 1). The renderer points at the
5
+ * Web Component class file at `./Hero.ts`; the saacms compile step is responsible
6
+ * for ensuring that file ships in the host bundle and that the custom element is
7
+ * registered (via `register()` in this package) before any page using it renders.
8
+ *
9
+ * TODO: migrate to `defineBlock` from `@saacms/core` once that helper is exported.
10
+ * For now we declare a local `BlockDef` shape mirroring what the helper will accept,
11
+ * so blocks-essentials compiles independently of the core scaffold's progress.
12
+ */
13
+ import { Schema } from "effect";
14
+ const HeroSchema = Schema.Struct({
15
+ title: Schema.String,
16
+ subtitle: Schema.optional(Schema.String),
17
+ ctaLabel: Schema.String,
18
+ ctaHref: Schema.String,
19
+ });
20
+ export const HeroBlock = {
21
+ slug: "saacms-hero",
22
+ authoring: "web-component",
23
+ schema: HeroSchema,
24
+ render: "./Hero.ts",
25
+ };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * <saacms-hero> — built-in Hero block, authored as a Web Component (ADR 0004 Mode 1).
3
+ *
4
+ * Renders into the light DOM (no shadow root) for v1 scaffold simplicity; this lets
5
+ * host-page CSS style the block without an extra adoptedStyleSheets bridge. Shadow DOM
6
+ * with slotted content is a candidate v2 hardening pass.
7
+ *
8
+ * Reactivity uses `signal` from `@preact/signals-core` per ADR 0023 — included here as a
9
+ * deliberate demonstration of the cross-framework reactive primitive that built-in
10
+ * blocks should reach for. The Hero is mostly attribute-driven, so only `cta-href`
11
+ * is wired through a signal as an exemplar.
12
+ */
13
+ import { HTMLElementBase } from "../internal/html-element-base.ts";
14
+ export declare class Hero extends HTMLElementBase {
15
+ static get observedAttributes(): readonly string[];
16
+ private readonly ctaHref;
17
+ private disposeCtaEffect;
18
+ connectedCallback(): void;
19
+ disconnectedCallback(): void;
20
+ attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
21
+ private render;
22
+ }
23
+ //# sourceMappingURL=Hero.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Hero.d.ts","sourceRoot":"","sources":["../../src/hero/Hero.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAKlE,qBAAa,IAAK,SAAQ,eAAe;IACvC,MAAM,KAAK,kBAAkB,IAAI,SAAS,MAAM,EAAE,CAEjD;IAID,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA6B;IACrD,OAAO,CAAC,gBAAgB,CAA4B;IAEpD,iBAAiB,IAAI,IAAI;IAWzB,oBAAoB,IAAI,IAAI;IAO5B,wBAAwB,CACtB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,GACtB,IAAI;IAWP,OAAO,CAAC,MAAM;CAqBf"}
@@ -0,0 +1,82 @@
1
+ /**
2
+ * <saacms-hero> — built-in Hero block, authored as a Web Component (ADR 0004 Mode 1).
3
+ *
4
+ * Renders into the light DOM (no shadow root) for v1 scaffold simplicity; this lets
5
+ * host-page CSS style the block without an extra adoptedStyleSheets bridge. Shadow DOM
6
+ * with slotted content is a candidate v2 hardening pass.
7
+ *
8
+ * Reactivity uses `signal` from `@preact/signals-core` per ADR 0023 — included here as a
9
+ * deliberate demonstration of the cross-framework reactive primitive that built-in
10
+ * blocks should reach for. The Hero is mostly attribute-driven, so only `cta-href`
11
+ * is wired through a signal as an exemplar.
12
+ */
13
+ import { signal, effect } from "@preact/signals-core";
14
+ const OBSERVED_ATTRIBUTES = ["title", "subtitle", "cta-label", "cta-href"];
15
+ export class Hero extends HTMLElement {
16
+ static get observedAttributes() {
17
+ return OBSERVED_ATTRIBUTES;
18
+ }
19
+ // Exemplar signal: cta-href is reactive so changes propagate via `effect` rather
20
+ // than a full re-render. Other attributes flow through plain re-render in v1.
21
+ ctaHref = signal("");
22
+ disposeCtaEffect = null;
23
+ connectedCallback() {
24
+ this.ctaHref.value = this.getAttribute("cta-href") ?? "";
25
+ this.render();
26
+ this.disposeCtaEffect = effect(() => {
27
+ const anchor = this.querySelector("[data-cta-anchor]");
28
+ if (anchor !== null) {
29
+ anchor.href = this.ctaHref.value;
30
+ }
31
+ });
32
+ }
33
+ disconnectedCallback() {
34
+ if (this.disposeCtaEffect !== null) {
35
+ this.disposeCtaEffect();
36
+ this.disposeCtaEffect = null;
37
+ }
38
+ }
39
+ attributeChangedCallback(name, _oldValue, newValue) {
40
+ if (!isObserved(name))
41
+ return;
42
+ if (name === "cta-href") {
43
+ this.ctaHref.value = newValue ?? "";
44
+ return;
45
+ }
46
+ if (this.isConnected) {
47
+ this.render();
48
+ }
49
+ }
50
+ render() {
51
+ const title = escapeHtml(this.getAttribute("title") ?? "");
52
+ const subtitle = this.getAttribute("subtitle");
53
+ const ctaLabel = escapeHtml(this.getAttribute("cta-label") ?? "");
54
+ const subtitleMarkup = subtitle === null || subtitle.length === 0
55
+ ? ""
56
+ : `<p class="saacms-hero__subtitle">${escapeHtml(subtitle)}</p>`;
57
+ const ctaMarkup = ctaLabel.length === 0
58
+ ? ""
59
+ : `<a data-cta-anchor class="saacms-hero__cta" href="${escapeAttr(this.ctaHref.value)}">${ctaLabel}</a>`;
60
+ this.innerHTML = `
61
+ <section class="saacms-hero">
62
+ <h1 class="saacms-hero__title">${title}</h1>
63
+ ${subtitleMarkup}
64
+ ${ctaMarkup}
65
+ </section>
66
+ `.trim();
67
+ }
68
+ }
69
+ function isObserved(name) {
70
+ return OBSERVED_ATTRIBUTES.includes(name);
71
+ }
72
+ function escapeHtml(value) {
73
+ return value
74
+ .replace(/&/g, "&amp;")
75
+ .replace(/</g, "&lt;")
76
+ .replace(/>/g, "&gt;")
77
+ .replace(/"/g, "&quot;")
78
+ .replace(/'/g, "&#39;");
79
+ }
80
+ function escapeAttr(value) {
81
+ return escapeHtml(value);
82
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Image block definition (saacms Block).
3
+ *
4
+ * Authoring mode: web-component (ADR 0004 Mode 1). The canonical `component`
5
+ * field is the custom-element TAG NAME (`saacms-image`), so this def imports
6
+ * cleanly in the DOM-less compile step (it never imports the element class).
7
+ *
8
+ * `alt` is REQUIRED by the schema (accessibility). The element still renders when
9
+ * an empty alt slips through at runtime, but flags itself for the admin UI.
10
+ */
11
+ import { Schema } from "effect";
12
+ declare const ImageSchema: Schema.Struct<{
13
+ src: typeof Schema.String;
14
+ alt: typeof Schema.String;
15
+ width: Schema.optional<typeof Schema.Number>;
16
+ height: Schema.optional<typeof Schema.Number>;
17
+ loading: Schema.optional<Schema.Literal<["lazy", "eager"]>>;
18
+ }>;
19
+ export type ImageProps = Schema.Schema.Type<typeof ImageSchema>;
20
+ export declare const ImageBlock: import("@saacms/core").BlockDef<Schema.Struct<{
21
+ src: typeof Schema.String;
22
+ alt: typeof Schema.String;
23
+ width: Schema.optional<typeof Schema.Number>;
24
+ height: Schema.optional<typeof Schema.Number>;
25
+ loading: Schema.optional<Schema.Literal<["lazy", "eager"]>>;
26
+ }>>;
27
+ export {};
28
+ //# sourceMappingURL=Image.block.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Image.block.d.ts","sourceRoot":"","sources":["../../src/image/Image.block.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAG/B,QAAA,MAAM,WAAW;;;;;;EAMf,CAAA;AAEF,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,WAAW,CAAC,CAAA;AAE/D,eAAO,MAAM,UAAU;;;;;;GAKrB,CAAA"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * <saacms-image> — built-in Image block (ADR 0004 Mode 1).
3
+ *
4
+ * Renders a single `<img>` into the light DOM. All attribute values are
5
+ * HTML-attribute-escaped before interpolation. `alt` is an accessibility
6
+ * requirement: when it is missing or empty the image still renders, but the
7
+ * element carries `data-saacms-warn="missing-alt"` so the admin UI can surface it.
8
+ *
9
+ * `loading` defaults to `"lazy"` and `decoding="async"` is always emitted.
10
+ */
11
+ import { HTMLElementBase } from "../internal/html-element-base.ts";
12
+ export declare class Image extends HTMLElementBase {
13
+ static get observedAttributes(): readonly string[];
14
+ get src(): string;
15
+ set src(value: string);
16
+ get alt(): string;
17
+ set alt(value: string);
18
+ get width(): number | null;
19
+ set width(value: number | null);
20
+ get height(): number | null;
21
+ set height(value: number | null);
22
+ get loading(): "lazy" | "eager";
23
+ set loading(value: "lazy" | "eager" | null);
24
+ connectedCallback(): void;
25
+ attributeChangedCallback(name: string, _oldValue: string | null, _newValue: string | null): void;
26
+ private render;
27
+ }
28
+ //# sourceMappingURL=Image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../src/image/Image.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAwBlE,qBAAa,KAAM,SAAQ,eAAe;IACxC,MAAM,KAAK,kBAAkB,IAAI,SAAS,MAAM,EAAE,CAEjD;IAGD,IAAI,GAAG,IAAI,MAAM,CAEhB;IACD,IAAI,GAAG,CAAC,KAAK,EAAE,MAAM,EAEpB;IAED,IAAI,GAAG,IAAI,MAAM,CAEhB;IACD,IAAI,GAAG,CAAC,KAAK,EAAE,MAAM,EAEpB;IAED,IAAI,KAAK,IAAI,MAAM,GAAG,IAAI,CAGzB;IACD,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAG7B;IAED,IAAI,MAAM,IAAI,MAAM,GAAG,IAAI,CAG1B;IACD,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAG9B;IAED,IAAI,OAAO,IAAI,MAAM,GAAG,OAAO,CAE9B;IACD,IAAI,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,EAGzC;IAED,iBAAiB,IAAI,IAAI;IAIzB,wBAAwB,CACtB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,SAAS,EAAE,MAAM,GAAG,IAAI,GACvB,IAAI;IAOP,OAAO,CAAC,MAAM;CAoBf"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @saacms/blocks-essentials — public surface.
3
+ *
4
+ * Built-in saacms Blocks shipped as Web Components (ADR 0004 Mode 1) so they render
5
+ * identically in every host framework. Reactivity uses the cross-framework `signal`
6
+ * primitive per ADR 0023.
7
+ */
8
+ export { Hero } from "./hero/Hero.ts";
9
+ export { HeroBlock, type HeroProps, type BlockDef } from "./hero/Hero.block.ts";
10
+ export { RichText, sanitizeRichTextHtml } from "./rich-text/RichText.ts";
11
+ export { RichTextBlock, type RichTextProps } from "./rich-text/RichText.block.ts";
12
+ export { Image } from "./image/Image.ts";
13
+ export { ImageBlock, type ImageProps } from "./image/Image.block.ts";
14
+ export { CodeBlock, escapeCode } from "./code-block/CodeBlock.ts";
15
+ export { CodeBlockBlock, type CodeBlockProps } from "./code-block/CodeBlock.block.ts";
16
+ export { PricingTable, safeHref } from "./pricing-table/PricingTable.ts";
17
+ export { PricingTableBlock, type PricingTableProps, } from "./pricing-table/PricingTable.block.ts";
18
+ export { Video, resolveVideoAttrs, type VideoAttrInput, type ResolvedVideoAttrs, } from "./video/Video.ts";
19
+ export { VideoBlock, type VideoProps } from "./video/Video.block.ts";
20
+ export { RawHtml } from "./raw-html/RawHtml.ts";
21
+ export { RawHtmlBlock, type RawHtmlProps } from "./raw-html/RawHtml.block.ts";
22
+ export { register, REGISTRATIONS, type ElementRegistration } from "./register.ts";
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AACrC,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAE/E,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AACxE,OAAO,EAAE,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAEjF,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEpE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAErF,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AACxE,OAAO,EACL,iBAAiB,EACjB,KAAK,iBAAiB,GACvB,MAAM,uCAAuC,CAAA;AAE9C,OAAO,EACL,KAAK,EACL,iBAAiB,EACjB,KAAK,cAAc,EACnB,KAAK,kBAAkB,GACxB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEpE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAE7E,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAA"}