vue-datocms 8.1.1 → 8.1.3

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/index.cjs.js CHANGED
@@ -806,18 +806,18 @@ const StructuredText = vue.defineComponent({
806
806
  node
807
807
  );
808
808
  }
809
- if (!datocmsStructuredTextUtils.isStructuredText(props.data) || !props.data.blocks) {
809
+ if (!datocmsStructuredTextUtils.isStructuredText(props.data) || !props.data.inlineBlocks) {
810
810
  throw new datocmsStructuredTextUtils.RenderError(
811
- `The Structured Text document contains an 'inlineBlock' node, but .blocks is not present!`,
811
+ `The Structured Text document contains an 'inlineBlock' node, but .inlineBlocks is not present!`,
812
812
  node
813
813
  );
814
814
  }
815
- const item = props.data.blocks.find(
815
+ const item = props.data.inlineBlocks.find(
816
816
  (item2) => item2.id === node.item
817
817
  );
818
818
  if (!item) {
819
819
  throw new datocmsStructuredTextUtils.RenderError(
820
- `The Structured Text document contains a 'block' node, but cannot find a record with ID ${node.item} inside .blocks!`,
820
+ `The Structured Text document contains a 'block' node, but cannot find a record with ID ${node.item} inside .inlineBlocks!`,
821
821
  node
822
822
  );
823
823
  }
package/dist/index.d.ts CHANGED
@@ -2,8 +2,8 @@ import * as vue from 'vue';
2
2
  import { PropType, h, VNode, Ref, UnwrapRef, CSSProperties } from 'vue';
3
3
  import { TransformedMeta, RenderMarkRule, TransformMetaFn } from 'datocms-structured-text-generic-html-renderer';
4
4
  export { renderMarkRule, renderNodeRule, renderNodeRule as renderRule } from 'datocms-structured-text-generic-html-renderer';
5
- import { Record as Record$1, RenderResult, StructuredText as StructuredText$1, Document, Node, RenderRule } from 'datocms-structured-text-utils';
6
- export { RenderError, Document as StructuredTextDocument, StructuredText as StructuredTextGraphQlResponse } from 'datocms-structured-text-utils';
5
+ import { Record as Record$1, RenderResult, StructuredText as StructuredText$1, CdaStructuredTextRecord, Document, Node, RenderRule } from 'datocms-structured-text-utils';
6
+ export { CdaStructuredTextRecord, CdaStructuredTextValue, RenderError, Document as StructuredTextDocument, StructuredText as StructuredTextGraphQlResponse, Record as StructuredTextGraphQlResponseRecord, TypesafeCdaStructuredTextValue } from 'datocms-structured-text-utils';
7
7
  import * as hls_js from 'hls.js';
8
8
  import { StreamTypes, MaxResolutionValue, MinResolutionValue, CmcdTypes, PlaybackTypes } from '@mux/playback-core/.';
9
9
  import MuxPlayerElement, { Tokens } from '@mux/mux-player';
@@ -471,7 +471,7 @@ type RenderBlockContext<R extends Record$1 = Record$1> = {
471
471
  declare const StructuredText: vue.DefineComponent<{
472
472
  /** The actual field value you get from DatoCMS **/
473
473
  data: {
474
- type: PropType<StructuredText$1<Record$1, Record$1> | Document | Node | null | undefined>;
474
+ type: PropType<StructuredText$1<CdaStructuredTextRecord, CdaStructuredTextRecord, CdaStructuredTextRecord> | Document<string, string> | Node<string, string> | null | undefined>;
475
475
  };
476
476
  /** @deprecated use customNodeRules **/
477
477
  customRules: {
@@ -520,7 +520,7 @@ declare const StructuredText: vue.DefineComponent<{
520
520
  }, () => RenderResult<typeof h, (text: string, _key: string) => AdapterReturn, (children: AdapterReturn[], _key: string) => AdapterReturn>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
521
521
  /** The actual field value you get from DatoCMS **/
522
522
  data: {
523
- type: PropType<StructuredText$1<Record$1, Record$1> | Document | Node | null | undefined>;
523
+ type: PropType<StructuredText$1<CdaStructuredTextRecord, CdaStructuredTextRecord, CdaStructuredTextRecord> | Document<string, string> | Node<string, string> | null | undefined>;
524
524
  };
525
525
  /** @deprecated use customNodeRules **/
526
526
  customRules: {
@@ -782,18 +782,18 @@ const StructuredText = defineComponent({
782
782
  node
783
783
  );
784
784
  }
785
- if (!isStructuredText(props.data) || !props.data.blocks) {
785
+ if (!isStructuredText(props.data) || !props.data.inlineBlocks) {
786
786
  throw new RenderError(
787
- `The Structured Text document contains an 'inlineBlock' node, but .blocks is not present!`,
787
+ `The Structured Text document contains an 'inlineBlock' node, but .inlineBlocks is not present!`,
788
788
  node
789
789
  );
790
790
  }
791
- const item = props.data.blocks.find(
791
+ const item = props.data.inlineBlocks.find(
792
792
  (item2) => item2.id === node.item
793
793
  );
794
794
  if (!item) {
795
795
  throw new RenderError(
796
- `The Structured Text document contains a 'block' node, but cannot find a record with ID ${node.item} inside .blocks!`,
796
+ `The Structured Text document contains a 'block' node, but cannot find a record with ID ${node.item} inside .inlineBlocks!`,
797
797
  node
798
798
  );
799
799
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-datocms",
3
- "version": "8.1.1",
3
+ "version": "8.1.3",
4
4
  "description": "A set of components and utilities to work faster with DatoCMS in Vue.js environments",
5
5
  "keywords": [
6
6
  "datocms",
@@ -43,8 +43,8 @@
43
43
  "dependencies": {
44
44
  "datocms-listen": "^0.1.15",
45
45
  "hls.js": "^1.5.17",
46
- "datocms-structured-text-generic-html-renderer": "^4.1.2",
47
- "datocms-structured-text-utils": "^4.1.2",
46
+ "datocms-structured-text-generic-html-renderer": "^5.0.0",
47
+ "datocms-structured-text-utils": "^5.1.6",
48
48
  "hyphenate-style-name": "^1.0.4"
49
49
  },
50
50
  "peerDependencies": {