@sigmacomputing/plugin 0.7.57 → 1.0.0-rc.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.
Files changed (63) hide show
  1. package/.gitignore +30 -0
  2. package/.lintstagedrc +3 -0
  3. package/.nvmrc +1 -0
  4. package/.prettierrc +5 -0
  5. package/CHANGELOG.md +25 -0
  6. package/CONTRIBUTING.md +60 -0
  7. package/{LICENSE.md → LICENSE} +0 -0
  8. package/README.md +782 -8
  9. package/assets/sigma-logo-dark.svg +54 -0
  10. package/assets/sigma-logo-light.svg +50 -0
  11. package/dist/client/index.d.ts +4 -0
  12. package/dist/client/index.d.ts.map +1 -0
  13. package/dist/{client.js → client/index.js} +2 -1
  14. package/dist/client/initialize.d.ts +3 -0
  15. package/dist/client/initialize.d.ts.map +1 -0
  16. package/dist/{initialize.js → client/initialize.js} +1 -1
  17. package/dist/client/react/Context.d.ts +4 -0
  18. package/dist/client/react/Context.d.ts.map +1 -0
  19. package/dist/client/react/Context.js +6 -0
  20. package/dist/client/react/Provider.d.ts +8 -0
  21. package/dist/client/react/Provider.d.ts.map +1 -0
  22. package/dist/client/react/Provider.js +9 -0
  23. package/dist/client/react/hooks.d.ts +48 -0
  24. package/dist/client/react/hooks.d.ts.map +1 -0
  25. package/dist/{react/index.js → client/react/hooks.js} +23 -60
  26. package/dist/client/react/index.d.ts +4 -0
  27. package/dist/client/react/index.d.ts.map +1 -0
  28. package/dist/client/react/index.js +21 -0
  29. package/dist/index.d.ts +2 -3
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +3 -9
  32. package/dist/types.d.ts +262 -0
  33. package/dist/types.d.ts.map +1 -0
  34. package/dist/types.js +2 -0
  35. package/dist/{deepEqual.d.ts → utils/deepEqual.d.ts} +0 -0
  36. package/dist/utils/deepEqual.d.ts.map +1 -0
  37. package/dist/utils/deepEqual.js +29 -0
  38. package/jest.config.ts +22 -0
  39. package/package.json +50 -17
  40. package/src/client/__tests__/initialize.test.ts +30 -0
  41. package/src/client/index.ts +5 -0
  42. package/src/client/initialize.ts +199 -0
  43. package/src/client/react/Context.ts +6 -0
  44. package/src/client/react/Provider.tsx +19 -0
  45. package/src/client/react/hooks.ts +178 -0
  46. package/src/client/react/index.tsx +6 -0
  47. package/src/index.ts +3 -0
  48. package/src/types.ts +322 -0
  49. package/src/utils/deepEqual.ts +24 -0
  50. package/tsconfig.build.json +9 -0
  51. package/tsconfig.json +35 -0
  52. package/yarn.lock +3226 -0
  53. package/dist/client.d.ts +0 -2
  54. package/dist/client.d.ts.map +0 -1
  55. package/dist/deepEqual.d.ts.map +0 -1
  56. package/dist/deepEqual.js +0 -46
  57. package/dist/initialize.d.ts +0 -3
  58. package/dist/initialize.d.ts.map +0 -1
  59. package/dist/initialize.test.d.ts +0 -2
  60. package/dist/initialize.test.d.ts.map +0 -1
  61. package/dist/initialize.test.js +0 -26
  62. package/dist/react/index.d.ts +0 -58
  63. package/dist/react/index.d.ts.map +0 -1
package/.gitignore ADDED
@@ -0,0 +1,30 @@
1
+ # See https://help.github.com/ignore-files/ for more about ignoring files.
2
+
3
+ # dependencies
4
+ node_modules/
5
+
6
+ # testing
7
+ coverage/
8
+
9
+ # production
10
+ dist/
11
+
12
+ # misc
13
+ .DS_Store
14
+ .env.local
15
+ .envrc
16
+ eslint_output.json
17
+ tsc_output
18
+
19
+ npm-debug.log*
20
+ yarn-debug.log*
21
+ yarn-error.log*
22
+
23
+ # vim
24
+ *.swp
25
+
26
+ # IDE files
27
+ .idea
28
+
29
+ # typescript
30
+ tsconfig*.tsbuildinfo
package/.lintstagedrc ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "*.{js,ts,tsx}": "yarn prettier --write"
3
+ }
package/.nvmrc ADDED
@@ -0,0 +1 @@
1
+ v16.13.1
package/.prettierrc ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "arrowParens": "avoid",
3
+ "singleQuote": true,
4
+ "trailingComma": "all"
5
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,25 @@
1
+ ## v1.0.0 (September 2nd, 2022)
2
+
3
+ `@sigmacomputing/plugin` has moved to https://github.com/sigmacomputing/plugin and
4
+ is now open source. Feel free to create an issue or contribute by opening a pull
5
+ request. Read out `CONTRIBUTING.md` guide to get started.
6
+
7
+ #### Breaking Changes
8
+
9
+ - `@sigmacomputing/plugin-types` has been merged with `@sigmacomputing/plugin`
10
+ and will no longer received updates in the future. Please use only
11
+ `@sigmacomputing/plugin` going forward.
12
+
13
+ - All `react` exports (`SigmaClientProvider` and all hooks) have been moved to
14
+ a separate explicit export. This will allow better bundle splitting by not
15
+ including `react` specific code for plugins that do not use `react`.
16
+
17
+ ```ts
18
+ // before
19
+ import { SigmaClientProvider, usePlugin } from '@sigmacomputing/plugin';
20
+
21
+ // after
22
+ import { SigmaClientProvider, usePlugin } from '@sigmacomputing/plugin/react';
23
+ ```
24
+
25
+ All types can be imported from either `@sigmacomputing/plugin` or `@sigmacomputing/plugin/react`
@@ -0,0 +1,60 @@
1
+ ## Initial setup
2
+
3
+ Start by forking the `@sigmacomputing/plugin` repo and cloning it locally.
4
+
5
+ ```shs
6
+ git clone https://github.com/your-username/sigmacomputing-plugin.git
7
+ ```
8
+
9
+ Navigate to the `sigmacomputing-plugin` directory and install the required
10
+ dependencies with the following commands:
11
+
12
+ ```sh
13
+ # Ensure you have node version 16 installed (suggestion: v16.13.1).
14
+ nvm install
15
+ yarn install
16
+ ```
17
+
18
+ ## Start Developing
19
+
20
+ You can run any of the scripts located in the `package.json` using:
21
+
22
+ ```sh
23
+ yarn <script-name>
24
+ ```
25
+
26
+ For example, you can run the build process with
27
+
28
+ ```sh
29
+ yarn build
30
+ # Or in watch mode
31
+ yarn build:watch
32
+ ```
33
+
34
+ ### Add tests
35
+
36
+ Unit tests ensure that `@sigmacomputing/plugin` doesn't break accidentally. If
37
+ your code can regress in non-obvious ways, include unit tests with your PR. Use
38
+ the following naming convention:
39
+
40
+ ```
41
+ +-- parentFolder
42
+ | +-- __tests__
43
+ | +-- [filename].test.ts
44
+ | +-- [filename].ts
45
+ ```
46
+
47
+ Our unit test suite uses [jest](https://jestjs.io/)
48
+
49
+ ## Submit a pull request
50
+
51
+ Before submitting your contribution, run the test suite one last time with:
52
+
53
+ ```sh
54
+ yarn test
55
+ ```
56
+
57
+ Doing this prevents last-minute bugs and is also a great way to get your
58
+ contribution merged faster once you submit your pull request. Failing to do so
59
+ will lead to one of the maintainers mark the pull request with the Work in
60
+ Progress label until all tests pass.
File without changes