@embedpdf/plugin-rotate 1.0.19 → 1.0.21
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/dist/preact/adapter.d.ts +1 -0
- package/dist/preact/index.cjs +1 -1
- package/dist/preact/index.cjs.map +1 -1
- package/dist/preact/index.js +4 -2
- package/dist/preact/index.js.map +1 -1
- package/dist/react/adapter.d.ts +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +4 -2
- package/dist/react/index.js.map +1 -1
- package/dist/shared-preact/components/rotate.d.ts +4 -3
- package/dist/shared-preact/index.d.ts +1 -0
- package/dist/shared-react/components/rotate.d.ts +4 -3
- package/dist/shared-react/index.d.ts +1 -0
- package/dist/vue/index.cjs +1 -1
- package/dist/vue/index.d.ts +1 -0
- package/dist/vue/index.js +1 -0
- package/dist/vue/index.js.map +1 -1
- package/package.json +5 -5
package/dist/preact/adapter.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { Fragment } from 'preact';
|
|
2
2
|
export { useEffect, useRef, useState } from 'preact/hooks';
|
|
3
3
|
export type { ComponentChildren as ReactNode } from 'preact';
|
|
4
|
+
export type CSSProperties = import('preact').JSX.CSSProperties;
|
|
4
5
|
export type HTMLAttributes<T = any> = import('preact').JSX.HTMLAttributes<T extends EventTarget ? T : never>;
|
package/dist/preact/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@embedpdf/core/preact"),t=require("@embedpdf/plugin-rotate"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@embedpdf/core/preact"),t=require("@embedpdf/plugin-rotate"),r=require("preact/jsx-runtime"),i=()=>e.useCapability(t.RotatePlugin.id);exports.Rotate=function({children:e,pageSize:t,style:o,...a}){const{provides:s}=i(),n=(null==s?void 0:s.getMatrix({w:t.width,h:t.height}))||"matrix(1, 0, 0, 1, 0, 0)";return r.jsx("div",{...a,style:{position:"absolute",transformOrigin:"0 0",transform:n,...o},children:e})},exports.useRotateCapability=i,exports.useRotatePlugin=()=>e.usePlugin(t.RotatePlugin.id),Object.keys(t).forEach((e=>{"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})}));
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -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 } from '@framework';\nimport { Size } from '@embedpdf/models';\n\nimport { useRotateCapability } from '../hooks';\n\ntype RotateProps = HTMLAttributes<
|
|
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"}
|
package/dist/preact/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { usePlugin, useCapability } from "@embedpdf/core/preact";
|
|
2
2
|
import { RotatePlugin } from "@embedpdf/plugin-rotate";
|
|
3
|
+
export * from "@embedpdf/plugin-rotate";
|
|
3
4
|
import { jsx } from "preact/jsx-runtime";
|
|
4
5
|
const useRotatePlugin = () => usePlugin(RotatePlugin.id);
|
|
5
6
|
const useRotateCapability = () => useCapability(RotatePlugin.id);
|
|
6
|
-
function Rotate({ children, pageSize, ...props }) {
|
|
7
|
+
function Rotate({ children, pageSize, style, ...props }) {
|
|
7
8
|
const { provides: rotate } = useRotateCapability();
|
|
8
9
|
const matrix = (rotate == null ? void 0 : rotate.getMatrix({
|
|
9
10
|
w: pageSize.width,
|
|
@@ -16,7 +17,8 @@ function Rotate({ children, pageSize, ...props }) {
|
|
|
16
17
|
style: {
|
|
17
18
|
position: "absolute",
|
|
18
19
|
transformOrigin: "0 0",
|
|
19
|
-
transform: matrix
|
|
20
|
+
transform: matrix,
|
|
21
|
+
...style
|
|
20
22
|
},
|
|
21
23
|
children
|
|
22
24
|
}
|
package/dist/preact/index.js.map
CHANGED
|
@@ -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 } from '@framework';\nimport { Size } from '@embedpdf/models';\n\nimport { useRotateCapability } from '../hooks';\n\ntype RotateProps = HTMLAttributes<
|
|
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;"}
|
package/dist/react/adapter.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Fragment, useEffect, useRef, useState } from 'react';
|
|
2
|
-
export type { ReactNode, HTMLAttributes } from 'react';
|
|
2
|
+
export type { ReactNode, HTMLAttributes, CSSProperties } from 'react';
|
package/dist/react/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@embedpdf/core/react"),t=require("@embedpdf/plugin-rotate"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@embedpdf/core/react"),t=require("@embedpdf/plugin-rotate"),r=require("react/jsx-runtime"),i=()=>e.useCapability(t.RotatePlugin.id);exports.Rotate=function({children:e,pageSize:t,style:o,...a}){const{provides:s}=i(),n=(null==s?void 0:s.getMatrix({w:t.width,h:t.height}))||"matrix(1, 0, 0, 1, 0, 0)";return r.jsx("div",{...a,style:{position:"absolute",transformOrigin:"0 0",transform:n,...o},children:e})},exports.useRotateCapability=i,exports.useRotatePlugin=()=>e.usePlugin(t.RotatePlugin.id),Object.keys(t).forEach((e=>{"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})}));
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/react/index.cjs.map
CHANGED
|
@@ -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 } from '@framework';\nimport { Size } from '@embedpdf/models';\n\nimport { useRotateCapability } from '../hooks';\n\ntype RotateProps = HTMLAttributes<
|
|
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"}
|
package/dist/react/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { usePlugin, useCapability } from "@embedpdf/core/react";
|
|
2
2
|
import { RotatePlugin } from "@embedpdf/plugin-rotate";
|
|
3
|
+
export * from "@embedpdf/plugin-rotate";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
const useRotatePlugin = () => usePlugin(RotatePlugin.id);
|
|
5
6
|
const useRotateCapability = () => useCapability(RotatePlugin.id);
|
|
6
|
-
function Rotate({ children, pageSize, ...props }) {
|
|
7
|
+
function Rotate({ children, pageSize, style, ...props }) {
|
|
7
8
|
const { provides: rotate } = useRotateCapability();
|
|
8
9
|
const matrix = (rotate == null ? void 0 : rotate.getMatrix({
|
|
9
10
|
w: pageSize.width,
|
|
@@ -16,7 +17,8 @@ function Rotate({ children, pageSize, ...props }) {
|
|
|
16
17
|
style: {
|
|
17
18
|
position: "absolute",
|
|
18
19
|
transformOrigin: "0 0",
|
|
19
|
-
transform: matrix
|
|
20
|
+
transform: matrix,
|
|
21
|
+
...style
|
|
20
22
|
},
|
|
21
23
|
children
|
|
22
24
|
}
|
package/dist/react/index.js.map
CHANGED
|
@@ -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 } from '@framework';\nimport { Size } from '@embedpdf/models';\n\nimport { useRotateCapability } from '../hooks';\n\ntype RotateProps = HTMLAttributes<
|
|
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,8 +1,9 @@
|
|
|
1
|
-
import { ReactNode, HTMLAttributes } from '../../preact/adapter.ts';
|
|
1
|
+
import { ReactNode, HTMLAttributes, CSSProperties } from '../../preact/adapter.ts';
|
|
2
2
|
import { Size } from '@embedpdf/models';
|
|
3
|
-
type RotateProps = HTMLAttributes<
|
|
3
|
+
type RotateProps = Omit<HTMLAttributes<HTMLImageElement>, 'style'> & {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
pageSize: Size;
|
|
6
|
+
style?: CSSProperties;
|
|
6
7
|
};
|
|
7
|
-
export declare function Rotate({ children, pageSize, ...props }: RotateProps): import("preact").JSX.Element;
|
|
8
|
+
export declare function Rotate({ children, pageSize, style, ...props }: RotateProps): import("preact").JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ReactNode, HTMLAttributes } from '../../react/adapter.ts';
|
|
1
|
+
import { ReactNode, HTMLAttributes, CSSProperties } from '../../react/adapter.ts';
|
|
2
2
|
import { Size } from '@embedpdf/models';
|
|
3
|
-
type RotateProps = HTMLAttributes<
|
|
3
|
+
type RotateProps = Omit<HTMLAttributes<HTMLImageElement>, 'style'> & {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
pageSize: Size;
|
|
6
|
+
style?: CSSProperties;
|
|
6
7
|
};
|
|
7
|
-
export declare function Rotate({ children, pageSize, ...props }: RotateProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function Rotate({ children, pageSize, style, ...props }: RotateProps): import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
package/dist/vue/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@embedpdf/core/vue"),t=require("@embedpdf/plugin-rotate"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@embedpdf/core/vue"),t=require("@embedpdf/plugin-rotate"),r=require("vue"),o=()=>e.useCapability(t.RotatePlugin.id),a=r.defineComponent({__name:"rotate",props:{pageSize:{}},setup(e){const t=e,{provides:a}=o(),i=r.computed((()=>a.value?a.value.getMatrix({w:t.pageSize.width,h:t.pageSize.height,asString:!0}):"matrix(1, 0, 0, 1, 0, 0)"));return(e,t)=>(r.openBlock(),r.createElementBlock("div",{style:r.normalizeStyle({position:"absolute",transformOrigin:"0 0",transform:i.value})},[r.renderSlot(e.$slots,"default")],4))}});exports.Rotate=a,exports.useRotateCapability=o,exports.useRotatePlugin=()=>e.usePlugin(t.RotatePlugin.id),Object.keys(t).forEach((e=>{"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})}));
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/vue/index.d.ts
CHANGED
package/dist/vue/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { usePlugin, useCapability } from "@embedpdf/core/vue";
|
|
2
2
|
import { RotatePlugin } from "@embedpdf/plugin-rotate";
|
|
3
|
+
export * from "@embedpdf/plugin-rotate";
|
|
3
4
|
import { defineComponent, computed, createElementBlock, openBlock, normalizeStyle, renderSlot } from "vue";
|
|
4
5
|
const useRotatePlugin = () => usePlugin(RotatePlugin.id);
|
|
5
6
|
const useRotateCapability = () => useCapability(RotatePlugin.id);
|
package/dist/vue/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/vue/hooks/use-rotate.ts","../../src/vue/components/rotate.vue"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/vue';\nimport { RotatePlugin } from '@embedpdf/plugin-rotate';\n\n/**\n * Hook to get the raw rotate plugin instance.\n */\nexport const useRotatePlugin = () => usePlugin<RotatePlugin>(RotatePlugin.id);\n\n/**\n * Hook to get the rotate plugin's capability API.\n * This provides methods for rotating the document.\n */\nexport const useRotateCapability = () => useCapability<RotatePlugin>(RotatePlugin.id);\n","<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport type { Size } from '@embedpdf/models';\nimport { useRotateCapability } from '../hooks';\n\ninterface Props {\n pageSize: Size;\n}\n\nconst props = defineProps<Props>();\n\nconst { provides: rotate } = useRotateCapability();\n\nconst transformMatrix = computed(() => {\n // If the capability is not yet available, return an identity matrix.\n if (!rotate.value) {\n return 'matrix(1, 0, 0, 1, 0, 0)';\n }\n\n // Get the CSS transform matrix string from the capability.\n return rotate.value.getMatrix({\n w: props.pageSize.width,\n h: props.pageSize.height,\n asString: true,\n }) as string;\n});\n</script>\n\n<template>\n <div\n :style=\"{\n position: 'absolute',\n transformOrigin: '0 0',\n transform: transformMatrix,\n }\"\n >\n <slot />\n </div>\n</template>\n"],"names":["_createElementBlock","_normalizeStyle","_renderSlot"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/vue/hooks/use-rotate.ts","../../src/vue/components/rotate.vue"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/vue';\nimport { RotatePlugin } from '@embedpdf/plugin-rotate';\n\n/**\n * Hook to get the raw rotate plugin instance.\n */\nexport const useRotatePlugin = () => usePlugin<RotatePlugin>(RotatePlugin.id);\n\n/**\n * Hook to get the rotate plugin's capability API.\n * This provides methods for rotating the document.\n */\nexport const useRotateCapability = () => useCapability<RotatePlugin>(RotatePlugin.id);\n","<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport type { Size } from '@embedpdf/models';\nimport { useRotateCapability } from '../hooks';\n\ninterface Props {\n pageSize: Size;\n}\n\nconst props = defineProps<Props>();\n\nconst { provides: rotate } = useRotateCapability();\n\nconst transformMatrix = computed(() => {\n // If the capability is not yet available, return an identity matrix.\n if (!rotate.value) {\n return 'matrix(1, 0, 0, 1, 0, 0)';\n }\n\n // Get the CSS transform matrix string from the capability.\n return rotate.value.getMatrix({\n w: props.pageSize.width,\n h: props.pageSize.height,\n asString: true,\n }) as string;\n});\n</script>\n\n<template>\n <div\n :style=\"{\n position: 'absolute',\n transformOrigin: '0 0',\n transform: transformMatrix,\n }\"\n >\n <slot />\n </div>\n</template>\n"],"names":["_createElementBlock","_normalizeStyle","_renderSlot"],"mappings":";;;;AAMO,MAAM,kBAAkB,MAAM,UAAwB,aAAa,EAAE;AAMrE,MAAM,sBAAsB,MAAM,cAA4B,aAAa,EAAE;;;;;;;ACHpF,UAAM,QAAQ;AAEd,UAAM,EAAE,UAAU,OAAO,IAAI,oBAAoB;AAE3C,UAAA,kBAAkB,SAAS,MAAM;AAEjC,UAAA,CAAC,OAAO,OAAO;AACV,eAAA;AAAA,MAAA;AAIF,aAAA,OAAO,MAAM,UAAU;AAAA,QAC5B,GAAG,MAAM,SAAS;AAAA,QAClB,GAAG,MAAM,SAAS;AAAA,QAClB,UAAU;AAAA,MAAA,CACX;AAAA,IAAA,CACF;;0BAICA,mBAQM,OAAA;AAAA,QAPH,OAAKC,eAAA;AAAA;;qBAA+E,gBAAe;AAAA;;QAMpGC,WAAQ,KAAA,QAAA,SAAA;AAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@embedpdf/plugin-rotate",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.21",
|
|
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.
|
|
31
|
+
"@embedpdf/models": "1.0.21"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/react": "^18.2.0",
|
|
35
35
|
"typescript": "^5.0.0",
|
|
36
|
-
"@embedpdf/
|
|
37
|
-
"@embedpdf/
|
|
36
|
+
"@embedpdf/core": "1.0.21",
|
|
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.
|
|
44
|
+
"@embedpdf/core": "1.0.21"
|
|
45
45
|
},
|
|
46
46
|
"files": [
|
|
47
47
|
"dist",
|