@sigmacomputing/plugin 1.1.0-alpha.3 → 1.1.0

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.
Files changed (62) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/LICENSE +21 -0
  3. package/README.md +993 -0
  4. package/dist/client.d.ts +2 -0
  5. package/dist/client.d.ts.map +1 -0
  6. package/dist/client.js +5 -0
  7. package/dist/error.d.ts +3 -0
  8. package/dist/error.d.ts.map +1 -0
  9. package/dist/error.js +9 -0
  10. package/dist/{types/index.d.ts → index.d.ts} +2 -1
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.js +22 -0
  13. package/dist/react.d.ts +3 -0
  14. package/dist/react.d.ts.map +1 -0
  15. package/dist/react.js +20 -0
  16. package/dist/{types/types/index.d.ts → types.d.ts} +132 -62
  17. package/dist/types.d.ts.map +1 -0
  18. package/dist/types.js +2 -0
  19. package/package.json +37 -29
  20. package/dist/cjs/client/index.js +0 -9
  21. package/dist/cjs/client/index.js.map +0 -1
  22. package/dist/cjs/client/initialize.js +0 -158
  23. package/dist/cjs/client/initialize.js.map +0 -1
  24. package/dist/cjs/index.js +0 -12
  25. package/dist/cjs/index.js.map +0 -1
  26. package/dist/cjs/utils/polyfillRequestAnimationFrame.js +0 -17
  27. package/dist/cjs/utils/polyfillRequestAnimationFrame.js.map +0 -1
  28. package/dist/esm/client/index.esm.js +0 -6
  29. package/dist/esm/client/index.esm.js.map +0 -1
  30. package/dist/esm/client/initialize.esm.js +0 -156
  31. package/dist/esm/client/initialize.esm.js.map +0 -1
  32. package/dist/esm/index.esm.js +0 -4
  33. package/dist/esm/index.esm.js.map +0 -1
  34. package/dist/esm/utils/polyfillRequestAnimationFrame.esm.js +0 -15
  35. package/dist/esm/utils/polyfillRequestAnimationFrame.esm.js.map +0 -1
  36. package/dist/mjs/client/index.mjs +0 -6
  37. package/dist/mjs/client/index.mjs.map +0 -1
  38. package/dist/mjs/client/initialize.mjs +0 -156
  39. package/dist/mjs/client/initialize.mjs.map +0 -1
  40. package/dist/mjs/index.mjs +0 -4
  41. package/dist/mjs/index.mjs.map +0 -1
  42. package/dist/mjs/utils/polyfillRequestAnimationFrame.mjs +0 -15
  43. package/dist/mjs/utils/polyfillRequestAnimationFrame.mjs.map +0 -1
  44. package/dist/types/.tsbuildinfo +0 -1
  45. package/dist/types/client/index.d.ts +0 -4
  46. package/dist/types/client/index.d.ts.map +0 -1
  47. package/dist/types/client/initialize.d.ts +0 -3
  48. package/dist/types/client/initialize.d.ts.map +0 -1
  49. package/dist/types/index.d.ts.map +0 -1
  50. package/dist/types/types/index.d.ts.map +0 -1
  51. package/dist/types/utils/polyfillRequestAnimationFrame.d.ts +0 -8
  52. package/dist/types/utils/polyfillRequestAnimationFrame.d.ts.map +0 -1
  53. package/dist/umd/plugin.development.js +0 -181
  54. package/dist/umd/plugin.development.js.map +0 -1
  55. package/dist/umd/plugin.production.min.js +0 -2
  56. package/dist/umd/plugin.production.min.js.map +0 -1
  57. package/src/client/index.ts +0 -5
  58. package/src/client/initialize.ts +0 -196
  59. package/src/globals.d.ts +0 -5
  60. package/src/index.ts +0 -4
  61. package/src/types/index.ts +0 -322
  62. package/src/utils/polyfillRequestAnimationFrame.ts +0 -13
@@ -0,0 +1,2 @@
1
+ export declare const client: import("./types").PluginInstance<{}>;
2
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,sCAAe,CAAC"}
package/dist/client.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.client = void 0;
4
+ const initialize_1 = require("./client/initialize");
5
+ exports.client = (0, initialize_1.initialize)();
@@ -0,0 +1,3 @@
1
+ import { CustomPluginConfigOptions } from './types';
2
+ export declare function validateConfigId(configId: string, expectedConfigType: CustomPluginConfigOptions['type']): void;
3
+ //# sourceMappingURL=error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAEpD,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,kBAAkB,EAAE,yBAAyB,CAAC,MAAM,CAAC,QAKtD"}
package/dist/error.js ADDED
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateConfigId = void 0;
4
+ function validateConfigId(configId, expectedConfigType) {
5
+ if (configId === undefined) {
6
+ console.warn(`Invalid config ${expectedConfigType}: ${configId}`);
7
+ }
8
+ }
9
+ exports.validateConfigId = validateConfigId;
@@ -1,4 +1,5 @@
1
- export * from './client';
2
1
  export * from './types';
2
+ export * from './react';
3
+ export * from './client';
3
4
  export { polyfillRequestAnimationFrame } from './utils/polyfillRequestAnimationFrame';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AAEzB,OAAO,EAAE,6BAA6B,EAAE,MAAM,uCAAuC,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.polyfillRequestAnimationFrame = void 0;
18
+ __exportStar(require("./types"), exports);
19
+ __exportStar(require("./react"), exports);
20
+ __exportStar(require("./client"), exports);
21
+ var polyfillRequestAnimationFrame_1 = require("./utils/polyfillRequestAnimationFrame");
22
+ Object.defineProperty(exports, "polyfillRequestAnimationFrame", { enumerable: true, get: function () { return polyfillRequestAnimationFrame_1.polyfillRequestAnimationFrame; } });
@@ -0,0 +1,3 @@
1
+ export * from './react/hooks';
2
+ export { SigmaClientProviderProps, SigmaClientProvider, } from './react/Provider';
3
+ //# sourceMappingURL=react.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,OAAO,EACL,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,kBAAkB,CAAC"}
package/dist/react.js ADDED
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.SigmaClientProvider = void 0;
18
+ __exportStar(require("./react/hooks"), exports);
19
+ var Provider_1 = require("./react/Provider");
20
+ Object.defineProperty(exports, "SigmaClientProvider", { enumerable: true, get: function () { return Provider_1.SigmaClientProvider; } });
@@ -11,17 +11,33 @@ export interface PluginConfig<T> {
11
11
  screenshot: boolean;
12
12
  [key: string]: any;
13
13
  }
14
+ /**
15
+ * Style colors available to plugins
16
+ * @typedef {object} PluginStyle
17
+ * @property {string} backgroundColor Background color set from workbook if any
18
+ */
19
+ export interface PluginStyle {
20
+ backgroundColor: string;
21
+ }
14
22
  /**
15
23
  * @typedef {object} WorkbookVariable
16
- * @property {string} name Name of Control Variable within Workbook
17
- * @property {{string}} defaultValue Current Value containing at least type as string
24
+ * @property {string} name Name of control variable within workbook
25
+ * @property {{string}} defaultValue Current value containing at least type as string
18
26
  */
19
27
  export interface WorkbookVariable {
20
28
  name: string;
21
29
  defaultValue: {
22
30
  type: string;
31
+ value: any;
23
32
  };
24
33
  }
34
+ /**
35
+ * @typedef {object} UrlParameter
36
+ * @property {string} value Current url value
37
+ */
38
+ export interface UrlParameter {
39
+ value: string;
40
+ }
25
41
  export declare type WorkbookSelection = Record<string, {
26
42
  type: string;
27
43
  val?: unknown;
@@ -66,80 +82,82 @@ export interface WorkbookElementColumns {
66
82
  * @typedef {() => void} Unsubscriber
67
83
  */
68
84
  export declare type Unsubscriber = () => void;
69
- /**
70
- * Different types Plugin Config Options
71
- * @typedef {object} CustomPluginConfigOptions
72
- * @property {string} type Type of config option
73
- * @property {string} name Name ID of config option
74
- * @property {(string | undefined)} label Displayed label for config option
75
- */
76
- export declare type CustomPluginConfigOptions = {
77
- type: 'group';
85
+ export interface CustomPluginConfigOptionBase {
78
86
  name: string;
79
87
  label?: string;
80
- } | {
88
+ }
89
+ export interface CustomPluginConfigGroup extends CustomPluginConfigOptionBase {
90
+ type: 'group';
91
+ }
92
+ export interface CustomPluginConfigElement extends CustomPluginConfigOptionBase {
81
93
  type: 'element';
82
- name: string;
83
- label?: string;
84
- } | {
94
+ }
95
+ export interface CustomPluginConfigColumn extends CustomPluginConfigOptionBase {
85
96
  type: 'column';
86
- name: string;
87
- label?: string;
88
97
  allowedTypes?: ValueType[];
89
98
  source: string;
90
99
  allowMultiple: boolean;
91
- } | {
100
+ }
101
+ export interface CustomPluginConfigText extends CustomPluginConfigOptionBase {
92
102
  type: 'text';
93
- name: string;
94
- label?: string;
95
103
  source?: string;
96
104
  secure?: boolean;
97
105
  multiline?: boolean;
98
106
  placeholder?: string;
99
107
  defaultValue?: string;
100
- } | {
108
+ }
109
+ export interface CustomPluginConfigToggle extends CustomPluginConfigOptionBase {
101
110
  type: 'toggle';
102
- name: string;
103
- label?: string;
104
111
  source?: string;
105
112
  defaultValue?: boolean;
106
- } | {
113
+ }
114
+ export interface CustomPluginConfigCheckbox extends CustomPluginConfigOptionBase {
107
115
  type: 'checkbox';
108
- name: string;
109
- label?: string;
110
116
  source?: string;
111
117
  defaultValue?: boolean;
112
- } | {
118
+ }
119
+ export interface CustomPluginConfigRadio extends CustomPluginConfigOptionBase {
113
120
  type: 'radio';
114
- name: string;
115
- label?: string;
116
121
  source?: string;
117
- values: string[];
118
122
  singleLine?: boolean;
123
+ values: string[];
119
124
  defaultValue?: string;
120
- } | {
125
+ }
126
+ export interface CustomPluginConfigDropdown extends CustomPluginConfigOptionBase {
121
127
  type: 'dropdown';
122
- name: string;
123
- label?: string;
124
128
  source?: string;
125
129
  width?: string;
126
130
  values: string[];
127
131
  defaultValue?: string;
128
- } | {
132
+ }
133
+ export interface CustomPluginConfigColor extends CustomPluginConfigOptionBase {
129
134
  type: 'color';
130
- name: string;
131
- label?: string;
132
135
  source?: string;
133
- } | {
136
+ }
137
+ export interface CustomPluginConfigVariable extends CustomPluginConfigOptionBase {
134
138
  type: 'variable';
135
- name: string;
136
- label?: string;
137
139
  allowedTypes?: ControlType[];
138
- } | {
140
+ }
141
+ export interface CustomPluginConfigInteraction extends CustomPluginConfigOptionBase {
139
142
  type: 'interaction';
140
- name: string;
141
- label?: string;
142
- };
143
+ }
144
+ export interface CustomPluginConfigActionTrigger extends CustomPluginConfigOptionBase {
145
+ type: 'action-trigger';
146
+ }
147
+ export interface CustomPluginConfigActionEffect extends CustomPluginConfigOptionBase {
148
+ type: 'action-effect';
149
+ }
150
+ export interface CustomPluginConfigUrlParameter extends Omit<CustomPluginConfigOptionBase, 'label'> {
151
+ type: 'url-parameter';
152
+ }
153
+ /**
154
+ * Different types Plugin Config Options
155
+ * @typedef {object} CustomPluginConfigOptions
156
+ * @property {string} type Type of config option
157
+ * @property {string} name Name ID of config option
158
+ * @property {(string | undefined)} label Displayed label for config option
159
+ */
160
+ export declare type CustomPluginConfigOptions = CustomPluginConfigGroup | CustomPluginConfigElement | CustomPluginConfigColumn | CustomPluginConfigText | CustomPluginConfigToggle | CustomPluginConfigCheckbox | CustomPluginConfigRadio | CustomPluginConfigDropdown | CustomPluginConfigColor | CustomPluginConfigVariable | CustomPluginConfigInteraction | CustomPluginConfigActionTrigger | CustomPluginConfigActionEffect | CustomPluginConfigUrlParameter;
143
161
  /**
144
162
  * @typedef {object} PluginInstance
145
163
  * @template T Type of Config passed in
@@ -190,28 +208,42 @@ export interface PluginInstance<T = any> {
190
208
  configureEditorPanel(options: CustomPluginConfigOptions[]): void;
191
209
  /**
192
210
  * Gets a static image of a workbook variable
193
- * @param {string} id ID of the workbook variable in config
211
+ * @param {string} configId ID from config of type: 'variable'
194
212
  * @returns {WorkbookVariable} Current value of the workbook variable
195
213
  */
196
- getVariable(id: string): WorkbookVariable;
214
+ getVariable(configId: string): WorkbookVariable;
197
215
  /**
198
216
  * Setter for workbook variable passed in
199
- * @param {string} id ID of the workbook variable in config
217
+ * @param {string} configId ID from config of type: 'variable'
200
218
  * @param {unknown[]} values Values to assign to the workbook variable
201
219
  */
202
- setVariable(id: string, ...values: unknown[]): void;
220
+ setVariable(configId: string, ...values: unknown[]): void;
203
221
  /**
222
+ * @deprecated Use Action API instead
204
223
  * Getter for interaction selection state
205
- * @param {string} id ID from interaction type in Plugin Config
224
+ * @param {string} configId ID from config of type: 'interaction'
206
225
  */
207
- getInteraction(id: string): WorkbookSelection[];
226
+ getInteraction(configId: string): WorkbookSelection[];
208
227
  /**
228
+ * @deprecated Use Action API instead
209
229
  * Setter for interaction selection state
210
- * @param {string} id ID from interaction type in Plugin Config
230
+ * @param {string} configId ID from config of type: 'interaction'
211
231
  * @param {string} elementId Source element ID from element type in Plugin Config
212
232
  * @param {Object} selection List of column IDs or Columns and values and key-value pairs to select
213
233
  */
214
- setInteraction(id: string, elementId: string, selection: WorkbookSelection[]): void;
234
+ setInteraction(configId: string, elementId: string, selection: WorkbookSelection[]): void;
235
+ /**
236
+ * Triggers an action based on the provided action trigger ID
237
+ * @param {string} configId ID from config of type: 'action-trigger'
238
+ */
239
+ triggerAction(configId: string): void;
240
+ /**
241
+ * Registers an effect with the provided action effect ID
242
+ * @param {string} configId ID from config of type: 'action-effect'
243
+ * @param {Function} effect The effect function to register
244
+ * @returns {Unsubscriber} A callable unsubscriber
245
+ */
246
+ registerEffect(configId: string, effect: () => void): () => void;
215
247
  /**
216
248
  * Overrider function for Config Ready state
217
249
  * @param {boolean} loadingState Boolean representing if Plugin Config is still loading
@@ -219,44 +251,82 @@ export interface PluginInstance<T = any> {
219
251
  setLoadingState(ready: boolean): void;
220
252
  /**
221
253
  * Allows users to subscribe to changes in the passed in variable
222
- * @param {string} id ID of the workbook variable in config
254
+ * @param {string} configId ID from config of type: 'variable'
223
255
  * @callback callback Function to be called upon receiving an updated workbook variable
224
256
  * @returns {Unsubscriber} A callable unsubscriber
225
257
  */
226
- subscribeToWorkbookVariable(id: string, callback: (input: WorkbookVariable) => void): Unsubscriber;
258
+ subscribeToWorkbookVariable(configId: string, callback: (input: WorkbookVariable) => void): Unsubscriber;
259
+ /**
260
+ * Allows users to subscribe to changes in the url parameter
261
+ * @param {string} configId ID from config of type: 'url-parameter'
262
+ * @callback callback Function to be called upon receiving an updated url parameter
263
+ * @returns {Unsubscriber} A callable unsubscriber
264
+ */
265
+ subscribeToUrlParameter(configId: string, callback: (input: UrlParameter) => void): Unsubscriber;
266
+ /**
267
+ * Gets the current value of a url parameter
268
+ * @param {string} configId ID from config of type: 'url-parameter'
269
+ * @returns {UrlParameter} Current value of the url parameter
270
+ */
271
+ getUrlParameter(configId: string): UrlParameter;
227
272
  /**
273
+ * Setter for url parameter
274
+ * @param {string} configId ID from config of type: 'url-parameter'
275
+ * @param {string} value Value to assign to the url parameter
276
+ */
277
+ setUrlParameter(configId: string, value: string): void;
278
+ /**
279
+ * @deprecated Use Action API instead
228
280
  * Allows users to subscribe to changes in the passed in interaction ID
229
- * @param {string} id ID of the interaction variable within Plugin Config
281
+ * @param {string} configId ID from the config of type: 'interaction'
230
282
  * @callback callback Function to be called upon receiving an updated interaction selection state
231
283
  * @returns {Unsubscriber} A callable unsubscriber
232
284
  */
233
- subscribeToWorkbookInteraction(id: string, callback: (input: WorkbookSelection[]) => void): Unsubscriber;
285
+ subscribeToWorkbookInteraction(configId: string, callback: (input: WorkbookSelection[]) => void): Unsubscriber;
234
286
  };
235
287
  elements: {
236
288
  /**
237
289
  * Getter for Column Data by parent sheet ID
238
- * @param {string} id Sheet ID to retrieve columns from
290
+ * @param {string} configId ID from config of type: 'element'
239
291
  * @returns {WorkbookElementColumns} Column values contained within corresponding sheet
240
292
  */
241
- getElementColumns(id: string): Promise<WorkbookElementColumns>;
293
+ getElementColumns(configId: string): Promise<WorkbookElementColumns>;
242
294
  /**
243
295
  * Subscriber to changes in column data by ID
244
- * @param {string} id Column ID to subscribe to
296
+ * @param {string} configId ID from config of type: 'element'
245
297
  * @callback callback Callback function to be called upon changes to column data
246
298
  * @returns {Unsubscriber} Callable unsubscriber to column data changes
247
299
  */
248
- subscribeToElementColumns(id: string, callback: (cols: WorkbookElementColumns) => void): Unsubscriber;
300
+ subscribeToElementColumns(configId: string, callback: (cols: WorkbookElementColumns) => void): Unsubscriber;
249
301
  /**
250
302
  * Subscriber for the data within a given sheet
251
- * @param {string} id Sheet ID to get element data from
303
+ * @param {string} configId ID from config of type: 'element'
252
304
  * @callback callback Function to call on data passed in
253
305
  * @returns {Unsubscriber} A callable unsubscriber to changes in the data
254
306
  */
255
- subscribeToElementData(id: string, callback: (data: WorkbookElementData) => void): Unsubscriber;
307
+ subscribeToElementData(configId: string, callback: (data: WorkbookElementData) => void): Unsubscriber;
308
+ /**
309
+ * Ask sigma to load more data
310
+ * @param {string} configId ID from config of type: 'element'
311
+ */
312
+ fetchMoreElementData(configId: string): void;
313
+ };
314
+ style: {
315
+ /**
316
+ * Subscribe to style updates
317
+ * @param callback Function to call when style updates
318
+ * @returns Unsubscriber function
319
+ */
320
+ subscribe(callback: (style: PluginStyle) => void): () => void;
321
+ /**
322
+ * Request current style from workbook
323
+ * @returns Promise with current style
324
+ */
325
+ get(): Promise<PluginStyle>;
256
326
  };
257
327
  /**
258
328
  * Destroys plugin instance and removes all subscribers
259
329
  */
260
330
  destroy(): void;
261
331
  }
262
- //# sourceMappingURL=index.d.ts.map
332
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;AAChF,oBAAY,aAAa,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,CAAC;AAC5D,oBAAY,SAAS,GAAG,aAAa,GAAG,OAAO,CAAC;AAEhD;;GAEG;AACH,oBAAY,WAAW,GACnB,SAAS,GACT,MAAM,GACN,QAAQ,GACR,MAAM,GACN,WAAW,GACX,aAAa,GACb,WAAW,GACX,cAAc,GACd,YAAY,CAAC;AAEjB,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,CAAC,CAAC;IACV,UAAU,EAAE,OAAO,CAAC;IACpB,CAAC,GAAG,EAA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macomputing/plugin",
3
- "version": "1.1.0-alpha.3",
4
- "author": "Sigma Computing <engineering@sigmacomputing.com>",
5
- "description": "Sigma Computing Plugin: Vanilla Client API",
6
- "homepage": "https://github.com/sigmacomputing/plugin",
3
+ "version": "1.1.0",
4
+ "description": "Sigma Computing Plugin Client API",
7
5
  "license": "MIT",
6
+ "homepage": "https://github.com/sigmacomputing/plugin",
7
+ "main": "./dist/index.js",
8
8
  "repository": {
9
9
  "type": "git",
10
- "url": "https://github.com/sigmacomputing/plugin.git",
11
- "directory": "packages/plugin"
10
+ "url": "https://github.com/sigmacomputing/plugin.git"
12
11
  },
13
12
  "bugs": {
14
13
  "email": "support@sigmacomputing.com",
15
14
  "url": "https://github.com/sigmacomputing/plugin/issues"
16
15
  },
17
- "keywords": [
18
- "sigma",
19
- "sigma-plugin",
20
- "sigmacomputing",
21
- "sigmacomputing-plugin"
22
- ],
23
- "main": "src/index.ts",
16
+ "packageManager": "yarn@4.4.1",
24
17
  "files": [
25
- "/dist",
26
- "/src",
27
- "!/src/**/__tests__/**"
18
+ "dist/*"
28
19
  ],
29
- "exports": {
30
- "./package.json": "./package.json",
31
- ".": {
32
- "default": "./dist/cjs/index.js",
33
- "import": "./dist/esm/index.js",
34
- "types": "./dist/types/index.d.ts"
20
+ "typesVersions": {
21
+ "*": {
22
+ "react": [
23
+ "dist/react/index.d.ts"
24
+ ]
35
25
  }
36
26
  },
37
27
  "scripts": {
38
- "build:types": "yarn tsc --build tsconfig.build.json",
39
- "format": "yarn prettier --write 'src/**/*.{ts,tsx}' 'jest.config.ts'",
40
- "test": "cd ../.. && yarn test --selectProjects @sigmacomputing/plugin",
41
- "test:watch": "yarn test --watch",
42
- "types": "yarn tsc --noEmit",
43
- "types:watch": "yarn types --watch"
28
+ "build": "yarn tsc --build tsconfig.build.json",
29
+ "build:watch": "yarn build --watch",
30
+ "format": "prettier --write 'src/**/*.{ts,tsx}' 'jest.config.ts'",
31
+ "precommit": "lint-staged",
32
+ "prepublish": "yarn build",
33
+ "test": "jest --ci",
34
+ "test:watch": "yarn test --watch"
35
+ },
36
+ "peerDependencies": {
37
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
38
+ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
39
+ },
40
+ "devDependencies": {
41
+ "@jest/types": "^27.5.1",
42
+ "@types/jest": "^27.5.1",
43
+ "@types/node": "^18.7.14",
44
+ "@types/react": "^19.0.0",
45
+ "@types/react-dom": "^19.0.0",
46
+ "jest": "^27.5.1",
47
+ "jest-watch-typeahead": "^2.1.1",
48
+ "lint-staged": "^13.0.3",
49
+ "prettier": "^2.7.1",
50
+ "ts-jest": "^27.1.4",
51
+ "typescript": "^4.8.2"
44
52
  }
45
- }
53
+ }
@@ -1,9 +0,0 @@
1
- 'use strict';
2
-
3
- var initialize = require('./initialize.js');
4
-
5
- const client = initialize.initialize();
6
-
7
- exports.initialize = initialize.initialize;
8
- exports.client = client;
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/client/index.ts"],"sourcesContent":["import { initialize } from './initialize';\n\nexport const client = initialize();\n\nexport { initialize };\n"],"names":["client","initialize"],"mappings":";;;;AAEaA,MAAAA,MAAM,GAAGC,qBAAU;;;;;"}