@prismicio/vue 6.0.0 → 6.1.0-canary.edf003d
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/PrismicImage.cjs.map +1 -0
- package/dist/PrismicImage.js.map +1 -0
- package/dist/PrismicImage.vue.d.cts +4 -4
- package/dist/PrismicImage.vue.d.cts.map +1 -1
- package/dist/{src/PrismicImage.vue.d.ts → PrismicImage.vue.d.ts} +4 -4
- package/dist/PrismicImage.vue.d.ts.map +1 -0
- package/dist/PrismicImage.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
- package/dist/PrismicImage.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/PrismicLink.cjs.map +1 -0
- package/dist/PrismicLink.js.map +1 -0
- package/dist/PrismicLink.vue.d.cts +4 -4
- package/dist/{src/PrismicLink.vue.d.ts → PrismicLink.vue.d.ts} +4 -4
- package/dist/PrismicLink.vue.d.ts.map +1 -0
- package/dist/PrismicLink.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
- package/dist/PrismicLink.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/PrismicRichText/PrismicRichText.cjs.map +1 -0
- package/dist/PrismicRichText/PrismicRichText.js.map +1 -0
- package/dist/{src/PrismicRichText → PrismicRichText}/PrismicRichText.vue.d.ts +4 -4
- package/dist/PrismicRichText/PrismicRichText.vue.d.ts.map +1 -0
- package/dist/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
- package/dist/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.cjs.map +1 -0
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.js.map +1 -0
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/PrismicRichText/PrismicRichTextSerialize.cjs.map +1 -0
- package/dist/PrismicRichText/PrismicRichTextSerialize.js.map +1 -0
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/PrismicRichText/getRichTextComponentProps.cjs.map +1 -0
- package/dist/PrismicRichText/getRichTextComponentProps.d.ts.map +1 -0
- package/dist/PrismicRichText/getRichTextComponentProps.js.map +1 -0
- package/dist/PrismicRichText/types.d.ts.map +1 -0
- package/dist/PrismicTable/PrismicTable.cjs.map +1 -0
- package/dist/PrismicTable/PrismicTable.js.map +1 -0
- package/dist/{src/PrismicTable → PrismicTable}/PrismicTable.vue.d.ts +2 -2
- package/dist/PrismicTable/PrismicTable.vue.d.ts.map +1 -0
- package/dist/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
- package/dist/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/PrismicTable/PrismicTableDefaultComponents.cjs.map +1 -0
- package/dist/PrismicTable/PrismicTableDefaultComponents.js.map +1 -0
- package/dist/PrismicTable/PrismicTableRow.cjs.map +1 -0
- package/dist/PrismicTable/PrismicTableRow.js.map +1 -0
- package/dist/PrismicTable/PrismicTableRow.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
- package/dist/PrismicTable/PrismicTableRow.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/{src/PrismicTable → PrismicTable}/getTableComponentProps.cjs +2 -2
- package/dist/PrismicTable/getTableComponentProps.cjs.map +1 -0
- package/dist/PrismicTable/getTableComponentProps.d.ts.map +1 -0
- package/dist/{src/PrismicTable → PrismicTable}/getTableComponentProps.js +2 -2
- package/dist/PrismicTable/getTableComponentProps.js.map +1 -0
- package/dist/PrismicTable/types.d.ts.map +1 -0
- package/dist/PrismicText.cjs.map +1 -0
- package/dist/PrismicText.js.map +1 -0
- package/dist/PrismicText.vue.d.cts +2 -2
- package/dist/{src/PrismicText.vue.d.ts → PrismicText.vue.d.ts} +2 -2
- package/dist/PrismicText.vue.d.ts.map +1 -0
- package/dist/PrismicText.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
- package/dist/PrismicText.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/SliceSimulator.cjs +8 -0
- package/dist/SliceSimulator.cjs.map +1 -0
- package/dist/SliceSimulator.js +8 -0
- package/dist/SliceSimulator.js.map +1 -0
- package/dist/SliceSimulator.vue.d.cts +57 -0
- package/dist/SliceSimulator.vue.d.cts.map +1 -0
- package/dist/SliceSimulator.vue.d.ts +57 -0
- package/dist/SliceSimulator.vue.d.ts.map +1 -0
- package/dist/SliceSimulator.vue_vue_type_script_setup_true_lang.cjs +66 -0
- package/dist/SliceSimulator.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
- package/dist/SliceSimulator.vue_vue_type_script_setup_true_lang.js +66 -0
- package/dist/SliceSimulator.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/SliceZone/SliceZone.cjs.map +1 -0
- package/dist/SliceZone/SliceZone.js.map +1 -0
- package/dist/SliceZone/SliceZone.vue.d.cts +2 -2
- package/dist/{src/SliceZone → SliceZone}/SliceZone.vue.d.ts +2 -2
- package/dist/SliceZone/SliceZone.vue.d.ts.map +1 -0
- package/dist/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
- package/dist/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/SliceZone/TODOSliceComponent.cjs.map +1 -0
- package/dist/SliceZone/TODOSliceComponent.d.ts.map +1 -0
- package/dist/SliceZone/TODOSliceComponent.js.map +1 -0
- package/dist/SliceZone/defineSliceZoneComponents.cjs.map +1 -0
- package/dist/SliceZone/defineSliceZoneComponents.d.ts.map +1 -0
- package/dist/SliceZone/defineSliceZoneComponents.js.map +1 -0
- package/dist/SliceZone/getSliceComponentProps.cjs.map +1 -0
- package/dist/SliceZone/getSliceComponentProps.d.ts.map +1 -0
- package/dist/SliceZone/getSliceComponentProps.js.map +1 -0
- package/dist/SliceZone/types.d.ts.map +1 -0
- package/dist/_virtual/rolldown_runtime.cjs +2 -2
- package/dist/_virtual/rolldown_runtime.js +2 -2
- package/dist/createPrismic.cjs.map +1 -0
- package/dist/createPrismic.d.ts.map +1 -0
- package/dist/createPrismic.js.map +1 -0
- package/dist/index.cjs +14 -12
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +20 -19
- package/dist/index.js +14 -13
- package/dist/{src/lib → lib}/devMsg.cjs +1 -1
- package/dist/lib/devMsg.cjs.map +1 -0
- package/dist/{src/lib → lib}/devMsg.js +1 -1
- package/dist/lib/devMsg.js.map +1 -0
- package/dist/lib/isInternalURL.cjs.map +1 -0
- package/dist/lib/isInternalURL.js.map +1 -0
- package/dist/package.cjs +1 -1
- package/dist/package.js +1 -1
- package/dist/types.cjs.map +1 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js.map +1 -0
- package/package.json +11 -10
- package/src/SliceSimulator.vue +78 -0
- package/src/index.ts +3 -0
- package/dist/src/PrismicImage.cjs.map +0 -1
- package/dist/src/PrismicImage.js.map +0 -1
- package/dist/src/PrismicImage.vue.d.ts.map +0 -1
- package/dist/src/PrismicImage.vue_vue_type_script_setup_true_lang.cjs.map +0 -1
- package/dist/src/PrismicImage.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/src/PrismicLink.cjs.map +0 -1
- package/dist/src/PrismicLink.js.map +0 -1
- package/dist/src/PrismicLink.vue.d.ts.map +0 -1
- package/dist/src/PrismicLink.vue_vue_type_script_setup_true_lang.cjs.map +0 -1
- package/dist/src/PrismicLink.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/src/PrismicRichText/PrismicRichText.cjs.map +0 -1
- package/dist/src/PrismicRichText/PrismicRichText.js.map +0 -1
- package/dist/src/PrismicRichText/PrismicRichText.vue.d.ts.map +0 -1
- package/dist/src/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.cjs.map +0 -1
- package/dist/src/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/src/PrismicRichText/PrismicRichTextDefaultComponent.cjs.map +0 -1
- package/dist/src/PrismicRichText/PrismicRichTextDefaultComponent.js.map +0 -1
- package/dist/src/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.cjs.map +0 -1
- package/dist/src/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/src/PrismicRichText/PrismicRichTextSerialize.cjs.map +0 -1
- package/dist/src/PrismicRichText/PrismicRichTextSerialize.js.map +0 -1
- package/dist/src/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.cjs.map +0 -1
- package/dist/src/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/src/PrismicRichText/getRichTextComponentProps.cjs.map +0 -1
- package/dist/src/PrismicRichText/getRichTextComponentProps.d.ts.map +0 -1
- package/dist/src/PrismicRichText/getRichTextComponentProps.js.map +0 -1
- package/dist/src/PrismicRichText/types.d.ts.map +0 -1
- package/dist/src/PrismicTable/PrismicTable.cjs.map +0 -1
- package/dist/src/PrismicTable/PrismicTable.js.map +0 -1
- package/dist/src/PrismicTable/PrismicTable.vue.d.ts.map +0 -1
- package/dist/src/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.cjs.map +0 -1
- package/dist/src/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/src/PrismicTable/PrismicTableDefaultComponents.cjs.map +0 -1
- package/dist/src/PrismicTable/PrismicTableDefaultComponents.js.map +0 -1
- package/dist/src/PrismicTable/PrismicTableRow.cjs.map +0 -1
- package/dist/src/PrismicTable/PrismicTableRow.js.map +0 -1
- package/dist/src/PrismicTable/PrismicTableRow.vue_vue_type_script_setup_true_lang.cjs.map +0 -1
- package/dist/src/PrismicTable/PrismicTableRow.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/src/PrismicTable/getTableComponentProps.cjs.map +0 -1
- package/dist/src/PrismicTable/getTableComponentProps.d.ts.map +0 -1
- package/dist/src/PrismicTable/getTableComponentProps.js.map +0 -1
- package/dist/src/PrismicTable/types.d.ts.map +0 -1
- package/dist/src/PrismicText.cjs.map +0 -1
- package/dist/src/PrismicText.js.map +0 -1
- package/dist/src/PrismicText.vue.d.ts.map +0 -1
- package/dist/src/PrismicText.vue_vue_type_script_setup_true_lang.cjs.map +0 -1
- package/dist/src/PrismicText.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/src/SliceZone/SliceZone.cjs.map +0 -1
- package/dist/src/SliceZone/SliceZone.js.map +0 -1
- package/dist/src/SliceZone/SliceZone.vue.d.ts.map +0 -1
- package/dist/src/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.cjs.map +0 -1
- package/dist/src/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/src/SliceZone/TODOSliceComponent.cjs.map +0 -1
- package/dist/src/SliceZone/TODOSliceComponent.d.ts.map +0 -1
- package/dist/src/SliceZone/TODOSliceComponent.js.map +0 -1
- package/dist/src/SliceZone/defineSliceZoneComponents.cjs.map +0 -1
- package/dist/src/SliceZone/defineSliceZoneComponents.d.ts.map +0 -1
- package/dist/src/SliceZone/defineSliceZoneComponents.js.map +0 -1
- package/dist/src/SliceZone/getSliceComponentProps.cjs.map +0 -1
- package/dist/src/SliceZone/getSliceComponentProps.d.ts.map +0 -1
- package/dist/src/SliceZone/getSliceComponentProps.js.map +0 -1
- package/dist/src/SliceZone/types.d.ts.map +0 -1
- package/dist/src/createPrismic.cjs.map +0 -1
- package/dist/src/createPrismic.d.ts.map +0 -1
- package/dist/src/createPrismic.js.map +0 -1
- package/dist/src/lib/devMsg.cjs.map +0 -1
- package/dist/src/lib/devMsg.js.map +0 -1
- package/dist/src/lib/isInternalURL.cjs.map +0 -1
- package/dist/src/lib/isInternalURL.js.map +0 -1
- package/dist/src/types.cjs.map +0 -1
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/types.js.map +0 -1
- /package/dist/{src/PrismicImage.cjs → PrismicImage.cjs} +0 -0
- /package/dist/{src/PrismicImage.js → PrismicImage.js} +0 -0
- /package/dist/{src/PrismicImage.vue_vue_type_script_setup_true_lang.cjs → PrismicImage.vue_vue_type_script_setup_true_lang.cjs} +0 -0
- /package/dist/{src/PrismicImage.vue_vue_type_script_setup_true_lang.js → PrismicImage.vue_vue_type_script_setup_true_lang.js} +0 -0
- /package/dist/{src/PrismicLink.cjs → PrismicLink.cjs} +0 -0
- /package/dist/{src/PrismicLink.js → PrismicLink.js} +0 -0
- /package/dist/{src/PrismicLink.vue_vue_type_script_setup_true_lang.cjs → PrismicLink.vue_vue_type_script_setup_true_lang.cjs} +0 -0
- /package/dist/{src/PrismicLink.vue_vue_type_script_setup_true_lang.js → PrismicLink.vue_vue_type_script_setup_true_lang.js} +0 -0
- /package/dist/{src/PrismicRichText → PrismicRichText}/PrismicRichText.cjs +0 -0
- /package/dist/{src/PrismicRichText → PrismicRichText}/PrismicRichText.js +0 -0
- /package/dist/{src/PrismicRichText → PrismicRichText}/PrismicRichText.vue_vue_type_script_setup_true_lang.cjs +0 -0
- /package/dist/{src/PrismicRichText → PrismicRichText}/PrismicRichText.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{src/PrismicRichText → PrismicRichText}/PrismicRichTextDefaultComponent.cjs +0 -0
- /package/dist/{src/PrismicRichText → PrismicRichText}/PrismicRichTextDefaultComponent.js +0 -0
- /package/dist/{src/PrismicRichText → PrismicRichText}/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.cjs +0 -0
- /package/dist/{src/PrismicRichText → PrismicRichText}/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{src/PrismicRichText → PrismicRichText}/PrismicRichTextSerialize.cjs +0 -0
- /package/dist/{src/PrismicRichText → PrismicRichText}/PrismicRichTextSerialize.js +0 -0
- /package/dist/{src/PrismicRichText → PrismicRichText}/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.cjs +0 -0
- /package/dist/{src/PrismicRichText → PrismicRichText}/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{src/PrismicRichText → PrismicRichText}/getRichTextComponentProps.cjs +0 -0
- /package/dist/{src/PrismicRichText → PrismicRichText}/getRichTextComponentProps.d.ts +0 -0
- /package/dist/{src/PrismicRichText → PrismicRichText}/getRichTextComponentProps.js +0 -0
- /package/dist/{src/PrismicRichText → PrismicRichText}/index.d.ts +0 -0
- /package/dist/{src/PrismicRichText → PrismicRichText}/types.d.ts +0 -0
- /package/dist/{src/PrismicTable → PrismicTable}/PrismicTable.cjs +0 -0
- /package/dist/{src/PrismicTable → PrismicTable}/PrismicTable.js +0 -0
- /package/dist/{src/PrismicTable → PrismicTable}/PrismicTable.vue_vue_type_script_setup_true_lang.cjs +0 -0
- /package/dist/{src/PrismicTable → PrismicTable}/PrismicTable.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{src/PrismicTable → PrismicTable}/PrismicTableDefaultComponents.cjs +0 -0
- /package/dist/{src/PrismicTable → PrismicTable}/PrismicTableDefaultComponents.js +0 -0
- /package/dist/{src/PrismicTable → PrismicTable}/PrismicTableRow.cjs +0 -0
- /package/dist/{src/PrismicTable → PrismicTable}/PrismicTableRow.js +0 -0
- /package/dist/{src/PrismicTable → PrismicTable}/PrismicTableRow.vue_vue_type_script_setup_true_lang.cjs +0 -0
- /package/dist/{src/PrismicTable → PrismicTable}/PrismicTableRow.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{src/PrismicTable → PrismicTable}/getTableComponentProps.d.ts +0 -0
- /package/dist/{src/PrismicTable → PrismicTable}/index.d.ts +0 -0
- /package/dist/{src/PrismicTable → PrismicTable}/types.d.ts +0 -0
- /package/dist/{src/PrismicText.cjs → PrismicText.cjs} +0 -0
- /package/dist/{src/PrismicText.js → PrismicText.js} +0 -0
- /package/dist/{src/PrismicText.vue_vue_type_script_setup_true_lang.cjs → PrismicText.vue_vue_type_script_setup_true_lang.cjs} +0 -0
- /package/dist/{src/PrismicText.vue_vue_type_script_setup_true_lang.js → PrismicText.vue_vue_type_script_setup_true_lang.js} +0 -0
- /package/dist/{src/SliceZone → SliceZone}/SliceZone.cjs +0 -0
- /package/dist/{src/SliceZone → SliceZone}/SliceZone.js +0 -0
- /package/dist/{src/SliceZone → SliceZone}/SliceZone.vue_vue_type_script_setup_true_lang.cjs +0 -0
- /package/dist/{src/SliceZone → SliceZone}/SliceZone.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{src/SliceZone → SliceZone}/TODOSliceComponent.cjs +0 -0
- /package/dist/{src/SliceZone → SliceZone}/TODOSliceComponent.d.ts +0 -0
- /package/dist/{src/SliceZone → SliceZone}/TODOSliceComponent.js +0 -0
- /package/dist/{src/SliceZone → SliceZone}/defineSliceZoneComponents.cjs +0 -0
- /package/dist/{src/SliceZone → SliceZone}/defineSliceZoneComponents.d.ts +0 -0
- /package/dist/{src/SliceZone → SliceZone}/defineSliceZoneComponents.js +0 -0
- /package/dist/{src/SliceZone → SliceZone}/getSliceComponentProps.cjs +0 -0
- /package/dist/{src/SliceZone → SliceZone}/getSliceComponentProps.d.ts +0 -0
- /package/dist/{src/SliceZone → SliceZone}/getSliceComponentProps.js +0 -0
- /package/dist/{src/SliceZone → SliceZone}/index.d.ts +0 -0
- /package/dist/{src/SliceZone → SliceZone}/types.d.ts +0 -0
- /package/dist/{src/createPrismic.cjs → createPrismic.cjs} +0 -0
- /package/dist/{src/createPrismic.d.ts → createPrismic.d.ts} +0 -0
- /package/dist/{src/createPrismic.js → createPrismic.js} +0 -0
- /package/dist/{src/lib → lib}/isInternalURL.cjs +0 -0
- /package/dist/{src/lib → lib}/isInternalURL.js +0 -0
- /package/dist/{src/types.cjs → types.cjs} +0 -0
- /package/dist/{src/types.d.ts → types.d.ts} +0 -0
- /package/dist/{src/types.js → types.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrismicTable.vue_vue_type_script_setup_true_lang.js","names":["$attrs"],"sources":["../../src/PrismicTable/PrismicTable.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { type TableField, isFilled } from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport type { ComponentOrTagName, ComponentShorthand } from \"../types\"\nimport { isComponent } from \"../types\"\nimport type { InternalTableComponents, TableComponents } from \"./types\"\n\nimport type { RichTextComponents } from \"../PrismicRichText\"\nimport { usePrismic } from \"../createPrismic\"\n\nimport { defaultTableComponents } from \"./PrismicTableDefaultComponents\"\nimport PrismicTableRow from \"./PrismicTableRow.vue\"\n\n/** Props for `<PrismicTable />`. */\nexport type PrismicTableProps = {\n\t/** The Prismic table field to render. */\n\tfield: TableField | undefined\n\n\t/**\n\t * An object that maps a table block type to a Vue component or a shorthand\n\t * definition.\n\t *\n\t * @example\n\t *\n\t * ```javascript\n\t * {\n\t * table: Table,\n\t * thead: { class: 'bg-black text-white' },\n\t * th: { as: 'td', class: 'font-bold' },\n\t * }\n\t * ```\n\t */\n\tcomponents?: TableComponents & RichTextComponents\n\n\t/**\n\t * The value to be rendered when the field is empty. If a fallback is not\n\t * given, `null` (nothing) will be rendered.\n\t */\n\tfallback?: ComponentOrTagName\n}\n\nconst props = defineProps<PrismicTableProps>()\ndefineOptions({ name: \"PrismicTable\" })\n\nconst { components: { richTextComponents } } = usePrismic()\n\nconst resolvedComponents = computed<TableComponents & RichTextComponents>(\n\t() => {\n\t\treturn { ...richTextComponents, ...props.components }\n\t},\n)\n\nfunction getInternalComponent(type: keyof TableComponents) {\n\tconst maybeComponentOrShorthand = resolvedComponents.value?.[type]\n\n\tif (isComponent(maybeComponentOrShorthand)) {\n\t\treturn { is: maybeComponentOrShorthand }\n\t}\n\n\treturn {\n\t\tis: defaultTableComponents[type],\n\t\tshorthand: maybeComponentOrShorthand as ComponentShorthand,\n\t}\n}\n\nconst internalTableComponents = computed<InternalTableComponents>(() => {\n\treturn {\n\t\ttable: getInternalComponent(\"table\"),\n\t\tthead: getInternalComponent(\"thead\"),\n\t\ttbody: getInternalComponent(\"tbody\"),\n\t\ttr: getInternalComponent(\"tr\"),\n\t\tth: getInternalComponent(\"th\"),\n\t\ttd: getInternalComponent(\"td\"),\n\t}\n})\n</script>\n\n<template>\n\t<component\n\t\tv-if=\"isFilled.table(field)\"\n\t\t:is=\"internalTableComponents.table.is\"\n\t\t:table=\"field\"\n\t\tv-bind=\"{ ...$attrs, ...internalTableComponents.table.shorthand }\"\n\t>\n\t\t<component\n\t\t\tv-if=\"field.head\"\n\t\t\t:is=\"internalTableComponents.thead.is\"\n\t\t\t:head=\"field.head\"\n\t\t\tv-bind=\"internalTableComponents.thead.shorthand\"\n\t\t>\n\t\t\t<PrismicTableRow\n\t\t\t\tv-for=\"row in field.head.rows\"\n\t\t\t\t:key=\"row.key\"\n\t\t\t\t:row=\"row\"\n\t\t\t\t:internalTableComponents=\"internalTableComponents\"\n\t\t\t\t:components=\"components\"\n\t\t\t/>\n\t\t</component>\n\t\t<component\n\t\t\t:is=\"internalTableComponents.tbody.is\"\n\t\t\t:body=\"field.body\"\n\t\t\tv-bind=\"internalTableComponents.tbody.shorthand\"\n\t\t>\n\t\t\t<PrismicTableRow\n\t\t\t\tv-for=\"row in field.body.rows\"\n\t\t\t\t:key=\"row.key\"\n\t\t\t\t:row=\"row\"\n\t\t\t\t:internalTableComponents=\"internalTableComponents\"\n\t\t\t\t:components=\"components\"\n\t\t\t/>\n\t\t</component>\n\t</component>\n\t<component v-else-if=\"fallback\" :is=\"fallback\" v-bind=\"$attrs\" />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;EA0CA,MAAM,QAAQ;EAGd,MAAM,EAAE,YAAY,EAAE,yBAAyB,YAAW;EAE1D,MAAM,qBAAqB,eACpB;AACL,UAAO;IAAE,GAAG;IAAoB,GAAG,MAAM;IAAW;IAEtD;EAEA,SAAS,qBAAqB,MAA6B;GAC1D,MAAM,4BAA4B,mBAAmB,QAAQ;AAE7D,OAAI,YAAY,0BAA0B,CACzC,QAAO,EAAE,IAAI,2BAA0B;AAGxC,UAAO;IACN,IAAI,uBAAuB;IAC3B,WAAW;IACZ;;EAGD,MAAM,0BAA0B,eAAwC;AACvE,UAAO;IACN,OAAO,qBAAqB,QAAQ;IACpC,OAAO,qBAAqB,QAAQ;IACpC,OAAO,qBAAqB,QAAQ;IACpC,IAAI,qBAAqB,KAAK;IAC9B,IAAI,qBAAqB,KAAK;IAC9B,IAAI,qBAAqB,KAAK;IAC/B;IACA;;UAKO,MAAA,SAAQ,CAAC,MAAM,QAAA,MAAK,iBAD3B,YAiCY,wBA/BN,wBAAA,MAAwB,MAAM,GAAE,EAFtC,WAiCY;;IA9BV,OAAO,QAAA;;OACKA,KAAAA;IAAM,GAAK,wBAAA,MAAwB,MAAM;IAAS,CAAA,EAAA;2BAenD,CAZL,QAAA,MAAM,qBADb,YAaY,wBAXN,wBAAA,MAAwB,MAAM,GAAE,EAFtC,WAaY;;KAVV,MAAM,QAAA,MAAM;OACL,wBAAA,MAAwB,MAAM,UAAS,EAAA;4BAGhB,mBAD/B,mBAME,UAAA,MAAA,WALa,QAAA,MAAM,KAAK,OAAlB,QAAG;0BADX,YAME,yBAAA;OAJA,KAAK,IAAI;OACJ;OACL,yBAAyB,wBAAA;OACzB,YAAY,QAAA;;;;;;;;wEAGf,YAYY,wBAXN,wBAAA,MAAwB,MAAM,GAAE,EADtC,WAYY,EAVV,MAAM,QAAA,MAAM,QACL,wBAAA,MAAwB,MAAM,UAAS,EAAA;4BAGhB,mBAD/B,mBAME,UAAA,MAAA,WALa,QAAA,MAAM,KAAK,OAAlB,QAAG;0BADX,YAME,yBAAA;OAJA,KAAK,IAAI;OACJ;OACL,yBAAyB,wBAAA;OACzB,YAAY,QAAA;;;;;;;;;;wBAIM,QAAA,yBAAtB,YAAiE,wBAA5B,QAAA,SAAQ,EAAA,eAAA,WAAA,EAAA,KAAA,GAAA,EAAUA,KAAAA,OAAM,CAAA,EAAA,MAAA,GAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrismicTableDefaultComponents.cjs","names":[],"sources":["../../src/PrismicTable/PrismicTableDefaultComponents.ts"],"sourcesContent":["import { defineComponent, h } from \"vue\"\n\nimport type { TableComponents } from \"./types\"\n\nimport * as getTableComponentProps from \"./getTableComponentProps\"\n\nexport const defaultTableComponents: Required<TableComponents> = {\n\ttable: defineComponent({\n\t\tprops: getTableComponentProps.table(),\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(\"table\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\tthead: defineComponent({\n\t\tprops: getTableComponentProps.thead(),\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(\"thead\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttbody: defineComponent({\n\t\tprops: getTableComponentProps.tbody(),\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(\"tbody\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttr: defineComponent({\n\t\tprops: getTableComponentProps.tr(),\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(\"tr\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\tth: defineComponent({\n\t\tprops: getTableComponentProps.th(),\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(\"th\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttd: defineComponent({\n\t\tprops: getTableComponentProps.td(),\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(\"td\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n}\n"],"mappings":";;;;AAMA,MAAa,yBAAoD;CAChE,gCAAuB;EACtB,6CAAqC;EACrC,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,2BAAe,SAAS,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAErE,CAAC;CACF,gCAAuB;EACtB,6CAAqC;EACrC,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,2BAAe,SAAS,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAErE,CAAC;CACF,gCAAuB;EACtB,6CAAqC;EACrC,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,2BAAe,SAAS,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAErE,CAAC;CACF,6BAAoB;EACnB,0CAAkC;EAClC,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,2BAAe,MAAM,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAElE,CAAC;CACF,6BAAoB;EACnB,0CAAkC;EAClC,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,2BAAe,MAAM,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAElE,CAAC;CACF,6BAAoB;EACnB,0CAAkC;EAClC,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,2BAAe,MAAM,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAElE,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrismicTableDefaultComponents.js","names":["getTableComponentProps.table","getTableComponentProps.thead","getTableComponentProps.tbody","getTableComponentProps.tr","getTableComponentProps.th","getTableComponentProps.td"],"sources":["../../src/PrismicTable/PrismicTableDefaultComponents.ts"],"sourcesContent":["import { defineComponent, h } from \"vue\"\n\nimport type { TableComponents } from \"./types\"\n\nimport * as getTableComponentProps from \"./getTableComponentProps\"\n\nexport const defaultTableComponents: Required<TableComponents> = {\n\ttable: defineComponent({\n\t\tprops: getTableComponentProps.table(),\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(\"table\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\tthead: defineComponent({\n\t\tprops: getTableComponentProps.thead(),\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(\"thead\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttbody: defineComponent({\n\t\tprops: getTableComponentProps.tbody(),\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(\"tbody\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttr: defineComponent({\n\t\tprops: getTableComponentProps.tr(),\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(\"tr\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\tth: defineComponent({\n\t\tprops: getTableComponentProps.th(),\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(\"th\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttd: defineComponent({\n\t\tprops: getTableComponentProps.td(),\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(\"td\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n}\n"],"mappings":";;;;AAMA,MAAa,yBAAoD;CAChE,OAAO,gBAAgB;EACtB,OAAOA,OAA8B;EACrC,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,gBAAa,EAAE,SAAS,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAErE,CAAC;CACF,OAAO,gBAAgB;EACtB,OAAOC,OAA8B;EACrC,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,gBAAa,EAAE,SAAS,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAErE,CAAC;CACF,OAAO,gBAAgB;EACtB,OAAOC,OAA8B;EACrC,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,gBAAa,EAAE,SAAS,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAErE,CAAC;CACF,IAAI,gBAAgB;EACnB,OAAOC,IAA2B;EAClC,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,gBAAa,EAAE,MAAM,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAElE,CAAC;CACF,IAAI,gBAAgB;EACnB,OAAOC,IAA2B;EAClC,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,gBAAa,EAAE,MAAM,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAElE,CAAC;CACF,IAAI,gBAAgB;EACnB,OAAOC,IAA2B;EAClC,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,gBAAa,EAAE,MAAM,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAElE,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrismicTableRow.cjs","names":[],"sources":["../../src/PrismicTable/PrismicTableRow.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { TableFieldBodyRow, TableFieldHeadRow } from \"@prismicio/client\"\n\nimport type { InternalTableComponents } from \"./types\"\n\nimport type { RichTextComponents } from \"../PrismicRichText\"\nimport PrismicRichText from \"../PrismicRichText/PrismicRichText.vue\"\n\nexport type PrismicTableRowProps = {\n\trow: TableFieldHeadRow | TableFieldBodyRow\n\tinternalTableComponents: InternalTableComponents\n\tcomponents?: RichTextComponents\n}\n\nconst props = defineProps<PrismicTableRowProps>()\ndefineOptions({ name: \"PrismicTableRow\" })\n</script>\n\n<template>\n\t<component\n\t\t:is=\"internalTableComponents.tr.is\"\n\t\t:row=\"row\"\n\t\tv-bind=\"internalTableComponents.tr.shorthand\"\n\t>\n\t\t<template v-for=\"cell in row.cells\" :key=\"cell.key\">\n\t\t\t<component\n\t\t\t\tv-if=\"cell.type === 'header'\"\n\t\t\t\t:is=\"internalTableComponents.th.is\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t\tv-bind=\"internalTableComponents.th.shorthand\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t\t<component\n\t\t\t\tv-else\n\t\t\t\t:is=\"internalTableComponents.td.is\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t\tv-bind=\"internalTableComponents.td.shorthand\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t</template>\n\t</component>\n</template>\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrismicTableRow.js","names":[],"sources":["../../src/PrismicTable/PrismicTableRow.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { TableFieldBodyRow, TableFieldHeadRow } from \"@prismicio/client\"\n\nimport type { InternalTableComponents } from \"./types\"\n\nimport type { RichTextComponents } from \"../PrismicRichText\"\nimport PrismicRichText from \"../PrismicRichText/PrismicRichText.vue\"\n\nexport type PrismicTableRowProps = {\n\trow: TableFieldHeadRow | TableFieldBodyRow\n\tinternalTableComponents: InternalTableComponents\n\tcomponents?: RichTextComponents\n}\n\nconst props = defineProps<PrismicTableRowProps>()\ndefineOptions({ name: \"PrismicTableRow\" })\n</script>\n\n<template>\n\t<component\n\t\t:is=\"internalTableComponents.tr.is\"\n\t\t:row=\"row\"\n\t\tv-bind=\"internalTableComponents.tr.shorthand\"\n\t>\n\t\t<template v-for=\"cell in row.cells\" :key=\"cell.key\">\n\t\t\t<component\n\t\t\t\tv-if=\"cell.type === 'header'\"\n\t\t\t\t:is=\"internalTableComponents.th.is\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t\tv-bind=\"internalTableComponents.th.shorthand\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t\t<component\n\t\t\t\tv-else\n\t\t\t\t:is=\"internalTableComponents.td.is\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t\tv-bind=\"internalTableComponents.td.shorthand\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t</template>\n\t</component>\n</template>\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrismicTableRow.vue_vue_type_script_setup_true_lang.cjs","names":[],"sources":["../../src/PrismicTable/PrismicTableRow.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { TableFieldBodyRow, TableFieldHeadRow } from \"@prismicio/client\"\n\nimport type { InternalTableComponents } from \"./types\"\n\nimport type { RichTextComponents } from \"../PrismicRichText\"\nimport PrismicRichText from \"../PrismicRichText/PrismicRichText.vue\"\n\nexport type PrismicTableRowProps = {\n\trow: TableFieldHeadRow | TableFieldBodyRow\n\tinternalTableComponents: InternalTableComponents\n\tcomponents?: RichTextComponents\n}\n\nconst props = defineProps<PrismicTableRowProps>()\ndefineOptions({ name: \"PrismicTableRow\" })\n</script>\n\n<template>\n\t<component\n\t\t:is=\"internalTableComponents.tr.is\"\n\t\t:row=\"row\"\n\t\tv-bind=\"internalTableComponents.tr.shorthand\"\n\t>\n\t\t<template v-for=\"cell in row.cells\" :key=\"cell.key\">\n\t\t\t<component\n\t\t\t\tv-if=\"cell.type === 'header'\"\n\t\t\t\t:is=\"internalTableComponents.th.is\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t\tv-bind=\"internalTableComponents.th.shorthand\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t\t<component\n\t\t\t\tv-else\n\t\t\t\t:is=\"internalTableComponents.td.is\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t\tv-bind=\"internalTableComponents.td.shorthand\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t</template>\n\t</component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;sFAoBO,QAAA,wBAAwB,GAAG,GAAE,sBAsBvB,EArBV,KAAK,QAAA,KAAG,EACD,QAAA,wBAAwB,GAAG,UAAS,EAAA;oCAET,wDAiBxB,cAAA,0BAjBc,QAAA,IAAI,QAAZ,SAAI;mFAAqB,KAAK,QAEvC,KAAK,SAAI,wFACV,QAAA,wBAAwB,GAAG,GAAE,sBAKvB;;MAJJ;2BACC,QAAA,wBAAwB,GAAG,UAAS,EAAA;sCAEsB,sBAAA,iCAAA;OAAhD,OAAO,KAAK;OAAU,YAAY,QAAA;;;wGAI/C,QAAA,wBAAwB,GAAG,GAAE,sBAKvB;;MAJJ;2BACC,QAAA,wBAAwB,GAAG,UAAS,EAAA;sCAEsB,sBAAA,iCAAA;OAAhD,OAAO,KAAK;OAAU,YAAY,QAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrismicTableRow.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/PrismicTable/PrismicTableRow.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { TableFieldBodyRow, TableFieldHeadRow } from \"@prismicio/client\"\n\nimport type { InternalTableComponents } from \"./types\"\n\nimport type { RichTextComponents } from \"../PrismicRichText\"\nimport PrismicRichText from \"../PrismicRichText/PrismicRichText.vue\"\n\nexport type PrismicTableRowProps = {\n\trow: TableFieldHeadRow | TableFieldBodyRow\n\tinternalTableComponents: InternalTableComponents\n\tcomponents?: RichTextComponents\n}\n\nconst props = defineProps<PrismicTableRowProps>()\ndefineOptions({ name: \"PrismicTableRow\" })\n</script>\n\n<template>\n\t<component\n\t\t:is=\"internalTableComponents.tr.is\"\n\t\t:row=\"row\"\n\t\tv-bind=\"internalTableComponents.tr.shorthand\"\n\t>\n\t\t<template v-for=\"cell in row.cells\" :key=\"cell.key\">\n\t\t\t<component\n\t\t\t\tv-if=\"cell.type === 'header'\"\n\t\t\t\t:is=\"internalTableComponents.th.is\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t\tv-bind=\"internalTableComponents.th.shorthand\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t\t<component\n\t\t\t\tv-else\n\t\t\t\t:is=\"internalTableComponents.td.is\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t\tv-bind=\"internalTableComponents.td.shorthand\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t</template>\n\t</component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;uBAmBC,YAuBY,wBAtBN,QAAA,wBAAwB,GAAG,GAAE,EADnC,WAuBY,EArBV,KAAK,QAAA,KAAG,EACD,QAAA,wBAAwB,GAAG,UAAS,EAAA;2BAET,mBAAnC,mBAiBW,UAAA,MAAA,WAjBc,QAAA,IAAI,QAAZ,SAAI;6DAAqB,KAAK,QAEvC,KAAK,SAAI,yBADhB,YAOY,wBALN,QAAA,wBAAwB,GAAG,GAAE,EAFnC,WAOY;;MAJJ;2BACC,QAAA,wBAAwB,GAAG,UAAS,EAAA;6BAEsB,CAAlE,YAAkE,yBAAA;OAAhD,OAAO,KAAK;OAAU,YAAY,QAAA;;;yCAErD,YAOY,wBALN,QAAA,wBAAwB,GAAG,GAAE,EAFnC,WAOY;;MAJJ;2BACC,QAAA,wBAAwB,GAAG,UAAS,EAAA;6BAEsB,CAAlE,YAAkE,yBAAA;OAAhD,OAAO,KAAK;OAAU,YAAY,QAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
|
|
3
3
|
//#region src/PrismicTable/getTableComponentProps.ts
|
|
4
|
-
var getTableComponentProps_exports = /* @__PURE__ */ require_rolldown_runtime.
|
|
4
|
+
var getTableComponentProps_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
|
|
5
5
|
table: () => table,
|
|
6
6
|
tbody: () => tbody,
|
|
7
7
|
td: () => td,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTableComponentProps.cjs","names":[],"sources":["../../src/PrismicTable/getTableComponentProps.ts"],"sourcesContent":["import type {\n\tTableField,\n\tTableFieldBody,\n\tTableFieldBodyRow,\n\tTableFieldDataCell,\n\tTableFieldHead,\n\tTableFieldHeadRow,\n\tTableFieldHeaderCell,\n} from \"@prismicio/client\"\nimport type { PropType } from \"vue\"\n\n/**\n * Gets native Vue props for a component rendering `table` elements from a\n * Prismic table field with `<PrismicTable />`.\n *\n * Props are: `[\"table\"]`\n *\n * @example\n *\n * ```javascript\n * // Defining a new rich text component\n * import { getTableComponentProps } from \"@prismicio/vue\"\n *\n * defineProps(getTableComponentProps.table())\n * ```\n */\nexport const table = (): {\n\ttable: { type: PropType<TableField<\"filled\">>; required: true }\n} => ({\n\ttable: { type: Object as PropType<TableField<\"filled\">>, required: true },\n})\n\n/**\n * Gets native Vue props for a component rendering `thead` elements from a\n * Prismic table field with `<PrismicTable />`.\n *\n * Props are: `[\"head\"]`\n *\n * @example\n *\n * ```javascript\n * // Defining a new rich text component\n * import { getTableComponentProps } from \"@prismicio/vue\"\n *\n * defineProps(getTableComponentProps.thead())\n * ```\n */\nexport const thead = (): {\n\thead: { type: PropType<TableFieldHead>; required: true }\n} => ({\n\thead: { type: Object as PropType<TableFieldHead>, required: true },\n})\n\n/**\n * Gets native Vue props for a component rendering `tbody` elements from a\n * Prismic table field with `<PrismicTable />`.\n *\n * Props are: `[\"body\"]`\n *\n * @example\n *\n * ```javascript\n * // Defining a new rich text component\n * import { getTableComponentProps } from \"@prismicio/vue\"\n *\n * defineProps(getTableComponentProps.body())\n * ```\n */\nexport const tbody = (): {\n\tbody: { type: PropType<TableFieldBody>; required: true }\n} => ({\n\tbody: { type: Object as PropType<TableFieldBody>, required: true },\n})\n\n/**\n * Gets native Vue props for a component rendering `tr` elements from a Prismic\n * table field with `<PrismicTable />`.\n *\n * Props are: `[\"row\"]`\n *\n * @example\n *\n * ```javascript\n * // Defining a new rich text component\n * import { getTableComponentProps } from \"@prismicio/vue\"\n *\n * defineProps(getTableComponentProps.tr())\n * ```\n */\nexport const tr = (): {\n\trow: {\n\t\ttype: PropType<TableFieldHeadRow | TableFieldBodyRow>\n\t\trequired: true\n\t}\n} => ({\n\trow: {\n\t\ttype: Object as PropType<TableFieldHeadRow | TableFieldBodyRow>,\n\t\trequired: true,\n\t},\n})\n\n/**\n * Gets native Vue props for a component rendering `th` elements from a Prismic\n * table field with `<PrismicTable />`.\n *\n * Props are: `[\"cell\"]`\n *\n * @example\n *\n * ```javascript\n * // Defining a new rich text component\n * import { getTableComponentProps } from \"@prismicio/vue\"\n *\n * defineProps(getTableComponentProps.th())\n * ```\n */\nexport const th = (): {\n\tcell: { type: PropType<TableFieldHeaderCell>; required: true }\n} => ({\n\tcell: { type: Object as PropType<TableFieldHeaderCell>, required: true },\n})\n\n/**\n * Gets native Vue props for a component rendering `td` elements from a Prismic\n * table field with `<PrismicTable />`.\n *\n * Props are: `[\"cell\"]`\n *\n * @example\n *\n * ```javascript\n * // Defining a new rich text component\n * import { getTableComponentProps } from \"@prismicio/vue\"\n *\n * defineProps(getTableComponentProps.td())\n * ```\n */\nexport const td = (): {\n\tcell: { type: PropType<TableFieldDataCell>; required: true }\n} => ({\n\tcell: { type: Object as PropType<TableFieldDataCell>, required: true },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAa,eAEP,EACL,OAAO;CAAE,MAAM;CAA0C,UAAU;CAAM,EACzE;;;;;;;;;;;;;;;;AAiBD,MAAa,eAEP,EACL,MAAM;CAAE,MAAM;CAAoC,UAAU;CAAM,EAClE;;;;;;;;;;;;;;;;AAiBD,MAAa,eAEP,EACL,MAAM;CAAE,MAAM;CAAoC,UAAU;CAAM,EAClE;;;;;;;;;;;;;;;;AAiBD,MAAa,YAKP,EACL,KAAK;CACJ,MAAM;CACN,UAAU;CACV,EACD;;;;;;;;;;;;;;;;AAiBD,MAAa,YAEP,EACL,MAAM;CAAE,MAAM;CAA0C,UAAU;CAAM,EACxE;;;;;;;;;;;;;;;;AAiBD,MAAa,YAEP,EACL,MAAM;CAAE,MAAM;CAAwC,UAAU;CAAM,EACtE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTableComponentProps.d.ts","names":[],"sources":["../../src/PrismicTable/getTableComponentProps.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;AA0BA;AAqBA;AAqBA;AAqBA;AAEiB,cAjEJ,KAiEI,EAAA,GAAA,GAAA;EAAoB,KAAA,EAAA;IAA7B,IAAA,EAhEQ,QAgER,CAhEiB,UAgEjB,CAAA,QAAA,CAAA,CAAA;IAAQ,QAAA,EAAA,IAAA;EAyBH,CAAA;AAqBb,CAAA;;;;;;;;;;;;;;;;cA1Fa;;UACE,SAAS;;;;;;;;;;;;;;;;;;;cAoBX;;UACE,SAAS;;;;;;;;;;;;;;;;;;;cAoBX;;UAEL,SAAS,oBAAoB;;;;;;;;;;;;;;;;;;;cAyBxB;;UACE,SAAS;;;;;;;;;;;;;;;;;;;cAoBX;;UACE,SAAS"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __exportAll } from "../_virtual/rolldown_runtime.js";
|
|
2
2
|
|
|
3
3
|
//#region src/PrismicTable/getTableComponentProps.ts
|
|
4
|
-
var getTableComponentProps_exports = /* @__PURE__ */
|
|
4
|
+
var getTableComponentProps_exports = /* @__PURE__ */ __exportAll({
|
|
5
5
|
table: () => table,
|
|
6
6
|
tbody: () => tbody,
|
|
7
7
|
td: () => td,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTableComponentProps.js","names":[],"sources":["../../src/PrismicTable/getTableComponentProps.ts"],"sourcesContent":["import type {\n\tTableField,\n\tTableFieldBody,\n\tTableFieldBodyRow,\n\tTableFieldDataCell,\n\tTableFieldHead,\n\tTableFieldHeadRow,\n\tTableFieldHeaderCell,\n} from \"@prismicio/client\"\nimport type { PropType } from \"vue\"\n\n/**\n * Gets native Vue props for a component rendering `table` elements from a\n * Prismic table field with `<PrismicTable />`.\n *\n * Props are: `[\"table\"]`\n *\n * @example\n *\n * ```javascript\n * // Defining a new rich text component\n * import { getTableComponentProps } from \"@prismicio/vue\"\n *\n * defineProps(getTableComponentProps.table())\n * ```\n */\nexport const table = (): {\n\ttable: { type: PropType<TableField<\"filled\">>; required: true }\n} => ({\n\ttable: { type: Object as PropType<TableField<\"filled\">>, required: true },\n})\n\n/**\n * Gets native Vue props for a component rendering `thead` elements from a\n * Prismic table field with `<PrismicTable />`.\n *\n * Props are: `[\"head\"]`\n *\n * @example\n *\n * ```javascript\n * // Defining a new rich text component\n * import { getTableComponentProps } from \"@prismicio/vue\"\n *\n * defineProps(getTableComponentProps.thead())\n * ```\n */\nexport const thead = (): {\n\thead: { type: PropType<TableFieldHead>; required: true }\n} => ({\n\thead: { type: Object as PropType<TableFieldHead>, required: true },\n})\n\n/**\n * Gets native Vue props for a component rendering `tbody` elements from a\n * Prismic table field with `<PrismicTable />`.\n *\n * Props are: `[\"body\"]`\n *\n * @example\n *\n * ```javascript\n * // Defining a new rich text component\n * import { getTableComponentProps } from \"@prismicio/vue\"\n *\n * defineProps(getTableComponentProps.body())\n * ```\n */\nexport const tbody = (): {\n\tbody: { type: PropType<TableFieldBody>; required: true }\n} => ({\n\tbody: { type: Object as PropType<TableFieldBody>, required: true },\n})\n\n/**\n * Gets native Vue props for a component rendering `tr` elements from a Prismic\n * table field with `<PrismicTable />`.\n *\n * Props are: `[\"row\"]`\n *\n * @example\n *\n * ```javascript\n * // Defining a new rich text component\n * import { getTableComponentProps } from \"@prismicio/vue\"\n *\n * defineProps(getTableComponentProps.tr())\n * ```\n */\nexport const tr = (): {\n\trow: {\n\t\ttype: PropType<TableFieldHeadRow | TableFieldBodyRow>\n\t\trequired: true\n\t}\n} => ({\n\trow: {\n\t\ttype: Object as PropType<TableFieldHeadRow | TableFieldBodyRow>,\n\t\trequired: true,\n\t},\n})\n\n/**\n * Gets native Vue props for a component rendering `th` elements from a Prismic\n * table field with `<PrismicTable />`.\n *\n * Props are: `[\"cell\"]`\n *\n * @example\n *\n * ```javascript\n * // Defining a new rich text component\n * import { getTableComponentProps } from \"@prismicio/vue\"\n *\n * defineProps(getTableComponentProps.th())\n * ```\n */\nexport const th = (): {\n\tcell: { type: PropType<TableFieldHeaderCell>; required: true }\n} => ({\n\tcell: { type: Object as PropType<TableFieldHeaderCell>, required: true },\n})\n\n/**\n * Gets native Vue props for a component rendering `td` elements from a Prismic\n * table field with `<PrismicTable />`.\n *\n * Props are: `[\"cell\"]`\n *\n * @example\n *\n * ```javascript\n * // Defining a new rich text component\n * import { getTableComponentProps } from \"@prismicio/vue\"\n *\n * defineProps(getTableComponentProps.td())\n * ```\n */\nexport const td = (): {\n\tcell: { type: PropType<TableFieldDataCell>; required: true }\n} => ({\n\tcell: { type: Object as PropType<TableFieldDataCell>, required: true },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAa,eAEP,EACL,OAAO;CAAE,MAAM;CAA0C,UAAU;CAAM,EACzE;;;;;;;;;;;;;;;;AAiBD,MAAa,eAEP,EACL,MAAM;CAAE,MAAM;CAAoC,UAAU;CAAM,EAClE;;;;;;;;;;;;;;;;AAiBD,MAAa,eAEP,EACL,MAAM;CAAE,MAAM;CAAoC,UAAU;CAAM,EAClE;;;;;;;;;;;;;;;;AAiBD,MAAa,YAKP,EACL,KAAK;CACJ,MAAM;CACN,UAAU;CACV,EACD;;;;;;;;;;;;;;;;AAiBD,MAAa,YAEP,EACL,MAAM;CAAE,MAAM;CAA0C,UAAU;CAAM,EACxE;;;;;;;;;;;;;;;;AAiBD,MAAa,YAEP,EACL,MAAM;CAAE,MAAM;CAAwC,UAAU;CAAM,EACtE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../src/PrismicTable/types.ts"],"sourcesContent":[],"mappings":";;;;;;;AAkBA;;;;AAGI,KAHQ,eAAA,GAGR;EAEkB,KAAA,CAAA,EAHlB,SAGkB,CAAA;IAAlB,KAAA,EAHmB,UAGnB,CAAA,QAAA,CAAA;EACK,CAAA,CAAA,GAHL,IAGK,CAHA,kBAGA,EAAA,IAAA,CAAA;EAAL,KAAA,CAAA,EADA,SACA,CAAA;IAEkB,IAAA,EAHA,cAGA;EAAlB,CAAA,CAAA,GAFA,IAEA,CAFK,kBAEL,EAAA,IAAA,CAAA;EACK,KAAA,CAAA,EADL,SACK,CAAA;IAAL,IAAA,EADkB,cAClB;EAEiB,CAAA,CAAA,GAFjB,IAEiB,CAFZ,kBAEY,EAAA,IAAA,CAAA;EAAoB,EAAA,CAAA,EAArC,SAAqC,CAAA;IAArC,GAAA,EAAiB,iBAAjB,GAAqC,iBAArC;EACK,CAAA,CAAA,GAAL,IAAK,CAAA,kBAAA,EAAA,IAAA,CAAA;EAAL,EAAA,CAAA,EAEA,SAFA,CAAA;IAEkB,IAAA,EAAA,oBAAA;EAAlB,CAAA,CAAA,GACA,IADA,CACK,kBADL,EAAA,IAAA,CAAA;EACK,EAAA,CAAA,EAEL,SAFK,CAAA;IAAL,IAAA,EAEkB,kBAFlB;EAEkB,CAAA,CAAA,GAClB,IADkB,CACb,kBADa,EAAA,IAAA,CAAA;CAAlB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrismicText.cjs","names":[],"sources":["../src/PrismicText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { RichTextField } from \"@prismicio/client\"\nimport { asText } from \"@prismicio/client\"\nimport { DEV } from \"esm-env\"\nimport { watchEffect } from \"vue\"\n\nimport { devMsg } from \"./lib/devMsg\"\n\n/** Props for `<PrismicText />`. */\nexport type PrismicTextProps = {\n\t/** The Prismic rich text field to render. */\n\tfield: RichTextField | null | undefined\n\n\t/**\n\t * The string value to be rendered when the field is empty. If a fallback is\n\t * not given, `\"\"` (nothing) will be rendered.\n\t */\n\tfallback?: string\n\n\t/**\n\t * The separator used between blocks.\n\t *\n\t * @defaultValue `\" \"` (a whitespace)\n\t */\n\tseparator?: string\n}\n\nconst props = defineProps<PrismicTextProps>()\ndefineOptions({ name: \"PrismicText\" })\n\nif (DEV) {\n\twatchEffect(() => {\n\t\tif (typeof props.field === \"string\") {\n\t\t\tthrow new Error(\n\t\t\t\t`[PrismicText] The \"field\" prop only accepts a Rich Text or title field's value but was provided a different type of field instead (e.g. a Key Text or Select field). You can resolve this error by rendering the field value inline without <PrismicText>. For more details, see ${devMsg(\n\t\t\t\t\t\"prismictext-works-only-with-rich-text-and-title-fields\",\n\t\t\t\t)}`,\n\t\t\t)\n\t\t}\n\t}, {})\n}\n</script>\n\n<template>\n\t{{ asText(field) || fallback || \"\" }}\n</template>\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrismicText.js","names":[],"sources":["../src/PrismicText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { RichTextField } from \"@prismicio/client\"\nimport { asText } from \"@prismicio/client\"\nimport { DEV } from \"esm-env\"\nimport { watchEffect } from \"vue\"\n\nimport { devMsg } from \"./lib/devMsg\"\n\n/** Props for `<PrismicText />`. */\nexport type PrismicTextProps = {\n\t/** The Prismic rich text field to render. */\n\tfield: RichTextField | null | undefined\n\n\t/**\n\t * The string value to be rendered when the field is empty. If a fallback is\n\t * not given, `\"\"` (nothing) will be rendered.\n\t */\n\tfallback?: string\n\n\t/**\n\t * The separator used between blocks.\n\t *\n\t * @defaultValue `\" \"` (a whitespace)\n\t */\n\tseparator?: string\n}\n\nconst props = defineProps<PrismicTextProps>()\ndefineOptions({ name: \"PrismicText\" })\n\nif (DEV) {\n\twatchEffect(() => {\n\t\tif (typeof props.field === \"string\") {\n\t\t\tthrow new Error(\n\t\t\t\t`[PrismicText] The \"field\" prop only accepts a Rich Text or title field's value but was provided a different type of field instead (e.g. a Key Text or Select field). You can resolve this error by rendering the field value inline without <PrismicText>. For more details, see ${devMsg(\n\t\t\t\t\t\"prismictext-works-only-with-rich-text-and-title-fields\",\n\t\t\t\t)}`,\n\t\t\t)\n\t\t}\n\t}, {})\n}\n</script>\n\n<template>\n\t{{ asText(field) || fallback || \"\" }}\n</template>\n"],"mappings":""}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as vue26 from "vue";
|
|
2
2
|
import { RichTextField } from "@prismicio/client";
|
|
3
3
|
|
|
4
4
|
//#region src/PrismicText.vue.d.ts
|
|
@@ -18,7 +18,7 @@ type PrismicTextProps = {
|
|
|
18
18
|
*/
|
|
19
19
|
separator?: string;
|
|
20
20
|
};
|
|
21
|
-
declare const __VLS_export:
|
|
21
|
+
declare const __VLS_export: vue26.DefineComponent<PrismicTextProps, {}, {}, {}, {}, vue26.ComponentOptionsMixin, vue26.ComponentOptionsMixin, {}, string, vue26.PublicProps, Readonly<PrismicTextProps> & Readonly<{}>, {}, {}, {}, {}, string, vue26.ComponentProvideOptions, false, {}, any>;
|
|
22
22
|
declare const _default: typeof __VLS_export;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { PrismicTextProps, _default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as vue9 from "vue";
|
|
2
2
|
import { RichTextField } from "@prismicio/client";
|
|
3
3
|
|
|
4
4
|
//#region src/PrismicText.vue.d.ts
|
|
@@ -18,7 +18,7 @@ type PrismicTextProps = {
|
|
|
18
18
|
*/
|
|
19
19
|
separator?: string;
|
|
20
20
|
};
|
|
21
|
-
declare const __VLS_export:
|
|
21
|
+
declare const __VLS_export: vue9.DefineComponent<PrismicTextProps, {}, {}, {}, {}, vue9.ComponentOptionsMixin, vue9.ComponentOptionsMixin, {}, string, vue9.PublicProps, Readonly<PrismicTextProps> & Readonly<{}>, {}, {}, {}, {}, string, vue9.ComponentProvideOptions, false, {}, any>;
|
|
22
22
|
declare const _default: typeof __VLS_export;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { PrismicTextProps, _default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrismicText.vue.d.ts","names":[],"sources":["../src/PrismicText.vue"],"sourcesContent":[],"mappings":";;;;;KAyDY,gBAAA;;EAAA,KAAA,EAEJ,aAFoB,GAAA,IAAA,GAAA,SAEpB;EAoDF;;;;EAAY,QAAA,CAAA,EAAA,MAAA;EAAA;;;;;EAAA,SAAA,CAAA,EAAA,MAAA;AAAA,CAAA;cAAZ,cAAY,IAAA,CAAA,gBAAA,kCAAA,IAAA,CAAA,qBAAA,EAAA,IAAA,CAAA,qBAAA,cAAA,IAAA,CAAA,WAAA,EAAA,SAAA,oBAAA,sCAAA,IAAA,CAAA,uBAAA;cAAA,iBAGU"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrismicText.vue_vue_type_script_setup_true_lang.cjs","names":[],"sources":["../src/PrismicText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { RichTextField } from \"@prismicio/client\"\nimport { asText } from \"@prismicio/client\"\nimport { DEV } from \"esm-env\"\nimport { watchEffect } from \"vue\"\n\nimport { devMsg } from \"./lib/devMsg\"\n\n/** Props for `<PrismicText />`. */\nexport type PrismicTextProps = {\n\t/** The Prismic rich text field to render. */\n\tfield: RichTextField | null | undefined\n\n\t/**\n\t * The string value to be rendered when the field is empty. If a fallback is\n\t * not given, `\"\"` (nothing) will be rendered.\n\t */\n\tfallback?: string\n\n\t/**\n\t * The separator used between blocks.\n\t *\n\t * @defaultValue `\" \"` (a whitespace)\n\t */\n\tseparator?: string\n}\n\nconst props = defineProps<PrismicTextProps>()\ndefineOptions({ name: \"PrismicText\" })\n\nif (DEV) {\n\twatchEffect(() => {\n\t\tif (typeof props.field === \"string\") {\n\t\t\tthrow new Error(\n\t\t\t\t`[PrismicText] The \"field\" prop only accepts a Rich Text or title field's value but was provided a different type of field instead (e.g. a Key Text or Select field). You can resolve this error by rendering the field value inline without <PrismicText>. For more details, see ${devMsg(\n\t\t\t\t\t\"prismictext-works-only-with-rich-text-and-title-fields\",\n\t\t\t\t)}`,\n\t\t\t)\n\t\t}\n\t}, {})\n}\n</script>\n\n<template>\n\t{{ asText(field) || fallback || \"\" }}\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EA2BA,MAAM,QAAQ;AAGd,MAAI,YACH,4BAAkB;AACjB,OAAI,OAAO,MAAM,UAAU,SAC1B,OAAM,IAAI,MACT,oRAAoR,sBACnR,yDACA,GACF;KAEC,EAAE,CAAA;;kDAKF,yBAAM,CAAC,QAAA,MAAK,IAAK,QAAA,YAAQ,GAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrismicText.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../src/PrismicText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { RichTextField } from \"@prismicio/client\"\nimport { asText } from \"@prismicio/client\"\nimport { DEV } from \"esm-env\"\nimport { watchEffect } from \"vue\"\n\nimport { devMsg } from \"./lib/devMsg\"\n\n/** Props for `<PrismicText />`. */\nexport type PrismicTextProps = {\n\t/** The Prismic rich text field to render. */\n\tfield: RichTextField | null | undefined\n\n\t/**\n\t * The string value to be rendered when the field is empty. If a fallback is\n\t * not given, `\"\"` (nothing) will be rendered.\n\t */\n\tfallback?: string\n\n\t/**\n\t * The separator used between blocks.\n\t *\n\t * @defaultValue `\" \"` (a whitespace)\n\t */\n\tseparator?: string\n}\n\nconst props = defineProps<PrismicTextProps>()\ndefineOptions({ name: \"PrismicText\" })\n\nif (DEV) {\n\twatchEffect(() => {\n\t\tif (typeof props.field === \"string\") {\n\t\t\tthrow new Error(\n\t\t\t\t`[PrismicText] The \"field\" prop only accepts a Rich Text or title field's value but was provided a different type of field instead (e.g. a Key Text or Select field). You can resolve this error by rendering the field value inline without <PrismicText>. For more details, see ${devMsg(\n\t\t\t\t\t\"prismictext-works-only-with-rich-text-and-title-fields\",\n\t\t\t\t)}`,\n\t\t\t)\n\t\t}\n\t}, {})\n}\n</script>\n\n<template>\n\t{{ asText(field) || fallback || \"\" }}\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EA2BA,MAAM,QAAQ;AAGd,MAAI,IACH,mBAAkB;AACjB,OAAI,OAAO,MAAM,UAAU,SAC1B,OAAM,IAAI,MACT,oRAAoR,OACnR,yDACA,GACF;KAEC,EAAE,CAAA;;0BAKF,MAAA,OAAM,CAAC,QAAA,MAAK,IAAK,QAAA,YAAQ,GAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const require_SliceSimulator_vue_vue_type_script_setup_true_lang = require('./SliceSimulator.vue_vue_type_script_setup_true_lang.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/SliceSimulator.vue
|
|
4
|
+
var SliceSimulator_default = require_SliceSimulator_vue_vue_type_script_setup_true_lang.default;
|
|
5
|
+
|
|
6
|
+
//#endregion
|
|
7
|
+
exports.default = SliceSimulator_default;
|
|
8
|
+
//# sourceMappingURL=SliceSimulator.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SliceSimulator.cjs","names":[],"sources":["../src/SliceSimulator.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ref, onMounted, onUnmounted } from \"vue\";\nimport {\n\tgetDefaultProps,\n\tgetDefaultSlices,\n\tgetDefaultMessage,\n\tonClickHandler,\n\tdisableEventHandler,\n\tsimulatorClass,\n\tsimulatorRootClass,\n\tStateEventType,\n\tSimulatorManager,\n} from \"@prismicio/simulator/kit\";\n\n/** Props for `<SliceSimulator />`. */\nexport type SliceSimulatorProps = {\n\t/** The z-index value of the simulator so that it's displayed above layout elements. */\n\tzIndex?: number\n\t/** The background color of the simulator to match website design. */\n\tbackground?: string\n}\n\nconst props = defineProps<SliceSimulatorProps>()\ndefineOptions({ name: \"SliceSimulator\" })\n\nconst slices = ref(getDefaultSlices());\nconst message = ref(getDefaultMessage());\n\nconst simulatorManager = new SimulatorManager();\n\nonMounted(() => {\n\tsimulatorManager.state.on(\n\t\tStateEventType.Slices,\n\t\t(_slices) => { slices.value = _slices; },\n\t\t\"simulator-slices\",\n\t);\n\tsimulatorManager.state.on(\n\t\tStateEventType.Message,\n\t\t(_message) => { message.value = _message; },\n\t\t\"simulator-message\",\n\t);\n\n\tsimulatorManager.init();\n});\n\nonUnmounted(() => {\n\tsimulatorManager.state.off(StateEventType.Slices, \"simulator-slices\");\n\n\tsimulatorManager.state.off(StateEventType.Message, \"simulator-message\");\n});\n</script>\n\n<template>\n\t<div\n\t\t:class=\"simulatorClass\"\n\t\t:style=\"{\n\t\t\tzIndex: props.zIndex || getDefaultProps().zIndex,\n\t\t\tposition: 'fixed',\n\t\t\ttop: 0,\n\t\t\tleft: 0,\n\t\t\twidth: '100%',\n\t\t\theight: '100vh',\n\t\t\toverflow: 'auto',\n\t\t\tbackground: props.background || getDefaultProps().background,\n\t\t}\"\n\t>\n\t\t<article v-if=\"message\" v-html=\"message\" />\n\t\t<div\n\t\t\tv-else-if=\"slices.length\"\n\t\t\tid=\"root\"\n\t\t\t:class=\"simulatorRootClass\"\n\t\t\t@click.capture=\"onClickHandler\"\n\t\t\t@submit.capture=\"disableEventHandler\"\n\t\t>\n\t\t\t<slot :slices=\"slices\" />\n\t\t</div>\n\t</div>\n</template>\n"],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import SliceSimulator_vue_vue_type_script_setup_true_lang_default from "./SliceSimulator.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
+
|
|
3
|
+
//#region src/SliceSimulator.vue
|
|
4
|
+
var SliceSimulator_default = SliceSimulator_vue_vue_type_script_setup_true_lang_default;
|
|
5
|
+
|
|
6
|
+
//#endregion
|
|
7
|
+
export { SliceSimulator_default as default };
|
|
8
|
+
//# sourceMappingURL=SliceSimulator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SliceSimulator.js","names":[],"sources":["../src/SliceSimulator.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ref, onMounted, onUnmounted } from \"vue\";\nimport {\n\tgetDefaultProps,\n\tgetDefaultSlices,\n\tgetDefaultMessage,\n\tonClickHandler,\n\tdisableEventHandler,\n\tsimulatorClass,\n\tsimulatorRootClass,\n\tStateEventType,\n\tSimulatorManager,\n} from \"@prismicio/simulator/kit\";\n\n/** Props for `<SliceSimulator />`. */\nexport type SliceSimulatorProps = {\n\t/** The z-index value of the simulator so that it's displayed above layout elements. */\n\tzIndex?: number\n\t/** The background color of the simulator to match website design. */\n\tbackground?: string\n}\n\nconst props = defineProps<SliceSimulatorProps>()\ndefineOptions({ name: \"SliceSimulator\" })\n\nconst slices = ref(getDefaultSlices());\nconst message = ref(getDefaultMessage());\n\nconst simulatorManager = new SimulatorManager();\n\nonMounted(() => {\n\tsimulatorManager.state.on(\n\t\tStateEventType.Slices,\n\t\t(_slices) => { slices.value = _slices; },\n\t\t\"simulator-slices\",\n\t);\n\tsimulatorManager.state.on(\n\t\tStateEventType.Message,\n\t\t(_message) => { message.value = _message; },\n\t\t\"simulator-message\",\n\t);\n\n\tsimulatorManager.init();\n});\n\nonUnmounted(() => {\n\tsimulatorManager.state.off(StateEventType.Slices, \"simulator-slices\");\n\n\tsimulatorManager.state.off(StateEventType.Message, \"simulator-message\");\n});\n</script>\n\n<template>\n\t<div\n\t\t:class=\"simulatorClass\"\n\t\t:style=\"{\n\t\t\tzIndex: props.zIndex || getDefaultProps().zIndex,\n\t\t\tposition: 'fixed',\n\t\t\ttop: 0,\n\t\t\tleft: 0,\n\t\t\twidth: '100%',\n\t\t\theight: '100vh',\n\t\t\toverflow: 'auto',\n\t\t\tbackground: props.background || getDefaultProps().background,\n\t\t}\"\n\t>\n\t\t<article v-if=\"message\" v-html=\"message\" />\n\t\t<div\n\t\t\tv-else-if=\"slices.length\"\n\t\t\tid=\"root\"\n\t\t\t:class=\"simulatorRootClass\"\n\t\t\t@click.capture=\"onClickHandler\"\n\t\t\t@submit.capture=\"disableEventHandler\"\n\t\t>\n\t\t\t<slot :slices=\"slices\" />\n\t\t</div>\n\t</div>\n</template>\n"],"mappings":""}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as vue31 from "vue";
|
|
2
|
+
import * as _prismicio_client0 from "@prismicio/client";
|
|
3
|
+
|
|
4
|
+
//#region src/SliceSimulator.vue.d.ts
|
|
5
|
+
/** Props for `<SliceSimulator />`. */
|
|
6
|
+
type SliceSimulatorProps = {
|
|
7
|
+
/** The z-index value of the simulator so that it's displayed above layout elements. */
|
|
8
|
+
zIndex?: number;
|
|
9
|
+
/** The background color of the simulator to match website design. */
|
|
10
|
+
background?: string;
|
|
11
|
+
};
|
|
12
|
+
declare var __VLS_1: {
|
|
13
|
+
slices: [] | [{
|
|
14
|
+
slice_type: string;
|
|
15
|
+
slice_label: string | null;
|
|
16
|
+
id: string;
|
|
17
|
+
primary: Record<string, _prismicio_client0.AnyRegularField>;
|
|
18
|
+
items: Record<string, _prismicio_client0.AnyRegularField>[];
|
|
19
|
+
} | {
|
|
20
|
+
slice_type: string;
|
|
21
|
+
slice_label: null;
|
|
22
|
+
id: string;
|
|
23
|
+
variation: string;
|
|
24
|
+
version: string;
|
|
25
|
+
primary: Record<string, _prismicio_client0.AnySlicePrimaryField>;
|
|
26
|
+
items: Record<string, _prismicio_client0.AnyRegularField>[];
|
|
27
|
+
}, ...({
|
|
28
|
+
slice_type: string;
|
|
29
|
+
slice_label: string | null;
|
|
30
|
+
id: string;
|
|
31
|
+
primary: Record<string, _prismicio_client0.AnyRegularField>;
|
|
32
|
+
items: Record<string, _prismicio_client0.AnyRegularField>[];
|
|
33
|
+
} | {
|
|
34
|
+
slice_type: string;
|
|
35
|
+
slice_label: null;
|
|
36
|
+
id: string;
|
|
37
|
+
variation: string;
|
|
38
|
+
version: string;
|
|
39
|
+
primary: Record<string, _prismicio_client0.AnySlicePrimaryField>;
|
|
40
|
+
items: Record<string, _prismicio_client0.AnyRegularField>[];
|
|
41
|
+
})[]];
|
|
42
|
+
};
|
|
43
|
+
type __VLS_Slots = {} & {
|
|
44
|
+
default?: (props: typeof __VLS_1) => any;
|
|
45
|
+
};
|
|
46
|
+
declare const __VLS_base: vue31.DefineComponent<SliceSimulatorProps, {}, {}, {}, {}, vue31.ComponentOptionsMixin, vue31.ComponentOptionsMixin, {}, string, vue31.PublicProps, Readonly<SliceSimulatorProps> & Readonly<{}>, {}, {}, {}, {}, string, vue31.ComponentProvideOptions, false, {}, any>;
|
|
47
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
48
|
+
declare const _default: typeof __VLS_export;
|
|
49
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
50
|
+
new (): {
|
|
51
|
+
$slots: S;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=SliceSimulator.vue.d.ts.map
|
|
55
|
+
//#endregion
|
|
56
|
+
export { SliceSimulatorProps, _default };
|
|
57
|
+
//# sourceMappingURL=SliceSimulator.vue.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SliceSimulator.vue.d.cts","names":[],"sources":["../src/SliceSimulator.vue"],"sourcesContent":[],"mappings":";;;;;KA+FY,mBAAA;;;EAAA;EA0FR,UAAkB,CAAA,EAAA,MAAA;CAAA;YAAlB;;;;;4BAAkB,kBAAA,CAAA,eAAA;;;;;;;;;;;IACjB,UAAW,EAAA,MAAA;IAMV,WAEJ,EAAA,MAAA,GAAA,IAAA;IAFc,EAAA,EAAA,MAAA;IAAA,OAAA,QAAA,CAAA,MAAA,qCAAA;IAAA,KAAA,QAAA,CAAA,MAAA,qCAAA,EAAA;EAAA,CAAA,GAAA;IAAA,UAAA,EAAA,MAAA;IAAA,WAAA,EAAA,IAAA;IAAA,EAAA,EAAA,MAAA;IAAA,SAAA,EAAA,MAAA;IAAA,OAAA,EAAA,MAAA;IAAA,OAAA,QAAA,CAAA,MAAA,0CAAA;IAGV,KAAA,QAAoE,CAAA,MAAA,qCAAA,EAAA;EAAxB,CAAA,CAAA,EAAA,CAAA;CAAY;KATzD,WAAA,GASsB,CAAA,CAAA,GAAA;EAAe,OAAA,CAAA,EAAA,CAAA,KAAA,EAAA,OARb,OAQa,EAAA,GAAA,GAAA;AAAA,CAAA;AAC1C,cAJM,UAKc,EALJ,KAAA,CAAA,eAOL,CAPK,mBAOL,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAPK,KAAA,CAAA,qBAAA,EAAA,KAAA,CAAA,qBAAA,EAOL,CAAA,CAAA,EAAA,MAAA,EAPK,KAAA,CAAA,WAAA,EAAA,QAOL,CAPK,mBAOL,CAAA,GAPK,QAOL,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,MAAA,EAPK,KAAA,CAAA,uBAAA,EAOL,KAAA,EAAA,CAAA,CAAA,EAAA,GAAA,CAAA;cAJL,cAAqB,uBAAuB,YAAY;cAApB,iBACd;KACvB,wBAAwB;;YAEnB"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as vue26 from "vue";
|
|
2
|
+
import * as _prismicio_client0 from "@prismicio/client";
|
|
3
|
+
|
|
4
|
+
//#region src/SliceSimulator.vue.d.ts
|
|
5
|
+
/** Props for `<SliceSimulator />`. */
|
|
6
|
+
type SliceSimulatorProps = {
|
|
7
|
+
/** The z-index value of the simulator so that it's displayed above layout elements. */
|
|
8
|
+
zIndex?: number;
|
|
9
|
+
/** The background color of the simulator to match website design. */
|
|
10
|
+
background?: string;
|
|
11
|
+
};
|
|
12
|
+
declare var __VLS_1: {
|
|
13
|
+
slices: [] | [{
|
|
14
|
+
slice_type: string;
|
|
15
|
+
slice_label: string | null;
|
|
16
|
+
id: string;
|
|
17
|
+
primary: Record<string, _prismicio_client0.AnyRegularField>;
|
|
18
|
+
items: Record<string, _prismicio_client0.AnyRegularField>[];
|
|
19
|
+
} | {
|
|
20
|
+
slice_type: string;
|
|
21
|
+
slice_label: null;
|
|
22
|
+
id: string;
|
|
23
|
+
variation: string;
|
|
24
|
+
version: string;
|
|
25
|
+
primary: Record<string, _prismicio_client0.AnySlicePrimaryField>;
|
|
26
|
+
items: Record<string, _prismicio_client0.AnyRegularField>[];
|
|
27
|
+
}, ...({
|
|
28
|
+
slice_type: string;
|
|
29
|
+
slice_label: string | null;
|
|
30
|
+
id: string;
|
|
31
|
+
primary: Record<string, _prismicio_client0.AnyRegularField>;
|
|
32
|
+
items: Record<string, _prismicio_client0.AnyRegularField>[];
|
|
33
|
+
} | {
|
|
34
|
+
slice_type: string;
|
|
35
|
+
slice_label: null;
|
|
36
|
+
id: string;
|
|
37
|
+
variation: string;
|
|
38
|
+
version: string;
|
|
39
|
+
primary: Record<string, _prismicio_client0.AnySlicePrimaryField>;
|
|
40
|
+
items: Record<string, _prismicio_client0.AnyRegularField>[];
|
|
41
|
+
})[]];
|
|
42
|
+
};
|
|
43
|
+
type __VLS_Slots = {} & {
|
|
44
|
+
default?: (props: typeof __VLS_1) => any;
|
|
45
|
+
};
|
|
46
|
+
declare const __VLS_base: vue26.DefineComponent<SliceSimulatorProps, {}, {}, {}, {}, vue26.ComponentOptionsMixin, vue26.ComponentOptionsMixin, {}, string, vue26.PublicProps, Readonly<SliceSimulatorProps> & Readonly<{}>, {}, {}, {}, {}, string, vue26.ComponentProvideOptions, false, {}, any>;
|
|
47
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
48
|
+
declare const _default: typeof __VLS_export;
|
|
49
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
50
|
+
new (): {
|
|
51
|
+
$slots: S;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=SliceSimulator.vue.d.ts.map
|
|
55
|
+
//#endregion
|
|
56
|
+
export { SliceSimulatorProps, _default };
|
|
57
|
+
//# sourceMappingURL=SliceSimulator.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SliceSimulator.vue.d.ts","names":[],"sources":["../src/SliceSimulator.vue"],"sourcesContent":[],"mappings":";;;;;KA+FY,mBAAA;;;EAAA;EA0FR,UAAkB,CAAA,EAAA,MAAA;CAAA;YAAlB;;;;;4BAAkB,kBAAA,CAAA,eAAA;;;;;;;;;;;IACjB,UAAW,EAAA,MAAA;IAMV,WAEJ,EAAA,MAAA,GAAA,IAAA;IAFc,EAAA,EAAA,MAAA;IAAA,OAAA,QAAA,CAAA,MAAA,qCAAA;IAAA,KAAA,QAAA,CAAA,MAAA,qCAAA,EAAA;EAAA,CAAA,GAAA;IAAA,UAAA,EAAA,MAAA;IAAA,WAAA,EAAA,IAAA;IAAA,EAAA,EAAA,MAAA;IAAA,SAAA,EAAA,MAAA;IAAA,OAAA,EAAA,MAAA;IAAA,OAAA,QAAA,CAAA,MAAA,0CAAA;IAGV,KAAA,QAAoE,CAAA,MAAA,qCAAA,EAAA;EAAxB,CAAA,CAAA,EAAA,CAAA;CAAY;KATzD,WAAA,GASsB,CAAA,CAAA,GAAA;EAAe,OAAA,CAAA,EAAA,CAAA,KAAA,EAAA,OARb,OAQa,EAAA,GAAA,GAAA;AAAA,CAAA;AAC1C,cAJM,UAKc,EALJ,KAAA,CAAA,eAOL,CAPK,mBAOL,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAPK,KAAA,CAAA,qBAAA,EAAA,KAAA,CAAA,qBAAA,EAOL,CAAA,CAAA,EAAA,MAAA,EAPK,KAAA,CAAA,WAAA,EAAA,QAOL,CAPK,mBAOL,CAAA,GAPK,QAOL,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,MAAA,EAPK,KAAA,CAAA,uBAAA,EAOL,KAAA,EAAA,CAAA,CAAA,EAAA,GAAA,CAAA;cAJL,cAAqB,uBAAuB,YAAY;cAApB,iBACd;KACvB,wBAAwB;;YAEnB"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
let vue = require("vue");
|
|
2
|
+
let _prismicio_simulator_kit = require("@prismicio/simulator/kit");
|
|
3
|
+
|
|
4
|
+
//#region src/SliceSimulator.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
const _hoisted_1 = ["innerHTML"];
|
|
6
|
+
var SliceSimulator_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
7
|
+
name: "SliceSimulator",
|
|
8
|
+
__name: "SliceSimulator",
|
|
9
|
+
props: {
|
|
10
|
+
zIndex: {
|
|
11
|
+
type: Number,
|
|
12
|
+
required: false
|
|
13
|
+
},
|
|
14
|
+
background: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: false
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
setup(__props) {
|
|
20
|
+
const props = __props;
|
|
21
|
+
const slices = (0, vue.ref)((0, _prismicio_simulator_kit.getDefaultSlices)());
|
|
22
|
+
const message = (0, vue.ref)((0, _prismicio_simulator_kit.getDefaultMessage)());
|
|
23
|
+
const simulatorManager = new _prismicio_simulator_kit.SimulatorManager();
|
|
24
|
+
(0, vue.onMounted)(() => {
|
|
25
|
+
simulatorManager.state.on(_prismicio_simulator_kit.StateEventType.Slices, (_slices) => {
|
|
26
|
+
slices.value = _slices;
|
|
27
|
+
}, "simulator-slices");
|
|
28
|
+
simulatorManager.state.on(_prismicio_simulator_kit.StateEventType.Message, (_message) => {
|
|
29
|
+
message.value = _message;
|
|
30
|
+
}, "simulator-message");
|
|
31
|
+
simulatorManager.init();
|
|
32
|
+
});
|
|
33
|
+
(0, vue.onUnmounted)(() => {
|
|
34
|
+
simulatorManager.state.off(_prismicio_simulator_kit.StateEventType.Slices, "simulator-slices");
|
|
35
|
+
simulatorManager.state.off(_prismicio_simulator_kit.StateEventType.Message, "simulator-message");
|
|
36
|
+
});
|
|
37
|
+
return (_ctx, _cache) => {
|
|
38
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
39
|
+
class: (0, vue.normalizeClass)((0, vue.unref)(_prismicio_simulator_kit.simulatorClass)),
|
|
40
|
+
style: (0, vue.normalizeStyle)({
|
|
41
|
+
zIndex: props.zIndex || (0, vue.unref)(_prismicio_simulator_kit.getDefaultProps)().zIndex,
|
|
42
|
+
position: "fixed",
|
|
43
|
+
top: 0,
|
|
44
|
+
left: 0,
|
|
45
|
+
width: "100%",
|
|
46
|
+
height: "100vh",
|
|
47
|
+
overflow: "auto",
|
|
48
|
+
background: props.background || (0, vue.unref)(_prismicio_simulator_kit.getDefaultProps)().background
|
|
49
|
+
})
|
|
50
|
+
}, [message.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("article", {
|
|
51
|
+
key: 0,
|
|
52
|
+
innerHTML: message.value
|
|
53
|
+
}, null, 8, _hoisted_1)) : slices.value.length ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
54
|
+
key: 1,
|
|
55
|
+
id: "root",
|
|
56
|
+
class: (0, vue.normalizeClass)((0, vue.unref)(_prismicio_simulator_kit.simulatorRootClass)),
|
|
57
|
+
onClickCapture: _cache[0] || (_cache[0] = (...args) => (0, vue.unref)(_prismicio_simulator_kit.onClickHandler) && (0, vue.unref)(_prismicio_simulator_kit.onClickHandler)(...args)),
|
|
58
|
+
onSubmitCapture: _cache[1] || (_cache[1] = (...args) => (0, vue.unref)(_prismicio_simulator_kit.disableEventHandler) && (0, vue.unref)(_prismicio_simulator_kit.disableEventHandler)(...args))
|
|
59
|
+
}, [(0, vue.renderSlot)(_ctx.$slots, "default", { slices: slices.value })], 34)) : (0, vue.createCommentVNode)("v-if", true)], 6);
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
//#endregion
|
|
65
|
+
exports.default = SliceSimulator_vue_vue_type_script_setup_true_lang_default;
|
|
66
|
+
//# sourceMappingURL=SliceSimulator.vue_vue_type_script_setup_true_lang.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SliceSimulator.vue_vue_type_script_setup_true_lang.cjs","names":[],"sources":["../src/SliceSimulator.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ref, onMounted, onUnmounted } from \"vue\";\nimport {\n\tgetDefaultProps,\n\tgetDefaultSlices,\n\tgetDefaultMessage,\n\tonClickHandler,\n\tdisableEventHandler,\n\tsimulatorClass,\n\tsimulatorRootClass,\n\tStateEventType,\n\tSimulatorManager,\n} from \"@prismicio/simulator/kit\";\n\n/** Props for `<SliceSimulator />`. */\nexport type SliceSimulatorProps = {\n\t/** The z-index value of the simulator so that it's displayed above layout elements. */\n\tzIndex?: number\n\t/** The background color of the simulator to match website design. */\n\tbackground?: string\n}\n\nconst props = defineProps<SliceSimulatorProps>()\ndefineOptions({ name: \"SliceSimulator\" })\n\nconst slices = ref(getDefaultSlices());\nconst message = ref(getDefaultMessage());\n\nconst simulatorManager = new SimulatorManager();\n\nonMounted(() => {\n\tsimulatorManager.state.on(\n\t\tStateEventType.Slices,\n\t\t(_slices) => { slices.value = _slices; },\n\t\t\"simulator-slices\",\n\t);\n\tsimulatorManager.state.on(\n\t\tStateEventType.Message,\n\t\t(_message) => { message.value = _message; },\n\t\t\"simulator-message\",\n\t);\n\n\tsimulatorManager.init();\n});\n\nonUnmounted(() => {\n\tsimulatorManager.state.off(StateEventType.Slices, \"simulator-slices\");\n\n\tsimulatorManager.state.off(StateEventType.Message, \"simulator-message\");\n});\n</script>\n\n<template>\n\t<div\n\t\t:class=\"simulatorClass\"\n\t\t:style=\"{\n\t\t\tzIndex: props.zIndex || getDefaultProps().zIndex,\n\t\t\tposition: 'fixed',\n\t\t\ttop: 0,\n\t\t\tleft: 0,\n\t\t\twidth: '100%',\n\t\t\theight: '100vh',\n\t\t\toverflow: 'auto',\n\t\t\tbackground: props.background || getDefaultProps().background,\n\t\t}\"\n\t>\n\t\t<article v-if=\"message\" v-html=\"message\" />\n\t\t<div\n\t\t\tv-else-if=\"slices.length\"\n\t\t\tid=\"root\"\n\t\t\t:class=\"simulatorRootClass\"\n\t\t\t@click.capture=\"onClickHandler\"\n\t\t\t@submit.capture=\"disableEventHandler\"\n\t\t>\n\t\t\t<slot :slices=\"slices\" />\n\t\t</div>\n\t</div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;EAsBA,MAAM,QAAQ;EAGd,MAAM,sEAA+B,CAAC;EACtC,MAAM,wEAAiC,CAAC;EAExC,MAAM,mBAAmB,IAAI,2CAAkB;AAE/C,2BAAgB;AACf,oBAAiB,MAAM,GACtB,wCAAe,SACd,YAAY;AAAE,WAAO,QAAQ;MAC9B,mBACA;AACD,oBAAiB,MAAM,GACtB,wCAAe,UACd,aAAa;AAAE,YAAQ,QAAQ;MAChC,oBACA;AAED,oBAAiB,MAAM;IACtB;AAEF,6BAAkB;AACjB,oBAAiB,MAAM,IAAI,wCAAe,QAAQ,mBAAmB;AAErE,oBAAiB,MAAM,IAAI,wCAAe,SAAS,oBAAoB;IACtE;;4DA2BK,OAAA;IAtBJ,8CAAO,wCAAc,CAAA;IACrB,+BAAK;aAAe,MAAM,yBAAU,yCAAe,EAAA,CAAG;;;;;;;iBAA+H,MAAM,6BAAc,yCAAe,EAAA,CAAG;;OAW7M,QAAA,2DAA4B,WAAA;;IAAnB,WAAQ,QAAA;8BAEpB,OAAA,MAAO,4DAOb,OAAA;;IANL,IAAG;IACF,8CAAO,4CAAkB,CAAA;0EACV,wCAAA,mBAAA,wCAAA,CAAA,GAAA,KAAc;2EACb,6CAAA,mBAAA,6CAAA,CAAA,GAAA,KAAmB;2BAEX,KAAA,QAAA,WAAA,EAAlB,QAAQ,OAAA,OAAM,CAAA"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { createCommentVNode, createElementBlock, defineComponent, normalizeClass, normalizeStyle, onMounted, onUnmounted, openBlock, ref, renderSlot, unref } from "vue";
|
|
2
|
+
import { SimulatorManager, StateEventType, disableEventHandler, getDefaultMessage, getDefaultProps, getDefaultSlices, onClickHandler, simulatorClass, simulatorRootClass } from "@prismicio/simulator/kit";
|
|
3
|
+
|
|
4
|
+
//#region src/SliceSimulator.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
const _hoisted_1 = ["innerHTML"];
|
|
6
|
+
var SliceSimulator_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
7
|
+
name: "SliceSimulator",
|
|
8
|
+
__name: "SliceSimulator",
|
|
9
|
+
props: {
|
|
10
|
+
zIndex: {
|
|
11
|
+
type: Number,
|
|
12
|
+
required: false
|
|
13
|
+
},
|
|
14
|
+
background: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: false
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
setup(__props) {
|
|
20
|
+
const props = __props;
|
|
21
|
+
const slices = ref(getDefaultSlices());
|
|
22
|
+
const message = ref(getDefaultMessage());
|
|
23
|
+
const simulatorManager = new SimulatorManager();
|
|
24
|
+
onMounted(() => {
|
|
25
|
+
simulatorManager.state.on(StateEventType.Slices, (_slices) => {
|
|
26
|
+
slices.value = _slices;
|
|
27
|
+
}, "simulator-slices");
|
|
28
|
+
simulatorManager.state.on(StateEventType.Message, (_message) => {
|
|
29
|
+
message.value = _message;
|
|
30
|
+
}, "simulator-message");
|
|
31
|
+
simulatorManager.init();
|
|
32
|
+
});
|
|
33
|
+
onUnmounted(() => {
|
|
34
|
+
simulatorManager.state.off(StateEventType.Slices, "simulator-slices");
|
|
35
|
+
simulatorManager.state.off(StateEventType.Message, "simulator-message");
|
|
36
|
+
});
|
|
37
|
+
return (_ctx, _cache) => {
|
|
38
|
+
return openBlock(), createElementBlock("div", {
|
|
39
|
+
class: normalizeClass(unref(simulatorClass)),
|
|
40
|
+
style: normalizeStyle({
|
|
41
|
+
zIndex: props.zIndex || unref(getDefaultProps)().zIndex,
|
|
42
|
+
position: "fixed",
|
|
43
|
+
top: 0,
|
|
44
|
+
left: 0,
|
|
45
|
+
width: "100%",
|
|
46
|
+
height: "100vh",
|
|
47
|
+
overflow: "auto",
|
|
48
|
+
background: props.background || unref(getDefaultProps)().background
|
|
49
|
+
})
|
|
50
|
+
}, [message.value ? (openBlock(), createElementBlock("article", {
|
|
51
|
+
key: 0,
|
|
52
|
+
innerHTML: message.value
|
|
53
|
+
}, null, 8, _hoisted_1)) : slices.value.length ? (openBlock(), createElementBlock("div", {
|
|
54
|
+
key: 1,
|
|
55
|
+
id: "root",
|
|
56
|
+
class: normalizeClass(unref(simulatorRootClass)),
|
|
57
|
+
onClickCapture: _cache[0] || (_cache[0] = (...args) => unref(onClickHandler) && unref(onClickHandler)(...args)),
|
|
58
|
+
onSubmitCapture: _cache[1] || (_cache[1] = (...args) => unref(disableEventHandler) && unref(disableEventHandler)(...args))
|
|
59
|
+
}, [renderSlot(_ctx.$slots, "default", { slices: slices.value })], 34)) : createCommentVNode("v-if", true)], 6);
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
//#endregion
|
|
65
|
+
export { SliceSimulator_vue_vue_type_script_setup_true_lang_default as default };
|
|
66
|
+
//# sourceMappingURL=SliceSimulator.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SliceSimulator.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../src/SliceSimulator.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ref, onMounted, onUnmounted } from \"vue\";\nimport {\n\tgetDefaultProps,\n\tgetDefaultSlices,\n\tgetDefaultMessage,\n\tonClickHandler,\n\tdisableEventHandler,\n\tsimulatorClass,\n\tsimulatorRootClass,\n\tStateEventType,\n\tSimulatorManager,\n} from \"@prismicio/simulator/kit\";\n\n/** Props for `<SliceSimulator />`. */\nexport type SliceSimulatorProps = {\n\t/** The z-index value of the simulator so that it's displayed above layout elements. */\n\tzIndex?: number\n\t/** The background color of the simulator to match website design. */\n\tbackground?: string\n}\n\nconst props = defineProps<SliceSimulatorProps>()\ndefineOptions({ name: \"SliceSimulator\" })\n\nconst slices = ref(getDefaultSlices());\nconst message = ref(getDefaultMessage());\n\nconst simulatorManager = new SimulatorManager();\n\nonMounted(() => {\n\tsimulatorManager.state.on(\n\t\tStateEventType.Slices,\n\t\t(_slices) => { slices.value = _slices; },\n\t\t\"simulator-slices\",\n\t);\n\tsimulatorManager.state.on(\n\t\tStateEventType.Message,\n\t\t(_message) => { message.value = _message; },\n\t\t\"simulator-message\",\n\t);\n\n\tsimulatorManager.init();\n});\n\nonUnmounted(() => {\n\tsimulatorManager.state.off(StateEventType.Slices, \"simulator-slices\");\n\n\tsimulatorManager.state.off(StateEventType.Message, \"simulator-message\");\n});\n</script>\n\n<template>\n\t<div\n\t\t:class=\"simulatorClass\"\n\t\t:style=\"{\n\t\t\tzIndex: props.zIndex || getDefaultProps().zIndex,\n\t\t\tposition: 'fixed',\n\t\t\ttop: 0,\n\t\t\tleft: 0,\n\t\t\twidth: '100%',\n\t\t\theight: '100vh',\n\t\t\toverflow: 'auto',\n\t\t\tbackground: props.background || getDefaultProps().background,\n\t\t}\"\n\t>\n\t\t<article v-if=\"message\" v-html=\"message\" />\n\t\t<div\n\t\t\tv-else-if=\"slices.length\"\n\t\t\tid=\"root\"\n\t\t\t:class=\"simulatorRootClass\"\n\t\t\t@click.capture=\"onClickHandler\"\n\t\t\t@submit.capture=\"disableEventHandler\"\n\t\t>\n\t\t\t<slot :slices=\"slices\" />\n\t\t</div>\n\t</div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;EAsBA,MAAM,QAAQ;EAGd,MAAM,SAAS,IAAI,kBAAkB,CAAC;EACtC,MAAM,UAAU,IAAI,mBAAmB,CAAC;EAExC,MAAM,mBAAmB,IAAI,kBAAkB;AAE/C,kBAAgB;AACf,oBAAiB,MAAM,GACtB,eAAe,SACd,YAAY;AAAE,WAAO,QAAQ;MAC9B,mBACA;AACD,oBAAiB,MAAM,GACtB,eAAe,UACd,aAAa;AAAE,YAAQ,QAAQ;MAChC,oBACA;AAED,oBAAiB,MAAM;IACtB;AAEF,oBAAkB;AACjB,oBAAiB,MAAM,IAAI,eAAe,QAAQ,mBAAmB;AAErE,oBAAiB,MAAM,IAAI,eAAe,SAAS,oBAAoB;IACtE;;uBAID,mBAuBM,OAAA;IAtBJ,OAAK,eAAE,MAAA,eAAc,CAAA;IACrB,OAAK,eAAA;aAAe,MAAM,UAAU,MAAA,gBAAe,EAAA,CAAG;;;;;;;iBAA+H,MAAM,cAAc,MAAA,gBAAe,EAAA,CAAG;;OAW7M,QAAA,sBAAf,mBAA2C,WAAA;;IAAnB,WAAQ,QAAA;8BAEpB,OAAA,MAAO,uBADnB,mBAQM,OAAA;;IANL,IAAG;IACF,OAAK,eAAE,MAAA,mBAAkB,CAAA;2DACV,MAAA,eAAA,IAAA,MAAA,eAAA,CAAA,GAAA,KAAc;4DACb,MAAA,oBAAA,IAAA,MAAA,oBAAA,CAAA,GAAA,KAAmB;OAEpC,WAAyB,KAAA,QAAA,WAAA,EAAlB,QAAQ,OAAA,OAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SliceZone.cjs","names":[],"sources":["../../src/SliceZone/SliceZone.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from \"vue\"\n\nimport type { ComponentOrTagName } from \"../types\"\nimport type {\n\tSliceComponentType,\n\tSliceLike,\n\tSliceZoneComponents,\n\tSliceZoneLike,\n} from \"./types\"\n\nimport { TODOSliceComponent } from \"./TODOSliceComponent\"\n\n/**\n * Props for `<SliceZone />`.\n *\n * @typeParam TContext - Arbitrary data made available to all Slice components\n */\nexport type SliceZoneProps<TContext = unknown> = {\n\t/** List of slice data from the slice zone. */\n\tslices: SliceZoneLike<SliceLike | (SliceLike & Record<string, unknown>)>\n\n\t/** A record mapping slice types to React components. */\n\tcomponents?: SliceZoneComponents\n\n\t/**\n\t * The Vue component rendered if a component mapping from the `components`\n\t * prop cannot be found.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tdefaultComponent?: SliceComponentType<any, TContext>\n\n\t/** Arbitrary data made available to all slice components. */\n\tcontext?: TContext\n}\n\nconst props = defineProps<SliceZoneProps>()\ndefineOptions({ name: \"SliceZone\" })\n\nconst renderedSlices = computed<\n\t{\n\t\tis: ComponentOrTagName\n\t\tkey: string\n\t\tprops: Record<string, unknown>\n\t}[]\n>(() => {\n\tif (!props.slices) return []\n\n\treturn props.slices.map((slice, index) => {\n\t\tconst type =\n\t\t\t\"slice_type\" in slice ? (slice.slice_type as string) : slice.type\n\n\t\tconst key =\n\t\t\t\"id\" in slice && typeof slice.id === \"string\"\n\t\t\t\t? slice.id\n\t\t\t\t: `${index}-${JSON.stringify(slice)}`\n\n\t\tconst is = props.components?.[type] || props.defaultComponent\n\n\t\tif (!is) {\n\t\t\treturn { is: TODOSliceComponent, key, props: { slice } }\n\t\t}\n\n\t\tif (slice.__mapped) {\n\t\t\tconst { __mapped, ...mappedProps } = slice\n\n\t\t\treturn { is, key, props: mappedProps }\n\t\t}\n\n\t\treturn {\n\t\t\tis,\n\t\t\tkey,\n\t\t\tprops: {\n\t\t\t\tslice,\n\t\t\t\tindex,\n\t\t\t\tcontext: props.context,\n\t\t\t\tslices: props.slices,\n\t\t\t},\n\t\t}\n\t})\n})\n</script>\n\n<template>\n\t<component\n\t\tv-for=\"renderedSlice in renderedSlices\"\n\t\t:is=\"renderedSlice.is\"\n\t\t:key=\"renderedSlice.key\"\n\t\tv-bind=\"renderedSlice.props\"\n\t/>\n</template>\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SliceZone.js","names":[],"sources":["../../src/SliceZone/SliceZone.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from \"vue\"\n\nimport type { ComponentOrTagName } from \"../types\"\nimport type {\n\tSliceComponentType,\n\tSliceLike,\n\tSliceZoneComponents,\n\tSliceZoneLike,\n} from \"./types\"\n\nimport { TODOSliceComponent } from \"./TODOSliceComponent\"\n\n/**\n * Props for `<SliceZone />`.\n *\n * @typeParam TContext - Arbitrary data made available to all Slice components\n */\nexport type SliceZoneProps<TContext = unknown> = {\n\t/** List of slice data from the slice zone. */\n\tslices: SliceZoneLike<SliceLike | (SliceLike & Record<string, unknown>)>\n\n\t/** A record mapping slice types to React components. */\n\tcomponents?: SliceZoneComponents\n\n\t/**\n\t * The Vue component rendered if a component mapping from the `components`\n\t * prop cannot be found.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tdefaultComponent?: SliceComponentType<any, TContext>\n\n\t/** Arbitrary data made available to all slice components. */\n\tcontext?: TContext\n}\n\nconst props = defineProps<SliceZoneProps>()\ndefineOptions({ name: \"SliceZone\" })\n\nconst renderedSlices = computed<\n\t{\n\t\tis: ComponentOrTagName\n\t\tkey: string\n\t\tprops: Record<string, unknown>\n\t}[]\n>(() => {\n\tif (!props.slices) return []\n\n\treturn props.slices.map((slice, index) => {\n\t\tconst type =\n\t\t\t\"slice_type\" in slice ? (slice.slice_type as string) : slice.type\n\n\t\tconst key =\n\t\t\t\"id\" in slice && typeof slice.id === \"string\"\n\t\t\t\t? slice.id\n\t\t\t\t: `${index}-${JSON.stringify(slice)}`\n\n\t\tconst is = props.components?.[type] || props.defaultComponent\n\n\t\tif (!is) {\n\t\t\treturn { is: TODOSliceComponent, key, props: { slice } }\n\t\t}\n\n\t\tif (slice.__mapped) {\n\t\t\tconst { __mapped, ...mappedProps } = slice\n\n\t\t\treturn { is, key, props: mappedProps }\n\t\t}\n\n\t\treturn {\n\t\t\tis,\n\t\t\tkey,\n\t\t\tprops: {\n\t\t\t\tslice,\n\t\t\t\tindex,\n\t\t\t\tcontext: props.context,\n\t\t\t\tslices: props.slices,\n\t\t\t},\n\t\t}\n\t})\n})\n</script>\n\n<template>\n\t<component\n\t\tv-for=\"renderedSlice in renderedSlices\"\n\t\t:is=\"renderedSlice.is\"\n\t\t:key=\"renderedSlice.key\"\n\t\tv-bind=\"renderedSlice.props\"\n\t/>\n</template>\n"],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SliceComponentType, SliceLike, SliceZoneComponents, SliceZoneLike } from "./types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue21 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/SliceZone/SliceZone.vue.d.ts
|
|
5
5
|
|
|
@@ -22,7 +22,7 @@ type SliceZoneProps<TContext = unknown> = {
|
|
|
22
22
|
context?: TContext;
|
|
23
23
|
};
|
|
24
24
|
type __VLS_Props = SliceZoneProps;
|
|
25
|
-
declare const __VLS_export:
|
|
25
|
+
declare const __VLS_export: vue21.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue21.ComponentOptionsMixin, vue21.ComponentOptionsMixin, {}, string, vue21.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, vue21.ComponentProvideOptions, false, {}, any>;
|
|
26
26
|
declare const _default: typeof __VLS_export;
|
|
27
27
|
//#endregion
|
|
28
28
|
export { SliceZoneProps, _default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SliceComponentType, SliceLike, SliceZoneComponents, SliceZoneLike } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue14 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/SliceZone/SliceZone.vue.d.ts
|
|
5
5
|
|
|
@@ -22,7 +22,7 @@ type SliceZoneProps<TContext = unknown> = {
|
|
|
22
22
|
context?: TContext;
|
|
23
23
|
};
|
|
24
24
|
type __VLS_Props = SliceZoneProps;
|
|
25
|
-
declare const __VLS_export:
|
|
25
|
+
declare const __VLS_export: vue14.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue14.ComponentOptionsMixin, vue14.ComponentOptionsMixin, {}, string, vue14.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, vue14.ComponentProvideOptions, false, {}, any>;
|
|
26
26
|
declare const _default: typeof __VLS_export;
|
|
27
27
|
//#endregion
|
|
28
28
|
export { SliceZoneProps, _default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SliceZone.vue.d.ts","names":[],"sources":["../../src/SliceZone/SliceZone.vue"],"sourcesContent":[],"mappings":";;;;;;;;AA+GA;;AAEoC,KAFxB,cAEwB,CAAA,WAAA,OAAA,CAAA,GAAA;EAAY;EAAvC,MAAA,EAAA,aAAA,CAAc,SAAd,GAAA,CAA2B,SAA3B,GAAuC,MAAvC,CAAA,MAAA,EAAA,OAAA,CAAA,CAAA,CAAA;EAGK;EAO8B,UAAA,CAAA,EAP9B,mBAO8B;EAAxB;;;AAInB;EAkFK,gBAEJ,CAAA,EAxFkB,kBAwFlB,CAAA,GAAA,EAxF0C,QAwF1C,CAAA;EAFgB;EAAA,OAAA,CAAA,EAnFP,QAmFO;CAAA;KAhFb,WAAA,GAAc,cAgFD;cAAZ,YAAY,EAAA,KAAA,CAAA,eAAA,CAAA,WAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,KAAA,CAAA,qBAAA,EAAA,KAAA,CAAA,qBAAA,EAAA,CAAA,CAAA,EAAA,MAAA,EAAA,KAAA,CAAA,WAAA,EAAA,QAAA,CAAA,WAAA,CAAA,GAAA,QAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,MAAA,EAAA,KAAA,CAAA,uBAAA,EAAA,KAAA,EAAA,CAAA,CAAA,EAAA,GAAA,CAAA;cAAA,QAAA,EAAA,OAGU,YAHV"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SliceZone.vue_vue_type_script_setup_true_lang.cjs","names":[],"sources":["../../src/SliceZone/SliceZone.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from \"vue\"\n\nimport type { ComponentOrTagName } from \"../types\"\nimport type {\n\tSliceComponentType,\n\tSliceLike,\n\tSliceZoneComponents,\n\tSliceZoneLike,\n} from \"./types\"\n\nimport { TODOSliceComponent } from \"./TODOSliceComponent\"\n\n/**\n * Props for `<SliceZone />`.\n *\n * @typeParam TContext - Arbitrary data made available to all Slice components\n */\nexport type SliceZoneProps<TContext = unknown> = {\n\t/** List of slice data from the slice zone. */\n\tslices: SliceZoneLike<SliceLike | (SliceLike & Record<string, unknown>)>\n\n\t/** A record mapping slice types to React components. */\n\tcomponents?: SliceZoneComponents\n\n\t/**\n\t * The Vue component rendered if a component mapping from the `components`\n\t * prop cannot be found.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tdefaultComponent?: SliceComponentType<any, TContext>\n\n\t/** Arbitrary data made available to all slice components. */\n\tcontext?: TContext\n}\n\nconst props = defineProps<SliceZoneProps>()\ndefineOptions({ name: \"SliceZone\" })\n\nconst renderedSlices = computed<\n\t{\n\t\tis: ComponentOrTagName\n\t\tkey: string\n\t\tprops: Record<string, unknown>\n\t}[]\n>(() => {\n\tif (!props.slices) return []\n\n\treturn props.slices.map((slice, index) => {\n\t\tconst type =\n\t\t\t\"slice_type\" in slice ? (slice.slice_type as string) : slice.type\n\n\t\tconst key =\n\t\t\t\"id\" in slice && typeof slice.id === \"string\"\n\t\t\t\t? slice.id\n\t\t\t\t: `${index}-${JSON.stringify(slice)}`\n\n\t\tconst is = props.components?.[type] || props.defaultComponent\n\n\t\tif (!is) {\n\t\t\treturn { is: TODOSliceComponent, key, props: { slice } }\n\t\t}\n\n\t\tif (slice.__mapped) {\n\t\t\tconst { __mapped, ...mappedProps } = slice\n\n\t\t\treturn { is, key, props: mappedProps }\n\t\t}\n\n\t\treturn {\n\t\t\tis,\n\t\t\tkey,\n\t\t\tprops: {\n\t\t\t\tslice,\n\t\t\t\tindex,\n\t\t\t\tcontext: props.context,\n\t\t\t\tslices: props.slices,\n\t\t\t},\n\t\t}\n\t})\n})\n</script>\n\n<template>\n\t<component\n\t\tv-for=\"renderedSlice in renderedSlices\"\n\t\t:is=\"renderedSlice.is\"\n\t\t:key=\"renderedSlice.key\"\n\t\tv-bind=\"renderedSlice.props\"\n\t/>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EAoCA,MAAM,QAAQ;EAGd,MAAM,yCAME;AACP,OAAI,CAAC,MAAM,OAAQ,QAAO,EAAC;AAE3B,UAAO,MAAM,OAAO,KAAK,OAAO,UAAU;IACzC,MAAM,OACL,gBAAgB,QAAS,MAAM,aAAwB,MAAM;IAE9D,MAAM,MACL,QAAQ,SAAS,OAAO,MAAM,OAAO,WAClC,MAAM,KACN,GAAG,MAAM,GAAG,KAAK,UAAU,MAAM;IAErC,MAAM,KAAK,MAAM,aAAa,SAAS,MAAM;AAE7C,QAAI,CAAC,GACJ,QAAO;KAAE,IAAI;KAAoB;KAAK,OAAO,EAAE,OAAO;KAAC;AAGxD,QAAI,MAAM,UAAU;KACnB,MAAM,EAAE,UAAU,GAAG,gBAAgB;AAErC,YAAO;MAAE;MAAI;MAAK,OAAO;MAAY;;AAGtC,WAAO;KACN;KACA;KACA,OAAO;MACN;MACA;MACA,SAAS,MAAM;MACf,QAAQ,MAAM;MACd;KACF;KACA;IACD;;gEASE,cAAA,0BAJuB,eAAA,QAAjB,kBAAa;uFACf,cAAc,GAAE,sBAGpB,EAFA,KAAK,cAAc,0BACZ,cAAc,MAAK,EAAA,MAAA,GAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SliceZone.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/SliceZone/SliceZone.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from \"vue\"\n\nimport type { ComponentOrTagName } from \"../types\"\nimport type {\n\tSliceComponentType,\n\tSliceLike,\n\tSliceZoneComponents,\n\tSliceZoneLike,\n} from \"./types\"\n\nimport { TODOSliceComponent } from \"./TODOSliceComponent\"\n\n/**\n * Props for `<SliceZone />`.\n *\n * @typeParam TContext - Arbitrary data made available to all Slice components\n */\nexport type SliceZoneProps<TContext = unknown> = {\n\t/** List of slice data from the slice zone. */\n\tslices: SliceZoneLike<SliceLike | (SliceLike & Record<string, unknown>)>\n\n\t/** A record mapping slice types to React components. */\n\tcomponents?: SliceZoneComponents\n\n\t/**\n\t * The Vue component rendered if a component mapping from the `components`\n\t * prop cannot be found.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tdefaultComponent?: SliceComponentType<any, TContext>\n\n\t/** Arbitrary data made available to all slice components. */\n\tcontext?: TContext\n}\n\nconst props = defineProps<SliceZoneProps>()\ndefineOptions({ name: \"SliceZone\" })\n\nconst renderedSlices = computed<\n\t{\n\t\tis: ComponentOrTagName\n\t\tkey: string\n\t\tprops: Record<string, unknown>\n\t}[]\n>(() => {\n\tif (!props.slices) return []\n\n\treturn props.slices.map((slice, index) => {\n\t\tconst type =\n\t\t\t\"slice_type\" in slice ? (slice.slice_type as string) : slice.type\n\n\t\tconst key =\n\t\t\t\"id\" in slice && typeof slice.id === \"string\"\n\t\t\t\t? slice.id\n\t\t\t\t: `${index}-${JSON.stringify(slice)}`\n\n\t\tconst is = props.components?.[type] || props.defaultComponent\n\n\t\tif (!is) {\n\t\t\treturn { is: TODOSliceComponent, key, props: { slice } }\n\t\t}\n\n\t\tif (slice.__mapped) {\n\t\t\tconst { __mapped, ...mappedProps } = slice\n\n\t\t\treturn { is, key, props: mappedProps }\n\t\t}\n\n\t\treturn {\n\t\t\tis,\n\t\t\tkey,\n\t\t\tprops: {\n\t\t\t\tslice,\n\t\t\t\tindex,\n\t\t\t\tcontext: props.context,\n\t\t\t\tslices: props.slices,\n\t\t\t},\n\t\t}\n\t})\n})\n</script>\n\n<template>\n\t<component\n\t\tv-for=\"renderedSlice in renderedSlices\"\n\t\t:is=\"renderedSlice.is\"\n\t\t:key=\"renderedSlice.key\"\n\t\tv-bind=\"renderedSlice.props\"\n\t/>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EAoCA,MAAM,QAAQ;EAGd,MAAM,iBAAiB,eAMf;AACP,OAAI,CAAC,MAAM,OAAQ,QAAO,EAAC;AAE3B,UAAO,MAAM,OAAO,KAAK,OAAO,UAAU;IACzC,MAAM,OACL,gBAAgB,QAAS,MAAM,aAAwB,MAAM;IAE9D,MAAM,MACL,QAAQ,SAAS,OAAO,MAAM,OAAO,WAClC,MAAM,KACN,GAAG,MAAM,GAAG,KAAK,UAAU,MAAM;IAErC,MAAM,KAAK,MAAM,aAAa,SAAS,MAAM;AAE7C,QAAI,CAAC,GACJ,QAAO;KAAE,IAAI;KAAoB;KAAK,OAAO,EAAE,OAAO;KAAC;AAGxD,QAAI,MAAM,UAAU;KACnB,MAAM,EAAE,UAAU,GAAG,gBAAgB;AAErC,YAAO;MAAE;MAAI;MAAK,OAAO;MAAY;;AAGtC,WAAO;KACN;KACA;KACA,OAAO;MACN;MACA;MACA,SAAS,MAAM;MACf,QAAQ,MAAM;MACd;KACF;KACA;IACD;;2BAIA,mBAKE,UAAA,MAAA,WAJuB,eAAA,QAAjB,kBAAa;wBADrB,YAKE,wBAHI,cAAc,GAAE,EAFtB,WAKE,EAFA,KAAK,cAAc,0BACZ,cAAc,MAAK,EAAA,MAAA,GAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TODOSliceComponent.cjs","names":["DEV"],"sources":["../../src/SliceZone/TODOSliceComponent.ts"],"sourcesContent":["import { DEV } from \"esm-env\"\nimport { computed, defineComponent, h, watchEffect } from \"vue\"\nimport type { PropType } from \"vue\"\n\nimport type { SliceComponentType, SliceLike } from \"./types\"\n\n/**\n * This Slice component can be used as a reminder to provide a proper\n * implementation.\n *\n * This is also the default Vue component rendered when a component mapping\n * cannot be found in `<SliceZone />`.\n */\n// oxlint-disable-next-line explicit-module-boundary-types\nexport const TODOSliceComponent = DEV\n\t? /*#__PURE__*/ (defineComponent({\n\t\t\tname: \"TODOSliceComponent\",\n\t\t\tprops: {\n\t\t\t\tslice: {\n\t\t\t\t\ttype: Object as PropType<SliceLike>,\n\t\t\t\t\trequired: true,\n\t\t\t\t},\n\t\t\t},\n\t\t\tsetup(props) {\n\t\t\t\tconst type = computed(() => {\n\t\t\t\t\treturn \"slice_type\" in props.slice\n\t\t\t\t\t\t? props.slice.slice_type\n\t\t\t\t\t\t: props.slice.type\n\t\t\t\t})\n\n\t\t\t\twatchEffect(() => {\n\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t`[SliceZone] Could not find a component for Slice type \"${type.value}\"`,\n\t\t\t\t\t\tprops.slice,\n\t\t\t\t\t)\n\t\t\t\t})\n\n\t\t\t\treturn () => {\n\t\t\t\t\treturn h(\n\t\t\t\t\t\t\"section\",\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"data-slice-zone-todo-component\": \"\",\n\t\t\t\t\t\t\t\"data-slice-type\": type.value,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t[`Could not find a component for Slice type \"${type.value}\"`],\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t},\n\t\t}) as SliceComponentType)\n\t: ((() => null) as SliceComponentType)\n"],"mappings":";;;;;;;;;;;AAcA,MAAa,qBAAqBA,cAChB,yCAAgB;CAC/B,MAAM;CACN,OAAO,EACN,OAAO;EACN,MAAM;EACN,UAAU;EACV,EACD;CACD,MAAM,OAAO;EACZ,MAAM,+BAAsB;AAC3B,UAAO,gBAAgB,MAAM,QAC1B,MAAM,MAAM,aACZ,MAAM,MAAM;IACd;AAEF,6BAAkB;AACjB,WAAQ,KACP,0DAA0D,KAAK,MAAM,IACrE,MAAM,MACN;IACA;AAEF,eAAa;AACZ,qBACC,WACA;IACC,kCAAkC;IAClC,mBAAmB,KAAK;IACxB,EACD,CAAC,8CAA8C,KAAK,MAAM,GAAG,CAC7D;;;CAGH,CAAC,UACO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TODOSliceComponent.d.ts","names":[],"sources":["../../src/SliceZone/TODOSliceComponent.ts"],"sourcesContent":[],"mappings":";;;;;;AAcA;;;;;cAAa,oBAAkB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TODOSliceComponent.js","names":[],"sources":["../../src/SliceZone/TODOSliceComponent.ts"],"sourcesContent":["import { DEV } from \"esm-env\"\nimport { computed, defineComponent, h, watchEffect } from \"vue\"\nimport type { PropType } from \"vue\"\n\nimport type { SliceComponentType, SliceLike } from \"./types\"\n\n/**\n * This Slice component can be used as a reminder to provide a proper\n * implementation.\n *\n * This is also the default Vue component rendered when a component mapping\n * cannot be found in `<SliceZone />`.\n */\n// oxlint-disable-next-line explicit-module-boundary-types\nexport const TODOSliceComponent = DEV\n\t? /*#__PURE__*/ (defineComponent({\n\t\t\tname: \"TODOSliceComponent\",\n\t\t\tprops: {\n\t\t\t\tslice: {\n\t\t\t\t\ttype: Object as PropType<SliceLike>,\n\t\t\t\t\trequired: true,\n\t\t\t\t},\n\t\t\t},\n\t\t\tsetup(props) {\n\t\t\t\tconst type = computed(() => {\n\t\t\t\t\treturn \"slice_type\" in props.slice\n\t\t\t\t\t\t? props.slice.slice_type\n\t\t\t\t\t\t: props.slice.type\n\t\t\t\t})\n\n\t\t\t\twatchEffect(() => {\n\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t`[SliceZone] Could not find a component for Slice type \"${type.value}\"`,\n\t\t\t\t\t\tprops.slice,\n\t\t\t\t\t)\n\t\t\t\t})\n\n\t\t\t\treturn () => {\n\t\t\t\t\treturn h(\n\t\t\t\t\t\t\"section\",\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"data-slice-zone-todo-component\": \"\",\n\t\t\t\t\t\t\t\"data-slice-type\": type.value,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t[`Could not find a component for Slice type \"${type.value}\"`],\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t},\n\t\t}) as SliceComponentType)\n\t: ((() => null) as SliceComponentType)\n"],"mappings":";;;;;;;;;;;AAcA,MAAa,qBAAqB,MAChB,gCAAgB;CAC/B,MAAM;CACN,OAAO,EACN,OAAO;EACN,MAAM;EACN,UAAU;EACV,EACD;CACD,MAAM,OAAO;EACZ,MAAM,OAAO,eAAe;AAC3B,UAAO,gBAAgB,MAAM,QAC1B,MAAM,MAAM,aACZ,MAAM,MAAM;IACd;AAEF,oBAAkB;AACjB,WAAQ,KACP,0DAA0D,KAAK,MAAM,IACrE,MAAM,MACN;IACA;AAEF,eAAa;AACZ,UAAO,EACN,WACA;IACC,kCAAkC;IAClC,mBAAmB,KAAK;IACxB,EACD,CAAC,8CAA8C,KAAK,MAAM,GAAG,CAC7D;;;CAGH,CAAC,UACO"}
|