@uniformdev/mesh-sdk 20.63.1-alpha.12 → 20.63.1-alpha.21

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.js CHANGED
@@ -576,7 +576,113 @@ async function connectToParent({
576
576
  )
577
577
  }
578
578
  );
579
+ },
580
+ editorState: createEditorStateApi(client)
581
+ }
582
+ };
583
+ }
584
+ function createEditorStateApi(client) {
585
+ let cachedRootNodeId;
586
+ return {
587
+ async getRootNodeId() {
588
+ if (cachedRootNodeId) {
589
+ return cachedRootNodeId;
579
590
  }
591
+ const result = await client.request("editorState.getRootNodeId");
592
+ cachedRootNodeId = result;
593
+ return result;
594
+ },
595
+ // Read operations
596
+ async exportTree(params) {
597
+ const result = await client.request("editorState.exportTree", params);
598
+ cachedRootNodeId != null ? cachedRootNodeId : cachedRootNodeId = result == null ? void 0 : result._id;
599
+ return result;
600
+ },
601
+ async exportSubtree(params) {
602
+ return await client.request("editorState.exportSubtree", params);
603
+ },
604
+ async exportMetadata() {
605
+ return await client.request("editorState.exportMetadata");
606
+ },
607
+ async exportRootNodeMetadata() {
608
+ return await client.request("editorState.exportRootNodeMetadata");
609
+ },
610
+ async getNodeById(params) {
611
+ return await client.request("editorState.getNodeById", params);
612
+ },
613
+ async getNodeChildren(params) {
614
+ return await client.request("editorState.getNodeChildren", params);
615
+ },
616
+ async getNodeProperty(params) {
617
+ return await client.request("editorState.getNodeProperty", params);
618
+ },
619
+ async getNodeProperties(params) {
620
+ return await client.request("editorState.getNodeProperties", params);
621
+ },
622
+ async getParentInfo(params) {
623
+ return await client.request("editorState.getParentInfo", params);
624
+ },
625
+ // Selection
626
+ async getSelectedNodeId() {
627
+ return await client.request("editorState.getSelectedNodeId");
628
+ },
629
+ async setSelectedNodeId(params) {
630
+ await client.request("editorState.setSelectedNodeId", params);
631
+ },
632
+ async getSelectedParameterId() {
633
+ return await client.request("editorState.getSelectedParameterId");
634
+ },
635
+ async setSelectedParameterId(params) {
636
+ await client.request("editorState.setSelectedParameterId", params);
637
+ },
638
+ async getPristine() {
639
+ return await client.request("editorState.getPristine");
640
+ },
641
+ // Write operations
642
+ async insertNode(params) {
643
+ return await client.request("editorState.insertNode", params);
644
+ },
645
+ async deleteNode(params) {
646
+ await client.request("editorState.deleteNode", params);
647
+ },
648
+ async moveNode(params) {
649
+ await client.request("editorState.moveNode", params);
650
+ },
651
+ async updateNodeProperty(params) {
652
+ await client.request("editorState.updateNodeProperty", params);
653
+ },
654
+ async updateRootMetadata(params) {
655
+ await client.request("editorState.updateRootMetadata", params);
656
+ },
657
+ async updateRootNode(params) {
658
+ await client.request("editorState.updateRootNode", params);
659
+ },
660
+ // Pattern operations
661
+ async insertPattern(params) {
662
+ return await client.request("editorState.insertPattern", params);
663
+ },
664
+ async isPatternPropertyOverridden(params) {
665
+ return await client.request("editorState.isPatternPropertyOverridden", params);
666
+ },
667
+ async resetPatternPropertyOverride(params) {
668
+ await client.request("editorState.resetPatternPropertyOverride", params);
669
+ },
670
+ async setPropertyLocalizability(params) {
671
+ await client.request("editorState.setPropertyLocalizability", params);
672
+ },
673
+ // Locale operations
674
+ async enableLocale(params) {
675
+ await client.request("editorState.enableLocale", params);
676
+ },
677
+ async disableLocale(params) {
678
+ await client.request("editorState.disableLocale", params);
679
+ },
680
+ async setCurrentLocale(params) {
681
+ await client.request("editorState.setCurrentLocale", params);
682
+ },
683
+ // Dynamic input operations
684
+ async setDynamicInputPreviewValue(params) {
685
+ await client.request("editorState.setDynamicInputPreviewValue", params);
580
686
  }
581
687
  };
582
688
  }
@@ -774,7 +880,8 @@ async function initializeUniformMeshSDK({
774
880
  sdk.events.emit("onValueChanged", { newValue: value });
775
881
  await parent.setValue({ uniformMeshLocationValue: value, closeDialog: true });
776
882
  }
777
- } : void 0
883
+ } : void 0,
884
+ editorState: parent.editorState
778
885
  };
779
886
  return location;
780
887
  },
package/dist/index.mjs CHANGED
@@ -535,7 +535,113 @@ async function connectToParent({
535
535
  )
536
536
  }
537
537
  );
538
+ },
539
+ editorState: createEditorStateApi(client)
540
+ }
541
+ };
542
+ }
543
+ function createEditorStateApi(client) {
544
+ let cachedRootNodeId;
545
+ return {
546
+ async getRootNodeId() {
547
+ if (cachedRootNodeId) {
548
+ return cachedRootNodeId;
538
549
  }
550
+ const result = await client.request("editorState.getRootNodeId");
551
+ cachedRootNodeId = result;
552
+ return result;
553
+ },
554
+ // Read operations
555
+ async exportTree(params) {
556
+ const result = await client.request("editorState.exportTree", params);
557
+ cachedRootNodeId != null ? cachedRootNodeId : cachedRootNodeId = result == null ? void 0 : result._id;
558
+ return result;
559
+ },
560
+ async exportSubtree(params) {
561
+ return await client.request("editorState.exportSubtree", params);
562
+ },
563
+ async exportMetadata() {
564
+ return await client.request("editorState.exportMetadata");
565
+ },
566
+ async exportRootNodeMetadata() {
567
+ return await client.request("editorState.exportRootNodeMetadata");
568
+ },
569
+ async getNodeById(params) {
570
+ return await client.request("editorState.getNodeById", params);
571
+ },
572
+ async getNodeChildren(params) {
573
+ return await client.request("editorState.getNodeChildren", params);
574
+ },
575
+ async getNodeProperty(params) {
576
+ return await client.request("editorState.getNodeProperty", params);
577
+ },
578
+ async getNodeProperties(params) {
579
+ return await client.request("editorState.getNodeProperties", params);
580
+ },
581
+ async getParentInfo(params) {
582
+ return await client.request("editorState.getParentInfo", params);
583
+ },
584
+ // Selection
585
+ async getSelectedNodeId() {
586
+ return await client.request("editorState.getSelectedNodeId");
587
+ },
588
+ async setSelectedNodeId(params) {
589
+ await client.request("editorState.setSelectedNodeId", params);
590
+ },
591
+ async getSelectedParameterId() {
592
+ return await client.request("editorState.getSelectedParameterId");
593
+ },
594
+ async setSelectedParameterId(params) {
595
+ await client.request("editorState.setSelectedParameterId", params);
596
+ },
597
+ async getPristine() {
598
+ return await client.request("editorState.getPristine");
599
+ },
600
+ // Write operations
601
+ async insertNode(params) {
602
+ return await client.request("editorState.insertNode", params);
603
+ },
604
+ async deleteNode(params) {
605
+ await client.request("editorState.deleteNode", params);
606
+ },
607
+ async moveNode(params) {
608
+ await client.request("editorState.moveNode", params);
609
+ },
610
+ async updateNodeProperty(params) {
611
+ await client.request("editorState.updateNodeProperty", params);
612
+ },
613
+ async updateRootMetadata(params) {
614
+ await client.request("editorState.updateRootMetadata", params);
615
+ },
616
+ async updateRootNode(params) {
617
+ await client.request("editorState.updateRootNode", params);
618
+ },
619
+ // Pattern operations
620
+ async insertPattern(params) {
621
+ return await client.request("editorState.insertPattern", params);
622
+ },
623
+ async isPatternPropertyOverridden(params) {
624
+ return await client.request("editorState.isPatternPropertyOverridden", params);
625
+ },
626
+ async resetPatternPropertyOverride(params) {
627
+ await client.request("editorState.resetPatternPropertyOverride", params);
628
+ },
629
+ async setPropertyLocalizability(params) {
630
+ await client.request("editorState.setPropertyLocalizability", params);
631
+ },
632
+ // Locale operations
633
+ async enableLocale(params) {
634
+ await client.request("editorState.enableLocale", params);
635
+ },
636
+ async disableLocale(params) {
637
+ await client.request("editorState.disableLocale", params);
638
+ },
639
+ async setCurrentLocale(params) {
640
+ await client.request("editorState.setCurrentLocale", params);
641
+ },
642
+ // Dynamic input operations
643
+ async setDynamicInputPreviewValue(params) {
644
+ await client.request("editorState.setDynamicInputPreviewValue", params);
539
645
  }
540
646
  };
541
647
  }
@@ -733,7 +839,8 @@ async function initializeUniformMeshSDK({
733
839
  sdk.events.emit("onValueChanged", { newValue: value });
734
840
  await parent.setValue({ uniformMeshLocationValue: value, closeDialog: true });
735
841
  }
736
- } : void 0
842
+ } : void 0,
843
+ editorState: parent.editorState
737
844
  };
738
845
  return location;
739
846
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/mesh-sdk",
3
- "version": "20.63.1-alpha.12+914935b899",
3
+ "version": "20.63.1-alpha.21+dce4d28095",
4
4
  "description": "Uniform Mesh Framework SDK",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -32,10 +32,10 @@
32
32
  "access": "public"
33
33
  },
34
34
  "dependencies": {
35
- "@uniformdev/assets": "20.63.1-alpha.12+914935b899",
36
- "@uniformdev/canvas": "20.63.1-alpha.12+914935b899",
37
- "@uniformdev/context": "20.63.1-alpha.12+914935b899",
38
- "@uniformdev/project-map": "20.63.1-alpha.12+914935b899",
35
+ "@uniformdev/assets": "20.63.1-alpha.21+dce4d28095",
36
+ "@uniformdev/canvas": "20.63.1-alpha.21+dce4d28095",
37
+ "@uniformdev/context": "20.63.1-alpha.21+dce4d28095",
38
+ "@uniformdev/project-map": "20.63.1-alpha.21+dce4d28095",
39
39
  "imagesloaded": "^5.0.0",
40
40
  "mitt": "^3.0.1"
41
41
  },
@@ -43,5 +43,5 @@
43
43
  "@types/imagesloaded": "^4.1.2",
44
44
  "openai": "4.94.0"
45
45
  },
46
- "gitHead": "914935b89907018dde56a2c49b72e6899d9fb0e2"
46
+ "gitHead": "dce4d280956f096f3530911c59fe186c86c17eda"
47
47
  }