@spillway-cms/blocks 0.0.0-stage → 0.1.2

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 (109) hide show
  1. package/LICENSE +21 -0
  2. package/dist/ask.d.ts +39 -0
  3. package/dist/ask.js +96 -0
  4. package/dist/ask.js.map +1 -0
  5. package/dist/calendar.d.ts +42 -0
  6. package/dist/calendar.js +96 -0
  7. package/dist/calendar.js.map +1 -0
  8. package/dist/collection.d.ts +89 -0
  9. package/dist/collection.js +304 -0
  10. package/dist/collection.js.map +1 -0
  11. package/dist/config.d.ts +246 -0
  12. package/dist/config.js +638 -0
  13. package/dist/config.js.map +1 -0
  14. package/dist/css.d.ts +1 -0
  15. package/dist/css.js +606 -0
  16. package/dist/css.js.map +1 -0
  17. package/dist/docs-feedback.d.ts +34 -0
  18. package/dist/docs-feedback.js +57 -0
  19. package/dist/docs-feedback.js.map +1 -0
  20. package/dist/examples.d.ts +12 -0
  21. package/dist/examples.js +85 -0
  22. package/dist/examples.js.map +1 -0
  23. package/dist/experiment.d.ts +18 -0
  24. package/dist/experiment.js +20 -0
  25. package/dist/experiment.js.map +1 -0
  26. package/dist/form.d.ts +40 -0
  27. package/dist/form.js +252 -0
  28. package/dist/form.js.map +1 -0
  29. package/dist/gallery.d.ts +36 -0
  30. package/dist/gallery.js +114 -0
  31. package/dist/gallery.js.map +1 -0
  32. package/dist/image.d.ts +41 -0
  33. package/dist/image.js +39 -0
  34. package/dist/image.js.map +1 -0
  35. package/dist/index.d.ts +54 -0
  36. package/dist/index.js +31 -0
  37. package/dist/index.js.map +1 -0
  38. package/dist/layouts.d.ts +8 -0
  39. package/dist/layouts.js +81 -0
  40. package/dist/layouts.js.map +1 -0
  41. package/dist/markdown.d.ts +32 -0
  42. package/dist/markdown.js +283 -0
  43. package/dist/markdown.js.map +1 -0
  44. package/dist/marketing.d.ts +70 -0
  45. package/dist/marketing.js +208 -0
  46. package/dist/marketing.js.map +1 -0
  47. package/dist/menu.d.ts +43 -0
  48. package/dist/menu.js +75 -0
  49. package/dist/menu.js.map +1 -0
  50. package/dist/meta.d.ts +14 -0
  51. package/dist/meta.js +198 -0
  52. package/dist/meta.js.map +1 -0
  53. package/dist/module-block.d.ts +32 -0
  54. package/dist/module-block.js +76 -0
  55. package/dist/module-block.js.map +1 -0
  56. package/dist/motion.d.ts +19 -0
  57. package/dist/motion.js +161 -0
  58. package/dist/motion.js.map +1 -0
  59. package/dist/personalize.d.ts +18 -0
  60. package/dist/personalize.js +32 -0
  61. package/dist/personalize.js.map +1 -0
  62. package/dist/players.d.ts +30 -0
  63. package/dist/players.js +95 -0
  64. package/dist/players.js.map +1 -0
  65. package/dist/registry-browse.d.ts +31 -0
  66. package/dist/registry-browse.js +97 -0
  67. package/dist/registry-browse.js.map +1 -0
  68. package/dist/registry-gallery.d.ts +22 -0
  69. package/dist/registry-gallery.js +73 -0
  70. package/dist/registry-gallery.js.map +1 -0
  71. package/dist/registry-org.d.ts +22 -0
  72. package/dist/registry-org.js +44 -0
  73. package/dist/registry-org.js.map +1 -0
  74. package/dist/registry-package.d.ts +27 -0
  75. package/dist/registry-package.js +145 -0
  76. package/dist/registry-package.js.map +1 -0
  77. package/dist/registry-publisher.d.ts +20 -0
  78. package/dist/registry-publisher.js +46 -0
  79. package/dist/registry-publisher.js.map +1 -0
  80. package/dist/registry-shared.d.ts +29 -0
  81. package/dist/registry-shared.js +122 -0
  82. package/dist/registry-shared.js.map +1 -0
  83. package/dist/registry-stats.d.ts +15 -0
  84. package/dist/registry-stats.js +42 -0
  85. package/dist/registry-stats.js.map +1 -0
  86. package/dist/registry-types.d.ts +218 -0
  87. package/dist/registry-types.js +29 -0
  88. package/dist/registry-types.js.map +1 -0
  89. package/dist/sanitize.d.ts +37 -0
  90. package/dist/sanitize.js +293 -0
  91. package/dist/sanitize.js.map +1 -0
  92. package/dist/search.d.ts +25 -0
  93. package/dist/search.js +77 -0
  94. package/dist/search.js.map +1 -0
  95. package/dist/shared.d.ts +27 -0
  96. package/dist/shared.js +59 -0
  97. package/dist/shared.js.map +1 -0
  98. package/dist/status-board.d.ts +49 -0
  99. package/dist/status-board.js +81 -0
  100. package/dist/status-board.js.map +1 -0
  101. package/dist/story.d.ts +23 -0
  102. package/dist/story.js +58 -0
  103. package/dist/story.js.map +1 -0
  104. package/dist/styles.css +1361 -0
  105. package/dist/styles.d.ts +37 -0
  106. package/dist/styles.js +242 -0
  107. package/dist/styles.js.map +1 -0
  108. package/package.json +47 -3
  109. package/README.md +0 -3
@@ -0,0 +1,46 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { PackageCard, Placeholder, StatusBadges, cx, formatCount, formatDate } from './registry-shared.js';
3
+ export const publisherProfileComponent = {
4
+ label: 'Publisher profile',
5
+ fields: {
6
+ handle: { type: 'text', label: 'Publisher handle (empty = from the URL)', placeholder: 'acme' },
7
+ basePath: { type: 'text', label: 'Publishers base path', placeholder: '/registry/publishers' },
8
+ layout: {
9
+ type: 'radio',
10
+ label: 'Package layout',
11
+ options: [
12
+ { label: 'List', value: 'list' },
13
+ { label: 'Grid', value: 'grid' },
14
+ ],
15
+ },
16
+ notFoundText: { type: 'text', label: 'Text when the publisher is unknown' },
17
+ },
18
+ defaultProps: { handle: '', basePath: '/registry/publishers', layout: 'grid', notFoundText: 'No publisher by that handle.' },
19
+ render: ({ handle, layout, notFoundText, data, notFound }) => {
20
+ if (notFound || data === null) {
21
+ return (_jsx("section", { className: "sw-block sw-reg-publisher sw-reg-publisher--missing", children: _jsxs("div", { className: "sw-container sw-container--narrow", children: [_jsx("h1", { children: "Publisher not found" }), _jsx("p", { className: "sw-reg-empty", children: notFoundText }), _jsx("p", { children: _jsx("a", { href: "/registry", children: "Browse the registry \u2192" }) })] }) }));
22
+ }
23
+ if (!data) {
24
+ return (_jsx("section", { className: "sw-block sw-reg-publisher", children: _jsx("div", { className: "sw-container", children: _jsx(Placeholder, { label: `Publisher profile: ${handle || 'from the page path'}` }) }) }));
25
+ }
26
+ return (_jsx("section", { className: "sw-block sw-reg-publisher", "data-publisher": data.handle, children: _jsxs("div", { className: "sw-container", children: [_jsxs("header", { className: "sw-reg-publisher__head", children: [_jsx("span", { className: "sw-reg-publisher__avatar", "aria-hidden": "true", children: (data.name || data.handle).slice(0, 1).toUpperCase() }), _jsxs("div", { className: "sw-reg-publisher__id", children: [_jsx("h1", { className: "sw-reg-publisher__name", children: data.name || data.handle }), _jsxs("p", { className: "sw-reg-publisher__handle", children: [_jsxs("code", { children: ["@", data.handle] }), data.memberSince ? _jsxs("span", { className: "sw-reg-publisher__since", children: [" \u00B7 publishing since ", formatDate(data.memberSince)] }) : null] }), _jsx("div", { className: "sw-reg-badges", children: _jsx(StatusBadges, { reviewed: false, checked: false, verified: data.verified }) })] }), _jsxs("dl", { className: "sw-reg-publisher__stats", children: [_jsxs("div", { children: [_jsx("dt", { children: "Packages" }), _jsx("dd", { children: data.packages.length })] }), _jsxs("div", { children: [_jsx("dt", { children: "Downloads" }), _jsx("dd", { children: formatCount(data.downloads) })] })] })] }), data.bio ? _jsx("p", { className: "sw-reg-publisher__bio", children: data.bio }) : null, data.website || (data.maintainers && data.maintainers.length) ? (_jsxs("ul", { className: "sw-reg-package__links sw-reg-publisher__links", children: [data.website ? (_jsx("li", { children: _jsx("a", { href: data.website, rel: "noopener me", children: data.website.replace(/^https?:\/\//, '').replace(/\/$/, '') }) })) : null, data.maintainers && data.maintainers.length ? (_jsxs("li", { children: ["Maintainers:", ' ', data.maintainers.map((m, i) => (_jsxs("span", { children: [i > 0 ? ', ' : '', _jsx("a", { href: `/registry/publishers/${encodeURIComponent(m.handle)}`, children: m.name || m.handle })] }, m.handle)))] })) : null] })) : null, _jsx("h2", { className: "sw-reg-publisher__section", children: "Packages" }), data.packages.length === 0 ? (_jsx("p", { className: "sw-reg-empty", children: "Nothing published yet." })) : (_jsx("ul", { className: cx('sw-reg-list', layout === 'grid' && 'sw-reg-list--grid'), children: data.packages.map((p) => (_jsx(PackageCard, { item: p }, `${p.kind}:${p.name}`))) }))] }) }));
27
+ },
28
+ };
29
+ export const publisherProfileCss = `/* ---------- Registry: publisher ---------- */
30
+
31
+ .sw-reg-publisher__head { display: grid; grid-template-columns: auto 1fr; gap: var(--sw-space-2) var(--sw-space-3); align-items: center; margin-bottom: var(--sw-space-3); }
32
+ @media (min-width: 640px) { .sw-reg-publisher__head { grid-template-columns: auto 1fr auto; } }
33
+ .sw-reg-publisher__avatar { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--sw-color-primary, #1d4ed8); color: var(--sw-color-primary-contrast, #fff); font-size: 1.6rem; font-weight: 700; }
34
+ .sw-reg-publisher__id { display: grid; gap: 4px; min-width: 0; }
35
+ .sw-reg-publisher__name { font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.2rem); }
36
+ .sw-reg-publisher__handle { margin: 0; color: var(--sw-color-muted); }
37
+ .sw-reg-publisher__since { font-size: 0.9rem; }
38
+ .sw-reg-publisher__stats { display: flex; gap: var(--sw-space-3); margin: 0; grid-column: 1 / -1; }
39
+ @media (min-width: 640px) { .sw-reg-publisher__stats { grid-column: auto; } }
40
+ .sw-reg-publisher__stats dt { font-size: 0.8rem; color: var(--sw-color-muted); font-weight: 600; }
41
+ .sw-reg-publisher__stats dd { margin: 0; font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
42
+ .sw-reg-publisher__bio { max-width: 65ch; margin-bottom: var(--sw-space-2); }
43
+ .sw-reg-publisher__links { margin-bottom: var(--sw-space-3); }
44
+ .sw-reg-publisher__section { font-size: 1.25rem; margin-bottom: var(--sw-space-2); }
45
+ `;
46
+ //# sourceMappingURL=registry-publisher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry-publisher.js","sourceRoot":"","sources":["../src/registry-publisher.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,EAAE,EAAE,WAAW,EAAE,UA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,CAAC,EAAE,EAAE,CAAC,CACxB,KAAC,WAAW,IAA6B,IAAI,EAAE,CAAC,IAA9B,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,EAAE,CAAa,CACrD,CAAC,GACC,CACN,IACG,GACE,CACX,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;CAgBlC,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Pieces shared by the registry blocks: badges, cards, number and date formatting. Server-safe.
3
+ */
4
+ import type { RegistryCard, RegistryKind, RegistryTier } from './registry-types.js';
5
+ export declare function cx(...parts: Array<string | false | null | undefined>): string;
6
+ export declare function formatCount(n: number): string;
7
+ export declare function formatDate(iso: string | null | undefined): string;
8
+ export declare function formatBytes(n: number | null | undefined): string;
9
+ export declare function KindBadge({ kind }: {
10
+ kind: RegistryKind;
11
+ }): import("react").JSX.Element;
12
+ export declare function TierBadge({ tier }: {
13
+ tier: RegistryTier | null | undefined;
14
+ }): import("react").JSX.Element | null;
15
+ export declare function StatusBadges({ reviewed, checked, verified, deprecated }: {
16
+ reviewed: boolean;
17
+ checked: boolean;
18
+ verified: boolean;
19
+ deprecated?: boolean;
20
+ }): import("react").JSX.Element;
21
+ /** A package in a list. `titleLevel` keeps the page's headings in order: h2 when nothing between the page title and the list is a heading. */
22
+ export declare function PackageCard({ item, titleLevel }: {
23
+ item: RegistryCard;
24
+ titleLevel?: 'h2' | 'h3';
25
+ }): import("react").JSX.Element;
26
+ export declare function Placeholder({ label }: {
27
+ label: string;
28
+ }): import("react").JSX.Element;
29
+ export declare const registrySharedCss = "/* ---------- Registry: shared ---------- */\n\n.sw-reg-badges { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }\n.sw-reg-badge {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 2px 8px;\n border-radius: 999px;\n border: 1px solid var(--sw-color-border);\n background: var(--sw-color-surface);\n color: var(--sw-color-muted);\n font-size: 0.78rem;\n font-weight: 600;\n line-height: 1.4;\n letter-spacing: 0.01em;\n white-space: nowrap;\n}\n.sw-reg-badge__icon { flex: none; }\n.sw-reg-badge--kind-module { color: var(--sw-color-primary, #1d4ed8); border-color: color-mix(in srgb, var(--sw-color-primary, #1d4ed8) 35%, transparent); background: color-mix(in srgb, var(--sw-color-primary, #1d4ed8) 8%, var(--sw-color-bg, #fff)); }\n.sw-reg-badge--kind-theme { color: #6d28d9; border-color: #c4b5fd; background: #f5f3ff; }\n.sw-reg-badge--kind-kit { color: #0f766e; border-color: #99f6e4; background: #f0fdfa; }\n.sw-reg-badge--kind-brand { color: #9d174d; border-color: #fbcfe8; background: #fdf2f8; }\n.sw-reg-badge--tier-trusted { color: #92400e; border-color: #fcd34d; background: #fffbeb; }\n.sw-reg-badge--tier-sandboxed { color: #1e40af; border-color: #93c5fd; background: #eff6ff; }\n.sw-reg-badge--reviewed, .sw-reg-badge--checked { color: #166534; border-color: #86efac; background: #f0fdf4; }\n.sw-reg-badge--verified { color: #1e3a8a; border-color: #93c5fd; background: #eff6ff; }\n.sw-reg-badge--deprecated { color: #991b1b; border-color: #fca5a5; background: #fef2f2; }\n\n.sw-reg-list { display: grid; gap: var(--sw-space-2); list-style: none; margin: 0; padding: 0; }\n@media (min-width: 900px) { .sw-reg-list--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }\n.sw-reg-card {\n display: flex;\n flex-direction: column;\n gap: var(--sw-space-1);\n padding: var(--sw-space-3);\n border: 1px solid var(--sw-color-border);\n border-radius: var(--sw-radius, 8px);\n background: var(--sw-color-bg, #fff);\n position: relative;\n transition: border-color 120ms ease;\n}\n.sw-reg-card:hover { border-color: var(--sw-color-primary, #1d4ed8); }\n.sw-reg-card:focus-within { box-shadow: var(--sw-focus-ring); }\n.sw-reg-card--deprecated { opacity: 0.8; }\n.sw-reg-card__head { display: flex; flex-wrap: wrap; gap: var(--sw-space-1) var(--sw-space-2); align-items: center; justify-content: space-between; }\n.sw-reg-card__title { margin: 0; font-size: 1.15rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0; }\n.sw-reg-card__title a { color: inherit; text-decoration: none; }\n.sw-reg-card__title a::after { content: \"\"; position: absolute; inset: 0; }\n.sw-reg-card__title a:hover { text-decoration: underline; }\n.sw-reg-card__by { position: relative; z-index: 1; color: inherit; }\n.sw-reg-card__desc { margin: 0; color: var(--sw-color-muted); }\n.sw-reg-card__meta { display: flex; flex-wrap: wrap; gap: 2px var(--sw-space-2); margin: 0; font-size: 0.85rem; color: var(--sw-color-muted); }\n.sw-reg-card__meta dt { display: inline; }\n.sw-reg-card__meta dt::after { content: \": \"; }\n.sw-reg-card__meta dd { display: inline; margin: 0; }\n.sw-reg-card__meta dd + dt { margin-left: var(--sw-space-1); }\n.sw-reg-card__meta dd + dt::before { content: \"\u00B7 \"; color: var(--sw-color-border); }\n.sw-reg-placeholder {\n padding: var(--sw-space-3);\n border: 1px dashed var(--sw-color-border);\n border-radius: var(--sw-radius, 8px);\n background: var(--sw-color-surface);\n color: var(--sw-color-muted);\n font-size: 0.9rem;\n text-align: center;\n}\n.sw-reg-empty { color: var(--sw-color-muted); padding: var(--sw-space-3) 0; }\n.sw-page .sw-reg-code, .sw-page .sw-reg-card code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }\n";
@@ -0,0 +1,122 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { REGISTRY_KIND_LABELS } from './registry-types.js';
3
+ export function cx(...parts) {
4
+ return parts.filter(Boolean).join(' ');
5
+ }
6
+ export function formatCount(n) {
7
+ if (!Number.isFinite(n))
8
+ return '0';
9
+ if (n < 1000)
10
+ return String(n);
11
+ if (n < 1_000_000)
12
+ return `${(n / 1000).toFixed(n < 10_000 ? 1 : 0).replace(/\.0$/, '')}k`;
13
+ return `${(n / 1_000_000).toFixed(1).replace(/\.0$/, '')}M`;
14
+ }
15
+ export function formatDate(iso) {
16
+ if (!iso)
17
+ return '';
18
+ const d = new Date(iso);
19
+ return Number.isNaN(d.getTime()) ? iso : d.toLocaleDateString('en-US', { year: 'numeric', month: 'short', day: 'numeric', timeZone: 'UTC' });
20
+ }
21
+ export function formatBytes(n) {
22
+ if (n === null || n === undefined || !Number.isFinite(n))
23
+ return '';
24
+ if (n < 1024)
25
+ return `${n} B`;
26
+ if (n < 1024 * 1024)
27
+ return `${(n / 1024).toFixed(0)} KB`;
28
+ return `${(n / (1024 * 1024)).toFixed(1)} MB`;
29
+ }
30
+ export function KindBadge({ kind }) {
31
+ return _jsx("span", { className: cx('sw-reg-badge', `sw-reg-badge--kind-${kind}`), children: REGISTRY_KIND_LABELS[kind] ?? kind });
32
+ }
33
+ export function TierBadge({ tier }) {
34
+ if (!tier)
35
+ return null;
36
+ return (_jsx("span", { className: cx('sw-reg-badge', `sw-reg-badge--tier-${tier}`), title: tier === 'trusted' ? 'Runs in the server process after a human review' : 'Runs in a WebAssembly sandbox with declared capabilities', children: tier }));
37
+ }
38
+ export function StatusBadges({ reviewed, checked, verified, deprecated }) {
39
+ return (_jsxs(_Fragment, { children: [deprecated ? _jsx("span", { className: "sw-reg-badge sw-reg-badge--deprecated", children: "Deprecated" }) : null, reviewed ? (_jsxs("span", { className: "sw-reg-badge sw-reg-badge--reviewed", title: "A maintainer read the code before it was listed", children: [_jsx(Check, {}), " Reviewed"] })) : checked ? (_jsxs("span", { className: "sw-reg-badge sw-reg-badge--checked", title: "The automated checks passed (manifest, sandbox smoke test, secret scan)", children: [_jsx(Check, {}), " Checks passed"] })) : null, verified ? (_jsxs("span", { className: "sw-reg-badge sw-reg-badge--verified", title: "The publisher's identity was verified", children: [_jsx(Check, {}), " Verified publisher"] })) : null] }));
40
+ }
41
+ function Check() {
42
+ return (_jsx("svg", { className: "sw-reg-badge__icon", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", focusable: "false", children: _jsx("path", { d: "m5 12 5 5L20 7" }) }));
43
+ }
44
+ /** A package in a list. `titleLevel` keeps the page's headings in order: h2 when nothing between the page title and the list is a heading. */
45
+ export function PackageCard({ item, titleLevel = 'h3' }) {
46
+ const Title = titleLevel === 'h2' ? 'h2' : 'h3';
47
+ return (_jsxs("li", { className: cx('sw-reg-card', item.deprecated && 'sw-reg-card--deprecated'), children: [_jsxs("div", { className: "sw-reg-card__head", children: [_jsx(Title, { className: "sw-reg-card__title", children: _jsx("a", { href: item.href, children: item.name }) }), _jsxs("div", { className: "sw-reg-badges", children: [_jsx(KindBadge, { kind: item.kind }), item.kind === 'module' ? _jsx(TierBadge, { tier: item.tier }) : null, _jsx(StatusBadges, { reviewed: item.reviewed, checked: item.checked, verified: item.verified, deprecated: item.deprecated })] })] }), item.description ? _jsx("p", { className: "sw-reg-card__desc", children: item.description }) : null, _jsxs("dl", { className: "sw-reg-card__meta", children: [item.org ? (_jsxs(_Fragment, { children: [_jsx("dt", { children: "By" }), _jsx("dd", { children: _jsx("a", { className: "sw-reg-card__by", href: item.org.href, children: item.org.name || item.org.handle }) })] })) : item.publisher ? (_jsxs(_Fragment, { children: [_jsx("dt", { children: "By" }), _jsx("dd", { children: item.publisher.name || item.publisher.handle })] })) : null, _jsx("dt", { children: "Downloads" }), _jsx("dd", { children: formatCount(item.downloads) }), item.latest ? (_jsxs(_Fragment, { children: [_jsx("dt", { children: "Latest" }), _jsx("dd", { children: _jsx("code", { children: item.latest }) })] })) : null, item.updatedAt ? (_jsxs(_Fragment, { children: [_jsx("dt", { children: "Updated" }), _jsx("dd", { children: _jsx("time", { dateTime: item.updatedAt, children: formatDate(item.updatedAt) }) })] })) : null] })] }));
48
+ }
49
+ export function Placeholder({ label }) {
50
+ return (_jsxs("div", { className: "sw-reg-placeholder", role: "note", children: [label, " (filled in by the registry service when the page is published on a registry host)"] }));
51
+ }
52
+ export const registrySharedCss = `/* ---------- Registry: shared ---------- */
53
+
54
+ .sw-reg-badges { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
55
+ .sw-reg-badge {
56
+ display: inline-flex;
57
+ align-items: center;
58
+ gap: 4px;
59
+ padding: 2px 8px;
60
+ border-radius: 999px;
61
+ border: 1px solid var(--sw-color-border);
62
+ background: var(--sw-color-surface);
63
+ color: var(--sw-color-muted);
64
+ font-size: 0.78rem;
65
+ font-weight: 600;
66
+ line-height: 1.4;
67
+ letter-spacing: 0.01em;
68
+ white-space: nowrap;
69
+ }
70
+ .sw-reg-badge__icon { flex: none; }
71
+ .sw-reg-badge--kind-module { color: var(--sw-color-primary, #1d4ed8); border-color: color-mix(in srgb, var(--sw-color-primary, #1d4ed8) 35%, transparent); background: color-mix(in srgb, var(--sw-color-primary, #1d4ed8) 8%, var(--sw-color-bg, #fff)); }
72
+ .sw-reg-badge--kind-theme { color: #6d28d9; border-color: #c4b5fd; background: #f5f3ff; }
73
+ .sw-reg-badge--kind-kit { color: #0f766e; border-color: #99f6e4; background: #f0fdfa; }
74
+ .sw-reg-badge--kind-brand { color: #9d174d; border-color: #fbcfe8; background: #fdf2f8; }
75
+ .sw-reg-badge--tier-trusted { color: #92400e; border-color: #fcd34d; background: #fffbeb; }
76
+ .sw-reg-badge--tier-sandboxed { color: #1e40af; border-color: #93c5fd; background: #eff6ff; }
77
+ .sw-reg-badge--reviewed, .sw-reg-badge--checked { color: #166534; border-color: #86efac; background: #f0fdf4; }
78
+ .sw-reg-badge--verified { color: #1e3a8a; border-color: #93c5fd; background: #eff6ff; }
79
+ .sw-reg-badge--deprecated { color: #991b1b; border-color: #fca5a5; background: #fef2f2; }
80
+
81
+ .sw-reg-list { display: grid; gap: var(--sw-space-2); list-style: none; margin: 0; padding: 0; }
82
+ @media (min-width: 900px) { .sw-reg-list--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
83
+ .sw-reg-card {
84
+ display: flex;
85
+ flex-direction: column;
86
+ gap: var(--sw-space-1);
87
+ padding: var(--sw-space-3);
88
+ border: 1px solid var(--sw-color-border);
89
+ border-radius: var(--sw-radius, 8px);
90
+ background: var(--sw-color-bg, #fff);
91
+ position: relative;
92
+ transition: border-color 120ms ease;
93
+ }
94
+ .sw-reg-card:hover { border-color: var(--sw-color-primary, #1d4ed8); }
95
+ .sw-reg-card:focus-within { box-shadow: var(--sw-focus-ring); }
96
+ .sw-reg-card--deprecated { opacity: 0.8; }
97
+ .sw-reg-card__head { display: flex; flex-wrap: wrap; gap: var(--sw-space-1) var(--sw-space-2); align-items: center; justify-content: space-between; }
98
+ .sw-reg-card__title { margin: 0; font-size: 1.15rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0; }
99
+ .sw-reg-card__title a { color: inherit; text-decoration: none; }
100
+ .sw-reg-card__title a::after { content: ""; position: absolute; inset: 0; }
101
+ .sw-reg-card__title a:hover { text-decoration: underline; }
102
+ .sw-reg-card__by { position: relative; z-index: 1; color: inherit; }
103
+ .sw-reg-card__desc { margin: 0; color: var(--sw-color-muted); }
104
+ .sw-reg-card__meta { display: flex; flex-wrap: wrap; gap: 2px var(--sw-space-2); margin: 0; font-size: 0.85rem; color: var(--sw-color-muted); }
105
+ .sw-reg-card__meta dt { display: inline; }
106
+ .sw-reg-card__meta dt::after { content: ": "; }
107
+ .sw-reg-card__meta dd { display: inline; margin: 0; }
108
+ .sw-reg-card__meta dd + dt { margin-left: var(--sw-space-1); }
109
+ .sw-reg-card__meta dd + dt::before { content: "· "; color: var(--sw-color-border); }
110
+ .sw-reg-placeholder {
111
+ padding: var(--sw-space-3);
112
+ border: 1px dashed var(--sw-color-border);
113
+ border-radius: var(--sw-radius, 8px);
114
+ background: var(--sw-color-surface);
115
+ color: var(--sw-color-muted);
116
+ font-size: 0.9rem;
117
+ text-align: center;
118
+ }
119
+ .sw-reg-empty { color: var(--sw-color-muted); padding: var(--sw-space-3) 0; }
120
+ .sw-page .sw-reg-code, .sw-page .sw-reg-card code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }
121
+ `;
122
+ //# sourceMappingURL=registry-shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry-shared.js","sourceRoot":"","sources":["../src/registry-shared.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAE3D,MAAM,UAAU,EAAE,CAAC,GAAG,KAA+C;IACnE,OAAO,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,CAAS;IACnC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;QAAE,OAAO,GAAG,CAAC;IACpC,IAAI,CAAC,GAAG,IAAI;QAAE,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;IAC/B,IAAI,CAAC,GAAG,SAAS;QAAE,OAAO,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC;IAC3F,OAAO,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,GAA8B;IACvD,IAAI,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC;IACpB,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC;IACxB,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,OAAO,EAAE,EAAE,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,CACb,8BACE,kCAAe,EACf,uBACE,yBAAO,IAAI,CAAC,MAAM,GAAQ,GACvB,IACJ,CACJ,CAAC,CAAC,CAAC,IAAI,EACP,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAChB,8BACE,mCAAgB,EAChB,uBACE,eAAM,QAAQ,EAAE,IAAI,CAAC,SAAS,YAAG,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,GAAQ,GAChE,IACJ,CACJ,CAAC,CAAC,CAAC,IAAI,IACL,IACF,CACN,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,EAAE,KAAK,EAAqB;IACtD,OAAO,CACL,eAAK,SAAS,EAAC,oBAAoB,EAAC,IAAI,EAAC,MAAM,aAC5C,KAAK,0FACF,CACP,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqEhC,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * RegistryStats: the registry's totals (packages by kind, publishers, downloads) as a row of
3
+ * figures; resolved by the server from the registry service. Server-safe.
4
+ */
5
+ import type { ComponentConfig } from '@puckeditor/core';
6
+ import type { RegistryStatsData } from './registry-types.js';
7
+ export interface RegistryStatsProps {
8
+ title: string;
9
+ showPublishers: boolean;
10
+ showDownloads: boolean;
11
+ /** Resolved by the server; never stored. */
12
+ data?: RegistryStatsData;
13
+ }
14
+ export declare const registryStatsComponent: ComponentConfig<RegistryStatsProps>;
15
+ export declare const registryStatsCss = "/* ---------- Registry: stats ---------- */\n\n.sw-reg-stats__title { margin-bottom: var(--sw-space-2); }\n.sw-reg-stats__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sw-space-2); list-style: none; margin: 0; padding: 0; }\n@media (min-width: 640px) { .sw-reg-stats__list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }\n@media (min-width: 900px) { .sw-reg-stats__list { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); } }\n.sw-reg-stat { display: grid; gap: 2px; padding: var(--sw-space-2) var(--sw-space-3); border: 1px solid var(--sw-color-border); border-radius: var(--sw-radius, 8px); background: var(--sw-color-surface); }\n.sw-reg-stat__value { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.2rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }\n.sw-reg-stat__label { font-size: 0.9rem; color: var(--sw-color-muted); font-weight: 600; }\n.sw-reg-stat__label a { color: inherit; text-decoration: none; }\n.sw-reg-stat__label a:hover { text-decoration: underline; }\n.sw-reg-stats__note { margin-top: var(--sw-space-1); font-size: 0.85rem; color: var(--sw-color-muted); }\n";
@@ -0,0 +1,42 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Placeholder, formatCount, formatDate } from './registry-shared.js';
3
+ const yesNo = [
4
+ { label: 'Yes', value: true },
5
+ { label: 'No', value: false },
6
+ ];
7
+ export const registryStatsComponent = {
8
+ label: 'Registry stats',
9
+ fields: {
10
+ title: { type: 'text', label: 'Title (optional)' },
11
+ showPublishers: { type: 'radio', label: 'Show publishers', options: yesNo },
12
+ showDownloads: { type: 'radio', label: 'Show downloads', options: yesNo },
13
+ },
14
+ defaultProps: { title: '', showPublishers: true, showDownloads: true },
15
+ render: ({ title, showPublishers, showDownloads, data }) => {
16
+ const figures = data
17
+ ? [
18
+ { label: 'Packages', value: data.packages, href: '/registry' },
19
+ { label: 'Modules', value: data.modules, href: '/registry?kind=module' },
20
+ { label: 'Themes', value: data.themes, href: '/registry?kind=theme' },
21
+ { label: 'Kits', value: data.kits, href: '/registry?kind=kit' },
22
+ ...(showPublishers !== false ? [{ label: 'Publishers', value: data.publishers }] : []),
23
+ ...(showDownloads !== false ? [{ label: 'Downloads', value: data.downloads }] : []),
24
+ ]
25
+ : [];
26
+ return (_jsx("section", { className: "sw-block sw-reg-stats", "aria-label": title || 'Registry statistics', children: _jsxs("div", { className: "sw-container", children: [title ? _jsx("h2", { className: "sw-reg-stats__title", children: title }) : null, !data ? (_jsx(Placeholder, { label: "Registry stats" })) : (_jsxs(_Fragment, { children: [_jsx("ul", { className: "sw-reg-stats__list", children: figures.map((f) => (_jsxs("li", { className: "sw-reg-stat", children: [_jsx("span", { className: "sw-reg-stat__value", children: formatCount(f.value) }), _jsx("span", { className: "sw-reg-stat__label", children: f.href ? _jsx("a", { href: f.href, children: f.label }) : f.label })] }, f.label))) }), data.updatedAt ? (_jsxs("p", { className: "sw-reg-stats__note", children: ["Last publish ", _jsx("time", { dateTime: data.updatedAt, children: formatDate(data.updatedAt) })] })) : null] }))] }) }));
27
+ },
28
+ };
29
+ export const registryStatsCss = `/* ---------- Registry: stats ---------- */
30
+
31
+ .sw-reg-stats__title { margin-bottom: var(--sw-space-2); }
32
+ .sw-reg-stats__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sw-space-2); list-style: none; margin: 0; padding: 0; }
33
+ @media (min-width: 640px) { .sw-reg-stats__list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
34
+ @media (min-width: 900px) { .sw-reg-stats__list { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); } }
35
+ .sw-reg-stat { display: grid; gap: 2px; padding: var(--sw-space-2) var(--sw-space-3); border: 1px solid var(--sw-color-border); border-radius: var(--sw-radius, 8px); background: var(--sw-color-surface); }
36
+ .sw-reg-stat__value { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.2rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
37
+ .sw-reg-stat__label { font-size: 0.9rem; color: var(--sw-color-muted); font-weight: 600; }
38
+ .sw-reg-stat__label a { color: inherit; text-decoration: none; }
39
+ .sw-reg-stat__label a:hover { text-decoration: underline; }
40
+ .sw-reg-stats__note { margin-top: var(--sw-space-1); font-size: 0.85rem; color: var(--sw-color-muted); }
41
+ `;
42
+ //# sourceMappingURL=registry-stats.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry-stats.js","sourceRoot":"","sources":["../src/registry-stats.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAU5E,MAAM,KAAK,GAAG;IACZ,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE;IAC7B,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;CACrB,CAAC;AAEX,MAAM,CAAC,MAAM,sBAAsB,GAAwC;IACzE,KAAK,EAAE,gBAAgB;IACvB,MAAM,EAAE;QACN,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,kBAAkB,EAAE;QAClD,cAAc,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,OAAO,EAAE,KAAK,EAAE;QAC3E,aAAa,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,KAAK,EAAE;KAC1E;IACD,YAAY,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IACtE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,IAAI,EAAE,EAAE,EAAE;QACzD,MAAM,OAAO,GAAsD,IAAI;YACrE,CAAC,CAAC;gBACE,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE;gBAC9D,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,uBAAuB,EAAE;gBACxE,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,CAA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AAK,CAGX,CACN,CAAC,GACC,EACJ,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAChB,aAAG,SAAS,EAAC,oBAAoB,8BAClB,eAAM,QAAQ,EAAE,IAAI,CAAC,SAAS,YAAG,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,GAAQ,IAC9E,CACL,CAAC,CAAC,CAAC,IAAI,IACP,CACJ,IACG,GACE,CACX,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;CAY/B,CAAC"}
@@ -0,0 +1,218 @@
1
+ /**
2
+ * What the registry blocks render. These are view models: the server's registry service
3
+ * (packages/core/src/registry) maps its records onto them in the block resolvers
4
+ * (packages/core/src/registry/blocks.ts), so the blocks never depend on storage details and the
5
+ * editor can show a placeholder without any of it.
6
+ */
7
+ export type RegistryKind = 'module' | 'theme' | 'kit' | 'brand';
8
+ export type RegistryKindFilter = RegistryKind | 'all';
9
+ export type RegistrySort = 'relevance' | 'downloads' | 'updated' | 'name';
10
+ export type RegistryTier = 'trusted' | 'sandboxed';
11
+ export type RegistryVersionStatus = 'listed' | 'pending' | 'rejected' | 'yanked';
12
+ export type RegistryAdvisorySeverity = 'low' | 'moderate' | 'high' | 'critical';
13
+ export interface RegistryCard {
14
+ name: string;
15
+ kind: RegistryKind;
16
+ tier?: RegistryTier | null;
17
+ description: string;
18
+ /** Human review passed (trusted modules); sandboxed extensions, themes and kits carry `checked` instead. */
19
+ reviewed: boolean;
20
+ /** Automated checks passed. */
21
+ checked: boolean;
22
+ /** The publisher is verified. */
23
+ verified: boolean;
24
+ deprecated: boolean;
25
+ downloads: number;
26
+ latest: string | null;
27
+ updatedAt: string | null;
28
+ publisher: {
29
+ handle: string;
30
+ name: string;
31
+ } | null;
32
+ /** The organization that owns the package's namespace: cards say "by <org>" and link its page. */
33
+ org?: {
34
+ handle: string;
35
+ name: string;
36
+ href: string;
37
+ } | null;
38
+ href: string;
39
+ }
40
+ export interface RegistryBrowseData {
41
+ /** The page path the search form posts to (GET). */
42
+ action: string;
43
+ state: {
44
+ q: string;
45
+ kind: RegistryKindFilter;
46
+ sort: RegistrySort;
47
+ };
48
+ kinds: {
49
+ key: RegistryKindFilter;
50
+ label: string;
51
+ href: string;
52
+ count?: number;
53
+ }[];
54
+ sorts: {
55
+ key: RegistrySort;
56
+ label: string;
57
+ }[];
58
+ items: RegistryCard[];
59
+ total: number;
60
+ page: number;
61
+ pages: number;
62
+ prevHref?: string;
63
+ nextHref?: string;
64
+ pageHrefs: {
65
+ page: number;
66
+ href: string;
67
+ }[];
68
+ }
69
+ export interface RegistryCapabilityRow {
70
+ key: string;
71
+ /** One sentence on what the capability lets the module do. */
72
+ explanation: string;
73
+ /** Capabilities that reach outside the instance (http hosts, entity writes) are called out. */
74
+ sensitive: boolean;
75
+ }
76
+ export interface RegistryVersionRow {
77
+ version: string;
78
+ publishedAt: string;
79
+ size: number | null;
80
+ status: RegistryVersionStatus;
81
+ sha256?: string | null;
82
+ note?: string | null;
83
+ /** Compatible core range for this version. */
84
+ spillway?: string | null;
85
+ }
86
+ export interface RegistryAdvisoryRow {
87
+ id: string;
88
+ severity: RegistryAdvisorySeverity;
89
+ title: string;
90
+ /** Affected version range, e.g. "<1.2.0". */
91
+ affected: string;
92
+ fixedIn?: string | null;
93
+ url?: string | null;
94
+ publishedAt: string;
95
+ }
96
+ export interface RegistryPackageData {
97
+ name: string;
98
+ kind: RegistryKind;
99
+ tier?: RegistryTier | null;
100
+ description: string;
101
+ reviewed: boolean;
102
+ checked: boolean;
103
+ /** True while a trusted module waits for human review: shown with a warning. */
104
+ pendingReview: boolean;
105
+ deprecated: {
106
+ reason: string;
107
+ since?: string | null;
108
+ } | null;
109
+ publisher: {
110
+ handle: string;
111
+ name: string;
112
+ verified: boolean;
113
+ href: string;
114
+ } | null;
115
+ /** The organization that owns the package's namespace, when one does. */
116
+ org?: {
117
+ handle: string;
118
+ name: string;
119
+ verified: boolean;
120
+ href: string;
121
+ } | null;
122
+ namespace?: string | null;
123
+ homepage?: string | null;
124
+ repository?: string | null;
125
+ license?: string | null;
126
+ installCommand: string;
127
+ downloads: number;
128
+ latest: string | null;
129
+ /** Semver range of core the latest version supports. */
130
+ compatibility?: string | null;
131
+ capabilities: RegistryCapabilityRow[];
132
+ versions: RegistryVersionRow[];
133
+ advisories: RegistryAdvisoryRow[];
134
+ /** Pre-rendered, sanitised HTML (see markdown.ts). */
135
+ readmeHtml: string | null;
136
+ changelogHtml: string | null;
137
+ /** The agent-readable manifest for this package. */
138
+ manifestUrl: string;
139
+ /** The signed index entry for this package, if the registry exposes one. */
140
+ indexUrl?: string | null;
141
+ screenshots?: {
142
+ url: string;
143
+ alt: string;
144
+ }[];
145
+ previewHref?: string | null;
146
+ updatedAt: string | null;
147
+ createdAt: string | null;
148
+ keywords?: string[];
149
+ }
150
+ export interface RegistryStatsData {
151
+ packages: number;
152
+ modules: number;
153
+ themes: number;
154
+ kits: number;
155
+ publishers: number;
156
+ downloads: number;
157
+ versions?: number;
158
+ updatedAt?: string | null;
159
+ }
160
+ export interface ThemeGalleryItem {
161
+ name: string;
162
+ title: string;
163
+ description: string;
164
+ screenshots: {
165
+ url: string;
166
+ alt: string;
167
+ }[];
168
+ previewHref: string;
169
+ packageHref: string;
170
+ publisher: {
171
+ handle: string;
172
+ name: string;
173
+ } | null;
174
+ verified: boolean;
175
+ downloads: number;
176
+ latest: string | null;
177
+ }
178
+ export interface ThemeGalleryData {
179
+ items: ThemeGalleryItem[];
180
+ total: number;
181
+ browseHref: string;
182
+ }
183
+ export interface PublisherProfileData {
184
+ handle: string;
185
+ name: string;
186
+ verified: boolean;
187
+ bio?: string | null;
188
+ website?: string | null;
189
+ /** Organisation publishers list their maintainers by handle. */
190
+ maintainers?: {
191
+ handle: string;
192
+ name: string;
193
+ }[];
194
+ memberSince: string | null;
195
+ packages: RegistryCard[];
196
+ downloads: number;
197
+ }
198
+ export interface OrgProfileData {
199
+ handle: string;
200
+ name: string;
201
+ verified: boolean;
202
+ website?: string | null;
203
+ avatarUrl?: string | null;
204
+ members: {
205
+ handle: string;
206
+ name: string;
207
+ role: 'owner' | 'admin' | 'member';
208
+ href: string;
209
+ }[];
210
+ namespaces: string[];
211
+ memberSince: string | null;
212
+ packages: RegistryCard[];
213
+ downloads: number;
214
+ }
215
+ /** Which "kind" labels the public pages use. */
216
+ export declare const REGISTRY_KIND_LABELS: Record<RegistryKind, string>;
217
+ /** One line per capability, for the capability sheet on a module page. */
218
+ export declare function explainCapability(key: string): RegistryCapabilityRow;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * What the registry blocks render. These are view models: the server's registry service
3
+ * (packages/core/src/registry) maps its records onto them in the block resolvers
4
+ * (packages/core/src/registry/blocks.ts), so the blocks never depend on storage details and the
5
+ * editor can show a placeholder without any of it.
6
+ */
7
+ /** Which "kind" labels the public pages use. */
8
+ export const REGISTRY_KIND_LABELS = { module: 'Module', theme: 'Theme', kit: 'Kit', brand: 'Brand' };
9
+ /** One line per capability, for the capability sheet on a module page. */
10
+ export function explainCapability(key) {
11
+ if (key.startsWith('http:')) {
12
+ const host = key.slice(5);
13
+ return { key, explanation: `May make outbound HTTP requests to ${host} (and nowhere else). Private and local addresses are refused by the host.`, sensitive: true };
14
+ }
15
+ const known = {
16
+ hooks: ['Runs code when content is saved, published, a form is submitted or a page is about to render.', false],
17
+ blocks: ['Adds blocks to the page builder.', false],
18
+ fields: ['Adds field types to content types.', false],
19
+ admin: ['Adds pages to the admin.', false],
20
+ 'ai.tools': ['Exposes tools to the AI assistant and MCP clients.', false],
21
+ 'entity.read': ['Reads content (entities) on the instance.', false],
22
+ 'entity.write': ['Writes content on the instance (reserved; not granted by current hosts).', true],
23
+ 'site.read': ['Reads site settings (name, locales, theme).', false],
24
+ 'media.read': ['Reads media items and their URLs.', false],
25
+ };
26
+ const row = known[key];
27
+ return row ? { key, explanation: row[0], sensitive: row[1] } : { key, explanation: 'An unknown capability; the host refuses to load modules that declare one.', sensitive: true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AAC,CAAC,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,2EAA2E,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;AACpL,CAAC"}
@@ -0,0 +1,37 @@
1
+ type Attrs = Record<string, string>;
2
+ /** The attributes of an iframe worth keeping, or null when it may not be framed. */
3
+ export declare function embedIframeAttrs(attrs: Attrs, hosts?: readonly string[]): Attrs | null;
4
+ export interface SanitizeOptions {
5
+ /** Keep <iframe> elements whose https src is on one of these hosts; without it every iframe is dropped. */
6
+ iframeHosts?: readonly string[];
7
+ }
8
+ /** Conservative allow-list sanitiser; see the file comment. Returns balanced markup. */
9
+ export declare function sanitizeHtml(input: string, opts?: SanitizeOptions): string;
10
+ /** Text block, HTML mode: formatting only, never an iframe. */
11
+ /**
12
+ * Plain text as the HTML of its paragraphs: a blank line starts a paragraph, a single line break stays a line break, and
13
+ * the text is escaped. The Text block's Paragraphs format renders the same, and the builder converts it with this; a rich
14
+ * text field holding plain text (its type changed from plain text) renders through it too.
15
+ */
16
+ export declare function paragraphsToHtml(text: unknown): string;
17
+ /** Whether a string has no tags: plain text, not HTML. */
18
+ export declare function isPlainText(text: string): boolean;
19
+ export declare function sanitizeTextHtml(html: unknown): string;
20
+ /** Embed block: formatting plus sandboxed iframes to the allowed hosts (the site's list when the server resolved it, else the default). */
21
+ export declare function sanitizeEmbedHtml(html: unknown, hosts?: readonly string[]): string;
22
+ /**
23
+ * Holds the iframes of sanitized embed HTML until the visitor consents: each `src` becomes `data-sw-consent-src`, which the
24
+ * consent banner's script turns back once marketing and embedded content is allowed (or the visitor loads that one embed).
25
+ * The input must come from sanitizeEmbedHtml, which always writes `src` first. Returns the sources, for the notice's link.
26
+ */
27
+ export declare function holdEmbedHtml(clean: string): {
28
+ html: string;
29
+ sources: string[];
30
+ };
31
+ /**
32
+ * Gives code samples and tables in sanitized prose a tab stop (`tabindex="0"`), so keyboard users can scroll them when they
33
+ * are wider than the screen (WCAG 2.1.1; prose tables scroll on their own on a phone). Applied when prose is rendered, after
34
+ * sanitizing; an element that already has a tabindex is left alone.
35
+ */
36
+ export declare function keyboardScrollable(html: string): string;
37
+ export {};