@prismicio/vue 5.3.0 → 6.0.0-canary.331d154
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/README.md +10 -24
- package/dist/PrismicImage.cjs +8 -0
- package/dist/PrismicImage.cjs.map +1 -0
- package/dist/PrismicImage.js +8 -0
- package/dist/PrismicImage.js.map +1 -0
- package/dist/PrismicImage.vue.d.cts +267 -0
- package/dist/PrismicImage.vue.d.cts.map +1 -0
- package/dist/PrismicImage.vue.d.ts +258 -285
- package/dist/PrismicImage.vue.d.ts.map +1 -0
- package/dist/PrismicImage.vue_vue_type_script_setup_true_lang.cjs +115 -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 +115 -0
- package/dist/PrismicImage.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/PrismicLink.cjs +8 -0
- package/dist/PrismicLink.cjs.map +1 -0
- package/dist/PrismicLink.js +8 -0
- package/dist/PrismicLink.js.map +1 -0
- package/dist/PrismicLink.vue.d.cts +207 -0
- package/dist/PrismicLink.vue.d.cts.map +1 -0
- package/dist/PrismicLink.vue.d.ts +196 -268
- package/dist/PrismicLink.vue.d.ts.map +1 -0
- package/dist/PrismicLink.vue_vue_type_script_setup_true_lang.cjs +79 -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 +79 -0
- package/dist/PrismicLink.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/PrismicRichText/PrismicRichText.cjs +8 -0
- package/dist/PrismicRichText/PrismicRichText.cjs.map +1 -0
- package/dist/PrismicRichText/PrismicRichText.js +8 -0
- package/dist/PrismicRichText/PrismicRichText.js.map +1 -0
- package/dist/PrismicRichText/PrismicRichText.vue.d.cts +73 -0
- package/dist/PrismicRichText/PrismicRichText.vue.d.cts.map +1 -0
- package/dist/PrismicRichText/PrismicRichText.vue.d.ts +72 -95
- package/dist/PrismicRichText/PrismicRichText.vue.d.ts.map +1 -0
- package/dist/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.cjs +78 -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 +78 -0
- package/dist/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.cjs +8 -0
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.cjs.map +1 -0
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.js +8 -0
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.js.map +1 -0
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.cjs +123 -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 +123 -0
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/PrismicRichText/PrismicRichTextSerialize.cjs +8 -0
- package/dist/PrismicRichText/PrismicRichTextSerialize.cjs.map +1 -0
- package/dist/PrismicRichText/PrismicRichTextSerialize.js +8 -0
- package/dist/PrismicRichText/PrismicRichTextSerialize.js.map +1 -0
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.cjs +46 -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 +46 -0
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/PrismicRichText/getRichTextComponentProps.cjs +39 -9
- package/dist/PrismicRichText/getRichTextComponentProps.cjs.map +1 -1
- package/dist/PrismicRichText/getRichTextComponentProps.d.cts +54 -0
- package/dist/PrismicRichText/getRichTextComponentProps.d.cts.map +1 -0
- package/dist/PrismicRichText/getRichTextComponentProps.d.ts +15 -10
- package/dist/PrismicRichText/getRichTextComponentProps.d.ts.map +1 -0
- package/dist/PrismicRichText/getRichTextComponentProps.js +39 -10
- package/dist/PrismicRichText/getRichTextComponentProps.js.map +1 -1
- package/dist/PrismicRichText/index.d.ts +2 -2
- package/dist/PrismicRichText/types.d.cts +45 -0
- package/dist/PrismicRichText/types.d.cts.map +1 -0
- package/dist/PrismicRichText/types.d.ts +33 -10
- package/dist/PrismicRichText/types.d.ts.map +1 -0
- package/dist/PrismicTable/PrismicTable.cjs +8 -0
- package/dist/PrismicTable/PrismicTable.cjs.map +1 -0
- package/dist/PrismicTable/PrismicTable.js +8 -0
- package/dist/PrismicTable/PrismicTable.js.map +1 -0
- package/dist/PrismicTable/PrismicTable.vue.d.cts +37 -0
- package/dist/PrismicTable/PrismicTable.vue.d.cts.map +1 -0
- package/dist/PrismicTable/PrismicTable.vue.d.ts +37 -31
- package/dist/PrismicTable/PrismicTable.vue.d.ts.map +1 -0
- package/dist/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.cjs +101 -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 +101 -0
- package/dist/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/PrismicTable/PrismicTableDefaultComponents.cjs +43 -41
- package/dist/PrismicTable/PrismicTableDefaultComponents.cjs.map +1 -1
- package/dist/PrismicTable/PrismicTableDefaultComponents.js +43 -41
- package/dist/PrismicTable/PrismicTableDefaultComponents.js.map +1 -1
- package/dist/PrismicTable/PrismicTableRow.cjs +8 -0
- package/dist/PrismicTable/PrismicTableRow.cjs.map +1 -0
- package/dist/PrismicTable/PrismicTableRow.js +8 -0
- package/dist/PrismicTable/PrismicTableRow.js.map +1 -0
- package/dist/PrismicTable/PrismicTableRow.vue_vue_type_script_setup_true_lang.cjs +54 -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 +54 -0
- package/dist/PrismicTable/PrismicTableRow.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/PrismicTable/getTableComponentProps.cjs +131 -21
- package/dist/PrismicTable/getTableComponentProps.cjs.map +1 -1
- package/dist/PrismicTable/getTableComponentProps.d.cts +136 -0
- package/dist/PrismicTable/getTableComponentProps.d.cts.map +1 -0
- package/dist/PrismicTable/getTableComponentProps.d.ts +40 -32
- package/dist/PrismicTable/getTableComponentProps.d.ts.map +1 -0
- package/dist/PrismicTable/getTableComponentProps.js +128 -29
- package/dist/PrismicTable/getTableComponentProps.js.map +1 -1
- package/dist/PrismicTable/index.d.ts +2 -1
- package/dist/PrismicTable/types.d.cts +34 -0
- package/dist/PrismicTable/types.d.cts.map +1 -0
- package/dist/PrismicTable/types.d.ts +27 -23
- package/dist/PrismicTable/types.d.ts.map +1 -0
- package/dist/PrismicText.cjs +8 -0
- package/dist/PrismicText.cjs.map +1 -0
- package/dist/PrismicText.js +8 -0
- package/dist/PrismicText.js.map +1 -0
- package/dist/PrismicText.vue.d.cts +25 -0
- package/dist/PrismicText.vue.d.cts.map +1 -0
- package/dist/PrismicText.vue.d.ts +24 -30
- package/dist/PrismicText.vue.d.ts.map +1 -0
- package/dist/PrismicText.vue_vue_type_script_setup_true_lang.cjs +37 -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 +37 -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 +8 -0
- package/dist/SliceZone/SliceZone.cjs.map +1 -0
- package/dist/SliceZone/SliceZone.js +8 -0
- package/dist/SliceZone/SliceZone.js.map +1 -0
- package/dist/SliceZone/SliceZone.vue.d.cts +29 -0
- package/dist/SliceZone/SliceZone.vue.d.cts.map +1 -0
- package/dist/SliceZone/SliceZone.vue.d.ts +22 -34
- package/dist/SliceZone/SliceZone.vue.d.ts.map +1 -0
- package/dist/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.cjs +70 -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 +70 -0
- package/dist/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/SliceZone/TODOSliceComponent.cjs +35 -28
- package/dist/SliceZone/TODOSliceComponent.cjs.map +1 -1
- package/dist/SliceZone/TODOSliceComponent.d.cts +15 -0
- package/dist/SliceZone/TODOSliceComponent.d.cts.map +1 -0
- package/dist/SliceZone/TODOSliceComponent.d.ts +8 -2
- package/dist/SliceZone/TODOSliceComponent.d.ts.map +1 -0
- package/dist/SliceZone/TODOSliceComponent.js +34 -27
- package/dist/SliceZone/TODOSliceComponent.js.map +1 -1
- package/dist/SliceZone/defineSliceZoneComponents.cjs +47 -11
- package/dist/SliceZone/defineSliceZoneComponents.cjs.map +1 -1
- package/dist/SliceZone/defineSliceZoneComponents.d.cts +42 -0
- package/dist/SliceZone/defineSliceZoneComponents.d.cts.map +1 -0
- package/dist/SliceZone/defineSliceZoneComponents.d.ts +8 -2
- package/dist/SliceZone/defineSliceZoneComponents.d.ts.map +1 -0
- package/dist/SliceZone/defineSliceZoneComponents.js +47 -11
- package/dist/SliceZone/defineSliceZoneComponents.js.map +1 -1
- package/dist/SliceZone/getSliceComponentProps.cjs +57 -19
- package/dist/SliceZone/getSliceComponentProps.cjs.map +1 -1
- package/dist/SliceZone/getSliceComponentProps.d.cts +71 -0
- package/dist/SliceZone/getSliceComponentProps.d.cts.map +1 -0
- package/dist/SliceZone/getSliceComponentProps.d.ts +25 -20
- package/dist/SliceZone/getSliceComponentProps.d.ts.map +1 -0
- package/dist/SliceZone/getSliceComponentProps.js +57 -20
- package/dist/SliceZone/getSliceComponentProps.js.map +1 -1
- package/dist/SliceZone/index.d.ts +4 -4
- package/dist/SliceZone/types.d.cts +94 -0
- package/dist/SliceZone/types.d.cts.map +1 -0
- package/dist/SliceZone/types.d.ts +34 -37
- package/dist/SliceZone/types.d.ts.map +1 -0
- package/dist/_virtual/rolldown_runtime.cjs +19 -0
- package/dist/_virtual/rolldown_runtime.js +18 -0
- package/dist/createPrismic.cjs +32 -79
- package/dist/createPrismic.cjs.map +1 -1
- package/dist/createPrismic.d.cts +76 -0
- package/dist/createPrismic.d.cts.map +1 -0
- package/dist/createPrismic.d.ts +72 -16
- package/dist/createPrismic.d.ts.map +1 -0
- package/dist/createPrismic.js +31 -79
- package/dist/createPrismic.js.map +1 -1
- package/dist/index.cjs +33 -32
- package/dist/index.d.cts +17 -0
- package/dist/index.d.ts +20 -23
- package/dist/index.js +12 -29
- package/dist/lib/devMsg.cjs +22 -5
- package/dist/lib/devMsg.cjs.map +1 -1
- package/dist/lib/devMsg.js +23 -6
- package/dist/lib/devMsg.js.map +1 -1
- package/dist/lib/isInternalURL.cjs +17 -6
- package/dist/lib/isInternalURL.cjs.map +1 -1
- package/dist/lib/isInternalURL.js +17 -7
- package/dist/lib/isInternalURL.js.map +1 -1
- package/dist/package.cjs +12 -0
- package/dist/package.cjs.map +1 -0
- package/dist/package.js +6 -0
- package/dist/package.js.map +1 -0
- package/dist/types.cjs +9 -0
- package/dist/types.cjs.map +1 -0
- package/dist/types.d.cts +18 -0
- package/dist/types.d.cts.map +1 -0
- package/dist/types.d.ts +18 -369
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +8 -0
- package/dist/types.js.map +1 -0
- package/package.json +33 -57
- package/src/PrismicImage.vue +7 -27
- package/src/PrismicLink.vue +24 -49
- package/src/PrismicRichText/PrismicRichText.vue +77 -118
- package/src/PrismicRichText/PrismicRichTextDefaultComponent.vue +65 -19
- package/src/PrismicRichText/PrismicRichTextSerialize.vue +6 -30
- package/src/PrismicRichText/index.ts +1 -1
- package/src/PrismicRichText/types.ts +62 -19
- package/src/PrismicTable/PrismicTable.vue +63 -28
- package/src/PrismicTable/PrismicTableDefaultComponents.ts +14 -14
- package/src/PrismicTable/PrismicTableRow.vue +18 -25
- package/src/PrismicTable/index.ts +2 -0
- package/src/PrismicTable/types.ts +47 -16
- package/src/PrismicText.vue +4 -21
- package/src/SliceSimulator.vue +78 -0
- package/src/SliceZone/SliceZone.vue +18 -40
- package/src/SliceZone/TODOSliceComponent.ts +2 -1
- package/src/SliceZone/types.ts +6 -22
- package/src/createPrismic.ts +84 -133
- package/src/index.ts +18 -32
- package/src/lib/isInternalURL.ts +2 -6
- package/src/types.ts +24 -435
- package/dist/PrismicEmbed.vue.cjs +0 -25
- package/dist/PrismicEmbed.vue.cjs.map +0 -1
- package/dist/PrismicEmbed.vue.d.ts +0 -19
- package/dist/PrismicEmbed.vue.js +0 -26
- package/dist/PrismicEmbed.vue.js.map +0 -1
- package/dist/PrismicEmbed.vue2.cjs +0 -4
- package/dist/PrismicEmbed.vue2.cjs.map +0 -1
- package/dist/PrismicEmbed.vue2.js +0 -5
- package/dist/PrismicEmbed.vue2.js.map +0 -1
- package/dist/PrismicImage.vue.cjs +0 -112
- package/dist/PrismicImage.vue.cjs.map +0 -1
- package/dist/PrismicImage.vue.js +0 -113
- package/dist/PrismicImage.vue.js.map +0 -1
- package/dist/PrismicImage.vue2.cjs +0 -4
- package/dist/PrismicImage.vue2.cjs.map +0 -1
- package/dist/PrismicImage.vue2.js +0 -5
- package/dist/PrismicImage.vue2.js.map +0 -1
- package/dist/PrismicLink.vue.cjs +0 -64
- package/dist/PrismicLink.vue.cjs.map +0 -1
- package/dist/PrismicLink.vue.js +0 -65
- package/dist/PrismicLink.vue.js.map +0 -1
- package/dist/PrismicLink.vue2.cjs +0 -4
- package/dist/PrismicLink.vue2.cjs.map +0 -1
- package/dist/PrismicLink.vue2.js +0 -5
- package/dist/PrismicLink.vue2.js.map +0 -1
- package/dist/PrismicRichText/DeprecatedPrismicRichText.vue.cjs +0 -100
- package/dist/PrismicRichText/DeprecatedPrismicRichText.vue.cjs.map +0 -1
- package/dist/PrismicRichText/DeprecatedPrismicRichText.vue.d.ts +0 -38
- package/dist/PrismicRichText/DeprecatedPrismicRichText.vue.js +0 -101
- package/dist/PrismicRichText/DeprecatedPrismicRichText.vue.js.map +0 -1
- package/dist/PrismicRichText/DeprecatedPrismicRichText.vue2.cjs +0 -4
- package/dist/PrismicRichText/DeprecatedPrismicRichText.vue2.cjs.map +0 -1
- package/dist/PrismicRichText/DeprecatedPrismicRichText.vue2.js +0 -5
- package/dist/PrismicRichText/DeprecatedPrismicRichText.vue2.js.map +0 -1
- package/dist/PrismicRichText/PrismicRichText.vue.cjs +0 -97
- package/dist/PrismicRichText/PrismicRichText.vue.cjs.map +0 -1
- package/dist/PrismicRichText/PrismicRichText.vue.js +0 -98
- package/dist/PrismicRichText/PrismicRichText.vue.js.map +0 -1
- package/dist/PrismicRichText/PrismicRichText.vue2.cjs +0 -4
- package/dist/PrismicRichText/PrismicRichText.vue2.cjs.map +0 -1
- package/dist/PrismicRichText/PrismicRichText.vue2.js +0 -5
- package/dist/PrismicRichText/PrismicRichText.vue2.js.map +0 -1
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue.cjs +0 -133
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue.cjs.map +0 -1
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue.d.ts +0 -37
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue.js +0 -134
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue.js.map +0 -1
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue2.cjs +0 -4
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue2.cjs.map +0 -1
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue2.js +0 -5
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue2.js.map +0 -1
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue.cjs +0 -47
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue.cjs.map +0 -1
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue.d.ts +0 -10
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue.js +0 -48
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue.js.map +0 -1
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue2.cjs +0 -4
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue2.cjs.map +0 -1
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue2.js +0 -5
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue2.js.map +0 -1
- package/dist/PrismicTable/PrismicTable.vue.cjs +0 -62
- package/dist/PrismicTable/PrismicTable.vue.cjs.map +0 -1
- package/dist/PrismicTable/PrismicTable.vue.js +0 -63
- package/dist/PrismicTable/PrismicTable.vue.js.map +0 -1
- package/dist/PrismicTable/PrismicTable.vue2.cjs +0 -4
- package/dist/PrismicTable/PrismicTable.vue2.cjs.map +0 -1
- package/dist/PrismicTable/PrismicTable.vue2.js +0 -5
- package/dist/PrismicTable/PrismicTable.vue2.js.map +0 -1
- package/dist/PrismicTable/PrismicTableDefaultComponents.d.ts +0 -2
- package/dist/PrismicTable/PrismicTableRow.vue.cjs +0 -52
- package/dist/PrismicTable/PrismicTableRow.vue.cjs.map +0 -1
- package/dist/PrismicTable/PrismicTableRow.vue.d.ts +0 -26
- package/dist/PrismicTable/PrismicTableRow.vue.js +0 -53
- package/dist/PrismicTable/PrismicTableRow.vue.js.map +0 -1
- package/dist/PrismicTable/PrismicTableRow.vue2.cjs +0 -4
- package/dist/PrismicTable/PrismicTableRow.vue2.cjs.map +0 -1
- package/dist/PrismicTable/PrismicTableRow.vue2.js +0 -5
- package/dist/PrismicTable/PrismicTableRow.vue2.js.map +0 -1
- package/dist/PrismicText.vue.cjs +0 -43
- package/dist/PrismicText.vue.cjs.map +0 -1
- package/dist/PrismicText.vue.js +0 -44
- package/dist/PrismicText.vue.js.map +0 -1
- package/dist/PrismicText.vue2.cjs +0 -4
- package/dist/PrismicText.vue2.cjs.map +0 -1
- package/dist/PrismicText.vue2.js +0 -5
- package/dist/PrismicText.vue2.js.map +0 -1
- package/dist/SliceZone/SliceZone.vue.cjs +0 -63
- package/dist/SliceZone/SliceZone.vue.cjs.map +0 -1
- package/dist/SliceZone/SliceZone.vue.js +0 -64
- package/dist/SliceZone/SliceZone.vue.js.map +0 -1
- package/dist/SliceZone/SliceZone.vue2.cjs +0 -4
- package/dist/SliceZone/SliceZone.vue2.cjs.map +0 -1
- package/dist/SliceZone/SliceZone.vue2.js +0 -5
- package/dist/SliceZone/SliceZone.vue2.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/Wrapper.vue.cjs +0 -20
- package/dist/lib/Wrapper.vue.cjs.map +0 -1
- package/dist/lib/Wrapper.vue.d.ts +0 -28
- package/dist/lib/Wrapper.vue.js +0 -21
- package/dist/lib/Wrapper.vue.js.map +0 -1
- package/dist/lib/Wrapper.vue2.cjs +0 -4
- package/dist/lib/Wrapper.vue2.cjs.map +0 -1
- package/dist/lib/Wrapper.vue2.js +0 -5
- package/dist/lib/Wrapper.vue2.js.map +0 -1
- package/dist/lib/devMsg.d.ts +0 -16
- package/dist/lib/isInternalURL.d.ts +0 -8
- package/dist/package.json.cjs +0 -5
- package/dist/package.json.cjs.map +0 -1
- package/dist/package.json.js +0 -5
- package/dist/package.json.js.map +0 -1
- package/dist/usePrismic.cjs +0 -10
- package/dist/usePrismic.cjs.map +0 -1
- package/dist/usePrismic.d.ts +0 -30
- package/dist/usePrismic.js +0 -10
- package/dist/usePrismic.js.map +0 -1
- package/src/PrismicEmbed.vue +0 -42
- package/src/PrismicRichText/DeprecatedPrismicRichText.vue +0 -146
- package/src/lib/Wrapper.vue +0 -22
- package/src/usePrismic.ts +0 -36
|
@@ -1,22 +1,60 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
|
|
2
|
+
//#region src/SliceZone/getSliceComponentProps.ts
|
|
3
|
+
/**
|
|
4
|
+
* Gets native Vue props for a component rendering content from a Prismic Slice
|
|
5
|
+
* using the `<SliceZone />` component.
|
|
6
|
+
*
|
|
7
|
+
* Props are: `["slice", "index", "slices", "context"]`
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
*
|
|
11
|
+
* ```typescript
|
|
12
|
+
* // Defining a new slice component
|
|
13
|
+
* import { getSliceComponentProps } from "@prismicio/vue"
|
|
14
|
+
*
|
|
15
|
+
* defineProps(getSliceComponentProps())
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
*
|
|
20
|
+
* ```typescript
|
|
21
|
+
* // Defining a new slice component with visual hint
|
|
22
|
+
* import { getSliceComponentProps } from "@prismicio/vue"
|
|
23
|
+
*
|
|
24
|
+
* defineProps(
|
|
25
|
+
* getSliceComponentProps(["slice", "index", "slices", "context"]),
|
|
26
|
+
* )
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @typeParam TSlice - The Slice type
|
|
30
|
+
* @typeParam TContext - Arbitrary data passed to `<SliceZone />` and made
|
|
31
|
+
* available to all Slice components
|
|
32
|
+
*
|
|
33
|
+
* @param propsHint - An optional array of prop names used for the sole purpose
|
|
34
|
+
* of having a visual hint of which props are made available to the slice,
|
|
35
|
+
* this parameters doesn't have any effect
|
|
36
|
+
*
|
|
37
|
+
* @returns Props object to use with `defineProps()`
|
|
38
|
+
*/
|
|
3
39
|
const getSliceComponentProps = (propsHint) => ({
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
40
|
+
slice: {
|
|
41
|
+
type: Object,
|
|
42
|
+
required: true
|
|
43
|
+
},
|
|
44
|
+
index: {
|
|
45
|
+
type: Number,
|
|
46
|
+
required: true
|
|
47
|
+
},
|
|
48
|
+
slices: {
|
|
49
|
+
type: Array,
|
|
50
|
+
required: true
|
|
51
|
+
},
|
|
52
|
+
context: {
|
|
53
|
+
type: null,
|
|
54
|
+
required: true
|
|
55
|
+
}
|
|
20
56
|
});
|
|
57
|
+
|
|
58
|
+
//#endregion
|
|
21
59
|
exports.getSliceComponentProps = getSliceComponentProps;
|
|
22
|
-
//# sourceMappingURL=getSliceComponentProps.cjs.map
|
|
60
|
+
//# sourceMappingURL=getSliceComponentProps.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSliceComponentProps.cjs","sources":["
|
|
1
|
+
{"version":3,"file":"getSliceComponentProps.cjs","names":[],"sources":["../../src/SliceZone/getSliceComponentProps.ts"],"sourcesContent":["import type { PropType } from \"vue\"\n\nimport type { SliceComponentProps, SliceLike } from \"./types\"\n\n/**\n * Native Vue props for a component rendering content from a Prismic Slice using\n * the `<SliceZone />` component.\n *\n * @typeParam TSlice - The Slice type\n * @typeParam TContext - Arbitrary data passed to `<SliceZone />` and made\n * available to all Slice components\n */\ntype DefineComponentSliceComponentProps<\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tTSlice extends SliceLike = any,\n\tTContext = unknown,\n> = {\n\tslice: {\n\t\ttype: PropType<SliceComponentProps<TSlice, TContext>[\"slice\"]>\n\t\trequired: true\n\t}\n\tindex: {\n\t\ttype: PropType<SliceComponentProps<TSlice, TContext>[\"index\"]>\n\t\trequired: true\n\t}\n\tslices: {\n\t\ttype: PropType<SliceComponentProps<TSlice, TContext>[\"slices\"]>\n\t\trequired: true\n\t}\n\tcontext: {\n\t\ttype: PropType<SliceComponentProps<TSlice, TContext>[\"context\"]>\n\t\trequired: true\n\t}\n}\n\n/**\n * Gets native Vue props for a component rendering content from a Prismic Slice\n * using the `<SliceZone />` component.\n *\n * Props are: `[\"slice\", \"index\", \"slices\", \"context\"]`\n *\n * @example\n *\n * ```typescript\n * // Defining a new slice component\n * import { getSliceComponentProps } from \"@prismicio/vue\"\n *\n * defineProps(getSliceComponentProps())\n * ```\n *\n * @example\n *\n * ```typescript\n * // Defining a new slice component with visual hint\n * import { getSliceComponentProps } from \"@prismicio/vue\"\n *\n * defineProps(\n * \tgetSliceComponentProps([\"slice\", \"index\", \"slices\", \"context\"]),\n * )\n * ```\n *\n * @typeParam TSlice - The Slice type\n * @typeParam TContext - Arbitrary data passed to `<SliceZone />` and made\n * available to all Slice components\n *\n * @param propsHint - An optional array of prop names used for the sole purpose\n * of having a visual hint of which props are made available to the slice,\n * this parameters doesn't have any effect\n *\n * @returns Props object to use with `defineProps()`\n */\nexport const getSliceComponentProps = <\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tTSlice extends SliceLike = any,\n\tTContext = unknown,\n>(\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tpropsHint?: [\"slice\", \"index\", \"slices\", \"context\"],\n): DefineComponentSliceComponentProps<TSlice, TContext> => ({\n\tslice: {\n\t\ttype: Object as PropType<SliceComponentProps<TSlice, TContext>[\"slice\"]>,\n\t\trequired: true,\n\t},\n\tindex: {\n\t\ttype: Number as PropType<SliceComponentProps<TSlice, TContext>[\"index\"]>,\n\t\trequired: true,\n\t},\n\tslices: {\n\t\ttype: Array as PropType<SliceComponentProps<TSlice, TContext>[\"slices\"]>,\n\t\trequired: true,\n\t},\n\tcontext: {\n\t\ttype: null as unknown as PropType<\n\t\t\tSliceComponentProps<TSlice, TContext>[\"context\"]\n\t\t>,\n\t\trequired: true,\n\t},\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEA,MAAa,0BAMZ,eAC2D;CAC3D,OAAO;EACN,MAAM;EACN,UAAU;EACV;CACD,OAAO;EACN,MAAM;EACN,UAAU;EACV;CACD,QAAQ;EACP,MAAM;EACN,UAAU;EACV;CACD,SAAS;EACR,MAAM;EAGN,UAAU;EACV;CACD"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { SliceComponentProps, SliceLike } from "./types.cjs";
|
|
2
|
+
import { PropType } from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/SliceZone/getSliceComponentProps.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Native Vue props for a component rendering content from a Prismic Slice using
|
|
8
|
+
* the `<SliceZone />` component.
|
|
9
|
+
*
|
|
10
|
+
* @typeParam TSlice - The Slice type
|
|
11
|
+
* @typeParam TContext - Arbitrary data passed to `<SliceZone />` and made
|
|
12
|
+
* available to all Slice components
|
|
13
|
+
*/
|
|
14
|
+
type DefineComponentSliceComponentProps<TSlice extends SliceLike = any, TContext = unknown> = {
|
|
15
|
+
slice: {
|
|
16
|
+
type: PropType<SliceComponentProps<TSlice, TContext>["slice"]>;
|
|
17
|
+
required: true;
|
|
18
|
+
};
|
|
19
|
+
index: {
|
|
20
|
+
type: PropType<SliceComponentProps<TSlice, TContext>["index"]>;
|
|
21
|
+
required: true;
|
|
22
|
+
};
|
|
23
|
+
slices: {
|
|
24
|
+
type: PropType<SliceComponentProps<TSlice, TContext>["slices"]>;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
context: {
|
|
28
|
+
type: PropType<SliceComponentProps<TSlice, TContext>["context"]>;
|
|
29
|
+
required: true;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Gets native Vue props for a component rendering content from a Prismic Slice
|
|
34
|
+
* using the `<SliceZone />` component.
|
|
35
|
+
*
|
|
36
|
+
* Props are: `["slice", "index", "slices", "context"]`
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
*
|
|
40
|
+
* ```typescript
|
|
41
|
+
* // Defining a new slice component
|
|
42
|
+
* import { getSliceComponentProps } from "@prismicio/vue"
|
|
43
|
+
*
|
|
44
|
+
* defineProps(getSliceComponentProps())
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
*
|
|
49
|
+
* ```typescript
|
|
50
|
+
* // Defining a new slice component with visual hint
|
|
51
|
+
* import { getSliceComponentProps } from "@prismicio/vue"
|
|
52
|
+
*
|
|
53
|
+
* defineProps(
|
|
54
|
+
* getSliceComponentProps(["slice", "index", "slices", "context"]),
|
|
55
|
+
* )
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* @typeParam TSlice - The Slice type
|
|
59
|
+
* @typeParam TContext - Arbitrary data passed to `<SliceZone />` and made
|
|
60
|
+
* available to all Slice components
|
|
61
|
+
*
|
|
62
|
+
* @param propsHint - An optional array of prop names used for the sole purpose
|
|
63
|
+
* of having a visual hint of which props are made available to the slice,
|
|
64
|
+
* this parameters doesn't have any effect
|
|
65
|
+
*
|
|
66
|
+
* @returns Props object to use with `defineProps()`
|
|
67
|
+
*/
|
|
68
|
+
declare const getSliceComponentProps: <TSlice extends SliceLike = any, TContext = unknown>(propsHint?: ["slice", "index", "slices", "context"]) => DefineComponentSliceComponentProps<TSlice, TContext>;
|
|
69
|
+
//#endregion
|
|
70
|
+
export { getSliceComponentProps };
|
|
71
|
+
//# sourceMappingURL=getSliceComponentProps.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSliceComponentProps.d.cts","names":[],"sources":["../../src/SliceZone/getSliceComponentProps.ts"],"sourcesContent":[],"mappings":";;;;;;;AAE6D;;;;;;KAUxD,kCAUgC,CAAA,eARrB,SAQqB,GAAA,GAAA,EAAA,WAAA,OAAA,CAAA,GAAA;EAAQ,KAAA,EAAA;IAA5B,IAAA,EAJT,QAIS,CAJA,mBAIA,CAJoB,MAIpB,EAJ4B,QAI5B,CAAA,CAAA,OAAA,CAAA,CAAA;IAAT,QAAA,EAAA,IAAA;EAI6B,CAAA;EAAQ,KAAA,EAAA;IAA5B,IAAA,EAJT,QAIS,CAJA,mBAIA,CAJoB,MAIpB,EAJ4B,QAI5B,CAAA,CAAA,OAAA,CAAA,CAAA;IAAT,QAAA,EAAA,IAAA;EAI6B,CAAA;EAAQ,MAAA,EAAA;IAA5B,IAAA,EAJT,QAIS,CAJA,mBAIA,CAJoB,MAIpB,EAJ4B,QAI5B,CAAA,CAAA,QAAA,CAAA,CAAA;IAAT,QAAA,EAAA,IAAA;EAAQ,CAAA;EAyCH,OAAA,EAAA;IAEG,IAAA,EA3CR,QA2CQ,CA3CC,mBA2CD,CA3CqB,MA2CrB,EA3C6B,QA2C7B,CAAA,CAAA,SAAA,CAAA,CAAA;IAKsB,QAAA,EAAA,IAAA;EAAQ,CAAA;CAA3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAPU,wCAEG,6FAKb,mCAAmC,QAAQ"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { SliceComponentProps, SliceLike } from "./types.js";
|
|
2
|
+
import { PropType } from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/SliceZone/getSliceComponentProps.d.ts
|
|
5
|
+
|
|
3
6
|
/**
|
|
4
7
|
* Native Vue props for a component rendering content from a Prismic Slice using
|
|
5
8
|
* the `<SliceZone />` component.
|
|
@@ -9,22 +12,22 @@ import type { SliceComponentProps, SliceLike } from "./types";
|
|
|
9
12
|
* available to all Slice components
|
|
10
13
|
*/
|
|
11
14
|
type DefineComponentSliceComponentProps<TSlice extends SliceLike = any, TContext = unknown> = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
15
|
+
slice: {
|
|
16
|
+
type: PropType<SliceComponentProps<TSlice, TContext>["slice"]>;
|
|
17
|
+
required: true;
|
|
18
|
+
};
|
|
19
|
+
index: {
|
|
20
|
+
type: PropType<SliceComponentProps<TSlice, TContext>["index"]>;
|
|
21
|
+
required: true;
|
|
22
|
+
};
|
|
23
|
+
slices: {
|
|
24
|
+
type: PropType<SliceComponentProps<TSlice, TContext>["slices"]>;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
context: {
|
|
28
|
+
type: PropType<SliceComponentProps<TSlice, TContext>["context"]>;
|
|
29
|
+
required: true;
|
|
30
|
+
};
|
|
28
31
|
};
|
|
29
32
|
/**
|
|
30
33
|
* Gets native Vue props for a component rendering content from a Prismic Slice
|
|
@@ -62,5 +65,7 @@ type DefineComponentSliceComponentProps<TSlice extends SliceLike = any, TContext
|
|
|
62
65
|
*
|
|
63
66
|
* @returns Props object to use with `defineProps()`
|
|
64
67
|
*/
|
|
65
|
-
|
|
66
|
-
|
|
68
|
+
declare const getSliceComponentProps: <TSlice extends SliceLike = any, TContext = unknown>(propsHint?: ["slice", "index", "slices", "context"]) => DefineComponentSliceComponentProps<TSlice, TContext>;
|
|
69
|
+
//#endregion
|
|
70
|
+
export { getSliceComponentProps };
|
|
71
|
+
//# sourceMappingURL=getSliceComponentProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSliceComponentProps.d.ts","names":[],"sources":["../../src/SliceZone/getSliceComponentProps.ts"],"sourcesContent":[],"mappings":";;;;;;;AAE6D;;;;;;KAUxD,kCAUgC,CAAA,eARrB,SAQqB,GAAA,GAAA,EAAA,WAAA,OAAA,CAAA,GAAA;EAAQ,KAAA,EAAA;IAA5B,IAAA,EAJT,QAIS,CAJA,mBAIA,CAJoB,MAIpB,EAJ4B,QAI5B,CAAA,CAAA,OAAA,CAAA,CAAA;IAAT,QAAA,EAAA,IAAA;EAI6B,CAAA;EAAQ,KAAA,EAAA;IAA5B,IAAA,EAJT,QAIS,CAJA,mBAIA,CAJoB,MAIpB,EAJ4B,QAI5B,CAAA,CAAA,OAAA,CAAA,CAAA;IAAT,QAAA,EAAA,IAAA;EAI6B,CAAA;EAAQ,MAAA,EAAA;IAA5B,IAAA,EAJT,QAIS,CAJA,mBAIA,CAJoB,MAIpB,EAJ4B,QAI5B,CAAA,CAAA,QAAA,CAAA,CAAA;IAAT,QAAA,EAAA,IAAA;EAAQ,CAAA;EAyCH,OAAA,EAAA;IAEG,IAAA,EA3CR,QA2CQ,CA3CC,mBA2CD,CA3CqB,MA2CrB,EA3C6B,QA2C7B,CAAA,CAAA,SAAA,CAAA,CAAA;IAKsB,QAAA,EAAA,IAAA;EAAQ,CAAA;CAA3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAPU,wCAEG,6FAKb,mCAAmC,QAAQ"}
|
|
@@ -1,22 +1,59 @@
|
|
|
1
|
+
//#region src/SliceZone/getSliceComponentProps.ts
|
|
2
|
+
/**
|
|
3
|
+
* Gets native Vue props for a component rendering content from a Prismic Slice
|
|
4
|
+
* using the `<SliceZone />` component.
|
|
5
|
+
*
|
|
6
|
+
* Props are: `["slice", "index", "slices", "context"]`
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
*
|
|
10
|
+
* ```typescript
|
|
11
|
+
* // Defining a new slice component
|
|
12
|
+
* import { getSliceComponentProps } from "@prismicio/vue"
|
|
13
|
+
*
|
|
14
|
+
* defineProps(getSliceComponentProps())
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
*
|
|
19
|
+
* ```typescript
|
|
20
|
+
* // Defining a new slice component with visual hint
|
|
21
|
+
* import { getSliceComponentProps } from "@prismicio/vue"
|
|
22
|
+
*
|
|
23
|
+
* defineProps(
|
|
24
|
+
* getSliceComponentProps(["slice", "index", "slices", "context"]),
|
|
25
|
+
* )
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @typeParam TSlice - The Slice type
|
|
29
|
+
* @typeParam TContext - Arbitrary data passed to `<SliceZone />` and made
|
|
30
|
+
* available to all Slice components
|
|
31
|
+
*
|
|
32
|
+
* @param propsHint - An optional array of prop names used for the sole purpose
|
|
33
|
+
* of having a visual hint of which props are made available to the slice,
|
|
34
|
+
* this parameters doesn't have any effect
|
|
35
|
+
*
|
|
36
|
+
* @returns Props object to use with `defineProps()`
|
|
37
|
+
*/
|
|
1
38
|
const getSliceComponentProps = (propsHint) => ({
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
39
|
+
slice: {
|
|
40
|
+
type: Object,
|
|
41
|
+
required: true
|
|
42
|
+
},
|
|
43
|
+
index: {
|
|
44
|
+
type: Number,
|
|
45
|
+
required: true
|
|
46
|
+
},
|
|
47
|
+
slices: {
|
|
48
|
+
type: Array,
|
|
49
|
+
required: true
|
|
50
|
+
},
|
|
51
|
+
context: {
|
|
52
|
+
type: null,
|
|
53
|
+
required: true
|
|
54
|
+
}
|
|
18
55
|
});
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=getSliceComponentProps.js.map
|
|
56
|
+
|
|
57
|
+
//#endregion
|
|
58
|
+
export { getSliceComponentProps };
|
|
59
|
+
//# sourceMappingURL=getSliceComponentProps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSliceComponentProps.js","sources":["
|
|
1
|
+
{"version":3,"file":"getSliceComponentProps.js","names":[],"sources":["../../src/SliceZone/getSliceComponentProps.ts"],"sourcesContent":["import type { PropType } from \"vue\"\n\nimport type { SliceComponentProps, SliceLike } from \"./types\"\n\n/**\n * Native Vue props for a component rendering content from a Prismic Slice using\n * the `<SliceZone />` component.\n *\n * @typeParam TSlice - The Slice type\n * @typeParam TContext - Arbitrary data passed to `<SliceZone />` and made\n * available to all Slice components\n */\ntype DefineComponentSliceComponentProps<\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tTSlice extends SliceLike = any,\n\tTContext = unknown,\n> = {\n\tslice: {\n\t\ttype: PropType<SliceComponentProps<TSlice, TContext>[\"slice\"]>\n\t\trequired: true\n\t}\n\tindex: {\n\t\ttype: PropType<SliceComponentProps<TSlice, TContext>[\"index\"]>\n\t\trequired: true\n\t}\n\tslices: {\n\t\ttype: PropType<SliceComponentProps<TSlice, TContext>[\"slices\"]>\n\t\trequired: true\n\t}\n\tcontext: {\n\t\ttype: PropType<SliceComponentProps<TSlice, TContext>[\"context\"]>\n\t\trequired: true\n\t}\n}\n\n/**\n * Gets native Vue props for a component rendering content from a Prismic Slice\n * using the `<SliceZone />` component.\n *\n * Props are: `[\"slice\", \"index\", \"slices\", \"context\"]`\n *\n * @example\n *\n * ```typescript\n * // Defining a new slice component\n * import { getSliceComponentProps } from \"@prismicio/vue\"\n *\n * defineProps(getSliceComponentProps())\n * ```\n *\n * @example\n *\n * ```typescript\n * // Defining a new slice component with visual hint\n * import { getSliceComponentProps } from \"@prismicio/vue\"\n *\n * defineProps(\n * \tgetSliceComponentProps([\"slice\", \"index\", \"slices\", \"context\"]),\n * )\n * ```\n *\n * @typeParam TSlice - The Slice type\n * @typeParam TContext - Arbitrary data passed to `<SliceZone />` and made\n * available to all Slice components\n *\n * @param propsHint - An optional array of prop names used for the sole purpose\n * of having a visual hint of which props are made available to the slice,\n * this parameters doesn't have any effect\n *\n * @returns Props object to use with `defineProps()`\n */\nexport const getSliceComponentProps = <\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tTSlice extends SliceLike = any,\n\tTContext = unknown,\n>(\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tpropsHint?: [\"slice\", \"index\", \"slices\", \"context\"],\n): DefineComponentSliceComponentProps<TSlice, TContext> => ({\n\tslice: {\n\t\ttype: Object as PropType<SliceComponentProps<TSlice, TContext>[\"slice\"]>,\n\t\trequired: true,\n\t},\n\tindex: {\n\t\ttype: Number as PropType<SliceComponentProps<TSlice, TContext>[\"index\"]>,\n\t\trequired: true,\n\t},\n\tslices: {\n\t\ttype: Array as PropType<SliceComponentProps<TSlice, TContext>[\"slices\"]>,\n\t\trequired: true,\n\t},\n\tcontext: {\n\t\ttype: null as unknown as PropType<\n\t\t\tSliceComponentProps<TSlice, TContext>[\"context\"]\n\t\t>,\n\t\trequired: true,\n\t},\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEA,MAAa,0BAMZ,eAC2D;CAC3D,OAAO;EACN,MAAM;EACN,UAAU;EACV;CACD,OAAO;EACN,MAAM;EACN,UAAU;EACV;CACD,QAAQ;EACP,MAAM;EACN,UAAU;EACV;CACD,SAAS;EACR,MAAM;EAGN,UAAU;EACV;CACD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { SliceComponentProps, SliceComponentType, SliceLike, SliceLikeGraphQL, SliceLikeRestV2, SliceZoneComponents, SliceZoneLike } from "./types.js";
|
|
2
|
+
import { TODOSliceComponent } from "./TODOSliceComponent.js";
|
|
3
|
+
import { getSliceComponentProps } from "./getSliceComponentProps.js";
|
|
4
|
+
import { defineSliceZoneComponents } from "./defineSliceZoneComponents.js";
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { Component } from "../types.cjs";
|
|
2
|
+
import { Slice } from "@prismicio/client";
|
|
3
|
+
|
|
4
|
+
//#region src/SliceZone/types.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Returns the type of a `SliceLike` type.
|
|
8
|
+
*
|
|
9
|
+
* @typeParam TSlice - The Slice from which the type will be extracted.
|
|
10
|
+
*/
|
|
11
|
+
type ExtractSliceType<TSlice extends SliceLike> = TSlice extends SliceLikeRestV2 ? TSlice["slice_type"] : TSlice extends SliceLikeGraphQL ? TSlice["type"] : never;
|
|
12
|
+
/**
|
|
13
|
+
* The minimum required properties to represent a Prismic Slice from the Prismic
|
|
14
|
+
* Rest API V2 for the `unstable_mapSliceZone()` helper.
|
|
15
|
+
*
|
|
16
|
+
* @typeParam SliceType - Type name of the Slice.
|
|
17
|
+
*/
|
|
18
|
+
type SliceLikeRestV2<TSliceType extends string = string> = Pick<Slice<TSliceType>, "id" | "slice_type">;
|
|
19
|
+
/**
|
|
20
|
+
* The minimum required properties to represent a Prismic Slice from the Prismic
|
|
21
|
+
* GraphQL API for the `unstable_mapSliceZone()` helper.
|
|
22
|
+
*
|
|
23
|
+
* @typeParam SliceType - Type name of the Slice.
|
|
24
|
+
*/
|
|
25
|
+
type SliceLikeGraphQL<TSliceType extends string = string> = {
|
|
26
|
+
type: Slice<TSliceType>["slice_type"];
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* The minimum required properties to represent a Prismic Slice for the
|
|
30
|
+
* `<SliceZone />` component.
|
|
31
|
+
*
|
|
32
|
+
* If using Prismic's Rest API V2, use the `Slice` export from
|
|
33
|
+
* `@prismicio/client` for a full interface.
|
|
34
|
+
*
|
|
35
|
+
* @typeParam TSliceType - Type name of the Slice
|
|
36
|
+
*/
|
|
37
|
+
type SliceLike<TSliceType extends string = string> = (SliceLikeRestV2<TSliceType> | SliceLikeGraphQL<TSliceType>) & {
|
|
38
|
+
/**
|
|
39
|
+
* If `true`, this Slice has been modified from its original value using a
|
|
40
|
+
* mapper and `@prismicio/client`'s `mapSliceZone()`.
|
|
41
|
+
*
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
__mapped?: true;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* A looser version of the `SliceZone` type from `@prismicio/client` using
|
|
48
|
+
* `SliceLike`.
|
|
49
|
+
*
|
|
50
|
+
* If using Prismic's REST API, use the `SliceZone` export from
|
|
51
|
+
* `@prismicio/client` for the full type.
|
|
52
|
+
*
|
|
53
|
+
* @typeParam TSlice - The type(s) of slices in the Slice Zone
|
|
54
|
+
*/
|
|
55
|
+
type SliceZoneLike<TSlice extends SliceLike = SliceLike> = readonly TSlice[];
|
|
56
|
+
/**
|
|
57
|
+
* Vue props for a component rendering content from a Prismic Slice using the
|
|
58
|
+
* `<SliceZone />` component.
|
|
59
|
+
*
|
|
60
|
+
* @typeParam TSlice - The type(s) of slices in the Slice Zone
|
|
61
|
+
* @typeParam TContext - Arbitrary data passed to `<SliceZone />` and made
|
|
62
|
+
* available to all Slice components
|
|
63
|
+
*/
|
|
64
|
+
type SliceComponentProps<TSlice extends SliceLike = SliceLike, TContext = unknown> = {
|
|
65
|
+
/** Slice data for this component. */
|
|
66
|
+
slice: TSlice;
|
|
67
|
+
/** The index of the Slice in the Slice Zone. */
|
|
68
|
+
index: number;
|
|
69
|
+
/** All Slices from the Slice Zone to which the Slice belongs. */
|
|
70
|
+
slices: SliceZoneLike<TSlice extends SliceLikeGraphQL ? SliceLikeGraphQL : SliceLikeRestV2>;
|
|
71
|
+
/**
|
|
72
|
+
* Arbitrary data passed to `<SliceZone />` and made available to all Slice
|
|
73
|
+
* components.
|
|
74
|
+
*/
|
|
75
|
+
context: TContext;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* A Vue component to be rendered for each instance of its Slice.
|
|
79
|
+
*
|
|
80
|
+
* @typeParam TSlice - The type(s) of slices in the Slice Zone
|
|
81
|
+
* @typeParam TContext - Arbitrary data made available to all Slice components
|
|
82
|
+
*/
|
|
83
|
+
type SliceComponentType<TSlice extends SliceLike = any, TContext = unknown> = Component<SliceComponentProps<TSlice, TContext>>;
|
|
84
|
+
/**
|
|
85
|
+
* A record of Slice types mapped to Vue components. Each components will be
|
|
86
|
+
* rendered for each instance of their Slice type.
|
|
87
|
+
*
|
|
88
|
+
* @typeParam TSlice - The type(s) of slices in the Slice Zone
|
|
89
|
+
* @typeParam TContext - Arbitrary data made available to all Slice components
|
|
90
|
+
*/
|
|
91
|
+
type SliceZoneComponents<TSlice extends SliceLike = SliceLike, TContext = unknown> = { [SliceType in ExtractSliceType<TSlice>]: SliceComponentType<Extract<TSlice, SliceLike<SliceType>> extends never ? SliceLike : Extract<TSlice, SliceLike<SliceType>>, TContext> | string };
|
|
92
|
+
//#endregion
|
|
93
|
+
export { SliceComponentProps, SliceComponentType, SliceLike, SliceLikeGraphQL, SliceLikeRestV2, SliceZoneComponents, SliceZoneLike };
|
|
94
|
+
//# sourceMappingURL=types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.cts","names":[],"sources":["../../src/SliceZone/types.ts"],"sourcesContent":[],"mappings":";;;;;;;AAEyC;;;KAOpC,gBAA4D,CAAA,eAA5B,SAA4B,CAAA,GAAf,MAAe,SAAA,eAAA,GAC9D,MAD8D,CAAA,YAAA,CAAA,GAE9D,MAF8D,SAE/C,gBAF+C,GAG7D,MAH6D,CAAA,MAAA,CAAA,GAAA,KAAA;;;;;;AAYjE;AACO,KADK,eACL,CAAA,mBAAA,MAAA,GAAA,MAAA,CAAA,GAD2D,IAC3D,CAAN,KAAM,CAAA,UAAA,CAAA,EAAA,IAAA,GAAA,YAAA,CAAA;;;;AAUP;AAaA;;AACG,KAdS,gBAcT,CAAA,mBAAA,MAAA,GAAA,MAAA,CAAA,GAAA;EACiB,IAAA,EAdb,KAca,CAdP,UAcO,CAAA,CAAA,YAAA,CAAA;CAAjB;;AAoBH;;;;;AAWA;;;AAKQ,KAtCI,SAsCJ,CAAA,mBAAA,MAAA,GAAA,MAAA,CAAA,GAAA,CArCL,eAqCK,CArCW,UAqCX,CAAA,GApCL,gBAoCK,CApCY,UAoCZ,CAAA,CAAA,GAAA;EAWN;;;;;;EAOgB,QAAA,CAAA,EAAA,IAAA;AASlB,CAAA;;;;;;;AAaA;;;AAciC,KAtErB,aAsEqB,CAAA,eAtEQ,SAsER,GAtEoB,SAsEpB,CAAA,GAAA,SArEvB,MAqEuB,EAAA;;;;;;;;;AAIT,KA/DZ,mBA+DY,CAAA,eA9DR,SA8DQ,GA9DI,SA8DJ,EAAA,WAAA,OAAA,CAAA,GAAA;EAAhB;EACH,KAAA,EA3DG,MA2DH;EAJA;EAAkB,KAAA,EAAA,MAAA;;UA7Cd,cACP,eAAe,mBAAmB,mBAAmB;;;;;WAO7C;;;;;;;;KASE,kCAEI,uCAEZ,UAAU,oBAAoB,QAAQ;;;;;;;;KAS9B,mCACI,YAAY,iDAaZ,iBAAiB,UAC5B,mBACA,QAAQ,QAAQ,UAAU,4BACvB,YACA,QAAQ,QAAQ,UAAU,aAC7B"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { Component } from "../types.js";
|
|
2
|
+
import { Slice } from "@prismicio/client";
|
|
3
|
+
|
|
4
|
+
//#region src/SliceZone/types.d.ts
|
|
5
|
+
|
|
3
6
|
/**
|
|
4
7
|
* Returns the type of a `SliceLike` type.
|
|
5
8
|
*
|
|
@@ -12,15 +15,15 @@ type ExtractSliceType<TSlice extends SliceLike> = TSlice extends SliceLikeRestV2
|
|
|
12
15
|
*
|
|
13
16
|
* @typeParam SliceType - Type name of the Slice.
|
|
14
17
|
*/
|
|
15
|
-
|
|
18
|
+
type SliceLikeRestV2<TSliceType extends string = string> = Pick<Slice<TSliceType>, "id" | "slice_type">;
|
|
16
19
|
/**
|
|
17
20
|
* The minimum required properties to represent a Prismic Slice from the Prismic
|
|
18
21
|
* GraphQL API for the `unstable_mapSliceZone()` helper.
|
|
19
22
|
*
|
|
20
23
|
* @typeParam SliceType - Type name of the Slice.
|
|
21
24
|
*/
|
|
22
|
-
|
|
23
|
-
|
|
25
|
+
type SliceLikeGraphQL<TSliceType extends string = string> = {
|
|
26
|
+
type: Slice<TSliceType>["slice_type"];
|
|
24
27
|
};
|
|
25
28
|
/**
|
|
26
29
|
* The minimum required properties to represent a Prismic Slice for the
|
|
@@ -31,14 +34,14 @@ export type SliceLikeGraphQL<TSliceType extends string = string> = {
|
|
|
31
34
|
*
|
|
32
35
|
* @typeParam TSliceType - Type name of the Slice
|
|
33
36
|
*/
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
type SliceLike<TSliceType extends string = string> = (SliceLikeRestV2<TSliceType> | SliceLikeGraphQL<TSliceType>) & {
|
|
38
|
+
/**
|
|
39
|
+
* If `true`, this Slice has been modified from its original value using a
|
|
40
|
+
* mapper and `@prismicio/client`'s `mapSliceZone()`.
|
|
41
|
+
*
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
__mapped?: true;
|
|
42
45
|
};
|
|
43
46
|
/**
|
|
44
47
|
* A looser version of the `SliceZone` type from `@prismicio/client` using
|
|
@@ -49,7 +52,7 @@ export type SliceLike<TSliceType extends string = string> = (SliceLikeRestV2<TSl
|
|
|
49
52
|
*
|
|
50
53
|
* @typeParam TSlice - The type(s) of slices in the Slice Zone
|
|
51
54
|
*/
|
|
52
|
-
|
|
55
|
+
type SliceZoneLike<TSlice extends SliceLike = SliceLike> = readonly TSlice[];
|
|
53
56
|
/**
|
|
54
57
|
* Vue props for a component rendering content from a Prismic Slice using the
|
|
55
58
|
* `<SliceZone />` component.
|
|
@@ -58,24 +61,18 @@ export type SliceZoneLike<TSlice extends SliceLike = SliceLike> = readonly TSlic
|
|
|
58
61
|
* @typeParam TContext - Arbitrary data passed to `<SliceZone />` and made
|
|
59
62
|
* available to all Slice components
|
|
60
63
|
*/
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
slices: SliceZoneLike<TSlice extends SliceLikeGraphQL ? SliceLikeGraphQL : SliceLikeRestV2>;
|
|
74
|
-
/**
|
|
75
|
-
* Arbitrary data passed to `<SliceZone />` and made available to all Slice
|
|
76
|
-
* components.
|
|
77
|
-
*/
|
|
78
|
-
context: TContext;
|
|
64
|
+
type SliceComponentProps<TSlice extends SliceLike = SliceLike, TContext = unknown> = {
|
|
65
|
+
/** Slice data for this component. */
|
|
66
|
+
slice: TSlice;
|
|
67
|
+
/** The index of the Slice in the Slice Zone. */
|
|
68
|
+
index: number;
|
|
69
|
+
/** All Slices from the Slice Zone to which the Slice belongs. */
|
|
70
|
+
slices: SliceZoneLike<TSlice extends SliceLikeGraphQL ? SliceLikeGraphQL : SliceLikeRestV2>;
|
|
71
|
+
/**
|
|
72
|
+
* Arbitrary data passed to `<SliceZone />` and made available to all Slice
|
|
73
|
+
* components.
|
|
74
|
+
*/
|
|
75
|
+
context: TContext;
|
|
79
76
|
};
|
|
80
77
|
/**
|
|
81
78
|
* A Vue component to be rendered for each instance of its Slice.
|
|
@@ -83,7 +80,7 @@ export type SliceComponentProps<TSlice extends SliceLike = SliceLike, TContext =
|
|
|
83
80
|
* @typeParam TSlice - The type(s) of slices in the Slice Zone
|
|
84
81
|
* @typeParam TContext - Arbitrary data made available to all Slice components
|
|
85
82
|
*/
|
|
86
|
-
|
|
83
|
+
type SliceComponentType<TSlice extends SliceLike = any, TContext = unknown> = Component<SliceComponentProps<TSlice, TContext>>;
|
|
87
84
|
/**
|
|
88
85
|
* A record of Slice types mapped to Vue components. Each components will be
|
|
89
86
|
* rendered for each instance of their Slice type.
|
|
@@ -91,7 +88,7 @@ export type SliceComponentType<TSlice extends SliceLike = any, TContext = unknow
|
|
|
91
88
|
* @typeParam TSlice - The type(s) of slices in the Slice Zone
|
|
92
89
|
* @typeParam TContext - Arbitrary data made available to all Slice components
|
|
93
90
|
*/
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
};
|
|
97
|
-
|
|
91
|
+
type SliceZoneComponents<TSlice extends SliceLike = SliceLike, TContext = unknown> = { [SliceType in ExtractSliceType<TSlice>]: SliceComponentType<Extract<TSlice, SliceLike<SliceType>> extends never ? SliceLike : Extract<TSlice, SliceLike<SliceType>>, TContext> | string };
|
|
92
|
+
//#endregion
|
|
93
|
+
export { SliceComponentProps, SliceComponentType, SliceLike, SliceLikeGraphQL, SliceLikeRestV2, SliceZoneComponents, SliceZoneLike };
|
|
94
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../src/SliceZone/types.ts"],"sourcesContent":[],"mappings":";;;;;;;AAEyC;;;KAOpC,gBAA4D,CAAA,eAA5B,SAA4B,CAAA,GAAf,MAAe,SAAA,eAAA,GAC9D,MAD8D,CAAA,YAAA,CAAA,GAE9D,MAF8D,SAE/C,gBAF+C,GAG7D,MAH6D,CAAA,MAAA,CAAA,GAAA,KAAA;;;;;;AAYjE;AACO,KADK,eACL,CAAA,mBAAA,MAAA,GAAA,MAAA,CAAA,GAD2D,IAC3D,CAAN,KAAM,CAAA,UAAA,CAAA,EAAA,IAAA,GAAA,YAAA,CAAA;;;;AAUP;AAaA;;AACG,KAdS,gBAcT,CAAA,mBAAA,MAAA,GAAA,MAAA,CAAA,GAAA;EACiB,IAAA,EAdb,KAca,CAdP,UAcO,CAAA,CAAA,YAAA,CAAA;CAAjB;;AAoBH;;;;;AAWA;;;AAKQ,KAtCI,SAsCJ,CAAA,mBAAA,MAAA,GAAA,MAAA,CAAA,GAAA,CArCL,eAqCK,CArCW,UAqCX,CAAA,GApCL,gBAoCK,CApCY,UAoCZ,CAAA,CAAA,GAAA;EAWN;;;;;;EAOgB,QAAA,CAAA,EAAA,IAAA;AASlB,CAAA;;;;;;;AAaA;;;AAciC,KAtErB,aAsEqB,CAAA,eAtEQ,SAsER,GAtEoB,SAsEpB,CAAA,GAAA,SArEvB,MAqEuB,EAAA;;;;;;;;;AAIT,KA/DZ,mBA+DY,CAAA,eA9DR,SA8DQ,GA9DI,SA8DJ,EAAA,WAAA,OAAA,CAAA,GAAA;EAAhB;EACH,KAAA,EA3DG,MA2DH;EAJA;EAAkB,KAAA,EAAA,MAAA;;UA7Cd,cACP,eAAe,mBAAmB,mBAAmB;;;;;WAO7C;;;;;;;;KASE,kCAEI,uCAEZ,UAAU,oBAAoB,QAAQ;;;;;;;;KAS9B,mCACI,YAAY,iDAaZ,iBAAiB,UAC5B,mBACA,QAAQ,QAAQ,UAAU,4BACvB,YACA,QAAQ,QAAQ,UAAU,aAC7B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __exportAll = (all, symbols) => {
|
|
4
|
+
let target = {};
|
|
5
|
+
for (var name in all) {
|
|
6
|
+
__defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
if (symbols) {
|
|
12
|
+
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
13
|
+
}
|
|
14
|
+
return target;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
|
|
19
|
+
exports.__exportAll = __exportAll;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __exportAll = (all, symbols) => {
|
|
4
|
+
let target = {};
|
|
5
|
+
for (var name in all) {
|
|
6
|
+
__defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
if (symbols) {
|
|
12
|
+
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
13
|
+
}
|
|
14
|
+
return target;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
export { __exportAll };
|