@squiz/dxp-page-content-types 1.4.1 → 1.5.0

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.
@@ -4,11 +4,21 @@
4
4
  */
5
5
  import { FORMATTED_TEXT_MODELS } from '@squiz/dx-json-schema-lib';
6
6
  import { Conditions } from '../PageContent/PageContent';
7
+ /**
8
+ * Content node helper constants.
9
+ */
10
+ export declare const NODE_TYPE: {
11
+ component: "component";
12
+ fragment: "fragment";
13
+ layout: "layout";
14
+ variation: "variation";
15
+ };
16
+ export type NODE_TYPE = (typeof NODE_TYPE)[keyof typeof NODE_TYPE];
7
17
  /**
8
18
  * Semi-resolved (referenced content items, not resolved Matrix references) formatted nodes union type.
9
19
  */
10
20
  export type LayoutContentNodes = (Exclude<FORMATTED_TEXT_MODELS.v1.FormattedNodes, {
11
- type: 'component' | 'fragment' | 'layout';
21
+ type: NODE_TYPE;
12
22
  }> | FormattedTextFragmentNode | ComponentNode | VariationNode | LayoutNode) & {
13
23
  nodeId?: string;
14
24
  };
@@ -4,4 +4,14 @@
4
4
  * Copyright Squiz Australia Pty Ltd. All Rights Reserved.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.NODE_TYPE = void 0;
8
+ /**
9
+ * Content node helper constants.
10
+ */
11
+ exports.NODE_TYPE = {
12
+ component: 'component',
13
+ fragment: 'fragment',
14
+ layout: 'layout',
15
+ variation: 'variation',
16
+ };
7
17
  //# sourceMappingURL=Nodes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Nodes.js","sourceRoot":"","sources":["../../src/Nodes/Nodes.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
1
+ {"version":3,"file":"Nodes.js","sourceRoot":"","sources":["../../src/Nodes/Nodes.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAKH;;GAEG;AAEU,QAAA,SAAS,GAAG;IACvB,SAAS,EAAE,WAAoB;IAC/B,QAAQ,EAAE,UAAmB;IAC7B,MAAM,EAAE,QAAiB;IACzB,SAAS,EAAE,WAAoB;CAChC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squiz/dxp-page-content-types",
3
- "version": "1.4.1",
3
+ "version": "1.5.0",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "repository": {