@krizaka/ui 3.71.0 → 3.72.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/dist/blocks.css +26 -0
- package/dist/chunk-M3T5RQYV.js +34 -0
- package/dist/chunk-M3T5RQYV.js.map +1 -0
- package/dist/chunk-ZFR6ZNXD.js +203 -0
- package/dist/chunk-ZFR6ZNXD.js.map +1 -0
- package/dist/{frame-D6Xv83t8.d.ts → frame-CNZ5VgDD.d.ts} +11 -4
- package/dist/schema-DgjBz7-8.d.ts +242 -0
- package/dist/shop/booking.d.ts +2 -2
- package/dist/shop/booking.js +1 -1
- package/dist/shop/booking.js.map +1 -1
- package/dist/shop/bulletin.js +1 -1
- package/dist/shop/faq.d.ts +2 -1
- package/dist/shop/faq.js +1 -1
- package/dist/shop/faq.js.map +1 -1
- package/dist/shop/gallery.js +1 -1
- package/dist/shop/look.d.ts +43 -0
- package/dist/shop/look.js +52 -0
- package/dist/shop/look.js.map +1 -0
- package/dist/shop/policies.d.ts +2 -1
- package/dist/shop/policies.js +1 -1
- package/dist/shop/policies.js.map +1 -1
- package/dist/shop/reviews.d.ts +2 -1
- package/dist/shop/reviews.js +1 -1
- package/dist/shop/reviews.js.map +1 -1
- package/dist/shop/services.js +1 -1
- package/dist/shop/social.js +1 -1
- package/dist/shop/story.d.ts +2 -1
- package/dist/shop/story.js +1 -1
- package/dist/shop/story.js.map +1 -1
- package/dist/shop/team.js +1 -1
- package/dist/shop/video.js +1 -1
- package/dist/shop/visit.js +1 -1
- package/dist/shop-composer.d.ts +29 -0
- package/dist/shop-composer.js +156 -89
- package/dist/shop-composer.js.map +1 -1
- package/dist/shop.d.ts +6 -240
- package/dist/shop.js +24 -212
- package/dist/shop.js.map +1 -1
- package/package.json +25 -6
- package/registry/app-frame.json +1 -1
- package/registry/elephant.json +1 -1
- package/registry/index.json +9 -8
- package/registry/map.json +1 -1
- package/registry/nav-bar.json +1 -1
- package/registry/rail-nav.json +1 -1
- package/registry/shop-composer.json +9 -5
- package/registry/shop.json +50 -9
- package/registry/site-footer.json +1 -1
- package/dist/chunk-A7MQPIEG.js +0 -31
- package/dist/chunk-A7MQPIEG.js.map +0 -1
package/dist/shop.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/shop/catalogue.ts","../src/shop/define.ts","../src/shop/text.ts","../src/shop/schema.ts","../src/shop/migrate.ts","../src/shop/preview.ts","../src/shop/starters.ts"],"sourcesContent":["// The catalogue of section types (ADR-007 §3): each with its variants, its settings and the blocks it allows, as zod\n// schemas — the renderer, the validator and the composer's forms read the same definitions. The first variant of a type is\n// its default. Settings hold references and rules (ids, a source, a count), never a price or a text of the shop.\nimport * as z from \"zod/mini\";\n\nimport { defineSection } from \"./define\";\nimport { SHOP_LIMITS } from \"./limits\";\nimport { localizedText } from \"./text\";\n\n/** A reference to something the product holds (a service, a photo, a member): an opaque id. */\nconst ref = z.string().check(z.minLength(1), z.maxLength(80));\nconst short = z.string().check(z.minLength(1), z.maxLength(140));\nconst url = z.string().check(z.maxLength(300), z.regex(/^https:\\/\\//, \"an https address\"));\nconst isoDay = z.string().check(z.regex(/^\\d{4}-\\d{2}-\\d{2}$/, \"a day (YYYY-MM-DD)\"));\nconst source = z.enum([\"all\", \"pick\"]);\n/** One of a few numbers. */\nconst oneOf = <const N extends readonly [number, number, ...number[]]>(...n: N) => z.union(n.map((v) => z.literal(v)) as unknown as [z.ZodMiniLiteral<N[number]>, z.ZodMiniLiteral<N[number]>]);\n\nexport const platforms = [\"tiktok\", \"youtube-shorts\", \"instagram\"] as const;\n\nexport const heroSection = defineSection({\n type: \"hero\",\n variants: [\"poster\", \"split\", \"banner\", \"tv\"],\n settings: z.object({\n /** The cover: a media id. Absent, the product's default for the trade. */\n media: z.optional(ref),\n /** Where the photo is cropped to when the box is not its ratio. */\n focus: z.enum([\"center\", \"top\", \"bottom\"]),\n }),\n settingsDefault: { focus: \"center\" },\n blocks: { fact: z.object({ kind: z.enum([\"open-now\", \"area\", \"score\"]) }) },\n});\n\nexport const servicesSection = defineSection({\n type: \"services\",\n variants: [\"menu\", \"cards\", \"index\", \"carousel\"],\n settings: z.object({\n /** `all` the shop's services, or `pick` the ones the `service` blocks name, in their order. */\n source,\n groupBy: z.enum([\"category\", \"none\"]),\n /** `menu` only: two columns when nothing sits beside it. */\n columns: oneOf(1, 2),\n /** `menu` only: the shop's hours, team and address beside the list (the host draws them from its own data). */\n aside: z.enum([\"hours\", \"none\"]),\n }),\n settingsDefault: { source: \"all\", groupBy: \"category\", columns: 1, aside: \"hours\" },\n blocks: { service: z.object({ serviceId: ref }) },\n refine: (section, issue) => {\n if (section.settings.source === \"pick\" && (section.blocks ?? []).length === 0) issue([\"blocks\"], \"pick at least one service\");\n if (section.variant === \"cards\" && (section.blocks ?? []).length > SHOP_LIMITS.cards) issue([\"blocks\"], `at most ${SHOP_LIMITS.cards} cards`);\n },\n});\n\nexport const bookingSection = defineSection({\n type: \"booking\",\n variants: [\"strip\", \"panel\", \"closing\", \"sticky\"],\n settings: z.object({\n /** A service the times are for; absent, the next free times of any service. */\n serviceId: z.optional(ref),\n /** `strip`: how many times it shows. */\n count: oneOf(3, 4, 6),\n }),\n settingsDefault: { count: 4 },\n});\n\nexport const gallerySection = defineSection({\n type: \"gallery\",\n variants: [\"mosaic\", \"filmstrip\", \"wall\", \"grid\"],\n settings: z.object({\n source,\n /** `wall` only. */\n texture: z.enum([\"plaster\", \"brick\", \"ridge\", \"zellige\"]),\n }),\n settingsDefault: { source: \"all\", texture: \"plaster\" },\n blocks: {\n photo: z.object({ mediaId: ref, caption: z.optional(short) }),\n note: z.object({ text: short, signature: z.optional(z.string().check(z.maxLength(40))) }),\n sign: z.object({}),\n },\n refine: (section, issue) => {\n const photos = (section.blocks ?? []).filter((b) => b.type === \"photo\").length;\n if (photos > SHOP_LIMITS.photos) issue([\"blocks\"], `at most ${SHOP_LIMITS.photos} photos`);\n },\n});\n\nexport const videoSection = defineSection({\n type: \"video\",\n variants: [\"tv\", \"shorts\"],\n settings: z.object({ cabinet: z.enum([\"cabinet\", \"portable\"]), channel: z.optional(z.string().check(z.maxLength(32))) }),\n settingsDefault: { cabinet: \"cabinet\" },\n blocks: { reel: z.object({ platform: z.enum(platforms), url }) },\n});\n\nexport const reviewsSection = defineSection({\n type: \"reviews\",\n variants: [\"summary-cards\", \"quote\", \"strip\"],\n settings: z.object({ rule: z.enum([\"best\", \"latest\"]), count: oneOf(1, 2, 3) }),\n settingsDefault: { rule: \"best\", count: 2 },\n});\n\nexport const bulletinSection = defineSection({\n type: \"bulletin\",\n variants: [\"board\", \"banner\"],\n settings: z.object({}),\n settingsDefault: {},\n blocks: { flyer: z.object({ text: short, signature: z.optional(z.string().check(z.maxLength(40))), until: z.optional(isoDay) }) },\n refine: (section, issue) => {\n if ((section.blocks ?? []).length > SHOP_LIMITS.flyers) issue([\"blocks\"], `at most ${SHOP_LIMITS.flyers} flyers`);\n },\n});\n\nexport const teamSection = defineSection({\n type: \"team\",\n variants: [\"row\", \"cards\"],\n settings: z.object({ source }),\n settingsDefault: { source: \"all\" },\n blocks: { member: z.object({ memberId: ref }) },\n});\n\nexport const visitSection = defineSection({\n type: \"visit\",\n variants: [\"card\", \"map\", \"split\"],\n settings: z.object({ showPhone: z.boolean() }),\n settingsDefault: { showPhone: true },\n});\n\nexport const storySection = defineSection({\n type: \"story\",\n variants: [\"quote\", \"owner\"],\n settings: z.object({ body: localizedText }),\n settingsDefault: { body: {} },\n});\n\nexport const socialSection = defineSection({\n type: \"social\",\n variants: [\"links\", \"facade\"],\n settings: z.object({}),\n settingsDefault: {},\n blocks: { link: z.object({ platform: z.enum(platforms), url }) },\n});\n\nexport const faqSection = defineSection({\n type: \"faq\",\n variants: [\"list\"],\n settings: z.object({}),\n settingsDefault: {},\n blocks: { question: z.object({ question: localizedText, answer: localizedText }) },\n});\n\nexport const policiesSection = defineSection({\n type: \"policies\",\n variants: [\"inline\"],\n settings: z.object({ show: z.array(z.enum([\"cancellation\", \"prices\", \"booking-window\"])).check(z.maxLength(3)) }),\n settingsDefault: { show: [\"cancellation\", \"prices\", \"booking-window\"] },\n});\n\n/** Every section type, in the order the composer lists them. */\nexport const SECTION_DEFINITIONS = [\n heroSection, servicesSection, bookingSection, gallerySection, videoSection, reviewsSection, bulletinSection,\n teamSection, visitSection, storySection, socialSection, faqSection, policiesSection,\n] as const;\n\nexport type SectionDefinition = (typeof SECTION_DEFINITIONS)[number];\nexport type SectionType = SectionDefinition[\"type\"];\nexport const SECTION_TYPES = SECTION_DEFINITIONS.map((d) => d.type) as readonly SectionType[];\n\n/** The definition of a type. */\nexport function sectionDefinition<T extends SectionType>(type: T): Extract<SectionDefinition, { type: T }> {\n return SECTION_DEFINITIONS.find((d) => d.type === type) as Extract<SectionDefinition, { type: T }>;\n}\n","// `defineSection` (ADR-007 §1): one section type = its variants, the zod schema of its settings, the blocks it allows\n// (each a zod schema) and the checks that need the whole section. It builds the zod schema of a section of this type, so\n// the renderer, the validator and the composer's generated forms agree.\nimport * as z from \"zod/mini\";\n\nimport { SHOP_LIMITS } from \"./limits\";\nimport { localizedText } from \"./text\";\n\ntype Shape = z.ZodMiniObject;\ntype BlockShapes = Record<string, Shape>;\n\n/** What a section of a type is, once parsed. */\nexport type ParsedSection<T extends string, V extends string, S extends Shape, B extends BlockShapes> = {\n key: string;\n type: T;\n variant: V;\n disabled?: boolean | undefined;\n settings: z.output<S>;\n text?: { title?: z.output<typeof localizedText> | undefined; lead?: z.output<typeof localizedText> | undefined } | undefined;\n blocks?: { [K in keyof B & string]: { key: string; type: K; settings: z.output<B[K]>; text?: Record<string, z.output<typeof localizedText>> | undefined } }[keyof B & string][] | undefined;\n};\n\nexport type SectionSpec<T extends string, V extends readonly [string, ...string[]], S extends Shape, B extends BlockShapes> = {\n /** The type's name: the `type` of a section. */\n type: T;\n /** Its variants; the first is the default one. */\n variants: V;\n /** The zod schema of its settings. */\n settings: S;\n /** The settings a new section starts with. */\n settingsDefault: z.input<S>;\n /** The block types it allows, each with the zod schema of its settings. None: the section has no blocks. */\n blocks?: B;\n /** The checks that read the whole section (a count, a combination); `issue(path, message)` refuses it. */\n refine?: (section: ParsedSection<T, V[number], S, B>, issue: (path: (string | number)[], message: string) => void) => void;\n};\n\nexport type SectionDefinitionOf<T extends string, V extends readonly [string, ...string[]], S extends Shape, B extends BlockShapes> = SectionSpec<T, V, S, B> & {\n readonly defaultVariant: V[number];\n readonly blockTypes: readonly (keyof B & string)[];\n /** The zod schema of a section of this type. */\n readonly schema: z.ZodMiniType<ParsedSection<T, V[number], S, B>>;\n};\n\nconst key = z.string().check(z.minLength(1), z.maxLength(40), z.regex(/^[A-Za-z0-9_-]+$/, \"a key (letters, digits, - and _)\"));\n\n/** Defines a section type. */\nexport function defineSection<const T extends string, const V extends readonly [string, ...string[]], S extends Shape, B extends BlockShapes = Record<never, never>>(\n spec: SectionSpec<T, V, S, B>,\n): SectionDefinitionOf<T, V, S, B> {\n const blockUnion = spec.blocks && Object.keys(spec.blocks).length > 0\n ? z.discriminatedUnion(\n \"type\",\n Object.entries(spec.blocks).map(([type, settings]) =>\n z.object({ key, type: z.literal(type), settings, text: z.optional(z.record(z.string(), localizedText)) }),\n ) as unknown as [z.ZodMiniObject, ...z.ZodMiniObject[]],\n )\n : undefined;\n const blocks = blockUnion\n ? z.optional(z.array(blockUnion).check(z.maxLength(SHOP_LIMITS.blocks)))\n : z.optional(z.array(z.never()).check(z.maxLength(0)));\n const base = z.object({\n key,\n type: z.literal(spec.type),\n variant: z.enum(spec.variants),\n disabled: z.optional(z.boolean()),\n settings: spec.settings,\n text: z.optional(z.object({ title: z.optional(localizedText), lead: z.optional(localizedText) })),\n blocks,\n });\n const schema = base.check(\n z.superRefine((value, ctx) => {\n spec.refine?.(value as never, (path, message) => ctx.issues.push({ code: \"custom\", message, path, input: value }));\n }),\n );\n return Object.freeze({\n ...spec,\n defaultVariant: spec.variants[0],\n blockTypes: Object.keys(spec.blocks ?? {}) as (keyof B & string)[],\n schema: schema as unknown as z.ZodMiniType<ParsedSection<T, V[number], S, B>>,\n });\n}\n","import * as z from \"zod/mini\";\n\n/** The owner's words, in each language; the product's message is the fallback when a language is absent. */\nexport const localizedText = z.object({\n fr: z.optional(z.string().check(z.maxLength(600))),\n en: z.optional(z.string().check(z.maxLength(600))),\n});\nexport type LocalizedText = z.output<typeof localizedText>;\n","// The document a shop page is (ADR-007 §1): an ordered list of sections, each a `type` × `variant` with its settings and\n// its blocks. Parsed on write (a route refuses an invalid one, with the path) and on read. The storage is the product's.\nimport * as z from \"zod/mini\";\n\nimport { SECTION_DEFINITIONS, type SectionType } from \"./catalogue\";\nimport { SHOP_LIMITS } from \"./limits\";\n\n/** The version of the document's format; migrations are pure functions schema n → n + 1 (`migrate.ts`). */\n// @fixed: ADR-007 §1 — the format version of the code, bumped with a migration; not a shop setting.\nexport const SHOP_SCHEMA_VERSION = 1;\n\n/** A look preset by id and version (`@krizaka/tokens`): `salon-atelier`. The mode is the visitor's, never stored. */\nexport const presetRef = z.object({\n id: z.string().check(z.regex(/^[a-z]+-[a-z]+$/, \"a preset id (trade-name)\")),\n version: z.int().check(z.minimum(1)),\n});\n\nconst sectionUnion = z.discriminatedUnion(\n \"type\",\n SECTION_DEFINITIONS.map((d) => d.schema) as unknown as [z.ZodMiniObject, ...z.ZodMiniObject[]],\n);\n\nexport const shopPageSchema = z\n .object({\n schema: z.literal(SHOP_SCHEMA_VERSION),\n preset: presetRef,\n /** Overrides the preset's density. */\n density: z.optional(z.enum([\"compact\", \"airy\"])),\n sections: z.array(sectionUnion).check(z.minLength(1), z.maxLength(SHOP_LIMITS.sections)),\n })\n .check(\n z.superRefine((page, ctx) => {\n const add = (path: (string | number)[], message: string) => ctx.issues.push({ code: \"custom\", message, path, input: page });\n const seen = new Set<string>();\n page.sections.forEach((section, i) => {\n const s = section as { key: string; type: string };\n if (seen.has(s.key)) add([\"sections\", i, \"key\"], `the key \"${s.key}\" is used twice`);\n seen.add(s.key);\n if (s.type === \"hero\" && i !== 0) add([\"sections\", i, \"type\"], \"the hero is the first section, and there is only one\");\n });\n }),\n );\n\n/** A section of any type, as parsed: its `settings` and `blocks` are the type's own. */\nexport type Section = z.output<(typeof SECTION_DEFINITIONS)[number][\"schema\"]>;\nexport type ShopPage = {\n schema: typeof SHOP_SCHEMA_VERSION;\n preset: z.output<typeof presetRef>;\n density?: \"compact\" | \"airy\" | undefined;\n sections: Section[];\n};\nexport type SectionOf<T extends SectionType> = Extract<Section, { type: T }>;\n\nexport type ShopPageIssue = { path: string; message: string };\nexport type ShopPageResult = { ok: true; page: ShopPage } | { ok: false; issues: ShopPageIssue[] };\n\n/** Validates a document; an invalid one answers every issue with its path (`sections.2.variant`), for a 422. */\nexport function parseShopPage(input: unknown): ShopPageResult {\n const result = shopPageSchema.safeParse(input);\n if (result.success) return { ok: true, page: result.data as unknown as ShopPage };\n return { ok: false, issues: result.error.issues.map((i) => ({ path: i.path.join(\".\"), message: i.message })) };\n}\n","// Migrations of the document (ADR-007 §1): pure functions schema n → n + 1, applied in memory when an older document is\n// read; the product writes the migrated one back on the next save. A newer document than this code knows is refused.\nimport { SHOP_SCHEMA_VERSION } from \"./schema\";\n\nexport type ShopMigration = {\n /** The schema it reads. */\n from: number;\n /** Pure: returns a new document, never mutates. */\n up: (doc: Record<string, unknown>) => Record<string, unknown>;\n};\n\n/** The migrations of the document, oldest first. Schema 1 is the first format: none yet. */\nexport const SHOP_MIGRATIONS: readonly ShopMigration[] = [];\n\nexport type MigrationResult = { ok: true; doc: Record<string, unknown>; from: number } | { ok: false; reason: string };\n\n/** A migrator over a list of migrations and a current version (the shop's own are `migrateShopPage`). */\nexport function createMigrator(migrations: readonly ShopMigration[], current: number) {\n return (input: unknown): MigrationResult => {\n if (typeof input !== \"object\" || input === null || Array.isArray(input)) return { ok: false, reason: \"a document is an object\" };\n let doc = input as Record<string, unknown>;\n const from = doc.schema;\n if (typeof from !== \"number\" || !Number.isInteger(from) || from < 1) return { ok: false, reason: \"the document has no schema version\" };\n if (from > current) return { ok: false, reason: `schema ${from} is newer than this code knows (${current})` };\n for (let n = from; n < current; n++) {\n const step = migrations.find((m) => m.from === n);\n if (!step) return { ok: false, reason: `no migration from schema ${n}` };\n doc = { ...step.up(doc), schema: n + 1 };\n }\n return { ok: true, doc, from };\n };\n}\n\n/** Brings a stored document to the current schema (then `parseShopPage` it). */\nexport const migrateShopPage = createMigrator(SHOP_MIGRATIONS, SHOP_SCHEMA_VERSION);\n","// The preview bridge (ADR-007 §5): the composer shows the product's real public page in an iframe of its own route\n// (`?draft=<id>`) and talks to it by `postMessage` — three messages only, every one origin-checked on both sides: `select` (outline\n// a section), `scroll` (bring it into view), `refresh` (the draft changed: reload the data). Nothing else crosses: no document, no\n// script, no style. Both halves are here, tiny and free of React, because the page side must not import the composer.\n\n/** The only messages: the composer to the page. */\nexport type PreviewMessage = { source: \"krizaka-shop-composer\"; type: \"select\" | \"scroll\"; key: string } | { source: \"krizaka-shop-composer\"; type: \"refresh\" };\n\nconst SOURCE = \"krizaka-shop-composer\";\nconst KEY = /^[A-Za-z0-9_-]{1,40}$/;\n\n/** Reads a message event: only if it comes from `origin`, is one of the three messages and carries a well-formed key. */\nexport function readPreviewMessage(event: Pick<MessageEvent, \"origin\" | \"data\">, origin: string): PreviewMessage | null {\n if (event.origin !== origin) return null;\n const d = event.data as Record<string, unknown> | null;\n if (typeof d !== \"object\" || d === null || d.source !== SOURCE) return null;\n if (d.type === \"refresh\") return { source: SOURCE, type: \"refresh\" };\n if ((d.type === \"select\" || d.type === \"scroll\") && typeof d.key === \"string\" && KEY.test(d.key)) return { source: SOURCE, type: d.type, key: d.key };\n return null;\n}\n\n/** The composer's side: posts to the preview's window, addressed to its origin only. */\nexport function postToPreview(target: Pick<Window, \"postMessage\"> | null | undefined, origin: string, message: PreviewMessage): void {\n target?.postMessage(message, origin);\n}\n\n/** The attribute that names a section in the preview page: `<div data-shop-key=\"s_8f2c\">` (a block: the outline is its ring). */\nexport const SHOP_KEY_ATTRIBUTE = \"data-shop-key\";\n\n/**\n * The page's side: outlines the selected section (`data-shop-selected`, drawn by `blocks.css`), scrolls it into view, and calls\n * `onRefresh` when the draft changed. Returns the function that removes it. Only runs in an iframe of the composer's origin.\n */\nexport function connectShopPreview({ composerOrigin, onRefresh, root = document }: { composerOrigin: string; onRefresh?: () => void; root?: Document }): () => void {\n const find = (key: string) => root.querySelector<HTMLElement>(`[${SHOP_KEY_ATTRIBUTE}=\"${key}\"]`);\n const handler = (event: MessageEvent) => {\n // The origin first, before anything else is read from the message.\n if (event.origin !== composerOrigin) return;\n const m = readPreviewMessage(event, composerOrigin);\n if (!m) return;\n if (m.type === \"refresh\") {\n onRefresh?.();\n return;\n }\n for (const selected of root.querySelectorAll<HTMLElement>(\"[data-shop-selected]\")) delete selected.dataset.shopSelected;\n const el = find(m.key);\n if (!el) return;\n el.dataset.shopSelected = \"\";\n if (m.type === \"scroll\") {\n const reduced = typeof matchMedia === \"function\" && matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n el.scrollIntoView({ block: \"center\", behavior: reduced ? \"auto\" : \"smooth\" });\n }\n };\n window.addEventListener(\"message\", handler);\n return () => window.removeEventListener(\"message\", handler);\n}\n","// The starter documents (ADR-007 §4, §8): the five compositions of the ADR as data — a section list and a preset. A\n// product's template becomes one of these; the composer's « Start from » lists them. They hold no price, no text of a\n// shop and no photo: references and rules only.\nimport type { SectionOf, ShopPage } from \"./schema\";\n\nconst s = (key: string) => key;\nconst doc = (preset: string, density: \"compact\" | \"airy\", sections: ShopPage[\"sections\"]): ShopPage => ({\n schema: 1,\n preset: { id: preset, version: 1 },\n density,\n sections,\n});\nconst hero = (variant: \"poster\" | \"split\" | \"banner\" | \"tv\"): SectionOf<\"hero\"> => ({\n key: s(\"s_hero\"),\n type: \"hero\",\n variant,\n settings: { focus: \"center\" },\n blocks: [\n { key: \"b_open\", type: \"fact\", settings: { kind: \"open-now\" } },\n { key: \"b_area\", type: \"fact\", settings: { kind: \"area\" } },\n { key: \"b_score\", type: \"fact\", settings: { kind: \"score\" } },\n ],\n});\nconst menu = (columns: 1 | 2, aside: \"hours\" | \"none\"): SectionOf<\"services\"> => ({\n key: s(\"s_services\"),\n type: \"services\",\n variant: \"menu\",\n settings: { source: \"all\", groupBy: \"category\", columns, aside },\n});\nconst booking = (variant: \"strip\" | \"panel\" | \"sticky\", key: string): SectionOf<\"booking\"> => ({ key, type: \"booking\", variant, settings: { count: 4 } });\nconst gallery = (variant: \"mosaic\" | \"filmstrip\" | \"wall\" | \"grid\", key: string, extra: Partial<Pick<SectionOf<\"gallery\">, \"settings\" | \"blocks\">> = {}): SectionOf<\"gallery\"> => ({\n key,\n type: \"gallery\",\n variant,\n settings: { source: \"all\", texture: \"plaster\" },\n ...extra,\n});\n\n/** The salon, compact: the poster, the next free times, the price board beside the hours, a filmstrip, the reviews. */\nexport const salonCompact = doc(\"salon-vitrine\", \"compact\", [\n hero(\"poster\"),\n booking(\"strip\", \"s_times\"),\n menu(1, \"hours\"),\n gallery(\"filmstrip\", \"s_photos\"),\n { key: \"s_reviews\", type: \"reviews\", variant: \"summary-cards\", settings: { rule: \"best\", count: 2 } },\n booking(\"panel\", \"s_book\"),\n]);\n\n/** The salon, editorial: a split hero, the quote, the two-column menu, the mosaic, the visit. */\nexport const salonEditorial = doc(\"salon-atelier\", \"airy\", [\n hero(\"split\"),\n { key: \"s_story\", type: \"story\", variant: \"quote\", settings: { body: {} } },\n menu(2, \"none\"),\n gallery(\"mosaic\", \"s_photos\"),\n { key: \"s_visit\", type: \"visit\", variant: \"split\", settings: { showPhone: true } },\n booking(\"panel\", \"s_book\"),\n]);\n\n/** The salon, gallery first: the sign and the old TV, the mosaic, the menu, the wall. */\nexport const salonGallery = doc(\"salon-atelier\", \"compact\", [\n hero(\"tv\"),\n gallery(\"mosaic\", \"s_photos\"),\n menu(1, \"hours\"),\n gallery(\"wall\", \"s_wall\", { blocks: [{ key: \"b_note\", type: \"note\", settings: { text: \"Merci Jade !\", signature: \"Nadia\" } }] }),\n booking(\"sticky\", \"s_sticky\"),\n]);\n\n/** The dog walker, route: the poster, the areas, the menu, the next free times, a filmstrip. */\nexport const petsRoute = doc(\"pets-canal\", \"compact\", [\n hero(\"poster\"),\n { key: \"s_visit\", type: \"visit\", variant: \"map\", settings: { showPhone: false } },\n menu(1, \"none\"),\n booking(\"strip\", \"s_times\"),\n gallery(\"filmstrip\", \"s_photos\"),\n]);\n\n/** The dog walker, journal: a hero on paper, the notebook wall, the menu, the TV with notes. */\nexport const petsJournal = doc(\"pets-carnet\", \"airy\", [\n hero(\"split\"),\n gallery(\"wall\", \"s_wall\", { settings: { source: \"all\", texture: \"ridge\" } }),\n menu(1, \"none\"),\n { key: \"s_tv\", type: \"video\", variant: \"tv\", settings: { cabinet: \"portable\" } },\n booking(\"panel\", \"s_book\"),\n]);\n\nexport const shopStarters = { salonCompact, salonEditorial, salonGallery, petsRoute, petsJournal } as const;\nexport type ShopStarterId = keyof typeof shopStarters;\n"],"mappings":";;;;;;;;;;AAGA,YAAYA,QAAO;;;ACAnB,YAAYC,QAAO;;;ACHnB,YAAY,OAAO;AAGZ,IAAM,gBAAkB,SAAO;AAAA,EACpC,IAAM,WAAW,SAAO,EAAE,MAAQ,YAAU,GAAG,CAAC,CAAC;AAAA,EACjD,IAAM,WAAW,SAAO,EAAE,MAAQ,YAAU,GAAG,CAAC,CAAC;AACnD,CAAC;;;ADsCD,IAAM,MAAQ,UAAO,EAAE,MAAQ,aAAU,CAAC,GAAK,aAAU,EAAE,GAAK,SAAM,oBAAoB,kCAAkC,CAAC;AAGtH,SAAS,cACd,MACiC;AACjC,QAAM,aAAa,KAAK,UAAU,OAAO,KAAK,KAAK,MAAM,EAAE,SAAS,IAC9D;AAAA,IACA;AAAA,IACA,OAAO,QAAQ,KAAK,MAAM,EAAE;AAAA,MAAI,CAAC,CAAC,MAAM,QAAQ,MAC5C,UAAO,EAAE,KAAK,MAAQ,WAAQ,IAAI,GAAG,UAAU,MAAQ,YAAW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B,CAAC;AAEM,IAAM,eAAe,EAAE,cAAc,gBAAgB,cAAc,WAAW,YAAY;","names":["z","z","z","s","doc","key","key"]}
|
|
1
|
+
{"version":3,"sources":["../src/shop/schema.ts","../src/shop/migrate.ts","../src/shop/preview.ts","../src/shop/starters.ts"],"sourcesContent":["// The document a shop page is (ADR-007 §1): an ordered list of sections, each a `type` × `variant` with its settings and\n// its blocks. Parsed on write (a route refuses an invalid one, with the path) and on read. The storage is the product's.\nimport * as z from \"zod/mini\";\n\nimport { SECTION_DEFINITIONS, type SectionType } from \"./catalogue\";\nimport { SHOP_LIMITS } from \"./limits\";\n\n/** The version of the document's format; migrations are pure functions schema n → n + 1 (`migrate.ts`). */\n// @fixed: ADR-007 §1 — the format version of the code, bumped with a migration; not a shop setting.\nexport const SHOP_SCHEMA_VERSION = 1;\n\n/** A look preset by id and version (`@krizaka/tokens`): `salon-atelier`. The mode is the visitor's, never stored. */\nexport const presetRef = z.object({\n id: z.string().check(z.regex(/^[a-z]+-[a-z]+$/, \"a preset id (trade-name)\")),\n version: z.int().check(z.minimum(1)),\n});\n\nconst sectionUnion = z.discriminatedUnion(\n \"type\",\n SECTION_DEFINITIONS.map((d) => d.schema) as unknown as [z.ZodMiniObject, ...z.ZodMiniObject[]],\n);\n\nexport const shopPageSchema = z\n .object({\n schema: z.literal(SHOP_SCHEMA_VERSION),\n preset: presetRef,\n /** Overrides the preset's density. */\n density: z.optional(z.enum([\"compact\", \"airy\"])),\n /** One of the accents the look lists as tested (`krizaka`, `akinaza:accent-2`…): the owner's choice within the look. */\n accent: z.optional(z.string().check(z.regex(/^[a-z]+(:accent-2)?$/, \"an accent of the look\"))),\n sections: z.array(sectionUnion).check(z.minLength(1), z.maxLength(SHOP_LIMITS.sections)),\n })\n .check(\n z.superRefine((page, ctx) => {\n const add = (path: (string | number)[], message: string) => ctx.issues.push({ code: \"custom\", message, path, input: page });\n const seen = new Set<string>();\n page.sections.forEach((section, i) => {\n const s = section as { key: string; type: string };\n if (seen.has(s.key)) add([\"sections\", i, \"key\"], `the key \"${s.key}\" is used twice`);\n seen.add(s.key);\n if (s.type === \"hero\" && i !== 0) add([\"sections\", i, \"type\"], \"the hero is the first section, and there is only one\");\n });\n }),\n );\n\n/** A section of any type, as parsed: its `settings` and `blocks` are the type's own. */\nexport type Section = z.output<(typeof SECTION_DEFINITIONS)[number][\"schema\"]>;\nexport type ShopPage = {\n schema: typeof SHOP_SCHEMA_VERSION;\n preset: z.output<typeof presetRef>;\n density?: \"compact\" | \"airy\" | undefined;\n accent?: string | undefined;\n sections: Section[];\n};\nexport type SectionOf<T extends SectionType> = Extract<Section, { type: T }>;\n\nexport type ShopPageIssue = { path: string; message: string };\nexport type ShopPageResult = { ok: true; page: ShopPage } | { ok: false; issues: ShopPageIssue[] };\n\n/** Validates a document; an invalid one answers every issue with its path (`sections.2.variant`), for a 422. */\nexport function parseShopPage(input: unknown): ShopPageResult {\n const result = shopPageSchema.safeParse(input);\n if (result.success) return { ok: true, page: result.data as unknown as ShopPage };\n return { ok: false, issues: result.error.issues.map((i) => ({ path: i.path.join(\".\"), message: i.message })) };\n}\n","// Migrations of the document (ADR-007 §1): pure functions schema n → n + 1, applied in memory when an older document is\n// read; the product writes the migrated one back on the next save. A newer document than this code knows is refused.\nimport { SHOP_SCHEMA_VERSION } from \"./schema\";\n\nexport type ShopMigration = {\n /** The schema it reads. */\n from: number;\n /** Pure: returns a new document, never mutates. */\n up: (doc: Record<string, unknown>) => Record<string, unknown>;\n};\n\n/** The migrations of the document, oldest first. Schema 1 is the first format: none yet. */\nexport const SHOP_MIGRATIONS: readonly ShopMigration[] = [];\n\nexport type MigrationResult = { ok: true; doc: Record<string, unknown>; from: number } | { ok: false; reason: string };\n\n/** A migrator over a list of migrations and a current version (the shop's own are `migrateShopPage`). */\nexport function createMigrator(migrations: readonly ShopMigration[], current: number) {\n return (input: unknown): MigrationResult => {\n if (typeof input !== \"object\" || input === null || Array.isArray(input)) return { ok: false, reason: \"a document is an object\" };\n let doc = input as Record<string, unknown>;\n const from = doc.schema;\n if (typeof from !== \"number\" || !Number.isInteger(from) || from < 1) return { ok: false, reason: \"the document has no schema version\" };\n if (from > current) return { ok: false, reason: `schema ${from} is newer than this code knows (${current})` };\n for (let n = from; n < current; n++) {\n const step = migrations.find((m) => m.from === n);\n if (!step) return { ok: false, reason: `no migration from schema ${n}` };\n doc = { ...step.up(doc), schema: n + 1 };\n }\n return { ok: true, doc, from };\n };\n}\n\n/** Brings a stored document to the current schema (then `parseShopPage` it). */\nexport const migrateShopPage = createMigrator(SHOP_MIGRATIONS, SHOP_SCHEMA_VERSION);\n","// The preview bridge (ADR-007 §5): the composer shows the product's real public page in an iframe of its own route\n// (`?draft=<id>`) and talks to it by `postMessage` — three messages only, every one origin-checked on both sides: `select` (outline\n// a section), `scroll` (bring it into view), `refresh` (the draft changed: reload the data). Nothing else crosses: no document, no\n// script, no style. Both halves are here, tiny and free of React, because the page side must not import the composer.\n\n/** The only messages: the composer to the page. */\nexport type PreviewMessage = { source: \"krizaka-shop-composer\"; type: \"select\" | \"scroll\"; key: string } | { source: \"krizaka-shop-composer\"; type: \"refresh\" };\n\nconst SOURCE = \"krizaka-shop-composer\";\nconst KEY = /^[A-Za-z0-9_-]{1,40}$/;\n\n/** Reads a message event: only if it comes from `origin`, is one of the three messages and carries a well-formed key. */\nexport function readPreviewMessage(event: Pick<MessageEvent, \"origin\" | \"data\">, origin: string): PreviewMessage | null {\n if (event.origin !== origin) return null;\n const d = event.data as Record<string, unknown> | null;\n if (typeof d !== \"object\" || d === null || d.source !== SOURCE) return null;\n if (d.type === \"refresh\") return { source: SOURCE, type: \"refresh\" };\n if ((d.type === \"select\" || d.type === \"scroll\") && typeof d.key === \"string\" && KEY.test(d.key)) return { source: SOURCE, type: d.type, key: d.key };\n return null;\n}\n\n/** The composer's side: posts to the preview's window, addressed to its origin only. */\nexport function postToPreview(target: Pick<Window, \"postMessage\"> | null | undefined, origin: string, message: PreviewMessage): void {\n target?.postMessage(message, origin);\n}\n\n/** The attribute that names a section in the preview page: `<div data-shop-key=\"s_8f2c\">` (a block: the outline is its ring). */\nexport const SHOP_KEY_ATTRIBUTE = \"data-shop-key\";\n\n/**\n * The page's side: outlines the selected section (`data-shop-selected`, drawn by `blocks.css`), scrolls it into view, and calls\n * `onRefresh` when the draft changed. Returns the function that removes it. Only runs in an iframe of the composer's origin.\n */\nexport function connectShopPreview({ composerOrigin, onRefresh, root = document }: { composerOrigin: string; onRefresh?: () => void; root?: Document }): () => void {\n const find = (key: string) => root.querySelector<HTMLElement>(`[${SHOP_KEY_ATTRIBUTE}=\"${key}\"]`);\n const handler = (event: MessageEvent) => {\n // The origin first, before anything else is read from the message.\n if (event.origin !== composerOrigin) return;\n const m = readPreviewMessage(event, composerOrigin);\n if (!m) return;\n if (m.type === \"refresh\") {\n onRefresh?.();\n return;\n }\n for (const selected of root.querySelectorAll<HTMLElement>(\"[data-shop-selected]\")) delete selected.dataset.shopSelected;\n const el = find(m.key);\n if (!el) return;\n el.dataset.shopSelected = \"\";\n if (m.type === \"scroll\") {\n const reduced = typeof matchMedia === \"function\" && matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n el.scrollIntoView({ block: \"center\", behavior: reduced ? \"auto\" : \"smooth\" });\n }\n };\n window.addEventListener(\"message\", handler);\n return () => window.removeEventListener(\"message\", handler);\n}\n","// The starter documents (ADR-007 §4, §8): the five compositions of the ADR as data — a section list and a preset. A\n// product's template becomes one of these; the composer's « Start from » lists them. They hold no price, no text of a\n// shop and no photo: references and rules only.\nimport type { SectionOf, ShopPage } from \"./schema\";\n\nconst s = (key: string) => key;\nconst doc = (preset: string, density: \"compact\" | \"airy\", sections: ShopPage[\"sections\"]): ShopPage => ({\n schema: 1,\n preset: { id: preset, version: 1 },\n density,\n sections,\n});\nconst hero = (variant: \"poster\" | \"split\" | \"banner\" | \"tv\"): SectionOf<\"hero\"> => ({\n key: s(\"s_hero\"),\n type: \"hero\",\n variant,\n settings: { focus: \"center\" },\n blocks: [\n { key: \"b_open\", type: \"fact\", settings: { kind: \"open-now\" } },\n { key: \"b_area\", type: \"fact\", settings: { kind: \"area\" } },\n { key: \"b_score\", type: \"fact\", settings: { kind: \"score\" } },\n ],\n});\nconst menu = (columns: 1 | 2, aside: \"hours\" | \"none\"): SectionOf<\"services\"> => ({\n key: s(\"s_services\"),\n type: \"services\",\n variant: \"menu\",\n settings: { source: \"all\", groupBy: \"category\", columns, aside },\n});\nconst booking = (variant: \"strip\" | \"panel\" | \"sticky\", key: string): SectionOf<\"booking\"> => ({ key, type: \"booking\", variant, settings: { count: 4 } });\nconst gallery = (variant: \"mosaic\" | \"filmstrip\" | \"wall\" | \"grid\", key: string, extra: Partial<Pick<SectionOf<\"gallery\">, \"settings\" | \"blocks\">> = {}): SectionOf<\"gallery\"> => ({\n key,\n type: \"gallery\",\n variant,\n settings: { source: \"all\", texture: \"plaster\" },\n ...extra,\n});\n\n/** The salon, compact: the poster, the next free times, the price board beside the hours, a filmstrip, the reviews. */\nexport const salonCompact = doc(\"salon-vitrine\", \"compact\", [\n hero(\"poster\"),\n booking(\"strip\", \"s_times\"),\n menu(1, \"hours\"),\n gallery(\"filmstrip\", \"s_photos\"),\n { key: \"s_reviews\", type: \"reviews\", variant: \"summary-cards\", settings: { rule: \"best\", count: 2 } },\n booking(\"panel\", \"s_book\"),\n]);\n\n/** The salon, editorial: a split hero, the quote, the two-column menu, the mosaic, the visit. */\nexport const salonEditorial = doc(\"salon-atelier\", \"airy\", [\n hero(\"split\"),\n { key: \"s_story\", type: \"story\", variant: \"quote\", settings: { body: {} } },\n menu(2, \"none\"),\n gallery(\"mosaic\", \"s_photos\"),\n { key: \"s_visit\", type: \"visit\", variant: \"split\", settings: { showPhone: true } },\n booking(\"panel\", \"s_book\"),\n]);\n\n/** The salon, gallery first: the sign and the old TV, the mosaic, the menu, the wall. */\nexport const salonGallery = doc(\"salon-atelier\", \"compact\", [\n hero(\"tv\"),\n gallery(\"mosaic\", \"s_photos\"),\n menu(1, \"hours\"),\n gallery(\"wall\", \"s_wall\", { blocks: [{ key: \"b_note\", type: \"note\", settings: { text: \"Merci Jade !\", signature: \"Nadia\" } }] }),\n booking(\"sticky\", \"s_sticky\"),\n]);\n\n/** The dog walker, route: the poster, the areas, the menu, the next free times, a filmstrip. */\nexport const petsRoute = doc(\"pets-canal\", \"compact\", [\n hero(\"poster\"),\n { key: \"s_visit\", type: \"visit\", variant: \"map\", settings: { showPhone: false } },\n menu(1, \"none\"),\n booking(\"strip\", \"s_times\"),\n gallery(\"filmstrip\", \"s_photos\"),\n]);\n\n/** The dog walker, journal: a hero on paper, the notebook wall, the menu, the TV with notes. */\nexport const petsJournal = doc(\"pets-carnet\", \"airy\", [\n hero(\"split\"),\n gallery(\"wall\", \"s_wall\", { settings: { source: \"all\", texture: \"ridge\" } }),\n menu(1, \"none\"),\n { key: \"s_tv\", type: \"video\", variant: \"tv\", settings: { cabinet: \"portable\" } },\n booking(\"panel\", \"s_book\"),\n]);\n\nexport const shopStarters = { salonCompact, salonEditorial, salonGallery, petsRoute, petsJournal } as const;\nexport type ShopStarterId = keyof typeof shopStarters;\n"],"mappings":";;;;;;;;;;;;;;;;AAEA,YAAY,OAAO;AAOZ,IAAM,sBAAsB;AAG5B,IAAM,YAAc,SAAO;AAAA,EAChC,IAAM,SAAO,EAAE,MAAQ,QAAM,mBAAmB,0BAA0B,CAAC;AAAA,EAC3E,SAAW,MAAI,EAAE,MAAQ,UAAQ,CAAC,CAAC;AACrC,CAAC;AAED,IAAM,eAAiB;AAAA,EACrB;AAAA,EACA,oBAAoB,IAAI,CAAC,MAAM,EAAE,MAAM;AACzC;AAEO,IAAM,iBACV,SAAO;AAAA,EACN,QAAU,UAAQ,mBAAmB;AAAA,EACrC,QAAQ;AAAA;AAAA,EAER,SAAW,WAAW,OAAK,CAAC,WAAW,MAAM,CAAC,CAAC;AAAA;AAAA,EAE/C,QAAU,WAAW,SAAO,EAAE,MAAQ,QAAM,wBAAwB,uBAAuB,CAAC,CAAC;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A,EAC/H,QAAQ,UAAU,UAAU;AAC9B,CAAC;AAGM,IAAM,YAAY,IAAI,cAAc,WAAW;AAAA,EACpD,KAAK,QAAQ;AAAA,EACb,EAAE,KAAK,WAAW,MAAM,SAAS,SAAS,OAAO,UAAU,EAAE,WAAW,MAAM,EAAE;AAAA,EAChF,KAAK,GAAG,MAAM;AAAA,EACd,QAAQ,SAAS,SAAS;AAAA,EAC1B,QAAQ,aAAa,UAAU;AACjC,CAAC;AAGM,IAAM,cAAc,IAAI,eAAe,QAAQ;AAAA,EACpD,KAAK,OAAO;AAAA,EACZ,QAAQ,QAAQ,UAAU,EAAE,UAAU,EAAE,QAAQ,OAAO,SAAS,QAAQ,EAAE,CAAC;AAAA,EAC3E,KAAK,GAAG,MAAM;AAAA,EACd,EAAE,KAAK,QAAQ,MAAM,SAAS,SAAS,MAAM,UAAU,EAAE,SAAS,WAAW,EAAE;AAAA,EAC/E,QAAQ,SAAS,QAAQ;AAC3B,CAAC;AAEM,IAAM,eAAe,EAAE,cAAc,gBAAgB,cAAc,WAAW,YAAY;","names":["s","doc"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krizaka/ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.72.0",
|
|
4
4
|
"description": "The Krizaka front-end platform's components: the primitives (button, card, dialog, toast, menu, field, tabs, chip, switch, slider, command palette, theme, countdown…) on the semantic --kz-* tokens, the animated marks (Krizaka, Orazaka, Yomizaka, Akinaza) and the motion signature — web and /native.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"krizaka",
|
|
@@ -947,6 +947,10 @@
|
|
|
947
947
|
"types": "./dist/shop/policies.d.ts",
|
|
948
948
|
"import": "./dist/shop/policies.js"
|
|
949
949
|
},
|
|
950
|
+
"./shop/look": {
|
|
951
|
+
"types": "./dist/shop/look.d.ts",
|
|
952
|
+
"import": "./dist/shop/look.js"
|
|
953
|
+
},
|
|
950
954
|
"./shop/map-gate": {
|
|
951
955
|
"types": "./dist/shop/map-gate.d.ts",
|
|
952
956
|
"import": "./dist/shop/map-gate.js"
|
|
@@ -1001,7 +1005,7 @@
|
|
|
1001
1005
|
],
|
|
1002
1006
|
"peerDependencies": {
|
|
1003
1007
|
"@krizaka/query": ">=0.2.2",
|
|
1004
|
-
"@krizaka/tailwind": ">=3.
|
|
1008
|
+
"@krizaka/tailwind": ">=3.72.0",
|
|
1005
1009
|
"@maplibre/maplibre-react-native": ">=11",
|
|
1006
1010
|
"@shopify/flash-list": ">=2",
|
|
1007
1011
|
"expo-camera": ">=16",
|
|
@@ -3198,7 +3202,7 @@
|
|
|
3198
3202
|
{
|
|
3199
3203
|
"name": "./shop/booking",
|
|
3200
3204
|
"path": "dist/shop/booking.js",
|
|
3201
|
-
"limit": "2.
|
|
3205
|
+
"limit": "2.4 kB",
|
|
3202
3206
|
"gzip": true,
|
|
3203
3207
|
"ignore": [
|
|
3204
3208
|
"tailwind-variants",
|
|
@@ -3327,6 +3331,21 @@
|
|
|
3327
3331
|
"@krizaka/ui"
|
|
3328
3332
|
]
|
|
3329
3333
|
},
|
|
3334
|
+
{
|
|
3335
|
+
"name": "./shop/look",
|
|
3336
|
+
"path": "dist/shop/look.js",
|
|
3337
|
+
"limit": "2.6 kB",
|
|
3338
|
+
"gzip": true,
|
|
3339
|
+
"ignore": [
|
|
3340
|
+
"tailwind-variants",
|
|
3341
|
+
"clsx",
|
|
3342
|
+
"@krizaka/ui",
|
|
3343
|
+
"@krizaka/tokens",
|
|
3344
|
+
"@krizaka/ui/mascots",
|
|
3345
|
+
"zod",
|
|
3346
|
+
"zod/mini"
|
|
3347
|
+
]
|
|
3348
|
+
},
|
|
3330
3349
|
{
|
|
3331
3350
|
"name": "./shop/map-gate",
|
|
3332
3351
|
"path": "dist/shop/map-gate.js",
|
|
@@ -3371,7 +3390,7 @@
|
|
|
3371
3390
|
{
|
|
3372
3391
|
"name": "./shop-composer",
|
|
3373
3392
|
"path": "dist/shop-composer.js",
|
|
3374
|
-
"limit": "
|
|
3393
|
+
"limit": "25.5 kB",
|
|
3375
3394
|
"gzip": true,
|
|
3376
3395
|
"ignore": [
|
|
3377
3396
|
"tailwind-variants",
|
|
@@ -3441,8 +3460,8 @@
|
|
|
3441
3460
|
"tailwind-variants": "^3.3.1",
|
|
3442
3461
|
"zod": "^4.6.7",
|
|
3443
3462
|
"@krizaka/intl": "^0.4.1",
|
|
3444
|
-
"@krizaka/
|
|
3445
|
-
"@krizaka/
|
|
3463
|
+
"@krizaka/tokens": "^3.72.0",
|
|
3464
|
+
"@krizaka/pacer": "^0.1.0"
|
|
3446
3465
|
},
|
|
3447
3466
|
"scripts": {
|
|
3448
3467
|
"build": "node -e \"const fs=require('node:fs');fs.rmSync('dist',{recursive:true,force:true});for(const f of fs.readdirSync('registry/examples',{recursive:true}))if(/\\.(js|d\\.ts)$/.test(f))fs.rmSync('registry/examples/'+f)\" && tsup && node -e \"require('node:fs').copyFileSync('src/motion.css','dist/motion.css');require('node:fs').copyFileSync('src/blocks.css','dist/blocks.css');require('node:fs').copyFileSync('src/story.css','dist/story.css')\" && node scripts/build-registry.mjs",
|
package/registry/app-frame.json
CHANGED
package/registry/elephant.json
CHANGED
package/registry/index.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krizaka/ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.72.0",
|
|
4
4
|
"templatePurposes": {
|
|
5
5
|
"convince": {
|
|
6
6
|
"title": "Convince",
|
|
@@ -1013,7 +1013,7 @@
|
|
|
1013
1013
|
"native": 0
|
|
1014
1014
|
},
|
|
1015
1015
|
"dependencies": [
|
|
1016
|
-
"@krizaka/tokens@^3.
|
|
1016
|
+
"@krizaka/tokens@^3.72.0"
|
|
1017
1017
|
],
|
|
1018
1018
|
"registryDependencies": [
|
|
1019
1019
|
"account-menu",
|
|
@@ -2709,7 +2709,7 @@
|
|
|
2709
2709
|
"native": 0
|
|
2710
2710
|
},
|
|
2711
2711
|
"dependencies": [
|
|
2712
|
-
"@krizaka/tokens@^3.
|
|
2712
|
+
"@krizaka/tokens@^3.72.0"
|
|
2713
2713
|
],
|
|
2714
2714
|
"registryDependencies": []
|
|
2715
2715
|
},
|
|
@@ -4084,7 +4084,7 @@
|
|
|
4084
4084
|
"native": 2
|
|
4085
4085
|
},
|
|
4086
4086
|
"dependencies": [
|
|
4087
|
-
"@krizaka/tokens@^3.
|
|
4087
|
+
"@krizaka/tokens@^3.72.0",
|
|
4088
4088
|
"@protomaps/basemaps@5.7.2",
|
|
4089
4089
|
"tailwind-variants@^3.3.1"
|
|
4090
4090
|
],
|
|
@@ -4589,7 +4589,7 @@
|
|
|
4589
4589
|
"native": 0
|
|
4590
4590
|
},
|
|
4591
4591
|
"dependencies": [
|
|
4592
|
-
"@krizaka/tokens@^3.
|
|
4592
|
+
"@krizaka/tokens@^3.72.0",
|
|
4593
4593
|
"radix-ui@^1.8.1",
|
|
4594
4594
|
"tailwind-variants@^3.3.1"
|
|
4595
4595
|
],
|
|
@@ -5486,7 +5486,7 @@
|
|
|
5486
5486
|
"native": 0
|
|
5487
5487
|
},
|
|
5488
5488
|
"dependencies": [
|
|
5489
|
-
"@krizaka/tokens@^3.
|
|
5489
|
+
"@krizaka/tokens@^3.72.0",
|
|
5490
5490
|
"radix-ui@^1.8.1",
|
|
5491
5491
|
"tailwind-variants@^3.3.1"
|
|
5492
5492
|
],
|
|
@@ -5933,7 +5933,7 @@
|
|
|
5933
5933
|
"native": 0
|
|
5934
5934
|
},
|
|
5935
5935
|
"dependencies": [
|
|
5936
|
-
"@krizaka/tokens@^3.
|
|
5936
|
+
"@krizaka/tokens@^3.72.0",
|
|
5937
5937
|
"zod@^4.6.7"
|
|
5938
5938
|
],
|
|
5939
5939
|
"registryDependencies": [
|
|
@@ -5946,6 +5946,7 @@
|
|
|
5946
5946
|
"description-list",
|
|
5947
5947
|
"embed-facade",
|
|
5948
5948
|
"map",
|
|
5949
|
+
"mascots",
|
|
5949
5950
|
"media-gallery",
|
|
5950
5951
|
"opening-hours",
|
|
5951
5952
|
"page",
|
|
@@ -6153,7 +6154,7 @@
|
|
|
6153
6154
|
"native": 0
|
|
6154
6155
|
},
|
|
6155
6156
|
"dependencies": [
|
|
6156
|
-
"@krizaka/tokens@^3.
|
|
6157
|
+
"@krizaka/tokens@^3.72.0",
|
|
6157
6158
|
"radix-ui@^1.8.1",
|
|
6158
6159
|
"tailwind-variants@^3.3.1"
|
|
6159
6160
|
],
|
package/registry/map.json
CHANGED
package/registry/nav-bar.json
CHANGED