@prismicio/vue 6.2.0-pr.128.5ccd058 → 6.2.0-pr.129.965713f

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.
@@ -1 +1 @@
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":""}
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, { separator }) || fallback || \"\" }}\n</template>\n"],"mappings":""}
@@ -1 +1 @@
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
+ {"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, { separator }) || fallback || \"\" }}\n</template>\n"],"mappings":""}
@@ -26,7 +26,7 @@ var PrismicText_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0,
26
26
  if (typeof props.field === "string") throw new Error(`[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 ${require_devMsg.devMsg("prismictext-works-only-with-rich-text-and-title-fields")}`);
27
27
  }, {});
28
28
  return (_ctx, _cache) => {
29
- return (0, vue.toDisplayString)((0, vue.unref)(_prismicio_client.asText)(__props.field) || __props.fallback || "");
29
+ return (0, vue.toDisplayString)((0, vue.unref)(_prismicio_client.asText)(__props.field, { separator: __props.separator }) || __props.fallback || "");
30
30
  };
31
31
  }
32
32
  });
@@ -1 +1 @@
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"}
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, { separator }) || 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,OAAK,EAAA,WAAI,QAAA,UAAS,CAAA,KAAO,QAAA,YAAQ,EAAA"}
@@ -26,7 +26,7 @@ var PrismicText_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
26
26
  if (typeof props.field === "string") throw new Error(`[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("prismictext-works-only-with-rich-text-and-title-fields")}`);
27
27
  }, {});
28
28
  return (_ctx, _cache) => {
29
- return toDisplayString(unref(asText)(__props.field) || __props.fallback || "");
29
+ return toDisplayString(unref(asText)(__props.field, { separator: __props.separator }) || __props.fallback || "");
30
30
  };
31
31
  }
32
32
  });
@@ -1 +1 @@
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"}
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, { separator }) || 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,OAAK,EAAA,WAAI,QAAA,UAAS,CAAA,KAAO,QAAA,YAAQ,EAAA"}
package/dist/package.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "6.2.0-pr.128.5ccd058";
2
+ var version = "6.2.0-pr.129.965713f";
3
3
  Object.defineProperty(exports, "version", {
4
4
  enumerable: true,
5
5
  get: function() {
package/dist/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "6.2.0-pr.128.5ccd058";
2
+ var version = "6.2.0-pr.129.965713f";
3
3
  export { version };
4
4
 
5
5
  //# sourceMappingURL=package.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismicio/vue",
3
- "version": "6.2.0-pr.128.5ccd058",
3
+ "version": "6.2.0-pr.129.965713f",
4
4
  "description": "Vue plugin, components, and composables to fetch and present Prismic content",
5
5
  "keywords": [
6
6
  "plugin",
@@ -14,6 +14,10 @@
14
14
  "type": "git",
15
15
  "url": "ssh://git@github.com/prismicio/prismic-vue.git"
16
16
  },
17
+ "workspaces": [
18
+ ".",
19
+ "e2e-projects/*"
20
+ ],
17
21
  "files": [
18
22
  "./dist",
19
23
  "./src"
@@ -43,19 +47,22 @@
43
47
  "scripts": {
44
48
  "build": "tsdown",
45
49
  "dev": "tsdown --watch",
50
+ "e2e": "npm run build && playwright test",
51
+ "e2e:ui": "npm run e2e -- --ui",
46
52
  "format": "oxfmt",
47
53
  "prepare": "npm run build",
48
54
  "lint": "oxlint --deny-warnings",
49
55
  "types": "vue-tsc --noEmit",
50
56
  "unit": "vitest run --coverage",
51
57
  "unit:watch": "vitest watch",
52
- "test": "npm run lint && npm run types && npm run unit && npm run build"
58
+ "test": "npm run lint && npm run types && npm run unit && npm run e2e"
53
59
  },
54
60
  "dependencies": {
55
61
  "@prismicio/simulator": "^0.2.4",
56
62
  "esm-env": "^1.2.2"
57
63
  },
58
64
  "devDependencies": {
65
+ "@playwright/test": "^1.64.1",
59
66
  "@prismicio/client": "^7.23.0",
60
67
  "@prismicio/mock": "^0.7.2",
61
68
  "@types/jsdom-global": "^3.0.7",
@@ -66,6 +73,7 @@
66
73
  "jsdom-global": "^3.0.2",
67
74
  "oxfmt": "0.76.0",
68
75
  "oxlint": "1.91.0",
76
+ "playwright": "^1.64.1",
69
77
  "tsdown": "^0.23.5",
70
78
  "typescript": "^6.0.3",
71
79
  "vite": "^8.3.6",
@@ -42,5 +42,5 @@ if (DEV) {
42
42
  </script>
43
43
 
44
44
  <template>
45
- {{ asText(field) || fallback || "" }}
45
+ {{ asText(field, { separator }) || fallback || "" }}
46
46
  </template>