@prismicio/vue 6.1.5 → 6.2.0-canary.bcebbfc
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 +1 -2
- package/dist/PrismicImage.cjs.map +1 -1
- package/dist/PrismicImage.js +1 -2
- package/dist/PrismicImage.js.map +1 -1
- package/dist/PrismicImage.vue.d.cts +2 -4
- package/dist/PrismicImage.vue.d.cts.map +1 -1
- package/dist/PrismicImage.vue.d.ts +2 -4
- package/dist/PrismicImage.vue.d.ts.map +1 -1
- package/dist/PrismicImage.vue_vue_type_script_setup_true_lang.cjs +1 -2
- package/dist/PrismicImage.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/PrismicImage.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/PrismicImage.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/PrismicLink.cjs +1 -2
- package/dist/PrismicLink.cjs.map +1 -1
- package/dist/PrismicLink.js +1 -2
- package/dist/PrismicLink.js.map +1 -1
- package/dist/PrismicLink.vue.d.cts +4 -6
- package/dist/PrismicLink.vue.d.cts.map +1 -1
- package/dist/PrismicLink.vue.d.ts +4 -6
- package/dist/PrismicLink.vue.d.ts.map +1 -1
- package/dist/PrismicLink.vue_vue_type_script_setup_true_lang.cjs +1 -2
- package/dist/PrismicLink.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/PrismicLink.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/PrismicLink.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/PrismicRichText/PrismicRichText.cjs +1 -2
- package/dist/PrismicRichText/PrismicRichText.cjs.map +1 -1
- package/dist/PrismicRichText/PrismicRichText.js +1 -2
- package/dist/PrismicRichText/PrismicRichText.js.map +1 -1
- package/dist/PrismicRichText/PrismicRichText.vue.d.cts +2 -4
- package/dist/PrismicRichText/PrismicRichText.vue.d.cts.map +1 -1
- package/dist/PrismicRichText/PrismicRichText.vue.d.ts +2 -4
- package/dist/PrismicRichText/PrismicRichText.vue.d.ts.map +1 -1
- package/dist/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.cjs +1 -2
- package/dist/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.cjs +1 -2
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.cjs.map +1 -1
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.js +1 -2
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.js.map +1 -1
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.cjs +1 -2
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/PrismicRichText/PrismicRichTextSerialize.cjs +1 -2
- package/dist/PrismicRichText/PrismicRichTextSerialize.cjs.map +1 -1
- package/dist/PrismicRichText/PrismicRichTextSerialize.js +1 -2
- package/dist/PrismicRichText/PrismicRichTextSerialize.js.map +1 -1
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.cjs +1 -2
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/PrismicRichText/getRichTextComponentProps.cjs +1 -2
- package/dist/PrismicRichText/getRichTextComponentProps.d.cts +2 -4
- package/dist/PrismicRichText/getRichTextComponentProps.d.cts.map +1 -1
- package/dist/PrismicRichText/getRichTextComponentProps.d.ts +2 -4
- package/dist/PrismicRichText/getRichTextComponentProps.d.ts.map +1 -1
- package/dist/PrismicRichText/getRichTextComponentProps.js +1 -2
- package/dist/PrismicRichText/types.d.cts +3 -6
- package/dist/PrismicRichText/types.d.cts.map +1 -1
- package/dist/PrismicRichText/types.d.ts +3 -6
- package/dist/PrismicRichText/types.d.ts.map +1 -1
- package/dist/PrismicTable/PrismicTable.cjs +1 -2
- package/dist/PrismicTable/PrismicTable.cjs.map +1 -1
- package/dist/PrismicTable/PrismicTable.js +1 -2
- package/dist/PrismicTable/PrismicTable.js.map +1 -1
- package/dist/PrismicTable/PrismicTable.vue.d.cts +2 -4
- package/dist/PrismicTable/PrismicTable.vue.d.cts.map +1 -1
- package/dist/PrismicTable/PrismicTable.vue.d.ts +2 -4
- package/dist/PrismicTable/PrismicTable.vue.d.ts.map +1 -1
- package/dist/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.cjs +1 -2
- package/dist/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/PrismicTable/PrismicTableDefaultComponents.cjs +1 -2
- package/dist/PrismicTable/PrismicTableDefaultComponents.js +1 -2
- package/dist/PrismicTable/PrismicTableRow.cjs +1 -2
- package/dist/PrismicTable/PrismicTableRow.cjs.map +1 -1
- package/dist/PrismicTable/PrismicTableRow.js +1 -2
- package/dist/PrismicTable/PrismicTableRow.js.map +1 -1
- package/dist/PrismicTable/PrismicTableRow.vue_vue_type_script_setup_true_lang.cjs +1 -2
- package/dist/PrismicTable/PrismicTableRow.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/PrismicTable/PrismicTableRow.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/PrismicTable/PrismicTableRow.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/PrismicTable/getTableComponentProps.cjs +1 -2
- package/dist/PrismicTable/getTableComponentProps.d.cts +7 -8
- package/dist/PrismicTable/getTableComponentProps.d.cts.map +1 -1
- package/dist/PrismicTable/getTableComponentProps.d.ts +7 -8
- package/dist/PrismicTable/getTableComponentProps.d.ts.map +1 -1
- package/dist/PrismicTable/getTableComponentProps.js +1 -2
- package/dist/PrismicTable/types.d.cts +1 -4
- package/dist/PrismicTable/types.d.cts.map +1 -1
- package/dist/PrismicTable/types.d.ts +1 -4
- package/dist/PrismicTable/types.d.ts.map +1 -1
- package/dist/PrismicText.cjs +1 -2
- package/dist/PrismicText.cjs.map +1 -1
- package/dist/PrismicText.js +1 -2
- package/dist/PrismicText.js.map +1 -1
- package/dist/PrismicText.vue.d.cts +2 -4
- package/dist/PrismicText.vue.d.cts.map +1 -1
- package/dist/PrismicText.vue.d.ts +2 -4
- package/dist/PrismicText.vue.d.ts.map +1 -1
- package/dist/PrismicText.vue_vue_type_script_setup_true_lang.cjs +1 -2
- package/dist/PrismicText.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/PrismicText.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/PrismicText.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/SliceSimulator.cjs +1 -2
- package/dist/SliceSimulator.cjs.map +1 -1
- package/dist/SliceSimulator.js +1 -2
- package/dist/SliceSimulator.js.map +1 -1
- package/dist/SliceSimulator.vue.d.cts +2 -4
- package/dist/SliceSimulator.vue.d.cts.map +1 -1
- package/dist/SliceSimulator.vue.d.ts +2 -4
- package/dist/SliceSimulator.vue.d.ts.map +1 -1
- package/dist/SliceSimulator.vue_vue_type_script_setup_true_lang.cjs +1 -2
- package/dist/SliceSimulator.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/SliceSimulator.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/SliceSimulator.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/SliceZone/SliceBoundary.cjs +11 -0
- package/dist/SliceZone/SliceBoundary.cjs.map +1 -0
- package/dist/SliceZone/SliceBoundary.js +11 -0
- package/dist/SliceZone/SliceBoundary.js.map +1 -0
- package/dist/SliceZone/SliceZone.cjs +1 -2
- package/dist/SliceZone/SliceZone.cjs.map +1 -1
- package/dist/SliceZone/SliceZone.js +1 -2
- package/dist/SliceZone/SliceZone.js.map +1 -1
- package/dist/SliceZone/SliceZone.vue.d.cts +2 -4
- package/dist/SliceZone/SliceZone.vue.d.cts.map +1 -1
- package/dist/SliceZone/SliceZone.vue.d.ts +2 -4
- package/dist/SliceZone/SliceZone.vue.d.ts.map +1 -1
- package/dist/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.cjs +17 -4
- package/dist/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.js +18 -5
- package/dist/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/SliceZone/TODOSliceComponent.cjs +1 -2
- package/dist/SliceZone/TODOSliceComponent.cjs.map +1 -1
- package/dist/SliceZone/TODOSliceComponent.d.cts +1 -4
- package/dist/SliceZone/TODOSliceComponent.d.cts.map +1 -1
- package/dist/SliceZone/TODOSliceComponent.d.ts +1 -4
- package/dist/SliceZone/TODOSliceComponent.d.ts.map +1 -1
- package/dist/SliceZone/TODOSliceComponent.js +1 -2
- package/dist/SliceZone/defineSliceZoneComponents.cjs +1 -2
- package/dist/SliceZone/defineSliceZoneComponents.d.cts +1 -4
- package/dist/SliceZone/defineSliceZoneComponents.d.cts.map +1 -1
- package/dist/SliceZone/defineSliceZoneComponents.d.ts +1 -4
- package/dist/SliceZone/defineSliceZoneComponents.d.ts.map +1 -1
- package/dist/SliceZone/defineSliceZoneComponents.js +1 -2
- package/dist/SliceZone/getSliceComponentProps.cjs +1 -2
- package/dist/SliceZone/getSliceComponentProps.d.cts +2 -4
- package/dist/SliceZone/getSliceComponentProps.d.cts.map +1 -1
- package/dist/SliceZone/getSliceComponentProps.d.ts +2 -4
- package/dist/SliceZone/getSliceComponentProps.d.ts.map +1 -1
- package/dist/SliceZone/getSliceComponentProps.js +1 -2
- package/dist/SliceZone/types.d.cts +8 -10
- package/dist/SliceZone/types.d.cts.map +1 -1
- package/dist/SliceZone/types.d.ts +8 -10
- package/dist/SliceZone/types.d.ts.map +1 -1
- package/dist/_virtual/_rolldown/runtime.cjs +1 -2
- package/dist/_virtual/_rolldown/runtime.js +1 -2
- package/dist/createPrismic.cjs +1 -2
- package/dist/createPrismic.d.cts +5 -7
- package/dist/createPrismic.d.cts.map +1 -1
- package/dist/createPrismic.d.ts +5 -7
- package/dist/createPrismic.d.ts.map +1 -1
- package/dist/createPrismic.js +1 -2
- package/dist/lib/devMsg.cjs +1 -2
- package/dist/lib/devMsg.js +1 -2
- package/dist/lib/isInternalURL.cjs +1 -2
- package/dist/lib/isInternalURL.js +1 -2
- package/dist/package.cjs +2 -3
- package/dist/package.js +2 -3
- package/dist/types.cjs +1 -2
- package/dist/types.d.cts +3 -5
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.ts +3 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -2
- package/package.json +14 -14
- package/src/SliceZone/SliceBoundary.ts +10 -0
- package/src/SliceZone/SliceZone.vue +13 -10
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { Component, ComponentShorthand } from "../types.js";
|
|
2
2
|
import { TableField, TableFieldBody, TableFieldBodyRow, TableFieldDataCell, TableFieldHead, TableFieldHeadRow, TableFieldHeaderCell } from "@prismicio/client";
|
|
3
|
-
//#region src/PrismicTable/types.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* A map of Table block types to Vue Components. It is used to render table fields.
|
|
6
5
|
*
|
|
7
6
|
* @see Templating Table fields from Prismic {@link https://prismic.io/docs/table}
|
|
8
7
|
*/
|
|
9
|
-
type TableComponents = {
|
|
8
|
+
export type TableComponents = {
|
|
10
9
|
table?: Component<{
|
|
11
10
|
table: TableField<"filled">;
|
|
12
11
|
}> | Omit<ComponentShorthand, "as">;
|
|
@@ -26,6 +25,4 @@ type TableComponents = {
|
|
|
26
25
|
cell: TableFieldDataCell;
|
|
27
26
|
}> | Omit<ComponentShorthand, "as">;
|
|
28
27
|
};
|
|
29
|
-
//#endregion
|
|
30
|
-
export { TableComponents };
|
|
31
28
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../src/PrismicTable/types.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../src/PrismicTable/types.ts"],"mappings":";;;;;;;YAiBY;EACX,QAAQ;IAAY,OAAO;OAA0B,KAAK;EAC1D,QAAQ;IAAY,MAAM;OAAoB,KAAK;EACnD,QAAQ;IAAY,MAAM;OAAoB,KAAK;EACnD,KAAK;IAAY,KAAK,oBAAoB;OAAuB,KAAK;EACtE,KAAK;IAAY,MAAM;OAA0B,KAAK;EACtD,KAAK;IAAY,MAAM;OAAwB,KAAK"}
|
package/dist/PrismicText.cjs
CHANGED
package/dist/PrismicText.cjs.map
CHANGED
|
@@ -1 +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 not given, `\"\"`\n\t * (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
|
+
{"version":3,"file":"PrismicText.cjs","names":["_sfc_main"],"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 not given, `\"\"`\n\t * (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":""}
|
package/dist/PrismicText.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import PrismicText_vue_vue_type_script_setup_true_lang_default from "./PrismicText.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
-
|
|
2
|
+
// src/PrismicText.vue
|
|
3
3
|
var PrismicText_default = PrismicText_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
-
//#endregion
|
|
5
4
|
export { PrismicText_default as default };
|
|
6
5
|
|
|
7
6
|
//# sourceMappingURL=PrismicText.js.map
|
package/dist/PrismicText.js.map
CHANGED
|
@@ -1 +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 not given, `\"\"`\n\t * (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
|
+
{"version":3,"file":"PrismicText.js","names":["_sfc_main"],"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 not given, `\"\"`\n\t * (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,7 +1,6 @@
|
|
|
1
1
|
import { RichTextField } from "@prismicio/client";
|
|
2
|
-
//#region src/PrismicText.vue.d.ts
|
|
3
2
|
/** Props for `<PrismicText />`. */
|
|
4
|
-
type PrismicTextProps = {
|
|
3
|
+
export type PrismicTextProps = {
|
|
5
4
|
/** The Prismic rich text field to render. */
|
|
6
5
|
field: RichTextField | null | undefined;
|
|
7
6
|
/**
|
|
@@ -18,6 +17,5 @@ type PrismicTextProps = {
|
|
|
18
17
|
};
|
|
19
18
|
declare const __VLS_export: import("vue").DefineComponent<PrismicTextProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PrismicTextProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
19
|
declare const _default: typeof __VLS_export;
|
|
21
|
-
|
|
22
|
-
export { PrismicTextProps, _default as default };
|
|
20
|
+
export { _default as default };
|
|
23
21
|
//# sourceMappingURL=PrismicText.vue.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrismicText.vue.d.cts","names":[],"sources":["../src/PrismicText.vue"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PrismicText.vue.d.cts","names":[],"sources":["../src/PrismicText.vue"],"mappings":";;YAyDY;;EAEX,OAAO;;;;;EAMP;;;;;;EAOA;;cAmCK,4BAAY,gBAAA,gDAAA,qCAAA,iDAAA,aAAA,SAAA,oBAAA,oDAAA;cAGG,iBAAO"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { RichTextField } from "@prismicio/client";
|
|
2
|
-
//#region src/PrismicText.vue.d.ts
|
|
3
2
|
/** Props for `<PrismicText />`. */
|
|
4
|
-
type PrismicTextProps = {
|
|
3
|
+
export type PrismicTextProps = {
|
|
5
4
|
/** The Prismic rich text field to render. */
|
|
6
5
|
field: RichTextField | null | undefined;
|
|
7
6
|
/**
|
|
@@ -18,6 +17,5 @@ type PrismicTextProps = {
|
|
|
18
17
|
};
|
|
19
18
|
declare const __VLS_export: import("vue").DefineComponent<PrismicTextProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PrismicTextProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
19
|
declare const _default: typeof __VLS_export;
|
|
21
|
-
|
|
22
|
-
export { PrismicTextProps, _default as default };
|
|
20
|
+
export { _default as default };
|
|
23
21
|
//# sourceMappingURL=PrismicText.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrismicText.vue.d.ts","names":[],"sources":["../src/PrismicText.vue"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PrismicText.vue.d.ts","names":[],"sources":["../src/PrismicText.vue"],"mappings":";;YAyDY;;EAEX,OAAO;;;;;EAMP;;;;;;EAOA;;cAmCK,4BAAY,gBAAA,gDAAA,qCAAA,iDAAA,aAAA,SAAA,oBAAA,oDAAA;cAGG,iBAAO"}
|
|
@@ -2,7 +2,7 @@ const require_devMsg = require("./lib/devMsg.cjs");
|
|
|
2
2
|
let vue = require("vue");
|
|
3
3
|
let _prismicio_client = require("@prismicio/client");
|
|
4
4
|
let esm_env = require("esm-env");
|
|
5
|
-
|
|
5
|
+
// src/PrismicText.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var PrismicText_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
7
7
|
name: "PrismicText",
|
|
8
8
|
__name: "PrismicText",
|
|
@@ -30,7 +30,6 @@ var PrismicText_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0,
|
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
|
-
//#endregion
|
|
34
33
|
exports.default = PrismicText_vue_vue_type_script_setup_true_lang_default;
|
|
35
34
|
|
|
36
35
|
//# sourceMappingURL=PrismicText.vue_vue_type_script_setup_true_lang.cjs.map
|
|
@@ -1 +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 not given, `\"\"`\n\t * (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;EAGd,
|
|
1
|
+
{"version":3,"file":"PrismicText.vue_vue_type_script_setup_true_lang.cjs","names":["DEV","devMsg","_toDisplayString","_unref","asText"],"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 not given, `\"\"`\n\t * (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;EAGd,IAAIA,QAAAA,KACH,CAAA,GAAA,IAAA,YAAA,OAAkB;GACjB,IAAI,OAAO,MAAM,UAAU,UAC1B,MAAM,IAAI,MACT,oRAAoRC,eAAAA,OACnR,wDACD,GACD;EAEF,GAAG,CAAC,CAAC;;GAKF,QAAA,GAAAC,IAAAA,gBAAAA,EAAAA,GAAAC,IAAAA,MAAAA,CAAAC,kBAAAA,MAAA,CAAM,CAAC,QAAA,KAAK,KAAK,QAAA,YAAQ,EAAA"}
|
|
@@ -2,7 +2,7 @@ import { devMsg } from "./lib/devMsg.js";
|
|
|
2
2
|
import { defineComponent, toDisplayString, unref, watchEffect } from "vue";
|
|
3
3
|
import { asText } from "@prismicio/client";
|
|
4
4
|
import { DEV } from "esm-env";
|
|
5
|
-
|
|
5
|
+
// src/PrismicText.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var PrismicText_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
7
7
|
name: "PrismicText",
|
|
8
8
|
__name: "PrismicText",
|
|
@@ -30,7 +30,6 @@ var PrismicText_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
|
-
//#endregion
|
|
34
33
|
export { PrismicText_vue_vue_type_script_setup_true_lang_default as default };
|
|
35
34
|
|
|
36
35
|
//# sourceMappingURL=PrismicText.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -1 +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 not given, `\"\"`\n\t * (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;EAGd,IAAI,KACH,kBAAkB;GACjB,IAAI,OAAO,MAAM,UAAU,UAC1B,MAAM,IAAI,MACT,oRAAoR,OACnR,wDACD,GACD;EAEF,GAAG,CAAC,CAAC;;GAKF,
|
|
1
|
+
{"version":3,"file":"PrismicText.vue_vue_type_script_setup_true_lang.js","names":["_toDisplayString","_unref"],"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 not given, `\"\"`\n\t * (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;EAGd,IAAI,KACH,kBAAkB;GACjB,IAAI,OAAO,MAAM,UAAU,UAC1B,MAAM,IAAI,MACT,oRAAoR,OACnR,wDACD,GACD;EAEF,GAAG,CAAC,CAAC;;GAKF,OAAAA,gBAAAC,MAAA,MAAA,CAAM,CAAC,QAAA,KAAK,KAAK,QAAA,YAAQ,EAAA"}
|
package/dist/SliceSimulator.cjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
// src/SliceSimulator.vue
|
|
2
2
|
var SliceSimulator_default = require("./SliceSimulator.vue_vue_type_script_setup_true_lang.cjs").default;
|
|
3
|
-
//#endregion
|
|
4
3
|
exports.default = SliceSimulator_default;
|
|
5
4
|
|
|
6
5
|
//# sourceMappingURL=SliceSimulator.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliceSimulator.cjs","names":[],"sources":["../src/SliceSimulator.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n\tgetDefaultProps,\n\tgetDefaultSlices,\n\tgetDefaultMessage,\n\tonClickHandler,\n\tdisableEventHandler,\n\tsimulatorClass,\n\tsimulatorRootClass,\n\tStateEventType,\n\tSimulatorManager,\n} from \"@prismicio/simulator/kit\"\nimport { ref, onMounted, onUnmounted } from \"vue\"\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) => {\n\t\t\tslices.value = _slices\n\t\t},\n\t\t\"simulator-slices\",\n\t)\n\tsimulatorManager.state.on(\n\t\tStateEventType.Message,\n\t\t(_message) => {\n\t\t\tmessage.value = _message\n\t\t},\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":""}
|
|
1
|
+
{"version":3,"file":"SliceSimulator.cjs","names":["_sfc_main"],"sources":["../src/SliceSimulator.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n\tgetDefaultProps,\n\tgetDefaultSlices,\n\tgetDefaultMessage,\n\tonClickHandler,\n\tdisableEventHandler,\n\tsimulatorClass,\n\tsimulatorRootClass,\n\tStateEventType,\n\tSimulatorManager,\n} from \"@prismicio/simulator/kit\"\nimport { ref, onMounted, onUnmounted } from \"vue\"\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) => {\n\t\t\tslices.value = _slices\n\t\t},\n\t\t\"simulator-slices\",\n\t)\n\tsimulatorManager.state.on(\n\t\tStateEventType.Message,\n\t\t(_message) => {\n\t\t\tmessage.value = _message\n\t\t},\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":""}
|
package/dist/SliceSimulator.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import SliceSimulator_vue_vue_type_script_setup_true_lang_default from "./SliceSimulator.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
-
|
|
2
|
+
// src/SliceSimulator.vue
|
|
3
3
|
var SliceSimulator_default = SliceSimulator_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
-
//#endregion
|
|
5
4
|
export { SliceSimulator_default as default };
|
|
6
5
|
|
|
7
6
|
//# sourceMappingURL=SliceSimulator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliceSimulator.js","names":[],"sources":["../src/SliceSimulator.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n\tgetDefaultProps,\n\tgetDefaultSlices,\n\tgetDefaultMessage,\n\tonClickHandler,\n\tdisableEventHandler,\n\tsimulatorClass,\n\tsimulatorRootClass,\n\tStateEventType,\n\tSimulatorManager,\n} from \"@prismicio/simulator/kit\"\nimport { ref, onMounted, onUnmounted } from \"vue\"\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) => {\n\t\t\tslices.value = _slices\n\t\t},\n\t\t\"simulator-slices\",\n\t)\n\tsimulatorManager.state.on(\n\t\tStateEventType.Message,\n\t\t(_message) => {\n\t\t\tmessage.value = _message\n\t\t},\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":""}
|
|
1
|
+
{"version":3,"file":"SliceSimulator.js","names":["_sfc_main"],"sources":["../src/SliceSimulator.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n\tgetDefaultProps,\n\tgetDefaultSlices,\n\tgetDefaultMessage,\n\tonClickHandler,\n\tdisableEventHandler,\n\tsimulatorClass,\n\tsimulatorRootClass,\n\tStateEventType,\n\tSimulatorManager,\n} from \"@prismicio/simulator/kit\"\nimport { ref, onMounted, onUnmounted } from \"vue\"\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) => {\n\t\t\tslices.value = _slices\n\t\t},\n\t\t\"simulator-slices\",\n\t)\n\tsimulatorManager.state.on(\n\t\tStateEventType.Message,\n\t\t(_message) => {\n\t\t\tmessage.value = _message\n\t\t},\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":""}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
//#region src/SliceSimulator.vue.d.ts
|
|
2
1
|
/** Props for `<SliceSimulator />`. */
|
|
3
|
-
type SliceSimulatorProps = {
|
|
2
|
+
export type SliceSimulatorProps = {
|
|
4
3
|
/** The z-index value of the simulator so that it's displayed above layout elements. */
|
|
5
4
|
zIndex?: number;
|
|
6
5
|
/** The background color of the simulator to match website design. */
|
|
@@ -48,6 +47,5 @@ type __VLS_WithSlots<T, S> = T & {
|
|
|
48
47
|
$slots: S;
|
|
49
48
|
};
|
|
50
49
|
};
|
|
51
|
-
|
|
52
|
-
export { SliceSimulatorProps, _default as default };
|
|
50
|
+
export { _default as default };
|
|
53
51
|
//# sourceMappingURL=SliceSimulator.vue.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliceSimulator.vue.d.cts","names":[],"sources":["../src/SliceSimulator.vue"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"SliceSimulator.vue.d.cts","names":[],"sources":["../src/SliceSimulator.vue"],"mappings":";YAmGY;;EAEX;;EAEA;;YAoFG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KACC;EACD,WAAW,cAAc;;cAGvB,0BAAU,gBAAA,mDAAA,qCAAA,iDAAA,aAAA,SAAA,uBAAA,oDAAA;cAGV,cAAqB,uBAAuB,YAAY;cACzC,iBAAO;KACvB,gBAAgB,GAAG,KAAK;;IAE3B,QAAQ"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
//#region src/SliceSimulator.vue.d.ts
|
|
2
1
|
/** Props for `<SliceSimulator />`. */
|
|
3
|
-
type SliceSimulatorProps = {
|
|
2
|
+
export type SliceSimulatorProps = {
|
|
4
3
|
/** The z-index value of the simulator so that it's displayed above layout elements. */
|
|
5
4
|
zIndex?: number;
|
|
6
5
|
/** The background color of the simulator to match website design. */
|
|
@@ -48,6 +47,5 @@ type __VLS_WithSlots<T, S> = T & {
|
|
|
48
47
|
$slots: S;
|
|
49
48
|
};
|
|
50
49
|
};
|
|
51
|
-
|
|
52
|
-
export { SliceSimulatorProps, _default as default };
|
|
50
|
+
export { _default as default };
|
|
53
51
|
//# sourceMappingURL=SliceSimulator.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliceSimulator.vue.d.ts","names":[],"sources":["../src/SliceSimulator.vue"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"SliceSimulator.vue.d.ts","names":[],"sources":["../src/SliceSimulator.vue"],"mappings":";YAmGY;;EAEX;;EAEA;;YAoFG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KACC;EACD,WAAW,cAAc;;cAGvB,0BAAU,gBAAA,mDAAA,qCAAA,iDAAA,aAAA,SAAA,uBAAA,oDAAA;cAGV,cAAqB,uBAAuB,YAAY;cACzC,iBAAO;KACvB,gBAAgB,GAAG,KAAK;;IAE3B,QAAQ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
let vue = require("vue");
|
|
2
2
|
let _prismicio_simulator_kit = require("@prismicio/simulator/kit");
|
|
3
|
-
|
|
3
|
+
// src/SliceSimulator.vue?vue&type=script&setup=true&lang.ts
|
|
4
4
|
const _hoisted_1 = ["innerHTML"];
|
|
5
5
|
var SliceSimulator_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
6
6
|
name: "SliceSimulator",
|
|
@@ -59,7 +59,6 @@ var SliceSimulator_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (
|
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
|
-
//#endregion
|
|
63
62
|
exports.default = SliceSimulator_vue_vue_type_script_setup_true_lang_default;
|
|
64
63
|
|
|
65
64
|
//# sourceMappingURL=SliceSimulator.vue_vue_type_script_setup_true_lang.cjs.map
|
|
@@ -1 +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 {\n\tgetDefaultProps,\n\tgetDefaultSlices,\n\tgetDefaultMessage,\n\tonClickHandler,\n\tdisableEventHandler,\n\tsimulatorClass,\n\tsimulatorRootClass,\n\tStateEventType,\n\tSimulatorManager,\n} from \"@prismicio/simulator/kit\"\nimport { ref, onMounted, onUnmounted } from \"vue\"\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) => {\n\t\t\tslices.value = _slices\n\t\t},\n\t\t\"simulator-slices\",\n\t)\n\tsimulatorManager.state.on(\n\t\tStateEventType.Message,\n\t\t(_message) => {\n\t\t\tmessage.value = _message\n\t\t},\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,UAAA,
|
|
1
|
+
{"version":3,"file":"SliceSimulator.vue_vue_type_script_setup_true_lang.cjs","names":["ref","getDefaultSlices","getDefaultMessage","SimulatorManager","StateEventType","_openBlock","_createElementBlock","_normalizeClass","_unref","simulatorClass","_normalizeStyle","getDefaultProps","simulatorRootClass","onClickHandler","disableEventHandler","_renderSlot","_createCommentVNode"],"sources":["../src/SliceSimulator.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n\tgetDefaultProps,\n\tgetDefaultSlices,\n\tgetDefaultMessage,\n\tonClickHandler,\n\tdisableEventHandler,\n\tsimulatorClass,\n\tsimulatorRootClass,\n\tStateEventType,\n\tSimulatorManager,\n} from \"@prismicio/simulator/kit\"\nimport { ref, onMounted, onUnmounted } from \"vue\"\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) => {\n\t\t\tslices.value = _slices\n\t\t},\n\t\t\"simulator-slices\",\n\t)\n\tsimulatorManager.state.on(\n\t\tStateEventType.Message,\n\t\t(_message) => {\n\t\t\tmessage.value = _message\n\t\t},\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,UAAA,GAASA,IAAAA,IAAAA,EAAAA,GAAIC,yBAAAA,iBAAAA,CAAiB,CAAC;EACrC,MAAM,WAAA,GAAUD,IAAAA,IAAAA,EAAAA,GAAIE,yBAAAA,kBAAAA,CAAkB,CAAC;EAEvC,MAAM,mBAAmB,IAAIC,yBAAAA,iBAAiB;EAE9C,CAAA,GAAA,IAAA,UAAA,OAAgB;GACf,iBAAiB,MAAM,GACtBC,yBAAAA,eAAe,SACd,YAAY;IACZ,OAAO,QAAQ;GAChB,GACA,kBACD;GACA,iBAAiB,MAAM,GACtBA,yBAAAA,eAAe,UACd,aAAa;IACb,QAAQ,QAAQ;GACjB,GACA,mBACD;GAEA,iBAAiB,KAAK;EACvB,CAAC;EAED,CAAA,GAAA,IAAA,YAAA,OAAkB;GACjB,iBAAiB,MAAM,IAAIA,yBAAAA,eAAe,QAAQ,kBAAkB;GAEpE,iBAAiB,MAAM,IAAIA,yBAAAA,eAAe,SAAS,mBAAmB;EACvE,CAAC;;GAIA,QAAA,GAAAC,IAAAA,UAAAA,CAAA,IAAA,GAAAC,IAAAA,mBAAAA,CAuBM,OAAA;IAtBJ,QAAA,GAAKC,IAAAA,eAAAA,EAAAA,GAAEC,IAAAA,MAAAA,CAAAC,yBAAAA,cAAA,CAAc;IACrB,QAAA,GAAKC,IAAAA,eAAAA,CAAA;KAAe,QAAA,MAAM,WAAA,GAAUF,IAAAA,MAAAA,CAAAG,yBAAAA,eAAA,CAAe,CAAA,CAAA,CAAG;;;;;;;KAA+H,YAAA,MAAM,eAAA,GAAcH,IAAAA,MAAAA,CAAAG,yBAAAA,eAAA,CAAe,CAAA,CAAA,CAAG;;G,IAW7M,QAAA,UAAA,GAAfN,IAAAA,UAAAA,CAAA,IAAA,GAAAC,IAAAA,mBAAAA,CAA2C,WAAA;;IAAnB,WAAQ,QAAA;G,2BAEpB,OAAA,MAAO,WAAA,GADnBD,IAAAA,UAAAA,CAAA,IAAA,GAAAC,IAAAA,mBAAAA,CAQM,OAAA;;IANL,IAAG;IACF,QAAA,GAAKC,IAAAA,eAAAA,EAAAA,GAAEC,IAAAA,MAAAA,CAAAI,yBAAAA,kBAAA,CAAkB;I,2CACV,GAAA,UAAA,GAAAJ,IAAAA,MAAAA,CAAAK,yBAAAA,cAAA,MAAA,GAAAL,IAAAA,MAAAA,CAAAK,yBAAAA,cAAA,CAAA,CAAA,GAAA,IAAA;I,4CACC,GAAA,UAAA,GAAAL,IAAAA,MAAAA,CAAAM,yBAAAA,mBAAA,MAAA,GAAAN,IAAAA,MAAAA,CAAAM,yBAAAA,mBAAA,CAAA,CAAA,GAAA,IAAA;G,QAEjBC,IAAAA,WAAAA,CAAyB,KAAA,QAAA,WAAA,EAAlB,QAAQ,OAAA,MAAM,CAAA,C"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createCommentVNode, createElementBlock, defineComponent, normalizeClass, normalizeStyle, onMounted, onUnmounted, openBlock, ref, renderSlot, unref } from "vue";
|
|
2
2
|
import { SimulatorManager, StateEventType, disableEventHandler, getDefaultMessage, getDefaultProps, getDefaultSlices, onClickHandler, simulatorClass, simulatorRootClass } from "@prismicio/simulator/kit";
|
|
3
|
-
|
|
3
|
+
// src/SliceSimulator.vue?vue&type=script&setup=true&lang.ts
|
|
4
4
|
const _hoisted_1 = ["innerHTML"];
|
|
5
5
|
var SliceSimulator_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
6
6
|
name: "SliceSimulator",
|
|
@@ -59,7 +59,6 @@ var SliceSimulator_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
|
-
//#endregion
|
|
63
62
|
export { SliceSimulator_vue_vue_type_script_setup_true_lang_default as default };
|
|
64
63
|
|
|
65
64
|
//# sourceMappingURL=SliceSimulator.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -1 +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 {\n\tgetDefaultProps,\n\tgetDefaultSlices,\n\tgetDefaultMessage,\n\tonClickHandler,\n\tdisableEventHandler,\n\tsimulatorClass,\n\tsimulatorRootClass,\n\tStateEventType,\n\tSimulatorManager,\n} from \"@prismicio/simulator/kit\"\nimport { ref, onMounted, onUnmounted } from \"vue\"\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) => {\n\t\t\tslices.value = _slices\n\t\t},\n\t\t\"simulator-slices\",\n\t)\n\tsimulatorManager.state.on(\n\t\tStateEventType.Message,\n\t\t(_message) => {\n\t\t\tmessage.value = _message\n\t\t},\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,iBAAiB,CAAC;EACrC,MAAM,UAAU,IAAI,kBAAkB,CAAC;EAEvC,MAAM,mBAAmB,IAAI,iBAAiB;EAE9C,gBAAgB;GACf,iBAAiB,MAAM,GACtB,eAAe,SACd,YAAY;IACZ,OAAO,QAAQ;GAChB,GACA,kBACD;GACA,iBAAiB,MAAM,GACtB,eAAe,UACd,aAAa;IACb,QAAQ,QAAQ;GACjB,GACA,mBACD;GAEA,iBAAiB,KAAK;EACvB,CAAC;EAED,kBAAkB;GACjB,iBAAiB,MAAM,IAAI,eAAe,QAAQ,kBAAkB;GAEpE,iBAAiB,MAAM,IAAI,eAAe,SAAS,mBAAmB;EACvE,CAAC;;GAIA,
|
|
1
|
+
{"version":3,"file":"SliceSimulator.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_normalizeClass","_unref","_normalizeStyle","_renderSlot","_createCommentVNode"],"sources":["../src/SliceSimulator.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n\tgetDefaultProps,\n\tgetDefaultSlices,\n\tgetDefaultMessage,\n\tonClickHandler,\n\tdisableEventHandler,\n\tsimulatorClass,\n\tsimulatorRootClass,\n\tStateEventType,\n\tSimulatorManager,\n} from \"@prismicio/simulator/kit\"\nimport { ref, onMounted, onUnmounted } from \"vue\"\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) => {\n\t\t\tslices.value = _slices\n\t\t},\n\t\t\"simulator-slices\",\n\t)\n\tsimulatorManager.state.on(\n\t\tStateEventType.Message,\n\t\t(_message) => {\n\t\t\tmessage.value = _message\n\t\t},\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,iBAAiB,CAAC;EACrC,MAAM,UAAU,IAAI,kBAAkB,CAAC;EAEvC,MAAM,mBAAmB,IAAI,iBAAiB;EAE9C,gBAAgB;GACf,iBAAiB,MAAM,GACtB,eAAe,SACd,YAAY;IACZ,OAAO,QAAQ;GAChB,GACA,kBACD;GACA,iBAAiB,MAAM,GACtB,eAAe,UACd,aAAa;IACb,QAAQ,QAAQ;GACjB,GACA,mBACD;GAEA,iBAAiB,KAAK;EACvB,CAAC;EAED,kBAAkB;GACjB,iBAAiB,MAAM,IAAI,eAAe,QAAQ,kBAAkB;GAEpE,iBAAiB,MAAM,IAAI,eAAe,SAAS,mBAAmB;EACvE,CAAC;;GAIA,OAAAA,UAAA,GAAAC,mBAuBM,OAAA;IAtBJ,OAAKC,eAAEC,MAAA,cAAA,CAAc;IACrB,OAAKC,eAAA;KAAe,QAAA,MAAM,UAAUD,MAAA,eAAA,CAAe,CAAA,CAAA,CAAG;;;;;;;KAA+H,YAAA,MAAM,cAAcA,MAAA,eAAA,CAAe,CAAA,CAAA,CAAG;;G,IAW7M,QAAA,SAAfH,UAAA,GAAAC,mBAA2C,WAAA;;IAAnB,WAAQ,QAAA;G,2BAEpB,OAAA,MAAO,UADnBD,UAAA,GAAAC,mBAQM,OAAA;;IANL,IAAG;IACF,OAAKC,eAAEC,MAAA,kBAAA,CAAkB;I,2CACV,GAAA,SAAAA,MAAA,cAAA,KAAAA,MAAA,cAAA,CAAA,CAAA,GAAA,IAAA;I,4CACC,GAAA,SAAAA,MAAA,mBAAA,KAAAA,MAAA,mBAAA,CAAA,CAAA,GAAA,IAAA;G,IAEjBE,WAAyB,KAAA,QAAA,WAAA,EAAlB,QAAQ,OAAA,MAAM,CAAA,C"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
let vue = require("vue");
|
|
2
|
+
// src/SliceZone/SliceBoundary.ts
|
|
3
|
+
const SliceBoundary = (props, { slots }) => [
|
|
4
|
+
(0, vue.createCommentVNode)(`prismic-slice-start:${props.sliceId}`),
|
|
5
|
+
slots.default?.(),
|
|
6
|
+
(0, vue.createCommentVNode)(`prismic-slice-end:${props.sliceId}`)
|
|
7
|
+
];
|
|
8
|
+
SliceBoundary.props = ["sliceId"];
|
|
9
|
+
exports.SliceBoundary = SliceBoundary;
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=SliceBoundary.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SliceBoundary.cjs","names":["createCommentVNode"],"sources":["../../src/SliceZone/SliceBoundary.ts"],"sourcesContent":["import type { FunctionalComponent } from \"vue\"\nimport { createCommentVNode } from \"vue\"\n\nexport const SliceBoundary: FunctionalComponent<{ sliceId: string }> = (props, { slots }) => [\n\tcreateCommentVNode(`prismic-slice-start:${props.sliceId}`),\n\tslots.default?.(),\n\tcreateCommentVNode(`prismic-slice-end:${props.sliceId}`),\n]\n\nSliceBoundary.props = [\"sliceId\"]\n"],"mappings":";;AAGA,MAAa,iBAA2D,OAAO,EAAE,YAAY;EAC5FA,GAAAA,IAAAA,mBAAAA,CAAmB,uBAAuB,MAAM,SAAS;CACzD,MAAM,UAAU;EAChBA,GAAAA,IAAAA,mBAAAA,CAAmB,qBAAqB,MAAM,SAAS;AACxD;AAEA,cAAc,QAAQ,CAAC,SAAS"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createCommentVNode } from "vue";
|
|
2
|
+
// src/SliceZone/SliceBoundary.ts
|
|
3
|
+
const SliceBoundary = (props, { slots }) => [
|
|
4
|
+
createCommentVNode(`prismic-slice-start:${props.sliceId}`),
|
|
5
|
+
slots.default?.(),
|
|
6
|
+
createCommentVNode(`prismic-slice-end:${props.sliceId}`)
|
|
7
|
+
];
|
|
8
|
+
SliceBoundary.props = ["sliceId"];
|
|
9
|
+
export { SliceBoundary };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=SliceBoundary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SliceBoundary.js","names":[],"sources":["../../src/SliceZone/SliceBoundary.ts"],"sourcesContent":["import type { FunctionalComponent } from \"vue\"\nimport { createCommentVNode } from \"vue\"\n\nexport const SliceBoundary: FunctionalComponent<{ sliceId: string }> = (props, { slots }) => [\n\tcreateCommentVNode(`prismic-slice-start:${props.sliceId}`),\n\tslots.default?.(),\n\tcreateCommentVNode(`prismic-slice-end:${props.sliceId}`),\n]\n\nSliceBoundary.props = [\"sliceId\"]\n"],"mappings":";;AAGA,MAAa,iBAA2D,OAAO,EAAE,YAAY;CAC5F,mBAAmB,uBAAuB,MAAM,SAAS;CACzD,MAAM,UAAU;CAChB,mBAAmB,qBAAqB,MAAM,SAAS;AACxD;AAEA,cAAc,QAAQ,CAAC,SAAS"}
|
|
@@ -1 +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 { TODOSliceComponent } from \"./TODOSliceComponent\"\nimport type { SliceComponentType, SliceLike, SliceZoneComponents, SliceZoneLike } from \"./types\"\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/** The Vue component rendered if a component mapping from the `components` prop cannot be found. */\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 = \"slice_type\" in slice ? (slice.slice_type as string) : slice.type\n\n\t\tconst
|
|
1
|
+
{"version":3,"file":"SliceZone.cjs","names":["_sfc_main"],"sources":["../../src/SliceZone/SliceZone.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from \"vue\"\n\nimport type { ComponentOrTagName } from \"../types\"\nimport { SliceBoundary } from \"./SliceBoundary\"\nimport { TODOSliceComponent } from \"./TODOSliceComponent\"\nimport type { SliceComponentType, SliceLike, SliceZoneComponents, SliceZoneLike } from \"./types\"\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/** The Vue component rendered if a component mapping from the `components` prop cannot be found. */\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\tid?: 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 = \"slice_type\" in slice ? (slice.slice_type as string) : slice.type\n\n\t\tconst id = \"id\" in slice && typeof slice.id === \"string\" ? slice.id : undefined\n\t\tconst key = id ?? `${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, id, 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, id, props: mappedProps }\n\t\t}\n\n\t\treturn {\n\t\t\tis,\n\t\t\tkey,\n\t\t\tid,\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<template v-for=\"renderedSlice in renderedSlices\" :key=\"renderedSlice.key\">\n\t\t<SliceBoundary v-if=\"renderedSlice.id\" :slice-id=\"renderedSlice.id\">\n\t\t\t<component :is=\"renderedSlice.is\" v-bind=\"renderedSlice.props\" />\n\t\t</SliceBoundary>\n\t\t<component v-else :is=\"renderedSlice.is\" v-bind=\"renderedSlice.props\" />\n\t</template>\n</template>\n"],"mappings":""}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import SliceZone_vue_vue_type_script_setup_true_lang_default from "./SliceZone.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
-
|
|
2
|
+
// src/SliceZone/SliceZone.vue
|
|
3
3
|
var SliceZone_default = SliceZone_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
-
//#endregion
|
|
5
4
|
export { SliceZone_default as default };
|
|
6
5
|
|
|
7
6
|
//# sourceMappingURL=SliceZone.js.map
|
|
@@ -1 +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 { TODOSliceComponent } from \"./TODOSliceComponent\"\nimport type { SliceComponentType, SliceLike, SliceZoneComponents, SliceZoneLike } from \"./types\"\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/** The Vue component rendered if a component mapping from the `components` prop cannot be found. */\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 = \"slice_type\" in slice ? (slice.slice_type as string) : slice.type\n\n\t\tconst
|
|
1
|
+
{"version":3,"file":"SliceZone.js","names":["_sfc_main"],"sources":["../../src/SliceZone/SliceZone.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from \"vue\"\n\nimport type { ComponentOrTagName } from \"../types\"\nimport { SliceBoundary } from \"./SliceBoundary\"\nimport { TODOSliceComponent } from \"./TODOSliceComponent\"\nimport type { SliceComponentType, SliceLike, SliceZoneComponents, SliceZoneLike } from \"./types\"\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/** The Vue component rendered if a component mapping from the `components` prop cannot be found. */\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\tid?: 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 = \"slice_type\" in slice ? (slice.slice_type as string) : slice.type\n\n\t\tconst id = \"id\" in slice && typeof slice.id === \"string\" ? slice.id : undefined\n\t\tconst key = id ?? `${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, id, 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, id, props: mappedProps }\n\t\t}\n\n\t\treturn {\n\t\t\tis,\n\t\t\tkey,\n\t\t\tid,\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<template v-for=\"renderedSlice in renderedSlices\" :key=\"renderedSlice.key\">\n\t\t<SliceBoundary v-if=\"renderedSlice.id\" :slice-id=\"renderedSlice.id\">\n\t\t\t<component :is=\"renderedSlice.is\" v-bind=\"renderedSlice.props\" />\n\t\t</SliceBoundary>\n\t\t<component v-else :is=\"renderedSlice.is\" v-bind=\"renderedSlice.props\" />\n\t</template>\n</template>\n"],"mappings":""}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { SliceComponentType, SliceLike, SliceZoneComponents, SliceZoneLike } from "./types.cjs";
|
|
2
|
-
//#region src/SliceZone/SliceZone.vue.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Props for `<SliceZone />`.
|
|
5
4
|
*
|
|
6
5
|
* @typeParam TContext - Arbitrary data made available to all Slice components
|
|
7
6
|
*/
|
|
8
|
-
type SliceZoneProps<TContext = unknown> = {
|
|
7
|
+
export type SliceZoneProps<TContext = unknown> = {
|
|
9
8
|
/** List of slice data from the slice zone. */
|
|
10
9
|
slices: SliceZoneLike<SliceLike | (SliceLike & Record<string, unknown>)>;
|
|
11
10
|
/** A record mapping slice types to React components. */
|
|
@@ -18,6 +17,5 @@ type SliceZoneProps<TContext = unknown> = {
|
|
|
18
17
|
type __VLS_Props = SliceZoneProps;
|
|
19
18
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
19
|
declare const _default: typeof __VLS_export;
|
|
21
|
-
|
|
22
|
-
export { SliceZoneProps, _default as default };
|
|
20
|
+
export { _default as default };
|
|
23
21
|
//# sourceMappingURL=SliceZone.vue.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliceZone.vue.d.cts","names":[],"sources":["../../src/SliceZone/SliceZone.vue"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SliceZone.vue.d.cts","names":[],"sources":["../../src/SliceZone/SliceZone.vue"],"mappings":";;;;;;YAiGY,eAAe;;EAE1B,QAAQ,cAAc,aAAa,YAAY;;EAG/C,aAAa;;EAIb,mBAAmB,wBAAwB;;EAG3C,UAAU;;KAIN,cAAc;cAwGb,4BAAY,gBAAA,2CAAA,qCAAA,iDAAA,aAAA,SAAA,eAAA,oDAAA;cAGG,iBAAO"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { SliceComponentType, SliceLike, SliceZoneComponents, SliceZoneLike } from "./types.js";
|
|
2
|
-
//#region src/SliceZone/SliceZone.vue.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Props for `<SliceZone />`.
|
|
5
4
|
*
|
|
6
5
|
* @typeParam TContext - Arbitrary data made available to all Slice components
|
|
7
6
|
*/
|
|
8
|
-
type SliceZoneProps<TContext = unknown> = {
|
|
7
|
+
export type SliceZoneProps<TContext = unknown> = {
|
|
9
8
|
/** List of slice data from the slice zone. */
|
|
10
9
|
slices: SliceZoneLike<SliceLike | (SliceLike & Record<string, unknown>)>;
|
|
11
10
|
/** A record mapping slice types to React components. */
|
|
@@ -18,6 +17,5 @@ type SliceZoneProps<TContext = unknown> = {
|
|
|
18
17
|
type __VLS_Props = SliceZoneProps;
|
|
19
18
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
19
|
declare const _default: typeof __VLS_export;
|
|
21
|
-
|
|
22
|
-
export { SliceZoneProps, _default as default };
|
|
20
|
+
export { _default as default };
|
|
23
21
|
//# sourceMappingURL=SliceZone.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliceZone.vue.d.ts","names":[],"sources":["../../src/SliceZone/SliceZone.vue"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SliceZone.vue.d.ts","names":[],"sources":["../../src/SliceZone/SliceZone.vue"],"mappings":";;;;;;YAiGY,eAAe;;EAE1B,QAAQ,cAAc,aAAa,YAAY;;EAG/C,aAAa;;EAIb,mBAAmB,wBAAwB;;EAG3C,UAAU;;KAIN,cAAc;cAwGb,4BAAY,gBAAA,2CAAA,qCAAA,iDAAA,aAAA,SAAA,eAAA,oDAAA;cAGG,iBAAO"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
const require_SliceBoundary = require("./SliceBoundary.cjs");
|
|
1
2
|
const require_TODOSliceComponent = require("./TODOSliceComponent.cjs");
|
|
2
3
|
let vue = require("vue");
|
|
3
|
-
|
|
4
|
+
// src/SliceZone/SliceZone.vue?vue&type=script&setup=true&lang.ts
|
|
4
5
|
var SliceZone_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
5
6
|
name: "SliceZone",
|
|
6
7
|
__name: "SliceZone",
|
|
@@ -29,11 +30,13 @@ var SliceZone_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vu
|
|
|
29
30
|
if (!props.slices) return [];
|
|
30
31
|
return props.slices.map((slice, index) => {
|
|
31
32
|
const type = "slice_type" in slice ? slice.slice_type : slice.type;
|
|
32
|
-
const
|
|
33
|
+
const id = "id" in slice && typeof slice.id === "string" ? slice.id : void 0;
|
|
34
|
+
const key = id ?? `${index}-${JSON.stringify(slice)}`;
|
|
33
35
|
const is = props.components?.[type] || props.defaultComponent;
|
|
34
36
|
if (!is) return {
|
|
35
37
|
is: require_TODOSliceComponent.TODOSliceComponent,
|
|
36
38
|
key,
|
|
39
|
+
id,
|
|
37
40
|
props: { slice }
|
|
38
41
|
};
|
|
39
42
|
if (slice.__mapped) {
|
|
@@ -41,12 +44,14 @@ var SliceZone_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vu
|
|
|
41
44
|
return {
|
|
42
45
|
is,
|
|
43
46
|
key,
|
|
47
|
+
id,
|
|
44
48
|
props: mappedProps
|
|
45
49
|
};
|
|
46
50
|
}
|
|
47
51
|
return {
|
|
48
52
|
is,
|
|
49
53
|
key,
|
|
54
|
+
id,
|
|
50
55
|
props: {
|
|
51
56
|
slice,
|
|
52
57
|
index,
|
|
@@ -58,12 +63,20 @@ var SliceZone_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vu
|
|
|
58
63
|
});
|
|
59
64
|
return (_ctx, _cache) => {
|
|
60
65
|
return (0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(renderedSlices.value, (renderedSlice) => {
|
|
61
|
-
return (0, vue.openBlock)(), (0, vue.
|
|
66
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: renderedSlice.key }, [renderedSlice.id ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_SliceBoundary.SliceBoundary), {
|
|
67
|
+
key: 0,
|
|
68
|
+
"slice-id": renderedSlice.id
|
|
69
|
+
}, {
|
|
70
|
+
default: (0, vue.withCtx)(() => [((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(renderedSlice.is), (0, vue.mergeProps)({ ref_for: true }, renderedSlice.props), null, 16))]),
|
|
71
|
+
_: 2
|
|
72
|
+
}, 1032, ["slice-id"])) : ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(renderedSlice.is), (0, vue.mergeProps)({
|
|
73
|
+
key: 1,
|
|
74
|
+
ref_for: true
|
|
75
|
+
}, renderedSlice.props), null, 16))], 64);
|
|
62
76
|
}), 128);
|
|
63
77
|
};
|
|
64
78
|
}
|
|
65
79
|
});
|
|
66
|
-
//#endregion
|
|
67
80
|
exports.default = SliceZone_vue_vue_type_script_setup_true_lang_default;
|
|
68
81
|
|
|
69
82
|
//# sourceMappingURL=SliceZone.vue_vue_type_script_setup_true_lang.cjs.map
|
|
@@ -1 +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 { TODOSliceComponent } from \"./TODOSliceComponent\"\nimport type { SliceComponentType, SliceLike, SliceZoneComponents, SliceZoneLike } from \"./types\"\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/** The Vue component rendered if a component mapping from the `components` prop cannot be found. */\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 = \"slice_type\" in slice ? (slice.slice_type as string) : slice.type\n\n\t\tconst
|
|
1
|
+
{"version":3,"file":"SliceZone.vue_vue_type_script_setup_true_lang.cjs","names":["computed","TODOSliceComponent","_openBlock","_createElementBlock","_Fragment","_renderList","_createBlock","_unref","SliceBoundary","_withCtx","_resolveDynamicComponent","_mergeProps"],"sources":["../../src/SliceZone/SliceZone.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from \"vue\"\n\nimport type { ComponentOrTagName } from \"../types\"\nimport { SliceBoundary } from \"./SliceBoundary\"\nimport { TODOSliceComponent } from \"./TODOSliceComponent\"\nimport type { SliceComponentType, SliceLike, SliceZoneComponents, SliceZoneLike } from \"./types\"\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/** The Vue component rendered if a component mapping from the `components` prop cannot be found. */\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\tid?: 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 = \"slice_type\" in slice ? (slice.slice_type as string) : slice.type\n\n\t\tconst id = \"id\" in slice && typeof slice.id === \"string\" ? slice.id : undefined\n\t\tconst key = id ?? `${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, id, 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, id, props: mappedProps }\n\t\t}\n\n\t\treturn {\n\t\t\tis,\n\t\t\tkey,\n\t\t\tid,\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<template v-for=\"renderedSlice in renderedSlices\" :key=\"renderedSlice.key\">\n\t\t<SliceBoundary v-if=\"renderedSlice.id\" :slice-id=\"renderedSlice.id\">\n\t\t\t<component :is=\"renderedSlice.is\" v-bind=\"renderedSlice.props\" />\n\t\t</SliceBoundary>\n\t\t<component v-else :is=\"renderedSlice.is\" v-bind=\"renderedSlice.props\" />\n\t</template>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BA,MAAM,QAAQ;EAGd,MAAM,kBAAA,GAAiBA,IAAAA,SAAAA,OAOf;GACP,IAAI,CAAC,MAAM,QAAQ,OAAO,CAAC;GAE3B,OAAO,MAAM,OAAO,KAAK,OAAO,UAAU;IACzC,MAAM,OAAO,gBAAgB,QAAS,MAAM,aAAwB,MAAM;IAE1E,MAAM,KAAK,QAAQ,SAAS,OAAO,MAAM,OAAO,WAAW,MAAM,KAAK,KAAA;IACtE,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,KAAK,UAAU,KAAK;IAElD,MAAM,KAAK,MAAM,aAAa,SAAS,MAAM;IAE7C,IAAI,CAAC,IACJ,OAAO;KAAE,IAAIC,2BAAAA;KAAoB;KAAK;KAAI,OAAO,EAAE,MAAM;IAAE;IAG5D,IAAI,MAAM,UAAU;KACnB,MAAM,EAAE,UAAU,GAAG,gBAAgB;KAErC,OAAO;MAAE;MAAI;MAAK;MAAI,OAAO;KAAY;IAC1C;IAEA,OAAO;KACN;KACA;KACA;KACA,OAAO;MACN;MACA;MACA,SAAS,MAAM;MACf,QAAQ,MAAM;KACf;IACD;GACD,CAAC;EACF,CAAC;;GAIA,QAAA,GAAAC,IAAAA,UAAAA,CAAA,IAAA,IAAA,GAAAC,IAAAA,mBAAAA,CAKWC,IAAAA,UAAA,OAAA,GAAAC,IAAAA,WAAAA,CALuB,eAAA,QAAjB,kBAAa;I,yEAA0B,KAAA,cAAc,I,IAChD,cAAc,OAAA,GAAnCH,IAAAA,UAAAA,CAAA,IAAA,GAAAI,IAAAA,YAAAA,EAAAA,GAEgBC,IAAAA,MAAAA,CAAAC,sBAAAA,aAAA,GAAA;;KAFwB,YAAU,cAAc;;KAC/D,UAAA,GAAAC,IAAAA,QAAAA,OAAiE,GAAA,GAAjEP,IAAAA,UAAAA,CAAA,IAAA,GAAAI,IAAAA,YAAAA,EAAAA,GAAiEI,IAAAA,wBAAAA,CAAjD,cAAc,EAAE,IAAA,GAAhCC,IAAAA,WAAAA,CAAiE,EAAA,SAAA,KAAA,GAAvB,cAAc,KAAK,GAAA,MAAA,EAAA,E;;I,+BAE9DT,IAAAA,UAAAA,CAAA,IAAA,GAAAI,IAAAA,YAAAA,EAAAA,GAAwEI,IAAAA,wBAAAA,CAAjD,cAAc,EAAE,IAAA,GAAvCC,IAAAA,WAAAA,CAAwE;;;IAAvB,GAAA,cAAc,KAAK,GAAA,MAAA,EAAA,E"}
|