@nascentdigital/funnel-editor 8.0.3 → 8.0.4

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.
@@ -24,6 +24,7 @@ export declare class Block<TBlock extends Block.SchemaType = Block.SchemaType> e
24
24
  get state(): "undefined" | "invalid" | "valid";
25
25
  get fieldChanged$(): import("rxjs").Observable<Field.Event>;
26
26
  get configData(): Partial<Record<Schema.Block.Config.Variant, Block.ConfigVariantData>>;
27
+ get hasConfiguration(): boolean;
27
28
  get configuration(): BlockConfiguration;
28
29
  get value(): Schema.Block.Data;
29
30
  get modified(): boolean;
@@ -51,11 +51,14 @@ class Block extends ItemBase_1.ItemBase {
51
51
  var _a, _b;
52
52
  return (_b = (_a = this._configuration) === null || _a === void 0 ? void 0 : _a.configData) !== null && _b !== void 0 ? _b : this._configData;
53
53
  }
54
+ get hasConfiguration() {
55
+ return !!this._configuration;
56
+ }
54
57
  get configuration() {
55
58
  // throw if accessed too early
56
59
  const { _configuration } = this;
57
60
  if (!_configuration) {
58
- throw new funnel_core_1.InvalidOperationError('Cannot to access Block configuration before being bound to parent');
61
+ throw new funnel_core_1.InvalidOperationError('Cannot access Block configuration before being bound to parent. Please use hasConfiguration to check first.');
59
62
  }
60
63
  // return configuration
61
64
  return _configuration;
@@ -10,6 +10,7 @@ export declare class SectionBlock<TBlock extends Schema.Block = Schema.Block> ex
10
10
  get schema(): TBlock;
11
11
  get identifier(): string;
12
12
  get name(): string;
13
+ get hasConfiguration(): boolean;
13
14
  get configuration(): import("./BlockConfiguration").BlockConfiguration;
14
15
  get fields(): ReadonlyArray<FieldModel>;
15
16
  get nameField(): import("@nascentdigital/funnel-core").Field<Schema.TextField> | undefined;
@@ -21,6 +21,9 @@ class SectionBlock extends ItemBase_1.ItemBase {
21
21
  get name() {
22
22
  return this.block.name;
23
23
  }
24
+ get hasConfiguration() {
25
+ return this.block.hasConfiguration;
26
+ }
24
27
  get configuration() {
25
28
  return this.block.configuration;
26
29
  }
@@ -272,9 +272,6 @@ function renderListLayoutItem(item) {
272
272
  case 'brick':
273
273
  content = ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(panelClassName, panelPaddedX, 'grid grid-cols-2 gap-l3 pt-10'), children: [panel('h-12 row-start-1 col-span-full'), panel('h-12 row-start-2 col-start-1'), panel('h-12 row-start-2 col-start-2'), panel('h-12 row-start-3 col-span-full')] }));
274
274
  break;
275
- case 'brickFlipped':
276
- content = ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(panelClassName, panelPaddedX, 'grid grid-cols-2 gap-l3 pt-10'), children: [panel('h-12 row-start-1 col-start-1'), panel('h-12 row-start-1 col-start-2'), panel('h-12 row-start-2 col-span-full'), panel('h-12 row-start-3 col-start-1'), panel('h-12 row-start-3 col-start-2')] }));
277
- break;
278
275
  case 'carousel':
279
276
  content = ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(panelClassName, 'flex flex-col gap-l2 pt-10 pb-l3'), children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex-1 flex items-stretch gap-l3", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-8 bg-surface-placeholder rounded-r-[2px]" }), (0, jsx_runtime_1.jsx)("div", { className: "flex-1 bg-surface-placeholder-raised rounded-[2px]" }), (0, jsx_runtime_1.jsx)("div", { className: "w-8 bg-surface-placeholder rounded-l-[2px]" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex justify-center items-center gap-l1", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-4 h-4 bg-surface-placeholder-raised rounded-full" }), (0, jsx_runtime_1.jsx)("div", { className: "w-4 h-4 bg-surface-placeholder-raised rounded-full" }), (0, jsx_runtime_1.jsx)("div", { className: "w-4 h-4 bg-surface-placeholder-raised rounded-full" })] })] }));
280
277
  break;
@@ -501,10 +501,10 @@ video {
501
501
  }
502
502
 
503
503
  [popover]{
504
- inset: var(--toolwind-toggle-pqRdvUwqW7, 0px);
505
- background-color: var(--toolwind-toggle-7X9HUWnxJz, canvas);
506
- color: var(--toolwind-toggle-8OJbFc7cQW, canvastext);
507
- margin: var(--toolwind-toggle-l37QRfJBIJ, auto);
504
+ inset: var(--toolwind-toggle-nSvp8q7rrL, 0px);
505
+ background-color: var(--toolwind-toggle-ZSSRbB7EKW, canvas);
506
+ color: var(--toolwind-toggle-GwZMPobI7s, canvastext);
507
+ margin: var(--toolwind-toggle-GVxBrKGCyn, auto);
508
508
  }
509
509
  html, body, #__next, #root, .Editor-wrap{
510
510
  position: relative;
@@ -6220,10 +6220,10 @@ img.nd-Visual-image {
6220
6220
  .anchored\/\[--nd-popup-anchor\]:where(.anchored\/\[--nd-popup-anchor\]){
6221
6221
  position: absolute;
6222
6222
  view-transition-name: --tw-anchor-view-transition-2j1919322s193433343934192p322r2w33362l;
6223
- --toolwind-toggle-pqRdvUwqW7: auto;
6224
- --toolwind-toggle-7X9HUWnxJz: transparent;
6225
- --toolwind-toggle-8OJbFc7cQW: inherit;
6226
- --toolwind-toggle-l37QRfJBIJ: 0px;
6223
+ --toolwind-toggle-nSvp8q7rrL: auto;
6224
+ --toolwind-toggle-ZSSRbB7EKW: transparent;
6225
+ --toolwind-toggle-GwZMPobI7s: inherit;
6226
+ --toolwind-toggle-GVxBrKGCyn: 0px;
6227
6227
  }
6228
6228
  .counter-l1{
6229
6229
  counter-reset: l1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nascentdigital/funnel-editor",
3
- "version": "8.0.3",
3
+ "version": "8.0.4",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -92,5 +92,5 @@
92
92
  "ts-jest": "^29",
93
93
  "type-fest": "^4"
94
94
  },
95
- "gitHead": "78869fa63f0c205281707166ba652c73b2b99658"
95
+ "gitHead": "5375c943981bd14ac211a94f5455fdc1d5ba5098"
96
96
  }