@sankhyatronics/sankhya-cms 0.1.7 → 0.1.9
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/LICENSE +21 -21
- package/README.md +34 -34
- package/custom-elements.json +717 -643
- package/dist/bento-grid/index.js +3 -3
- package/dist/card/index.js +2 -2
- package/dist/carousel/index.js +3 -3
- package/dist/{chunk-3JU3R22O.js → chunk-5EBWMPJS.js} +2 -2
- package/dist/chunk-5EBWMPJS.js.map +1 -0
- package/dist/{chunk-2JGWWXEI.js → chunk-76AVBQUA.js} +3 -3
- package/dist/chunk-76AVBQUA.js.map +1 -0
- package/dist/{chunk-NN3OCPDV.js → chunk-7NLZND6Q.js} +3 -3
- package/dist/{chunk-EMVHNAID.js → chunk-ALI26WOB.js} +3 -3
- package/dist/chunk-ALI26WOB.js.map +1 -0
- package/dist/{chunk-TLHG33MM.js → chunk-BLQV2YMO.js} +3 -3
- package/dist/chunk-BLQV2YMO.js.map +1 -0
- package/dist/{chunk-UVNBZD7R.js → chunk-BMHMNXIA.js} +3 -3
- package/dist/chunk-BMHMNXIA.js.map +1 -0
- package/dist/{chunk-ZRXYWH6C.js → chunk-DH53HZPB.js} +4 -4
- package/dist/{chunk-HPIQSECE.js → chunk-EMCQBT3S.js} +3 -3
- package/dist/{chunk-BQTDFQ4V.js → chunk-FLY7TNRT.js} +3 -3
- package/dist/chunk-FLY7TNRT.js.map +1 -0
- package/dist/{chunk-3VE6VFJ4.js → chunk-FZ36KL73.js} +1 -1
- package/dist/chunk-FZ36KL73.js.map +1 -0
- package/dist/{chunk-HGTC3LCW.js → chunk-G3CF7MBO.js} +3 -3
- package/dist/{chunk-CDC4P77V.js → chunk-GJO3RGOB.js} +2 -2
- package/dist/chunk-GJO3RGOB.js.map +1 -0
- package/dist/{chunk-K4ZICRZL.js → chunk-JKBWZLG4.js} +3 -3
- package/dist/chunk-JKBWZLG4.js.map +1 -0
- package/dist/{chunk-4HKSA5UT.js → chunk-JQY2G4QK.js} +2 -2
- package/dist/chunk-JQY2G4QK.js.map +1 -0
- package/dist/{chunk-RHAOQ6K4.js → chunk-KMU6ABQF.js} +1 -1
- package/dist/chunk-KMU6ABQF.js.map +1 -0
- package/dist/{chunk-IQPW3CYZ.js → chunk-LEXZKGQX.js} +3 -3
- package/dist/chunk-LEXZKGQX.js.map +1 -0
- package/dist/{chunk-MW43OS47.js → chunk-MSSH3HFK.js} +2 -2
- package/dist/chunk-MSSH3HFK.js.map +1 -0
- package/dist/{chunk-DQHMJZ6X.js → chunk-R5G6KFTJ.js} +18 -8
- package/dist/chunk-R5G6KFTJ.js.map +1 -0
- package/dist/{chunk-VYON56QO.js → chunk-SMLR736E.js} +2 -2
- package/dist/chunk-SMLR736E.js.map +1 -0
- package/dist/{chunk-HGJT24UG.js → chunk-VWS53WY4.js} +3 -3
- package/dist/chunk-VWS53WY4.js.map +1 -0
- package/dist/{chunk-VRRBMOUP.js → chunk-WT4OATGP.js} +3 -3
- package/dist/chunk-WT4OATGP.js.map +1 -0
- package/dist/{chunk-PB7ZPPLP.js → chunk-WTD2YIAA.js} +1 -1
- package/dist/chunk-WTD2YIAA.js.map +1 -0
- package/dist/{chunk-5KHI36M5.js → chunk-XWB4CKDU.js} +44 -4
- package/dist/chunk-XWB4CKDU.js.map +1 -0
- package/dist/{chunk-XXPBFHWR.js → chunk-YQ42EBK5.js} +2 -2
- package/dist/chunk-YQ42EBK5.js.map +1 -0
- package/dist/{chunk-6H262SG6.js → chunk-YVTFQHVY.js} +2 -2
- package/dist/chunk-YVTFQHVY.js.map +1 -0
- package/dist/{chunk-7PSYCTEN.js → chunk-ZN4LIKVG.js} +2 -2
- package/dist/chunk-ZN4LIKVG.js.map +1 -0
- package/dist/cms-theme.css +26 -26
- package/dist/content-block/index.js +4 -4
- package/dist/cookie-consent/index.js +2 -2
- package/dist/dropdown/index.js +3 -3
- package/dist/feature-split/index.js +4 -4
- package/dist/features-section/index.js +5 -5
- package/dist/footer/index.js +2 -2
- package/dist/header/index.d.ts +13 -0
- package/dist/header/index.js +3 -3
- package/dist/hero/index.js +3 -3
- package/dist/icon-button/index.js +2 -2
- package/dist/index.js +35 -35
- package/dist/items-accordion/index.js +3 -3
- package/dist/markdown/index.js +2 -2
- package/dist/mega-menu/index.js +3 -3
- package/dist/menu-grid/index.js +2 -2
- package/dist/menu-grid-item/index.js +2 -2
- package/dist/menu-item/index.d.ts +5 -0
- package/dist/menu-item/index.js +3 -3
- package/dist/promo-banner/index.js +3 -3
- package/dist/schema/index.js.map +1 -1
- package/dist/section/index.js +3 -3
- package/dist/select/index.js +3 -3
- package/dist/shared/icons.js +1 -1
- package/dist/shared/styles.js +1 -1
- package/dist/stats/index.js +2 -2
- package/dist/testimonials/index.js +4 -4
- package/dist/theme.css +291 -291
- package/dist/themes.css +64 -64
- package/dist/theming/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-2JGWWXEI.js.map +0 -1
- package/dist/chunk-3JU3R22O.js.map +0 -1
- package/dist/chunk-3VE6VFJ4.js.map +0 -1
- package/dist/chunk-4HKSA5UT.js.map +0 -1
- package/dist/chunk-5KHI36M5.js.map +0 -1
- package/dist/chunk-6H262SG6.js.map +0 -1
- package/dist/chunk-7PSYCTEN.js.map +0 -1
- package/dist/chunk-BQTDFQ4V.js.map +0 -1
- package/dist/chunk-CDC4P77V.js.map +0 -1
- package/dist/chunk-DQHMJZ6X.js.map +0 -1
- package/dist/chunk-EMVHNAID.js.map +0 -1
- package/dist/chunk-HGJT24UG.js.map +0 -1
- package/dist/chunk-IQPW3CYZ.js.map +0 -1
- package/dist/chunk-K4ZICRZL.js.map +0 -1
- package/dist/chunk-MW43OS47.js.map +0 -1
- package/dist/chunk-PB7ZPPLP.js.map +0 -1
- package/dist/chunk-RHAOQ6K4.js.map +0 -1
- package/dist/chunk-TLHG33MM.js.map +0 -1
- package/dist/chunk-UVNBZD7R.js.map +0 -1
- package/dist/chunk-VRRBMOUP.js.map +0 -1
- package/dist/chunk-VYON56QO.js.map +0 -1
- package/dist/chunk-XXPBFHWR.js.map +0 -1
- /package/dist/{chunk-NN3OCPDV.js.map → chunk-7NLZND6Q.js.map} +0 -0
- /package/dist/{chunk-ZRXYWH6C.js.map → chunk-DH53HZPB.js.map} +0 -0
- /package/dist/{chunk-HPIQSECE.js.map → chunk-EMCQBT3S.js.map} +0 -0
- /package/dist/{chunk-HGTC3LCW.js.map → chunk-G3CF7MBO.js.map} +0 -0
package/dist/schema/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/schema/node.ts","../../src/schema/nodeUtils.ts","../../src/schema/components.ts","../../src/schema/validate.ts"],"sourcesContent":["/** Dependency-free node types, safe to import from the content API layer. */\
|
|
1
|
+
{"version":3,"sources":["../../src/schema/node.ts","../../src/schema/nodeUtils.ts","../../src/schema/components.ts","../../src/schema/validate.ts"],"sourcesContent":["/** Dependency-free node types, safe to import from the content API layer. */\n\n/** Action reference in JSON, resolved against the `handlers` prop of `DynamicRenderer`. */\nexport type ActionRef = `@action:${string}`;\n\n/** Keys the renderer owns; everything else on a node is passed to the component as a prop. */\nexport interface NodeEnvelope<TNode> {\n id?: string;\n /** Named slot in the parent (e.g. Header: \"utility\"). Omit for the default slot. */\n slot?: string;\n /** Editor-only label, never passed to the component. */\n label?: string;\n children?: TNode[];\n}\n\n/**\n * A node as it appears in JSON: flat, no `data` wrapper.\n * `{ \"type\": \"Hero\", \"id\": \"home-hero\", \"title\": \"...\", \"children\": [...] }`\n */\nexport interface ComponentNode extends NodeEnvelope<ComponentNode> {\n type: string;\n [prop: string]: unknown;\n}\n\n/** A page is a list of nodes. */\nexport type PageContent = ComponentNode[];\n\nexport function isComponentNode(value: unknown): value is ComponentNode {\n return (\n typeof value === 'object' &&\n value !== null &&\n !Array.isArray(value) &&\n typeof (value as { type?: unknown }).type === 'string' &&\n (value as { type: string }).type.trim().length > 0\n );\n}\n","import type { ComponentNode } from './node';\n\n/**\n * Returns a copy of `nodes` where the node with the given `id` has `props` merged in.\n * Use it to inject runtime state (e.g. the selected language) into fetched JSON without mutating it.\n */\nexport function patchNodeById(nodes: ComponentNode[], id: string, props: Record<string, unknown>): ComponentNode[] {\n return nodes.map(node => {\n const patched = node.id === id ? { ...node, ...props } : node;\n return patched.children\n ? { ...patched, children: patchNodeById(patched.children, id, props) }\n : patched;\n });\n}\n","/**\n * The JSON `type` of every base component, and the Lit element that renders it.\n * This is the contract page JSON is written against — renderers (React, or any other binding)\n * map each `type` to their own component for that element.\n */\nexport const componentTags = {\n BentoGrid: 'st-bento-grid',\n Card: 'st-card',\n Carousel: 'st-carousel',\n ContentBlock: 'st-content-block',\n CookieConsent: 'st-cookie-consent',\n Dropdown: 'st-dropdown',\n FeatureItem: 'st-feature-item',\n FeatureSplit: 'st-feature-split',\n FeaturesSection: 'st-features-section',\n Footer: 'st-footer',\n Header: 'st-header',\n Hero: 'st-hero',\n IconButton: 'st-icon-button',\n ItemsAccordion: 'st-items-accordion',\n MegaMenu: 'st-mega-menu',\n MegaMenuColumn: 'st-mega-menu-column',\n MegaMenuFeature: 'st-mega-menu-feature',\n MenuGrid: 'st-menu-grid',\n MenuGridItem: 'st-menu-grid-item',\n MenuItem: 'st-menu-item',\n PromoBanner: 'st-promo-banner',\n Section: 'st-section',\n Select: 'st-select',\n Stats: 'st-stats',\n Testimonials: 'st-testimonials'\n} as const;\n\n/** Every `type` the base set knows. */\nexport type ComponentType = keyof typeof componentTags;\n\nexport function isBaseComponentType(type: string): type is ComponentType {\n return Object.hasOwn(componentTags, type);\n}\n","import { isBaseComponentType } from './components';\nimport type { ComponentNode } from './node';\n\n/** Keys from the pre-flat schema; their presence means the JSON still needs `scripts/migrate-json.mjs`. */\nconst LEGACY_KEYS = ['data', 'embeddedView', 'data-position', 'image', 'contentUrl'] as const;\n\n/**\n * Returns the schema violations for a node and its descendants (empty when valid).\n * `isKnownType` defaults to the base component set; pass a wider predicate when a renderer also\n * registers custom components.\n */\nexport function validateNode(node: unknown, where = 'node', isKnownType: (type: string) => boolean = isBaseComponentType): string[] {\n if (typeof node !== 'object' || node === null || Array.isArray(node)) return [`${where}: node must be an object`];\n const n = node as ComponentNode;\n const found: string[] = [];\n if (typeof n.type !== 'string' || !isKnownType(n.type)) found.push(`${where}: unknown type \"${String(n.type)}\"`);\n for (const legacy of LEGACY_KEYS) {\n if (legacy in n) found.push(`${where}: legacy key \"${legacy}\"`);\n }\n if (Array.isArray(n.items) && n.items.some(item => typeof item === 'object' && item !== null && 'type' in item)) {\n found.push(`${where}: \"items\" must hold plain data; nest components under \"children\"`);\n }\n if (n.children !== undefined) {\n if (!Array.isArray(n.children)) found.push(`${where}: children must be an array`);\n else n.children.forEach((child, i) => found.push(...validateNode(child, `${where}.children[${i}]`, isKnownType)));\n }\n return found;\n}\n\n/** Validates a page: a node or a list of nodes. */\nexport function validatePage(page: unknown, isKnownType?: (type: string) => boolean): string[] {\n const nodes = Array.isArray(page) ? page : [page];\n return nodes.flatMap((node, i) => validateNode(node, `[${i}]`, isKnownType));\n}\n"],"mappings":";;;AA2BO,SAAS,gBAAgB,OAAwC;AACpE,SACI,OAAO,UAAU,YACjB,UAAU,QACV,CAAC,MAAM,QAAQ,KAAK,KACpB,OAAQ,MAA6B,SAAS,YAC7C,MAA2B,KAAK,KAAK,EAAE,SAAS;AAEzD;;;AC7BO,SAAS,cAAc,OAAwB,IAAY,OAAiD;AAC/G,SAAO,MAAM,IAAI,UAAQ;AACrB,UAAM,UAAU,KAAK,OAAO,KAAK,EAAE,GAAG,MAAM,GAAG,MAAM,IAAI;AACzD,WAAO,QAAQ,WACT,EAAE,GAAG,SAAS,UAAU,cAAc,QAAQ,UAAU,IAAI,KAAK,EAAE,IACnE;AAAA,EACV,CAAC;AACL;;;ACRO,IAAM,gBAAgB;AAAA,EACzB,WAAW;AAAA,EACX,MAAM;AAAA,EACN,UAAU;AAAA,EACV,cAAc;AAAA,EACd,eAAe;AAAA,EACf,UAAU;AAAA,EACV,aAAa;AAAA,EAC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GAAG,aAAa,OAAO,GAAG,KAAK,aAAa,CAAC,KAAK,WAAW,CAAC,CAAC;AAAA,EACpH;AACA,SAAO;AACX;AAGO,SAAS,aAAa,MAAe,aAAmD;AAC3F,QAAM,QAAQ,MAAM,QAAQ,IAAI,IAAI,OAAO,CAAC,IAAI;AAChD,SAAO,MAAM,QAAQ,CAAC,MAAM,MAAM,aAAa,MAAM,IAAI,CAAC,KAAK,WAAW,CAAC;AAC/E;","names":[]}
|
package/dist/section/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Section
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-7NLZND6Q.js";
|
|
4
|
+
import "../chunk-FZ36KL73.js";
|
|
5
|
+
import "../chunk-KMU6ABQF.js";
|
|
6
6
|
import "../chunk-EUXUH3YW.js";
|
|
7
7
|
export {
|
|
8
8
|
Section
|
package/dist/select/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Select
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-BLQV2YMO.js";
|
|
4
|
+
import "../chunk-WTD2YIAA.js";
|
|
5
|
+
import "../chunk-KMU6ABQF.js";
|
|
6
6
|
import "../chunk-EUXUH3YW.js";
|
|
7
7
|
export {
|
|
8
8
|
Select
|
package/dist/shared/icons.js
CHANGED
package/dist/shared/styles.js
CHANGED
package/dist/stats/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Testimonials
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-DH53HZPB.js";
|
|
4
|
+
import "../chunk-WTD2YIAA.js";
|
|
5
|
+
import "../chunk-FZ36KL73.js";
|
|
6
|
+
import "../chunk-KMU6ABQF.js";
|
|
7
7
|
import "../chunk-EUXUH3YW.js";
|
|
8
8
|
export {
|
|
9
9
|
Testimonials
|