@jc-times/business-ui 0.2.53 → 0.2.55

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.
package/package.json CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "name": "@jc-times/business-ui",
3
- "version": "0.2.53",
4
- "packageManager": "pnpm@11.19.0",
3
+ "version": "0.2.55",
5
4
  "description": "Shared accessible business UI components for JC Times applications",
6
5
  "repository": {
7
6
  "type": "git",
@@ -36,7 +35,8 @@
36
35
  "docs/data-table.md",
37
36
  "docs/dependencies.md",
38
37
  "patches",
39
- "licenses/embedpdf-MIT.txt"
38
+ "licenses/embedpdf-MIT.txt",
39
+ "docs/sortable-list.md"
40
40
  ],
41
41
  "main": "./dist/business-ui.js",
42
42
  "module": "./dist/business-ui.js",
@@ -79,22 +79,6 @@
79
79
  "bin": {
80
80
  "business-ui-gate": "./bin/business-ui-gate.mjs"
81
81
  },
82
- "scripts": {
83
- "dev:cascader": "vite --host 127.0.0.1 --port 4187 --strictPort",
84
- "dev:mrt": "vite --config examples/mrt-poc/vite.config.ts",
85
- "build:mrt": "vite build --config examples/mrt-poc/vite.config.ts",
86
- "test:mrt": "playwright test --config examples/mrt-poc/playwright.config.ts",
87
- "build": "vite build && tsc -p tsconfig.build.json --emitDeclarationOnly",
88
- "build:matrix": "vite build --config examples/visual-matrix/vite.config.ts",
89
- "dev:matrix": "vite examples/visual-matrix",
90
- "test": "vitest run",
91
- "test:browser": "playwright test",
92
- "typecheck": "tsc --noEmit",
93
- "verify": "pnpm typecheck && pnpm test && pnpm build && pnpm test:tree-shaking && pnpm build:matrix",
94
- "pack:release": "pnpm verify && pnpm pack",
95
- "publish:release": "node scripts/publish-release.mjs",
96
- "test:tree-shaking": "node scripts/check-tree-shaking.mjs"
97
- },
98
82
  "peerDependencies": {
99
83
  "@embedpdf/react-pdf-viewer": "2.15.0",
100
84
  "lucide-react": ">=0.468.0 <2",
@@ -132,6 +116,7 @@
132
116
  "react-aria-components": "1.21.1"
133
117
  },
134
118
  "devDependencies": {
119
+ "@embedpdf/pdfium": "2.15.0",
135
120
  "@embedpdf/react-pdf-viewer": "2.15.0",
136
121
  "@playwright/test": "1.63.0",
137
122
  "@testing-library/jest-dom": "7.0.1",
@@ -162,5 +147,21 @@
162
147
  "pdfjs-dist": {
163
148
  "optional": true
164
149
  }
150
+ },
151
+ "scripts": {
152
+ "dev:cascader": "vite --host 127.0.0.1 --port 4187 --strictPort",
153
+ "dev:mrt": "vite --config examples/mrt-poc/vite.config.ts",
154
+ "build:mrt": "vite build --config examples/mrt-poc/vite.config.ts",
155
+ "test:mrt": "playwright test --config examples/mrt-poc/playwright.config.ts",
156
+ "build": "vite build && tsc -p tsconfig.build.json --emitDeclarationOnly",
157
+ "build:matrix": "vite build --config examples/visual-matrix/vite.config.ts",
158
+ "dev:matrix": "vite examples/visual-matrix",
159
+ "test": "vitest run",
160
+ "test:browser": "playwright test",
161
+ "typecheck": "tsc --noEmit",
162
+ "verify": "pnpm typecheck && pnpm test && pnpm build && pnpm test:tree-shaking && pnpm build:matrix",
163
+ "pack:release": "pnpm verify && pnpm pack",
164
+ "publish:release": "node scripts/publish-release.mjs",
165
+ "test:tree-shaking": "node scripts/check-tree-shaking.mjs"
165
166
  }
166
- }
167
+ }
@@ -1,77 +1,77 @@
1
- diff --git a/dist/react/index.js b/dist/react/index.js
2
- index 0b7c4488a543a94690e8f6674cbe70e1420b2d9b..b9d32b35b8582f46f8564c6752450a9a8c91ea51 100644
3
- --- a/dist/react/index.js
4
- +++ b/dist/react/index.js
5
- @@ -43,7 +43,7 @@ function setupZoomGestures({
6
- viewportGap = 0,
7
- options = {}
8
- }) {
9
- - const { enablePinch = true, enableWheel = true } = options;
10
- + const { enablePinch = true, enableWheel = true, minZoom = 0.1, maxZoom = 3 } = options;
11
- if (typeof window === "undefined") {
12
- return () => {
13
- };
14
- @@ -106,6 +106,8 @@ function setupZoomGestures({
15
- return { tx, ty, blend, finalWidth };
16
- };
17
- const updateTransform = (scale) => {
18
- + // Match requestZoomBy precision and engine bounds before painting the preview.
19
- + scale = Number(clamp(initialZoom * scale, minZoom, maxZoom).toFixed(2)) / initialZoom;
20
- currentScale = scale;
21
- const { tx, ty } = calculateTransform(scale);
22
- element.style.transformOrigin = "0 0";
23
- @@ -253,7 +255,9 @@ function useZoomGesture(documentId, options = {}) {
24
- documentId,
25
- viewportElementRef,
26
- options.enablePinch,
27
- - options.enableWheel
28
- + options.enableWheel,
29
- + options.minZoom,
30
- + options.maxZoom
31
- ]);
32
- return { elementRef };
33
- }
34
- @@ -263,11 +267,13 @@ function ZoomGestureWrapper({
35
- style,
36
- enablePinch = true,
37
- enableWheel = true,
38
- + minZoom = 0.1,
39
- + maxZoom = 3,
40
- ...props
41
- }) {
42
- const options = useMemo(
43
- - () => ({ enablePinch, enableWheel }),
44
- - [enablePinch, enableWheel]
45
- + () => ({ enablePinch, enableWheel, minZoom, maxZoom }),
46
- + [enablePinch, enableWheel, minZoom, maxZoom]
47
- );
48
- const { elementRef } = useZoomGesture(documentId, options);
49
- return /* @__PURE__ */ jsx(
50
- diff --git a/dist/shared-react/components/zoom-gesture-wrapper.d.ts b/dist/shared-react/components/zoom-gesture-wrapper.d.ts
51
- index 68aed0ba801d6733f4f7e570b317a9bcf581c801..38e702dd4a6e633f9f58f36332ef2ffd22172570 100644
52
- --- a/dist/shared-react/components/zoom-gesture-wrapper.d.ts
53
- +++ b/dist/shared-react/components/zoom-gesture-wrapper.d.ts
54
- @@ -7,6 +7,9 @@ type ZoomGestureWrapperProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
55
- enablePinch?: boolean;
56
- /** Enable wheel zoom with ctrl/cmd key (default: true) */
57
- enableWheel?: boolean;
58
- + /** Bounds shared with ZoomPlugin; preview uses commit precision. */
59
- + minZoom?: number;
60
- + maxZoom?: number;
61
- };
62
- export declare function ZoomGestureWrapper({ children, documentId, style, enablePinch, enableWheel, ...props }: ZoomGestureWrapperProps): import("react/jsx-runtime").JSX.Element;
63
- export {};
64
- diff --git a/dist/shared-react/utils/zoom-gesture-logic.d.ts b/dist/shared-react/utils/zoom-gesture-logic.d.ts
65
- index 927ba65838ed69d13419c05eae7a4a87ae90f156..e35815359996e63e494b4bc3a3209a6a9b3876ef 100644
66
- --- a/dist/shared-react/utils/zoom-gesture-logic.d.ts
67
- +++ b/dist/shared-react/utils/zoom-gesture-logic.d.ts
68
- @@ -4,6 +4,9 @@ export interface ZoomGestureOptions {
69
- enablePinch?: boolean;
70
- /** Enable wheel zoom with ctrl/cmd key (default: true) */
71
- enableWheel?: boolean;
72
- + /** Bounds shared with ZoomPlugin; preview uses commit precision. */
73
- + minZoom?: number;
74
- + maxZoom?: number;
75
- }
76
- export interface ZoomGestureDeps {
77
- element: HTMLDivElement;
1
+ diff --git a/dist/react/index.js b/dist/react/index.js
2
+ index 0b7c4488a543a94690e8f6674cbe70e1420b2d9b..b9d32b35b8582f46f8564c6752450a9a8c91ea51 100644
3
+ --- a/dist/react/index.js
4
+ +++ b/dist/react/index.js
5
+ @@ -43,7 +43,7 @@ function setupZoomGestures({
6
+ viewportGap = 0,
7
+ options = {}
8
+ }) {
9
+ - const { enablePinch = true, enableWheel = true } = options;
10
+ + const { enablePinch = true, enableWheel = true, minZoom = 0.1, maxZoom = 3 } = options;
11
+ if (typeof window === "undefined") {
12
+ return () => {
13
+ };
14
+ @@ -106,6 +106,8 @@ function setupZoomGestures({
15
+ return { tx, ty, blend, finalWidth };
16
+ };
17
+ const updateTransform = (scale) => {
18
+ + // Match requestZoomBy precision and engine bounds before painting the preview.
19
+ + scale = Number(clamp(initialZoom * scale, minZoom, maxZoom).toFixed(2)) / initialZoom;
20
+ currentScale = scale;
21
+ const { tx, ty } = calculateTransform(scale);
22
+ element.style.transformOrigin = "0 0";
23
+ @@ -253,7 +255,9 @@ function useZoomGesture(documentId, options = {}) {
24
+ documentId,
25
+ viewportElementRef,
26
+ options.enablePinch,
27
+ - options.enableWheel
28
+ + options.enableWheel,
29
+ + options.minZoom,
30
+ + options.maxZoom
31
+ ]);
32
+ return { elementRef };
33
+ }
34
+ @@ -263,11 +267,13 @@ function ZoomGestureWrapper({
35
+ style,
36
+ enablePinch = true,
37
+ enableWheel = true,
38
+ + minZoom = 0.1,
39
+ + maxZoom = 3,
40
+ ...props
41
+ }) {
42
+ const options = useMemo(
43
+ - () => ({ enablePinch, enableWheel }),
44
+ - [enablePinch, enableWheel]
45
+ + () => ({ enablePinch, enableWheel, minZoom, maxZoom }),
46
+ + [enablePinch, enableWheel, minZoom, maxZoom]
47
+ );
48
+ const { elementRef } = useZoomGesture(documentId, options);
49
+ return /* @__PURE__ */ jsx(
50
+ diff --git a/dist/shared-react/components/zoom-gesture-wrapper.d.ts b/dist/shared-react/components/zoom-gesture-wrapper.d.ts
51
+ index 68aed0ba801d6733f4f7e570b317a9bcf581c801..38e702dd4a6e633f9f58f36332ef2ffd22172570 100644
52
+ --- a/dist/shared-react/components/zoom-gesture-wrapper.d.ts
53
+ +++ b/dist/shared-react/components/zoom-gesture-wrapper.d.ts
54
+ @@ -7,6 +7,9 @@ type ZoomGestureWrapperProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
55
+ enablePinch?: boolean;
56
+ /** Enable wheel zoom with ctrl/cmd key (default: true) */
57
+ enableWheel?: boolean;
58
+ + /** Bounds shared with ZoomPlugin; preview uses commit precision. */
59
+ + minZoom?: number;
60
+ + maxZoom?: number;
61
+ };
62
+ export declare function ZoomGestureWrapper({ children, documentId, style, enablePinch, enableWheel, ...props }: ZoomGestureWrapperProps): import("react/jsx-runtime").JSX.Element;
63
+ export {};
64
+ diff --git a/dist/shared-react/utils/zoom-gesture-logic.d.ts b/dist/shared-react/utils/zoom-gesture-logic.d.ts
65
+ index 927ba65838ed69d13419c05eae7a4a87ae90f156..e35815359996e63e494b4bc3a3209a6a9b3876ef 100644
66
+ --- a/dist/shared-react/utils/zoom-gesture-logic.d.ts
67
+ +++ b/dist/shared-react/utils/zoom-gesture-logic.d.ts
68
+ @@ -4,6 +4,9 @@ export interface ZoomGestureOptions {
69
+ enablePinch?: boolean;
70
+ /** Enable wheel zoom with ctrl/cmd key (default: true) */
71
+ enableWheel?: boolean;
72
+ + /** Bounds shared with ZoomPlugin; preview uses commit precision. */
73
+ + minZoom?: number;
74
+ + maxZoom?: number;
75
+ }
76
+ export interface ZoomGestureDeps {
77
+ element: HTMLDivElement;