@code0-tech/pictor 0.18.2 → 1.0.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 (39) hide show
  1. package/dist/assets/components/button/Button.style.css +1 -1
  2. package/dist/assets/components/command/Command.style.css +1 -1
  3. package/dist/assets/components/context-menu/ContextMenu.style.css +1 -1
  4. package/dist/assets/components/dialog/Dialog.style.css +1 -1
  5. package/dist/assets/components/form/Input.style.css +1 -1
  6. package/dist/assets/components/form/SelectInput.style.css +1 -1
  7. package/dist/assets/components/menu/Menu.style.css +1 -1
  8. package/dist/assets/components/segmented-control/SegmentedControl.style.css +1 -1
  9. package/dist/assets/components/tab/Tab.style.css +1 -1
  10. package/dist/assets/components/tooltip/Tooltip.style.css +1 -1
  11. package/dist/components/breadcrumb/Breadcrumb.js +9 -8
  12. package/dist/components/context-menu/ContextMenu.d.ts +1 -1
  13. package/dist/components/context-menu/ContextMenu.js +89 -102
  14. package/dist/components/data-table/DataTable.js +11 -10
  15. package/dist/components/dialog/Dialog.js +75 -80
  16. package/dist/components/editor/Editor.js +3 -2
  17. package/dist/components/form/EditorInput.js +490 -460
  18. package/dist/components/form/Input.js +18 -17
  19. package/dist/components/form/NumberInput.js +4 -4
  20. package/dist/components/form/PasswordInput.js +15 -15
  21. package/dist/components/form/TextInput.js +7 -7
  22. package/dist/components/gantt/GanttGroup.js +40 -39
  23. package/dist/components/json-view/JsonView.js +3 -3
  24. package/dist/components/menu/Menu.js +104 -117
  25. package/dist/components/progress/ProgressCircle.js +7 -6
  26. package/dist/components/progress/ProgressLinear.js +6 -5
  27. package/dist/components/segmented-control/SegmentedControl.d.ts +2 -2
  28. package/dist/components/segmented-control/SegmentedControl.js +44 -20
  29. package/dist/components/tab/Tab.js +58 -32
  30. package/dist/components/toast/Toast.d.ts +1 -1
  31. package/dist/components/toast/Toast.js +64 -65
  32. package/dist/components/tooltip/Tooltip.js +46 -51
  33. package/dist/index.js +181 -170
  34. package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js +12 -0
  35. package/dist/utils/index.d.ts +1 -0
  36. package/dist/utils/index.js +25 -14
  37. package/dist/utils/motion.d.ts +55 -0
  38. package/dist/utils/motion.js +115 -0
  39. package/package.json +8 -8
@@ -0,0 +1,115 @@
1
+ import { c as p } from "../_virtual/compiler-runtime.js";
2
+ import y from "react";
3
+ import { useReducedMotion as $ } from "../node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js";
4
+ const f = (t, e) => ({
5
+ type: "spring",
6
+ bounce: Math.max(0, 1 - t),
7
+ duration: e
8
+ }), d = {
9
+ //critically damped - the default for anything that just appears on screen
10
+ ui: f(1, 0.3),
11
+ //larger surfaces carry more visual weight, so they settle a little slower
12
+ surface: f(1, 0.4),
13
+ //only for motion a gesture handed off to (flick, throw, drag release)
14
+ momentum: f(0.8, 0.4),
15
+ //drawers and sheets
16
+ sheet: f(0.8, 0.3)
17
+ }, v = {
18
+ duration: 0.15,
19
+ ease: "easeOut"
20
+ }, m = () => $() ?? !1, x = (t, e, s) => ({
21
+ initial: {
22
+ opacity: 0,
23
+ scale: t,
24
+ filter: `blur(${e}px)`
25
+ },
26
+ animate: {
27
+ opacity: 1,
28
+ scale: 1,
29
+ filter: "blur(0px)"
30
+ },
31
+ exit: {
32
+ opacity: 0,
33
+ scale: t,
34
+ filter: `blur(${e}px)`
35
+ },
36
+ transition: s
37
+ }), b = {
38
+ initial: {
39
+ opacity: 0
40
+ },
41
+ animate: {
42
+ opacity: 1
43
+ },
44
+ exit: {
45
+ opacity: 0
46
+ },
47
+ transition: v
48
+ }, _ = () => {
49
+ const t = p.c(2), e = m();
50
+ let s;
51
+ return t[0] !== e ? (s = e ? b : x(0.96, 4, d.ui), t[0] = e, t[1] = s) : s = t[1], s;
52
+ }, g = () => {
53
+ const t = p.c(2), e = m();
54
+ let s;
55
+ return t[0] !== e ? (s = e ? b : x(0.97, 6, d.surface), t[0] = e, t[1] = s) : s = t[1], s;
56
+ }, h = (t) => {
57
+ const e = p.c(6), s = t === void 0 ? 6 : t;
58
+ if (m())
59
+ return b;
60
+ let a;
61
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = {
62
+ opacity: 0,
63
+ backdropFilter: "blur(0px)"
64
+ }, e[0] = a) : a = e[0];
65
+ const l = `blur(${s}px)`;
66
+ let o;
67
+ e[1] !== l ? (o = {
68
+ opacity: 1,
69
+ backdropFilter: l
70
+ }, e[1] = l, e[2] = o) : o = e[2];
71
+ let i;
72
+ e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = {
73
+ opacity: 0,
74
+ backdropFilter: "blur(0px)"
75
+ }, e[3] = i) : i = e[3];
76
+ let c;
77
+ return e[4] !== o ? (c = {
78
+ initial: a,
79
+ animate: o,
80
+ exit: i,
81
+ transition: d.surface
82
+ }, e[4] = o, e[5] = c) : c = e[5], c;
83
+ }, F = (t) => ({
84
+ transformOrigin: `var(--radix-${t}-content-transform-origin, center)`
85
+ }), R = (t, e, s) => {
86
+ const r = p.c(5), [a, l] = y.useState(t ?? e ?? !1);
87
+ let o;
88
+ r[0] !== s ? (o = (u) => {
89
+ l(u), s?.(u);
90
+ }, r[0] = s, r[1] = o) : o = r[1];
91
+ const i = o, c = t ?? a;
92
+ let n;
93
+ return r[2] !== i || r[3] !== c ? (n = [c, i], r[2] = i, r[3] = c, r[4] = n) : n = r[4], n;
94
+ }, k = (t, e, s) => {
95
+ const r = p.c(5), [a, l] = y.useState(t ?? e);
96
+ let o;
97
+ r[0] !== s ? (o = (u) => {
98
+ l(u), s?.(u);
99
+ }, r[0] = s, r[1] = o) : o = r[1];
100
+ const i = o, c = t ?? a;
101
+ let n;
102
+ return r[2] !== i || r[3] !== c ? (n = [c, i], r[2] = i, r[3] = c, r[4] = n) : n = r[4], n;
103
+ };
104
+ export {
105
+ v as crossFade,
106
+ F as popperTransformOrigin,
107
+ f as spring,
108
+ d as springs,
109
+ R as useObservedOpen,
110
+ k as useObservedValue,
111
+ _ as usePopperMotion,
112
+ m as useReducedMotionSafe,
113
+ h as useScrimMotion,
114
+ g as useSurfaceMotion
115
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code0-tech/pictor",
3
- "version": "0.18.2",
3
+ "version": "1.0.0",
4
4
  "type": "module",
5
5
  "description": "A simple template for a custom React component library",
6
6
  "scripts": {
@@ -24,8 +24,8 @@
24
24
  "@codemirror/lang-json": "^6.0.2",
25
25
  "@codemirror/language": "^6.12.4",
26
26
  "@codemirror/lint": "^6.9.7",
27
- "@codemirror/state": "^6.7.1",
28
- "@codemirror/view": "^6.43.9",
27
+ "@codemirror/state": "^6.7.6",
28
+ "@codemirror/view": "^6.43.13",
29
29
  "@dagrejs/dagre": "^3.0.0",
30
30
  "@icons-pack/react-simple-icons": "^13.13.0",
31
31
  "@internationalized/date": "^3.12.3",
@@ -62,7 +62,7 @@
62
62
  "@types/react-dom": "^19.2.3",
63
63
  "@types/react-syntax-highlighter": "^15.5.13",
64
64
  "@uidotdev/usehooks": "^2.4.1",
65
- "@uiw/codemirror-themes": "^4.25.10",
65
+ "@uiw/codemirror-themes": "^4.25.12",
66
66
  "@uiw/react-codemirror": "^4.25.10",
67
67
  "@uiw/react-json-view": "^2.0.0-alpha.43",
68
68
  "@vitejs/plugin-react": "^5.2.0",
@@ -73,9 +73,9 @@
73
73
  "babel-loader": "^10.1.1",
74
74
  "babel-plugin-react-compiler": "^19.1.0-rc.3",
75
75
  "cmdk": "^1.1.1",
76
- "concurrently": "^9.2.1",
76
+ "concurrently": "^9.2.4",
77
77
  "css-loader": "^7.1.4",
78
- "html-webpack-plugin": "^5.6.7",
78
+ "html-webpack-plugin": "^5.6.8",
79
79
  "identity-obj-proxy": "^3.0.0",
80
80
  "jest-image-snapshot": "^6.5.2",
81
81
  "js-md5": "^0.8.3",
@@ -93,7 +93,7 @@
93
93
  "slate": "^0.124.1",
94
94
  "slate-history": "^0.113.1",
95
95
  "slate-react": "^0.125.1",
96
- "sonner": "^2.0.7",
96
+ "sonner": "^2.0.8",
97
97
  "storybook": "^10.6.0",
98
98
  "style-loader": "^4.0.0",
99
99
  "ts-jest": "^29.4.11",
@@ -105,7 +105,7 @@
105
105
  "vite-plugin-svgr": "^5.2.0",
106
106
  "vitest": "^4.1.11",
107
107
  "zustand": "^4.5.7",
108
- "recharts": "^3.8.1"
108
+ "recharts": "^3.10.1"
109
109
  },
110
110
  "main": "dist/index.js",
111
111
  "repository": {