@embedpdf/plugin-rotate 1.0.22 → 1.0.24

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 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../src/shared/hooks/use-rotate.ts","../../src/shared/components/rotate.tsx"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/@framework';\nimport { RotatePlugin } from '@embedpdf/plugin-rotate';\n\nexport const useRotatePlugin = () => usePlugin<RotatePlugin>(RotatePlugin.id);\nexport const useRotateCapability = () => useCapability<RotatePlugin>(RotatePlugin.id);\n","import { ReactNode, HTMLAttributes, CSSProperties } from '@framework';\nimport { Size } from '@embedpdf/models';\n\nimport { useRotateCapability } from '../hooks';\n\ntype RotateProps = Omit<HTMLAttributes<HTMLImageElement>, 'style'> & {\n children: ReactNode;\n pageSize: Size;\n style?: CSSProperties;\n};\n\nexport function Rotate({ children, pageSize, style, ...props }: RotateProps) {\n const { provides: rotate } = useRotateCapability();\n const matrix =\n (rotate?.getMatrix({\n w: pageSize.width,\n h: pageSize.height,\n }) as string) || 'matrix(1, 0, 0, 1, 0, 0)';\n\n return (\n <div\n {...props}\n style={{\n position: 'absolute',\n transformOrigin: '0 0',\n transform: matrix,\n ...style,\n }}\n >\n {children}\n </div>\n );\n}\n"],"names":["useRotateCapability","useCapability","RotatePlugin","id","children","pageSize","style","props","provides","rotate","matrix","getMatrix","w","width","h","height","jsxRuntime","jsx","position","transformOrigin","transform","usePlugin"],"mappings":"8LAIaA,EAAsB,IAAMC,gBAA4BC,EAAAA,aAAaC,mBCO3E,UAAgBC,SAAEA,EAAAC,SAAUA,QAAUC,KAAUC,IACrD,MAAQC,SAAUC,GAAWT,IACvBU,SACHD,WAAQE,UAAU,CACjBC,EAAGP,EAASQ,MACZC,EAAGT,EAASU,WACG,2BAGjB,OAAAC,EAAAC,IAAC,MAAA,IACKV,EACJD,MAAO,CACLY,SAAU,WACVC,gBAAiB,MACjBC,UAAWV,KACRJ,GAGJF,YAGP,wDD7B+B,IAAMiB,YAAwBnB,EAAAA,aAAaC"}
1
+ {"version":3,"file":"index.cjs","sources":["../../src/shared/hooks/use-rotate.ts","../../src/shared/components/rotate.tsx"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/@framework';\nimport { RotatePlugin } from '@embedpdf/plugin-rotate';\n\nexport const useRotatePlugin = () => usePlugin<RotatePlugin>(RotatePlugin.id);\nexport const useRotateCapability = () => useCapability<RotatePlugin>(RotatePlugin.id);\n","import { ReactNode, HTMLAttributes, CSSProperties } from '@framework';\nimport { Size } from '@embedpdf/models';\n\nimport { useRotateCapability } from '../hooks';\n\ntype RotateProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {\n children: ReactNode;\n pageSize: Size;\n style?: CSSProperties;\n};\n\nexport function Rotate({ children, pageSize, style, ...props }: RotateProps) {\n const { provides: rotate } = useRotateCapability();\n const matrix =\n (rotate?.getMatrix({\n w: pageSize.width,\n h: pageSize.height,\n }) as string) || 'matrix(1, 0, 0, 1, 0, 0)';\n\n return (\n <div\n {...props}\n style={{\n position: 'absolute',\n transformOrigin: '0 0',\n transform: matrix,\n ...style,\n }}\n >\n {children}\n </div>\n );\n}\n"],"names":["useRotateCapability","useCapability","RotatePlugin","id","children","pageSize","style","props","provides","rotate","matrix","getMatrix","w","width","h","height","jsxRuntime","jsx","position","transformOrigin","transform","usePlugin"],"mappings":"8LAIaA,EAAsB,IAAMC,gBAA4BC,EAAAA,aAAaC,mBCO3E,UAAgBC,SAAEA,EAAAC,SAAUA,QAAUC,KAAUC,IACrD,MAAQC,SAAUC,GAAWT,IACvBU,SACHD,WAAQE,UAAU,CACjBC,EAAGP,EAASQ,MACZC,EAAGT,EAASU,WACG,2BAGjB,OAAAC,EAAAC,IAAC,MAAA,IACKV,EACJD,MAAO,CACLY,SAAU,WACVC,gBAAiB,MACjBC,UAAWV,KACRJ,GAGJF,YAGP,wDD7B+B,IAAMiB,YAAwBnB,EAAAA,aAAaC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/shared/hooks/use-rotate.ts","../../src/shared/components/rotate.tsx"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/@framework';\nimport { RotatePlugin } from '@embedpdf/plugin-rotate';\n\nexport const useRotatePlugin = () => usePlugin<RotatePlugin>(RotatePlugin.id);\nexport const useRotateCapability = () => useCapability<RotatePlugin>(RotatePlugin.id);\n","import { ReactNode, HTMLAttributes, CSSProperties } from '@framework';\nimport { Size } from '@embedpdf/models';\n\nimport { useRotateCapability } from '../hooks';\n\ntype RotateProps = Omit<HTMLAttributes<HTMLImageElement>, 'style'> & {\n children: ReactNode;\n pageSize: Size;\n style?: CSSProperties;\n};\n\nexport function Rotate({ children, pageSize, style, ...props }: RotateProps) {\n const { provides: rotate } = useRotateCapability();\n const matrix =\n (rotate?.getMatrix({\n w: pageSize.width,\n h: pageSize.height,\n }) as string) || 'matrix(1, 0, 0, 1, 0, 0)';\n\n return (\n <div\n {...props}\n style={{\n position: 'absolute',\n transformOrigin: '0 0',\n transform: matrix,\n ...style,\n }}\n >\n {children}\n </div>\n );\n}\n"],"names":[],"mappings":";;;;AAGO,MAAM,kBAAkB,MAAM,UAAwB,aAAa,EAAE;AACrE,MAAM,sBAAsB,MAAM,cAA4B,aAAa,EAAE;ACO7E,SAAS,OAAO,EAAE,UAAU,UAAU,OAAO,GAAG,SAAsB;AAC3E,QAAM,EAAE,UAAU,OAAO,IAAI,oBAAoB;AAC3C,QAAA,UACH,iCAAQ,UAAU;AAAA,IACjB,GAAG,SAAS;AAAA,IACZ,GAAG,SAAS;AAAA,EACb,OAAgB;AAGjB,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ,OAAO;AAAA,QACL,UAAU;AAAA,QACV,iBAAiB;AAAA,QACjB,WAAW;AAAA,QACX,GAAG;AAAA,MACL;AAAA,MAEC;AAAA,IAAA;AAAA,EACH;AAEJ;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/shared/hooks/use-rotate.ts","../../src/shared/components/rotate.tsx"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/@framework';\nimport { RotatePlugin } from '@embedpdf/plugin-rotate';\n\nexport const useRotatePlugin = () => usePlugin<RotatePlugin>(RotatePlugin.id);\nexport const useRotateCapability = () => useCapability<RotatePlugin>(RotatePlugin.id);\n","import { ReactNode, HTMLAttributes, CSSProperties } from '@framework';\nimport { Size } from '@embedpdf/models';\n\nimport { useRotateCapability } from '../hooks';\n\ntype RotateProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {\n children: ReactNode;\n pageSize: Size;\n style?: CSSProperties;\n};\n\nexport function Rotate({ children, pageSize, style, ...props }: RotateProps) {\n const { provides: rotate } = useRotateCapability();\n const matrix =\n (rotate?.getMatrix({\n w: pageSize.width,\n h: pageSize.height,\n }) as string) || 'matrix(1, 0, 0, 1, 0, 0)';\n\n return (\n <div\n {...props}\n style={{\n position: 'absolute',\n transformOrigin: '0 0',\n transform: matrix,\n ...style,\n }}\n >\n {children}\n </div>\n );\n}\n"],"names":[],"mappings":";;;;AAGO,MAAM,kBAAkB,MAAM,UAAwB,aAAa,EAAE;AACrE,MAAM,sBAAsB,MAAM,cAA4B,aAAa,EAAE;ACO7E,SAAS,OAAO,EAAE,UAAU,UAAU,OAAO,GAAG,SAAsB;AAC3E,QAAM,EAAE,UAAU,OAAO,IAAI,oBAAoB;AAC3C,QAAA,UACH,iCAAQ,UAAU;AAAA,IACjB,GAAG,SAAS;AAAA,IACZ,GAAG,SAAS;AAAA,EACb,OAAgB;AAGjB,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ,OAAO;AAAA,QACL,UAAU;AAAA,QACV,iBAAiB;AAAA,QACjB,WAAW;AAAA,QACX,GAAG;AAAA,MACL;AAAA,MAEC;AAAA,IAAA;AAAA,EACH;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../src/shared/hooks/use-rotate.ts","../../src/shared/components/rotate.tsx"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/@framework';\nimport { RotatePlugin } from '@embedpdf/plugin-rotate';\n\nexport const useRotatePlugin = () => usePlugin<RotatePlugin>(RotatePlugin.id);\nexport const useRotateCapability = () => useCapability<RotatePlugin>(RotatePlugin.id);\n","import { ReactNode, HTMLAttributes, CSSProperties } from '@framework';\nimport { Size } from '@embedpdf/models';\n\nimport { useRotateCapability } from '../hooks';\n\ntype RotateProps = Omit<HTMLAttributes<HTMLImageElement>, 'style'> & {\n children: ReactNode;\n pageSize: Size;\n style?: CSSProperties;\n};\n\nexport function Rotate({ children, pageSize, style, ...props }: RotateProps) {\n const { provides: rotate } = useRotateCapability();\n const matrix =\n (rotate?.getMatrix({\n w: pageSize.width,\n h: pageSize.height,\n }) as string) || 'matrix(1, 0, 0, 1, 0, 0)';\n\n return (\n <div\n {...props}\n style={{\n position: 'absolute',\n transformOrigin: '0 0',\n transform: matrix,\n ...style,\n }}\n >\n {children}\n </div>\n );\n}\n"],"names":["useRotateCapability","useCapability","RotatePlugin","id","children","pageSize","style","props","provides","rotate","matrix","getMatrix","w","width","h","height","jsxRuntime","jsx","position","transformOrigin","transform","usePlugin"],"mappings":"4LAIaA,EAAsB,IAAMC,gBAA4BC,EAAAA,aAAaC,mBCO3E,UAAgBC,SAAEA,EAAAC,SAAUA,QAAUC,KAAUC,IACrD,MAAQC,SAAUC,GAAWT,IACvBU,SACHD,WAAQE,UAAU,CACjBC,EAAGP,EAASQ,MACZC,EAAGT,EAASU,WACG,2BAGjB,OAAAC,EAAAC,IAAC,MAAA,IACKV,EACJD,MAAO,CACLY,SAAU,WACVC,gBAAiB,MACjBC,UAAWV,KACRJ,GAGJF,YAGP,wDD7B+B,IAAMiB,YAAwBnB,EAAAA,aAAaC"}
1
+ {"version":3,"file":"index.cjs","sources":["../../src/shared/hooks/use-rotate.ts","../../src/shared/components/rotate.tsx"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/@framework';\nimport { RotatePlugin } from '@embedpdf/plugin-rotate';\n\nexport const useRotatePlugin = () => usePlugin<RotatePlugin>(RotatePlugin.id);\nexport const useRotateCapability = () => useCapability<RotatePlugin>(RotatePlugin.id);\n","import { ReactNode, HTMLAttributes, CSSProperties } from '@framework';\nimport { Size } from '@embedpdf/models';\n\nimport { useRotateCapability } from '../hooks';\n\ntype RotateProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {\n children: ReactNode;\n pageSize: Size;\n style?: CSSProperties;\n};\n\nexport function Rotate({ children, pageSize, style, ...props }: RotateProps) {\n const { provides: rotate } = useRotateCapability();\n const matrix =\n (rotate?.getMatrix({\n w: pageSize.width,\n h: pageSize.height,\n }) as string) || 'matrix(1, 0, 0, 1, 0, 0)';\n\n return (\n <div\n {...props}\n style={{\n position: 'absolute',\n transformOrigin: '0 0',\n transform: matrix,\n ...style,\n }}\n >\n {children}\n </div>\n );\n}\n"],"names":["useRotateCapability","useCapability","RotatePlugin","id","children","pageSize","style","props","provides","rotate","matrix","getMatrix","w","width","h","height","jsxRuntime","jsx","position","transformOrigin","transform","usePlugin"],"mappings":"4LAIaA,EAAsB,IAAMC,gBAA4BC,EAAAA,aAAaC,mBCO3E,UAAgBC,SAAEA,EAAAC,SAAUA,QAAUC,KAAUC,IACrD,MAAQC,SAAUC,GAAWT,IACvBU,SACHD,WAAQE,UAAU,CACjBC,EAAGP,EAASQ,MACZC,EAAGT,EAASU,WACG,2BAGjB,OAAAC,EAAAC,IAAC,MAAA,IACKV,EACJD,MAAO,CACLY,SAAU,WACVC,gBAAiB,MACjBC,UAAWV,KACRJ,GAGJF,YAGP,wDD7B+B,IAAMiB,YAAwBnB,EAAAA,aAAaC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/shared/hooks/use-rotate.ts","../../src/shared/components/rotate.tsx"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/@framework';\nimport { RotatePlugin } from '@embedpdf/plugin-rotate';\n\nexport const useRotatePlugin = () => usePlugin<RotatePlugin>(RotatePlugin.id);\nexport const useRotateCapability = () => useCapability<RotatePlugin>(RotatePlugin.id);\n","import { ReactNode, HTMLAttributes, CSSProperties } from '@framework';\nimport { Size } from '@embedpdf/models';\n\nimport { useRotateCapability } from '../hooks';\n\ntype RotateProps = Omit<HTMLAttributes<HTMLImageElement>, 'style'> & {\n children: ReactNode;\n pageSize: Size;\n style?: CSSProperties;\n};\n\nexport function Rotate({ children, pageSize, style, ...props }: RotateProps) {\n const { provides: rotate } = useRotateCapability();\n const matrix =\n (rotate?.getMatrix({\n w: pageSize.width,\n h: pageSize.height,\n }) as string) || 'matrix(1, 0, 0, 1, 0, 0)';\n\n return (\n <div\n {...props}\n style={{\n position: 'absolute',\n transformOrigin: '0 0',\n transform: matrix,\n ...style,\n }}\n >\n {children}\n </div>\n );\n}\n"],"names":[],"mappings":";;;;AAGO,MAAM,kBAAkB,MAAM,UAAwB,aAAa,EAAE;AACrE,MAAM,sBAAsB,MAAM,cAA4B,aAAa,EAAE;ACO7E,SAAS,OAAO,EAAE,UAAU,UAAU,OAAO,GAAG,SAAsB;AAC3E,QAAM,EAAE,UAAU,OAAO,IAAI,oBAAoB;AAC3C,QAAA,UACH,iCAAQ,UAAU;AAAA,IACjB,GAAG,SAAS;AAAA,IACZ,GAAG,SAAS;AAAA,EACb,OAAgB;AAGjB,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ,OAAO;AAAA,QACL,UAAU;AAAA,QACV,iBAAiB;AAAA,QACjB,WAAW;AAAA,QACX,GAAG;AAAA,MACL;AAAA,MAEC;AAAA,IAAA;AAAA,EACH;AAEJ;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/shared/hooks/use-rotate.ts","../../src/shared/components/rotate.tsx"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/@framework';\nimport { RotatePlugin } from '@embedpdf/plugin-rotate';\n\nexport const useRotatePlugin = () => usePlugin<RotatePlugin>(RotatePlugin.id);\nexport const useRotateCapability = () => useCapability<RotatePlugin>(RotatePlugin.id);\n","import { ReactNode, HTMLAttributes, CSSProperties } from '@framework';\nimport { Size } from '@embedpdf/models';\n\nimport { useRotateCapability } from '../hooks';\n\ntype RotateProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {\n children: ReactNode;\n pageSize: Size;\n style?: CSSProperties;\n};\n\nexport function Rotate({ children, pageSize, style, ...props }: RotateProps) {\n const { provides: rotate } = useRotateCapability();\n const matrix =\n (rotate?.getMatrix({\n w: pageSize.width,\n h: pageSize.height,\n }) as string) || 'matrix(1, 0, 0, 1, 0, 0)';\n\n return (\n <div\n {...props}\n style={{\n position: 'absolute',\n transformOrigin: '0 0',\n transform: matrix,\n ...style,\n }}\n >\n {children}\n </div>\n );\n}\n"],"names":[],"mappings":";;;;AAGO,MAAM,kBAAkB,MAAM,UAAwB,aAAa,EAAE;AACrE,MAAM,sBAAsB,MAAM,cAA4B,aAAa,EAAE;ACO7E,SAAS,OAAO,EAAE,UAAU,UAAU,OAAO,GAAG,SAAsB;AAC3E,QAAM,EAAE,UAAU,OAAO,IAAI,oBAAoB;AAC3C,QAAA,UACH,iCAAQ,UAAU;AAAA,IACjB,GAAG,SAAS;AAAA,IACZ,GAAG,SAAS;AAAA,EACb,OAAgB;AAGjB,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ,OAAO;AAAA,QACL,UAAU;AAAA,QACV,iBAAiB;AAAA,QACjB,WAAW;AAAA,QACX,GAAG;AAAA,MACL;AAAA,MAEC;AAAA,IAAA;AAAA,EACH;AAEJ;"}
@@ -1,6 +1,6 @@
1
1
  import { ReactNode, HTMLAttributes, CSSProperties } from '../../preact/adapter.ts';
2
2
  import { Size } from '@embedpdf/models';
3
- type RotateProps = Omit<HTMLAttributes<HTMLImageElement>, 'style'> & {
3
+ type RotateProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
4
4
  children: ReactNode;
5
5
  pageSize: Size;
6
6
  style?: CSSProperties;
@@ -1,6 +1,6 @@
1
1
  import { ReactNode, HTMLAttributes, CSSProperties } from '../../react/adapter.ts';
2
2
  import { Size } from '@embedpdf/models';
3
- type RotateProps = Omit<HTMLAttributes<HTMLImageElement>, 'style'> & {
3
+ type RotateProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
4
4
  children: ReactNode;
5
5
  pageSize: Size;
6
6
  style?: CSSProperties;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embedpdf/plugin-rotate",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -28,20 +28,20 @@
28
28
  }
29
29
  },
30
30
  "dependencies": {
31
- "@embedpdf/models": "1.0.22"
31
+ "@embedpdf/models": "1.0.24"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/react": "^18.2.0",
35
35
  "typescript": "^5.0.0",
36
- "@embedpdf/build": "1.0.0",
37
- "@embedpdf/core": "1.0.22"
36
+ "@embedpdf/core": "1.0.24",
37
+ "@embedpdf/build": "1.0.0"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "preact": "^10.26.4",
41
41
  "react": ">=16.8.0",
42
42
  "react-dom": ">=16.8.0",
43
43
  "vue": ">=3.2.0",
44
- "@embedpdf/core": "1.0.22"
44
+ "@embedpdf/core": "1.0.24"
45
45
  },
46
46
  "files": [
47
47
  "dist",