pollination-react-io 1.11.1 → 1.11.2

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.
@@ -1,7 +1,7 @@
1
1
  export declare type GeometryAction = 'AddGeometry' | 'PreviewGeometry' | 'DeleteGeometry' | 'ClearGeometry' | 'SubscribePreviewGeometry';
2
2
  export declare type ModelAction = 'AddHBJSON' | 'PreviewHBJSON' | 'DeleteHBJSON' | 'ClearHBJSON' | 'SubscribePreviewHBJSON';
3
- export declare type SettingsAction = 'AddSettings' | 'PreviewSettings' | 'DeleteSettings' | 'ClearSettings' | 'SubscribePreviewSettings';
4
- export declare type CommandAction = 'AddCommand' | 'PreviewCommand' | 'DeleteCommand' | 'ClearCommand' | 'SubscribePreviewCommand';
3
+ export declare type SettingsAction = 'AddSettings';
4
+ export declare type CommandAction = 'AddCommand';
5
5
  export declare type ResultsAction = 'AddResults' | 'PreviewResults' | 'DeleteResults' | 'ClearResults' | 'SubscribePreviewResults';
6
6
  export declare type StudyAction = 'AddStudy' | 'PreviewStudy' | 'DeleteStudy' | 'ClearStudy' | 'SubscribePreviewStudy';
7
7
  export declare type Action = GeometryAction | ModelAction | ResultsAction | StudyAction | CommandAction | SettingsAction;
@@ -2,5 +2,5 @@ import type { SettingsOptions } from '.';
2
2
  export declare const useManageSettings: () => {
3
3
  host: "web" | "rhino" | "revit" | "sketchup";
4
4
  sendSettings: (settings: SettingsOptions) => import("./types").PanelMessageIn;
5
- getSettings: () => any;
5
+ getSettings: (key?: string) => any;
6
6
  };
@@ -23930,17 +23930,18 @@ var useRunCommand = function (defaultKey) {
23930
23930
  var useManageSettings = function () {
23931
23931
  var _a = useSendMessage(), host = _a.host, sendMessage = _a.sendMessage;
23932
23932
  var sendSettings = useCallback(function (settings) {
23933
- return sendMessage('SetModelSettings', { data: settings });
23933
+ return sendMessage('AddSettings', { data: settings });
23934
23934
  }, [sendMessage]);
23935
- var getSettings = useCallback(function () {
23935
+ var getSettings = useCallback(function (key) {
23936
23936
  // if (!checkDotNet()) return
23937
+ if (key === void 0) { key = performance.now().toString(); }
23937
23938
  var settings;
23938
23939
  try {
23939
23940
  settings = window.parent.chrome.webview.hostObjects.sync.settings.GetModelSettings();
23940
23941
  }
23941
23942
  catch (_a) {
23942
23943
  try {
23943
- settings = window.parent.chrome.webview.hostObjects.sync.settings.Get();
23944
+ settings = window.parent.chrome.webview.hostObjects.sync.settings.Get(key).data;
23944
23945
  }
23945
23946
  catch (_b) {
23946
23947
  throw new Error('Neither window.parent.chrome.webview.hostObjects.sync.settings.GetModelSettings() nor .Get() are available on this platform.');