@visualli/react 0.1.7 → 0.2.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 (49) hide show
  1. package/README.md +13 -5
  2. package/dist/index.cjs +1900 -2033
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +354 -97
  5. package/dist/index.d.ts +354 -97
  6. package/dist/index.js +2005 -2095
  7. package/dist/index.js.map +1 -1
  8. package/fonts/Caveat-Variable.ttf +0 -0
  9. package/licenses/visualli-design-system/LICENSE +9 -0
  10. package/licenses/visualli-design-system/NOTICE.md +6 -0
  11. package/package.json +9 -4
  12. package/src/VisualliCanvas.tsx +452 -409
  13. package/src/VisualliRenderer.tsx +90 -112
  14. package/src/components/A11yLayer.tsx +73 -0
  15. package/src/components/KonvaContainer.tsx +28 -237
  16. package/src/components/KonvaContainerLabelLayer.tsx +41 -0
  17. package/src/components/KonvaContainerLayer.tsx +34 -33
  18. package/src/components/KonvaEdge.tsx +25 -240
  19. package/src/components/KonvaEdgeLayer.tsx +69 -49
  20. package/src/components/KonvaNode.tsx +21 -156
  21. package/src/components/KonvaNodeLayer.tsx +102 -34
  22. package/src/components/KonvaStage.tsx +17 -3
  23. package/src/components/NavigationStack.tsx +16 -159
  24. package/src/components/Overlays.tsx +327 -0
  25. package/src/components/ZoomControls.tsx +3 -107
  26. package/src/components/useFrames.ts +30 -0
  27. package/src/context/VisualliContext.tsx +3 -3
  28. package/src/design/choreography.ts +157 -0
  29. package/src/design/containers.ts +150 -0
  30. package/src/design/design.ts +115 -0
  31. package/src/design/drawing.ts +303 -0
  32. package/src/design/measure.ts +34 -0
  33. package/src/design/runtime.ts +154 -0
  34. package/src/design/useDesign.ts +38 -0
  35. package/src/generated/specCss.ts +15 -0
  36. package/src/hooks/index.ts +0 -2
  37. package/src/hooks/useKonvaRenderer.ts +13 -18
  38. package/src/hooks/useLayerChoreography.ts +159 -0
  39. package/src/hooks/useViewportNodes.ts +0 -1
  40. package/src/index.ts +22 -22
  41. package/src/stores/stores.ts +2 -2
  42. package/src/stores/useViewportStore.ts +12 -2
  43. package/src/animations/index.ts +0 -2
  44. package/src/animations/konvaLayerTransition.ts +0 -223
  45. package/src/components/SketchyBoxKonva.tsx +0 -121
  46. package/src/config/blobShapes.ts +0 -204
  47. package/src/config/index.ts +0 -21
  48. package/src/config/textScaling.ts +0 -69
  49. package/src/hooks/useKonvaLayerTransition.ts +0 -221
Binary file
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) Visualli
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,6 @@
1
+ # Notices
2
+
3
+ - **Code, tokens, CSS and geometry** in this folder: MIT (see LICENSE).
4
+ - **Fonts** — all SIL Open Font License 1.1 (https://openfontlicense.org): Caveat, Kalam, Atkinson Hyperlegible Next, Atkinson Hyperlegible Mono. Bundled files keep their license; hosted ones load from Google Fonts.
5
+ - **Trademarks** — "Visualli", the Visualli logo, wordmark and tree mark are trademarks and are *not* licensed here; none are included. You may say a viewer is "compatible with the .visualli spec".
6
+ - The display face used in Visualli's own app chrome is licensed separately and is not part of this folder; where a spec style asks for `--font-display` it falls back to Atkinson Hyperlegible Next.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visualli/react",
3
- "version": "0.1.7",
3
+ "version": "0.2.1",
4
4
  "description": "React canvas renderer for .visualli files \u2014 built on @visualli/core",
5
5
  "repository": {
6
6
  "type": "git",
@@ -19,11 +19,15 @@
19
19
  },
20
20
  "files": [
21
21
  "dist",
22
- "src"
22
+ "src",
23
+ "licenses",
24
+ "fonts"
23
25
  ],
24
26
  "scripts": {
25
- "build": "tsup",
26
- "check-types": "tsc --noEmit"
27
+ "build": "node ../../../../scripts/gen-design-system.mjs && tsup",
28
+ "check-types": "tsc --noEmit",
29
+ "test": "vitest run",
30
+ "lint": "eslint src --max-warnings 0"
27
31
  },
28
32
  "peerDependencies": {
29
33
  "react": "^18.0.0",
@@ -40,6 +44,7 @@
40
44
  "devDependencies": {
41
45
  "@types/react": "^18.3.0",
42
46
  "@types/react-dom": "^18.3.0",
47
+ "@visualli/eslint-config": "*",
43
48
  "typescript": "^5.5.4"
44
49
  },
45
50
  "engines": {