@sigmacomputing/plugin 1.0.0-rc.1 → 1.0.0-rc.3

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,4 +1,4 @@
1
- import { initialize } from 'client/initialize';
1
+ import { initialize } from "./initialize";
2
2
  export declare const client: import("..").PluginInstance<{}>;
3
3
  export { initialize };
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,eAAO,MAAM,MAAM,iCAAe,CAAC;AAEnC,OAAO,EAAE,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,qBAA0B;AAE/C,eAAO,MAAM,MAAM,iCAAe,CAAC;AAEnC,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.initialize = exports.client = void 0;
4
- const initialize_1 = require("./initialize");
4
+ const initialize_1 = require("client/initialize");
5
5
  Object.defineProperty(exports, "initialize", { enumerable: true, get: function () { return initialize_1.initialize; } });
6
6
  exports.client = (0, initialize_1.initialize)();
@@ -1,3 +1,3 @@
1
- import { PluginInstance } from 'types';
1
+ import { PluginInstance } from "../types";
2
2
  export declare function initialize<T = {}>(): PluginInstance<T>;
3
3
  //# sourceMappingURL=initialize.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"initialize.d.ts","sourceRoot":"","sources":["../../src/client/initialize.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EAKf,MAAM,OAAO,CAAC;AAEf,wBAAgB,UAAU,CAAC,CAAC,GAAG,EAAE,KAAK,cAAc,CAAC,CAAC,CAAC,CA6LtD"}
1
+ {"version":3,"file":"initialize.d.ts","sourceRoot":"","sources":["../../src/client/initialize.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EAKf,iBAAc;AAEf,wBAAgB,UAAU,CAAC,CAAC,GAAG,EAAE,KAAK,cAAc,CAAC,CAAC,CAAC,CA6LtD"}
@@ -21,7 +21,7 @@ function initialize() {
21
21
  emit('config', (_a = pluginConfig.config) !== null && _a !== void 0 ? _a : {});
22
22
  });
23
23
  // send initialize event
24
- void execPromise('wb:plugin:init', require("../../package.json").version).then(config => {
24
+ void execPromise('wb:plugin:init', require('../../package.json').version).then(config => {
25
25
  Object.assign(pluginConfig, config);
26
26
  emit('init', pluginConfig);
27
27
  emit('config', pluginConfig.config);
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
- import { PluginInstance } from 'types';
2
+ import { PluginInstance } from "../../types";
3
3
  export declare const PluginContext: import("react").Context<PluginInstance<any>>;
4
4
  //# sourceMappingURL=Context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../src/client/react/Context.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,eAAO,MAAM,aAAa,8CAAwC,CAAC"}
1
+ {"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../src/client/react/Context.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,cAAc,EAAE,oBAAc;AAEvC,eAAO,MAAM,aAAa,8CAAwC,CAAC"}
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PluginContext = void 0;
4
4
  const react_1 = require("react");
5
- const client_1 = require("..");
5
+ const client_1 = require("client");
6
6
  exports.PluginContext = (0, react_1.createContext)(client_1.client);
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
- import { PluginInstance } from 'types';
2
+ import { PluginInstance } from "../../types";
3
3
  export interface SigmaClientProviderProps<T = any> {
4
4
  client: PluginInstance<T>;
5
5
  children?: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../src/client/react/Provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,wBAAwB,CAAC,CAAC,GAAG,GAAG;IAC/C,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IAC1B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,mBAAmB,CAAC,CAAC,GAAG,GAAG,EACzC,KAAK,EAAE,wBAAwB,CAAC,CAAC,CAAC,eAOnC"}
1
+ {"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../src/client/react/Provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAE,cAAc,EAAE,oBAAc;AAEvC,MAAM,WAAW,wBAAwB,CAAC,CAAC,GAAG,GAAG;IAC/C,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IAC1B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,mBAAmB,CAAC,CAAC,GAAG,GAAG,EACzC,KAAK,EAAE,wBAAwB,CAAC,CAAC,CAAC,eAOnC"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SigmaClientProvider = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const Context_1 = require("./Context");
5
+ const Context_1 = require("client/react/Context");
6
6
  function SigmaClientProvider(props) {
7
7
  return ((0, jsx_runtime_1.jsx)(Context_1.PluginContext.Provider, Object.assign({ value: props.client }, { children: props.children })));
8
8
  }
@@ -1,4 +1,4 @@
1
- import { PluginInstance, CustomPluginConfigOptions, WorkbookElementColumns, WorkbookElementData, WorkbookVariable } from 'types';
1
+ import { PluginInstance, CustomPluginConfigOptions, WorkbookElementColumns, WorkbookElementData, WorkbookVariable } from "../../types";
2
2
  /**
3
3
  * Gets the entire plugin instance
4
4
  * @returns {PluginInstance} Context for the current plugin instance
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/client/react/hooks.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,cAAc,EACd,yBAAyB,EACzB,sBAAsB,EACtB,mBAAmB,EAEnB,gBAAgB,EACjB,MAAM,OAAO,CAAC;AAGf;;;GAGG;AACH,wBAAgB,SAAS,IAAI,cAAc,CAAC,GAAG,CAAC,CAE/C;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,yBAAyB,EAAE,GACvC,IAAI,CAWN;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAAE,OAAO,GACpB,CAAC,OAAO,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC,CAezC;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,sBAAsB,CAWpE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,mBAAmB,CAW9D;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,CAmB3C;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,EAAE,EAAE,MAAM,GACT,CAAC,gBAAgB,GAAG,SAAS,EAAE,QAAQ,CAAC,CAc1C;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,EAAE,EAAE,MAAM,EACV,SAAS,EAAE,MAAM,GAChB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAoBrB"}
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/client/react/hooks.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,cAAc,EACd,yBAAyB,EACzB,sBAAsB,EACtB,mBAAmB,EAEnB,gBAAgB,EACjB,oBAAc;AAGf;;;GAGG;AACH,wBAAgB,SAAS,IAAI,cAAc,CAAC,GAAG,CAAC,CAE/C;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,yBAAyB,EAAE,GACvC,IAAI,CAWN;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAAE,OAAO,GACpB,CAAC,OAAO,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC,CAezC;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,sBAAsB,CAWpE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,mBAAmB,CAW9D;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,CAmB3C;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,EAAE,EAAE,MAAM,GACT,CAAC,gBAAgB,GAAG,SAAS,EAAE,QAAQ,CAAC,CAc1C;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,EAAE,EAAE,MAAM,EACV,SAAS,EAAE,MAAM,GAChB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAoBrB"}
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useInteraction = exports.useVariable = exports.useConfig = exports.useElementData = exports.useElementColumns = exports.useLoadingState = exports.useEditorPanelConfig = exports.usePlugin = void 0;
4
4
  const react_1 = require("react");
5
- const Context_1 = require("./Context");
6
- const deepEqual_1 = require("../../utils/deepEqual");
5
+ const Context_1 = require("client/react/Context");
6
+ const deepEqual_1 = require("utils/deepEqual");
7
7
  /**
8
8
  * Gets the entire plugin instance
9
9
  * @returns {PluginInstance} Context for the current plugin instance
@@ -1,4 +1,5 @@
1
- export * from 'client/react/hooks';
2
- export { SigmaClientProviderProps, SigmaClientProvider, } from 'client/react/Provider';
3
- export * from 'types';
1
+ export * from "..";
2
+ export * from "./hooks";
3
+ export { SigmaClientProviderProps, SigmaClientProvider, } from "./Provider";
4
+ export * from "../../types";
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/react/index.tsx"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,OAAO,EACL,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAC/B,cAAc,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/react/index.tsx"],"names":[],"mappings":"AAAA,mBAAuB;AAEvB,wBAAmC;AACnC,OAAO,EACL,wBAAwB,EACxB,mBAAmB,GACpB,mBAA8B;AAE/B,4BAAsB"}
@@ -15,7 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.SigmaClientProvider = void 0;
18
- __exportStar(require("./hooks"), exports);
19
- var Provider_1 = require("./Provider");
18
+ __exportStar(require("client"), exports);
19
+ __exportStar(require("client/react/hooks"), exports);
20
+ var Provider_1 = require("client/react/Provider");
20
21
  Object.defineProperty(exports, "SigmaClientProvider", { enumerable: true, get: function () { return Provider_1.SigmaClientProvider; } });
21
- __exportStar(require("../../types"), exports);
22
+ __exportStar(require("types"), exports);
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { client, initialize } from 'client';
2
- export * from 'types';
1
+ export * from "./client";
2
+ export * from "./types";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAE5C,cAAc,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yBAAuB;AACvB,wBAAsB"}
package/dist/index.js CHANGED
@@ -14,8 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.initialize = exports.client = void 0;
18
- var client_1 = require("./client");
19
- Object.defineProperty(exports, "client", { enumerable: true, get: function () { return client_1.client; } });
20
- Object.defineProperty(exports, "initialize", { enumerable: true, get: function () { return client_1.initialize; } });
21
- __exportStar(require("./types"), exports);
17
+ __exportStar(require("client"), exports);
18
+ __exportStar(require("types"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"deepEqual.d.ts","sourceRoot":"","sources":["../../src/utils/deepEqual.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,uBAuB7C"}
1
+ {"version":3,"file":"deepEqual.d.ts","sourceRoot":"","sources":["../../src/utils/deepEqual.ts"],"names":[],"mappings":"AAQA,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,uBAc7C"}
@@ -1,6 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.deepEqual = void 0;
4
+ function isObject(obj) {
5
+ if (typeof obj === 'object' && obj != null) {
6
+ return true;
7
+ }
8
+ else {
9
+ return false;
10
+ }
11
+ }
4
12
  function deepEqual(obj1, obj2) {
5
13
  if (obj1 === obj2) {
6
14
  return true;
@@ -16,14 +24,5 @@ function deepEqual(obj1, obj2) {
16
24
  }
17
25
  return true;
18
26
  }
19
- // Private
20
- function isObject(obj) {
21
- if (typeof obj === 'object' && obj != null) {
22
- return true;
23
- }
24
- else {
25
- return false;
26
- }
27
- }
28
27
  }
29
28
  exports.deepEqual = deepEqual;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sigmacomputing/plugin",
3
- "version": "1.0.0-rc.1",
3
+ "version": "1.0.0-rc.3",
4
4
  "description": "Sigma Computing Plugin Client API",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/sigmacomputing/plugin",
@@ -1,6 +1,9 @@
1
+ export * from 'client';
2
+
1
3
  export * from 'client/react/hooks';
2
4
  export {
3
5
  SigmaClientProviderProps,
4
6
  SigmaClientProvider,
5
7
  } from 'client/react/Provider';
8
+
6
9
  export * from 'types';
package/src/index.ts CHANGED
@@ -1,3 +1,2 @@
1
- export { client, initialize } from 'client';
2
-
1
+ export * from 'client';
3
2
  export * from 'types';
@@ -1,3 +1,11 @@
1
+ function isObject(obj: any) {
2
+ if (typeof obj === 'object' && obj != null) {
3
+ return true;
4
+ } else {
5
+ return false;
6
+ }
7
+ }
8
+
1
9
  export function deepEqual(obj1: any, obj2: any) {
2
10
  if (obj1 === obj2) {
3
11
  return true;
@@ -12,13 +20,4 @@ export function deepEqual(obj1: any, obj2: any) {
12
20
  }
13
21
  return true;
14
22
  }
15
-
16
- // Private
17
- function isObject(obj: any) {
18
- if (typeof obj === 'object' && obj != null) {
19
- return true;
20
- } else {
21
- return false;
22
- }
23
- }
24
23
  }
package/tsconfig.json CHANGED
@@ -27,7 +27,8 @@
27
27
  "plugins": [
28
28
  {
29
29
  "transform": "typescript-transform-paths",
30
- "exclude": ["**/node_modules/**"]
30
+ "exclude": ["**/node_modules/**"],
31
+ "afterDeclarations": true
31
32
  }
32
33
  ]
33
34
  },