@pdfme/ui 5.3.15 → 5.3.16-dev.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.
@@ -1,8 +1,5 @@
1
1
  import { PreviewProps } from '@pdfme/common';
2
2
  import { PreviewUI } from './class.js';
3
- /**
4
- * @deprecated This component will be removed in a future version. Consider using an alternative solution.
5
- */
6
3
  declare class Viewer extends PreviewUI {
7
4
  constructor(props: PreviewProps);
8
5
  protected render(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdfme/ui",
3
- "version": "5.3.15",
3
+ "version": "5.3.16-dev.1",
4
4
  "sideEffects": false,
5
5
  "author": "hand-dot",
6
6
  "license": "MIT",
@@ -40,11 +40,11 @@
40
40
  "@dnd-kit/sortable": "^10.0.0",
41
41
  "@pdfme/converter": "*",
42
42
  "@scena/react-guides": "^0.28.2",
43
- "antd": "^5.24.4",
43
+ "antd": "^5.24.6",
44
44
  "form-render": "^2.2.16",
45
45
  "globrex": "^0.1.2",
46
46
  "hotkeys-js": "^3.8.7",
47
- "lucide-react": "^0.486.0",
47
+ "lucide-react": "^0.487.0",
48
48
  "react": "^16.14.0",
49
49
  "react-dom": "^16.14.0",
50
50
  "react-moveable": "^0.56.0",
@@ -63,7 +63,7 @@
63
63
  "@vitejs/plugin-react": "^4.2.0",
64
64
  "csstype": "^3.1.2",
65
65
  "esbuild": "^0.25.2",
66
- "eslint-plugin-react": "^7.37.4",
66
+ "eslint-plugin-react": "^7.37.5",
67
67
  "eslint-plugin-react-hooks": "^5.2.0",
68
68
  "is-path-inside": "^4.0.0",
69
69
  "jest-canvas-mock": "^2.3.1",
@@ -71,7 +71,7 @@
71
71
  "postcss": "^8.5.3",
72
72
  "process": "^0.11.10",
73
73
  "rollup": "^4.38.0",
74
- "vite": "^6.2.4",
74
+ "vite": "^6.2.5",
75
75
  "vite-plugin-css-injected-by-js": "^3.3.0",
76
76
  "vite-tsconfig-paths": "^5.1.4"
77
77
  },
package/src/Viewer.tsx CHANGED
@@ -6,9 +6,6 @@ import { DESTROYED_ERR_MSG } from './constants.js';
6
6
  import Preview from './components/Preview.js';
7
7
  import AppContextProvider from './components/AppContextProvider.js';
8
8
 
9
- /**
10
- * @deprecated This component will be removed in a future version. Consider using an alternative solution.
11
- */
12
9
  class Viewer extends PreviewUI {
13
10
  constructor(props: PreviewProps) {
14
11
  super(props);
@@ -514,12 +514,18 @@ const Canvas = (props: Props, ref: Ref<HTMLDivElement>) => {
514
514
  value={value}
515
515
  onChangeHoveringSchemaId={onChangeHoveringSchemaId}
516
516
  mode={mode}
517
- onChange={(arg) => {
518
- // Use type assertion to safely handle the argument
519
- type ChangeArg = { key: string; value: unknown };
520
- const args = Array.isArray(arg) ? (arg as ChangeArg[]) : [arg as ChangeArg];
521
- changeSchemas(args.map(({ key, value }) => ({ key, value, schemaId: schema.id })));
522
- }}
517
+ onChange={
518
+ schemasList[pageCursor].some((s) => s.id === schema.id)
519
+ ? (arg) => {
520
+ // Use type assertion to safely handle the argument
521
+ type ChangeArg = { key: string; value: unknown };
522
+ const args = Array.isArray(arg) ? (arg as ChangeArg[]) : [arg as ChangeArg];
523
+ changeSchemas(
524
+ args.map(({ key, value }) => ({ key, value, schemaId: schema.id })),
525
+ );
526
+ }
527
+ : undefined
528
+ }
523
529
  stopEditing={() => setEditing(false)}
524
530
  outline={`1px ${hoveringSchemaId === schema.id ? 'solid' : 'dashed'} ${
525
531
  schema.readOnly && hoveringSchemaId !== schema.id