@inditextech/weave-renderer-konva-base 3.9.2 → 4.0.1

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.
@@ -14715,7 +14715,10 @@ var WeaveKonvaBaseRenderer = class extends WeaveRenderer {
14715
14715
  super();
14716
14716
  }
14717
14717
  init() {
14718
- this.actualState = { weave: {} };
14718
+ this.actualState = {
14719
+ weave: {},
14720
+ weaveMetadata: {}
14721
+ };
14719
14722
  }
14720
14723
  render(callback) {
14721
14724
  const newState = JSON.parse(JSON.stringify(this.instance.getStore().getState()));
@@ -14832,7 +14835,10 @@ var WeaveKonvaBaseRenderer = class extends WeaveRenderer {
14832
14835
  }
14833
14836
  buildSubtree(parentInstance, element, index) {
14834
14837
  const nodeInstance = this.reconciler.createInstance(this.instance, element.type, this.stripChildren(element.props));
14835
- if (!nodeInstance) throw new Error(`No handler found for node type ${element.type}`);
14838
+ if (!nodeInstance) {
14839
+ console.warn(`No handler found for node type ${element.type}`);
14840
+ return;
14841
+ }
14836
14842
  if (!parentInstance && nodeInstance) this.reconciler.createRoot(this.instance, nodeInstance);
14837
14843
  if (parentInstance && nodeInstance && (parentInstance instanceof Konva.Stage || parentInstance instanceof Konva.Layer || parentInstance instanceof Konva.Group)) this.reconciler.appendChildToContainer(this.instance, parentInstance, nodeInstance, index);
14838
14844
  const children = element.props.children ?? [];
@@ -14715,7 +14715,10 @@ var WeaveKonvaBaseRenderer = class extends WeaveRenderer {
14715
14715
  super();
14716
14716
  }
14717
14717
  init() {
14718
- this.actualState = { weave: {} };
14718
+ this.actualState = {
14719
+ weave: {},
14720
+ weaveMetadata: {}
14721
+ };
14719
14722
  }
14720
14723
  render(callback) {
14721
14724
  const newState = JSON.parse(JSON.stringify(this.instance.getStore().getState()));
@@ -14832,7 +14835,10 @@ var WeaveKonvaBaseRenderer = class extends WeaveRenderer {
14832
14835
  }
14833
14836
  buildSubtree(parentInstance, element, index) {
14834
14837
  const nodeInstance = this.reconciler.createInstance(this.instance, element.type, this.stripChildren(element.props));
14835
- if (!nodeInstance) throw new Error(`No handler found for node type ${element.type}`);
14838
+ if (!nodeInstance) {
14839
+ console.warn(`No handler found for node type ${element.type}`);
14840
+ return;
14841
+ }
14836
14842
  if (!parentInstance && nodeInstance) this.reconciler.createRoot(this.instance, nodeInstance);
14837
14843
  if (parentInstance && nodeInstance && (parentInstance instanceof Konva.Stage || parentInstance instanceof Konva.Layer || parentInstance instanceof Konva.Group)) this.reconciler.appendChildToContainer(this.instance, parentInstance, nodeInstance, index);
14838
14844
  const children = element.props.children ?? [];
@@ -4930,7 +4930,7 @@ var drawChart = (function (exports) {
4930
4930
  </script>
4931
4931
  <script>
4932
4932
  /*<!--*/
4933
- const data = {"version":2,"tree":{"name":"root","children":[{"name":"renderer-konva-base.node.js","children":[{"uid":"422523b6-1","name":"rolldown:runtime"},{"name":"home/runner/work/weavejs/weavejs/code/node_modules/lodash/lodash.js","uid":"422523b6-3"},{"name":"src","children":[{"uid":"422523b6-5","name":"reconciler.ts"},{"uid":"422523b6-7","name":"renderer.ts"},{"uid":"422523b6-9","name":"index.common.ts"},{"uid":"422523b6-11","name":"index.node.ts"}]}]}],"isRoot":true},"nodeParts":{"422523b6-1":{"renderedLength":1123,"gzipLength":559,"brotliLength":495,"metaUid":"422523b6-0"},"422523b6-3":{"renderedLength":492818,"gzipLength":91015,"brotliLength":70600,"metaUid":"422523b6-2"},"422523b6-5":{"renderedLength":2789,"gzipLength":810,"brotliLength":735,"metaUid":"422523b6-4"},"422523b6-7":{"renderedLength":5499,"gzipLength":1600,"brotliLength":1408,"metaUid":"422523b6-6"},"422523b6-9":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"422523b6-8"},"422523b6-11":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"422523b6-10"}},"nodeMetas":{"422523b6-0":{"id":"rolldown:runtime","moduleParts":{"renderer-konva-base.node.js":"422523b6-1"},"imported":[],"importedBy":[]},"422523b6-2":{"id":"/home/runner/work/weavejs/weavejs/code/node_modules/lodash/lodash.js","moduleParts":{"renderer-konva-base.node.js":"422523b6-3"},"imported":[],"importedBy":[{"uid":"422523b6-6"},{"uid":"422523b6-4"}]},"422523b6-4":{"id":"/src/reconciler.ts","moduleParts":{"renderer-konva-base.node.js":"422523b6-5"},"imported":[{"uid":"422523b6-15"},{"uid":"422523b6-14"},{"uid":"422523b6-2"}],"importedBy":[{"uid":"422523b6-6"}]},"422523b6-6":{"id":"/src/renderer.ts","moduleParts":{"renderer-konva-base.node.js":"422523b6-7"},"imported":[{"uid":"422523b6-13"},{"uid":"422523b6-14"},{"uid":"422523b6-2"},{"uid":"422523b6-4"},{"uid":"422523b6-15"}],"importedBy":[{"uid":"422523b6-8"}]},"422523b6-8":{"id":"/src/index.common.ts","moduleParts":{"renderer-konva-base.node.js":"422523b6-9"},"imported":[{"uid":"422523b6-6"},{"uid":"422523b6-12"}],"importedBy":[{"uid":"422523b6-10"}]},"422523b6-10":{"id":"/src/index.node.ts","moduleParts":{"renderer-konva-base.node.js":"422523b6-11"},"imported":[{"uid":"422523b6-8"}],"importedBy":[],"isEntry":true},"422523b6-12":{"id":"/src/types.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"422523b6-8"}]},"422523b6-13":{"id":"@inditextech/weave-types","moduleParts":{},"imported":[],"importedBy":[{"uid":"422523b6-6"}]},"422523b6-14":{"id":"konva","moduleParts":{},"imported":[],"importedBy":[{"uid":"422523b6-6"},{"uid":"422523b6-4"}]},"422523b6-15":{"id":"@inditextech/weave-sdk","moduleParts":{},"imported":[],"importedBy":[{"uid":"422523b6-6"},{"uid":"422523b6-4"}]}},"env":{"rollup":"4.23.0"},"options":{"gzip":true,"brotli":true,"sourcemap":false}};
4933
+ const data = {"version":2,"tree":{"name":"root","children":[{"name":"renderer-konva-base.node.js","children":[{"uid":"cf04f31c-1","name":"rolldown:runtime"},{"name":"home/runner/work/weavejs/weavejs/code/node_modules/lodash/lodash.js","uid":"cf04f31c-3"},{"name":"src","children":[{"uid":"cf04f31c-5","name":"reconciler.ts"},{"uid":"cf04f31c-7","name":"renderer.ts"},{"uid":"cf04f31c-9","name":"index.common.ts"},{"uid":"cf04f31c-11","name":"index.node.ts"}]}]}],"isRoot":true},"nodeParts":{"cf04f31c-1":{"renderedLength":1123,"gzipLength":559,"brotliLength":495,"metaUid":"cf04f31c-0"},"cf04f31c-3":{"renderedLength":492818,"gzipLength":91015,"brotliLength":70600,"metaUid":"cf04f31c-2"},"cf04f31c-5":{"renderedLength":2789,"gzipLength":810,"brotliLength":735,"metaUid":"cf04f31c-4"},"cf04f31c-7":{"renderedLength":5543,"gzipLength":1625,"brotliLength":1430,"metaUid":"cf04f31c-6"},"cf04f31c-9":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"cf04f31c-8"},"cf04f31c-11":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"cf04f31c-10"}},"nodeMetas":{"cf04f31c-0":{"id":"rolldown:runtime","moduleParts":{"renderer-konva-base.node.js":"cf04f31c-1"},"imported":[],"importedBy":[]},"cf04f31c-2":{"id":"/home/runner/work/weavejs/weavejs/code/node_modules/lodash/lodash.js","moduleParts":{"renderer-konva-base.node.js":"cf04f31c-3"},"imported":[],"importedBy":[{"uid":"cf04f31c-6"},{"uid":"cf04f31c-4"}]},"cf04f31c-4":{"id":"/src/reconciler.ts","moduleParts":{"renderer-konva-base.node.js":"cf04f31c-5"},"imported":[{"uid":"cf04f31c-15"},{"uid":"cf04f31c-14"},{"uid":"cf04f31c-2"}],"importedBy":[{"uid":"cf04f31c-6"}]},"cf04f31c-6":{"id":"/src/renderer.ts","moduleParts":{"renderer-konva-base.node.js":"cf04f31c-7"},"imported":[{"uid":"cf04f31c-13"},{"uid":"cf04f31c-14"},{"uid":"cf04f31c-2"},{"uid":"cf04f31c-4"},{"uid":"cf04f31c-15"}],"importedBy":[{"uid":"cf04f31c-8"}]},"cf04f31c-8":{"id":"/src/index.common.ts","moduleParts":{"renderer-konva-base.node.js":"cf04f31c-9"},"imported":[{"uid":"cf04f31c-6"},{"uid":"cf04f31c-12"}],"importedBy":[{"uid":"cf04f31c-10"}]},"cf04f31c-10":{"id":"/src/index.node.ts","moduleParts":{"renderer-konva-base.node.js":"cf04f31c-11"},"imported":[{"uid":"cf04f31c-8"}],"importedBy":[],"isEntry":true},"cf04f31c-12":{"id":"/src/types.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"cf04f31c-8"}]},"cf04f31c-13":{"id":"@inditextech/weave-types","moduleParts":{},"imported":[],"importedBy":[{"uid":"cf04f31c-6"}]},"cf04f31c-14":{"id":"konva","moduleParts":{},"imported":[],"importedBy":[{"uid":"cf04f31c-6"},{"uid":"cf04f31c-4"}]},"cf04f31c-15":{"id":"@inditextech/weave-sdk","moduleParts":{},"imported":[],"importedBy":[{"uid":"cf04f31c-6"},{"uid":"cf04f31c-4"}]}},"env":{"rollup":"4.23.0"},"options":{"gzip":true,"brotli":true,"sourcemap":false}};
4934
4934
 
4935
4935
  const run = () => {
4936
4936
  const width = window.innerWidth;
@@ -4930,7 +4930,7 @@ var drawChart = (function (exports) {
4930
4930
  </script>
4931
4931
  <script>
4932
4932
  /*<!--*/
4933
- const data = {"version":2,"tree":{"name":"root","children":[{"name":"renderer-konva-base.js","children":[{"uid":"8aaf16d6-1","name":"rolldown:runtime"},{"name":"home/runner/work/weavejs/weavejs/code/node_modules/lodash/lodash.js","uid":"8aaf16d6-3"},{"name":"src","children":[{"uid":"8aaf16d6-5","name":"reconciler.ts"},{"uid":"8aaf16d6-7","name":"renderer.ts"},{"uid":"8aaf16d6-9","name":"index.common.ts"},{"uid":"8aaf16d6-11","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"8aaf16d6-1":{"renderedLength":1123,"gzipLength":559,"brotliLength":495,"metaUid":"8aaf16d6-0"},"8aaf16d6-3":{"renderedLength":492818,"gzipLength":91015,"brotliLength":70600,"metaUid":"8aaf16d6-2"},"8aaf16d6-5":{"renderedLength":2789,"gzipLength":810,"brotliLength":735,"metaUid":"8aaf16d6-4"},"8aaf16d6-7":{"renderedLength":5499,"gzipLength":1600,"brotliLength":1408,"metaUid":"8aaf16d6-6"},"8aaf16d6-9":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"8aaf16d6-8"},"8aaf16d6-11":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"8aaf16d6-10"}},"nodeMetas":{"8aaf16d6-0":{"id":"rolldown:runtime","moduleParts":{"renderer-konva-base.js":"8aaf16d6-1"},"imported":[],"importedBy":[]},"8aaf16d6-2":{"id":"/home/runner/work/weavejs/weavejs/code/node_modules/lodash/lodash.js","moduleParts":{"renderer-konva-base.js":"8aaf16d6-3"},"imported":[],"importedBy":[{"uid":"8aaf16d6-6"},{"uid":"8aaf16d6-4"}]},"8aaf16d6-4":{"id":"/src/reconciler.ts","moduleParts":{"renderer-konva-base.js":"8aaf16d6-5"},"imported":[{"uid":"8aaf16d6-15"},{"uid":"8aaf16d6-14"},{"uid":"8aaf16d6-2"}],"importedBy":[{"uid":"8aaf16d6-6"}]},"8aaf16d6-6":{"id":"/src/renderer.ts","moduleParts":{"renderer-konva-base.js":"8aaf16d6-7"},"imported":[{"uid":"8aaf16d6-13"},{"uid":"8aaf16d6-14"},{"uid":"8aaf16d6-2"},{"uid":"8aaf16d6-4"},{"uid":"8aaf16d6-15"}],"importedBy":[{"uid":"8aaf16d6-8"}]},"8aaf16d6-8":{"id":"/src/index.common.ts","moduleParts":{"renderer-konva-base.js":"8aaf16d6-9"},"imported":[{"uid":"8aaf16d6-6"},{"uid":"8aaf16d6-12"}],"importedBy":[{"uid":"8aaf16d6-10"}]},"8aaf16d6-10":{"id":"/src/index.ts","moduleParts":{"renderer-konva-base.js":"8aaf16d6-11"},"imported":[{"uid":"8aaf16d6-8"}],"importedBy":[],"isEntry":true},"8aaf16d6-12":{"id":"/src/types.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"8aaf16d6-8"}]},"8aaf16d6-13":{"id":"@inditextech/weave-types","moduleParts":{},"imported":[],"importedBy":[{"uid":"8aaf16d6-6"}]},"8aaf16d6-14":{"id":"konva","moduleParts":{},"imported":[],"importedBy":[{"uid":"8aaf16d6-6"},{"uid":"8aaf16d6-4"}]},"8aaf16d6-15":{"id":"@inditextech/weave-sdk","moduleParts":{},"imported":[],"importedBy":[{"uid":"8aaf16d6-6"},{"uid":"8aaf16d6-4"}]}},"env":{"rollup":"4.23.0"},"options":{"gzip":true,"brotli":true,"sourcemap":false}};
4933
+ const data = {"version":2,"tree":{"name":"root","children":[{"name":"renderer-konva-base.js","children":[{"uid":"3a102d8b-1","name":"rolldown:runtime"},{"name":"home/runner/work/weavejs/weavejs/code/node_modules/lodash/lodash.js","uid":"3a102d8b-3"},{"name":"src","children":[{"uid":"3a102d8b-5","name":"reconciler.ts"},{"uid":"3a102d8b-7","name":"renderer.ts"},{"uid":"3a102d8b-9","name":"index.common.ts"},{"uid":"3a102d8b-11","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"3a102d8b-1":{"renderedLength":1123,"gzipLength":559,"brotliLength":495,"metaUid":"3a102d8b-0"},"3a102d8b-3":{"renderedLength":492818,"gzipLength":91015,"brotliLength":70600,"metaUid":"3a102d8b-2"},"3a102d8b-5":{"renderedLength":2789,"gzipLength":810,"brotliLength":735,"metaUid":"3a102d8b-4"},"3a102d8b-7":{"renderedLength":5543,"gzipLength":1625,"brotliLength":1430,"metaUid":"3a102d8b-6"},"3a102d8b-9":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"3a102d8b-8"},"3a102d8b-11":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"3a102d8b-10"}},"nodeMetas":{"3a102d8b-0":{"id":"rolldown:runtime","moduleParts":{"renderer-konva-base.js":"3a102d8b-1"},"imported":[],"importedBy":[]},"3a102d8b-2":{"id":"/home/runner/work/weavejs/weavejs/code/node_modules/lodash/lodash.js","moduleParts":{"renderer-konva-base.js":"3a102d8b-3"},"imported":[],"importedBy":[{"uid":"3a102d8b-6"},{"uid":"3a102d8b-4"}]},"3a102d8b-4":{"id":"/src/reconciler.ts","moduleParts":{"renderer-konva-base.js":"3a102d8b-5"},"imported":[{"uid":"3a102d8b-15"},{"uid":"3a102d8b-14"},{"uid":"3a102d8b-2"}],"importedBy":[{"uid":"3a102d8b-6"}]},"3a102d8b-6":{"id":"/src/renderer.ts","moduleParts":{"renderer-konva-base.js":"3a102d8b-7"},"imported":[{"uid":"3a102d8b-13"},{"uid":"3a102d8b-14"},{"uid":"3a102d8b-2"},{"uid":"3a102d8b-4"},{"uid":"3a102d8b-15"}],"importedBy":[{"uid":"3a102d8b-8"}]},"3a102d8b-8":{"id":"/src/index.common.ts","moduleParts":{"renderer-konva-base.js":"3a102d8b-9"},"imported":[{"uid":"3a102d8b-6"},{"uid":"3a102d8b-12"}],"importedBy":[{"uid":"3a102d8b-10"}]},"3a102d8b-10":{"id":"/src/index.ts","moduleParts":{"renderer-konva-base.js":"3a102d8b-11"},"imported":[{"uid":"3a102d8b-8"}],"importedBy":[],"isEntry":true},"3a102d8b-12":{"id":"/src/types.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a102d8b-8"}]},"3a102d8b-13":{"id":"@inditextech/weave-types","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a102d8b-6"}]},"3a102d8b-14":{"id":"konva","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a102d8b-6"},{"uid":"3a102d8b-4"}]},"3a102d8b-15":{"id":"@inditextech/weave-sdk","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a102d8b-6"},{"uid":"3a102d8b-4"}]}},"env":{"rollup":"4.23.0"},"options":{"gzip":true,"brotli":true,"sourcemap":false}};
4934
4934
 
4935
4935
  const run = () => {
4936
4936
  const width = window.innerWidth;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","names":[],"sources":["../src/renderer.ts","../src/types.ts"],"sourcesContent":null,"mappings":";;;;;;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AAA;EAAA,IAAA,EAAA,cAAA;;;aCQnB;aACA"}
package/dist/types.js CHANGED
@@ -14715,7 +14715,10 @@ var WeaveKonvaBaseRenderer = class extends WeaveRenderer {
14715
14715
  super();
14716
14716
  }
14717
14717
  init() {
14718
- this.actualState = { weave: {} };
14718
+ this.actualState = {
14719
+ weave: {},
14720
+ weaveMetadata: {}
14721
+ };
14719
14722
  }
14720
14723
  render(callback) {
14721
14724
  const newState = JSON.parse(JSON.stringify(this.instance.getStore().getState()));
@@ -14832,7 +14835,10 @@ var WeaveKonvaBaseRenderer = class extends WeaveRenderer {
14832
14835
  }
14833
14836
  buildSubtree(parentInstance, element, index) {
14834
14837
  const nodeInstance = this.reconciler.createInstance(this.instance, element.type, this.stripChildren(element.props));
14835
- if (!nodeInstance) throw new Error(`No handler found for node type ${element.type}`);
14838
+ if (!nodeInstance) {
14839
+ console.warn(`No handler found for node type ${element.type}`);
14840
+ return;
14841
+ }
14836
14842
  if (!parentInstance && nodeInstance) this.reconciler.createRoot(this.instance, nodeInstance);
14837
14843
  if (parentInstance && nodeInstance && (parentInstance instanceof Konva.Stage || parentInstance instanceof Konva.Layer || parentInstance instanceof Konva.Group)) this.reconciler.appendChildToContainer(this.instance, parentInstance, nodeInstance, index);
14838
14844
  const children = element.props.children ?? [];