vue-canvas-frame-headless 4.3.1 → 4.3.3
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/index.d.ts +1 -9
- package/dist/index.js +4 -8
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ComputedRef, MaybeRefOrGetter, Ref } from "vue";
|
|
2
|
-
//#region src/composables/useCanvasFrame.d.ts
|
|
3
2
|
export declare const useCanvasFrame: ({ css, fill, frame, pane, width }: {
|
|
4
3
|
css: MaybeRefOrGetter<string>;
|
|
5
4
|
fill?: MaybeRefOrGetter<boolean>;
|
|
@@ -11,13 +10,6 @@ export declare const useCanvasFrame: ({ css, fill, frame, pane, width }: {
|
|
|
11
10
|
frameStyle: ComputedRef<Record<string, string>>;
|
|
12
11
|
loaded: Promise<void>;
|
|
13
12
|
};
|
|
14
|
-
//#endregion
|
|
15
|
-
//#region src/services/constants.d.ts
|
|
16
13
|
export declare const CANVAS_FRAME_SRCDOC = "<!doctype html><html><head></head><body></body></html>";
|
|
17
|
-
//#endregion
|
|
18
|
-
//#region src/services/getFrameScale.d.ts
|
|
19
14
|
export declare const getFrameScale: (paneWidth: number, frameWidth: number) => number;
|
|
20
|
-
|
|
21
|
-
//#region src/services/getFrameWidth.d.ts
|
|
22
|
-
export declare const getFrameWidth: (width: number, fill: boolean, paneWidth: number) => number;
|
|
23
|
-
//#endregion
|
|
15
|
+
export declare const getFrameWidth: (width: number, fill: boolean, paneWidth: number) => number;
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { computed, onMounted, onScopeDispose, shallowRef, toValue, watch } from "vue";
|
|
2
|
-
|
|
2
|
+
// src/services/getFrameScale.ts
|
|
3
3
|
const getFrameScale = (paneWidth, frameWidth) => paneWidth > 0 ? Math.min(1, paneWidth / frameWidth) : 1;
|
|
4
|
-
|
|
5
|
-
//#region src/services/getFrameWidth.ts
|
|
4
|
+
// src/services/getFrameWidth.ts
|
|
6
5
|
const getFrameWidth = (width, fill, paneWidth) => fill ? Math.max(paneWidth, width) : width;
|
|
7
|
-
|
|
8
|
-
//#region src/composables/useCanvasFrame.ts
|
|
6
|
+
// src/composables/useCanvasFrame.ts
|
|
9
7
|
const useCanvasFrame = ({ css, fill, frame, pane, width }) => {
|
|
10
8
|
const { promise: loaded, resolve: resolveLoaded } = Promise.withResolvers();
|
|
11
9
|
const frameDocument = shallowRef();
|
|
@@ -64,8 +62,6 @@ const useCanvasFrame = ({ css, fill, frame, pane, width }) => {
|
|
|
64
62
|
loaded
|
|
65
63
|
};
|
|
66
64
|
};
|
|
67
|
-
|
|
68
|
-
//#region src/services/constants.ts
|
|
65
|
+
// src/services/constants.ts
|
|
69
66
|
const CANVAS_FRAME_SRCDOC = "<!doctype html><html><head></head><body></body></html>";
|
|
70
|
-
//#endregion
|
|
71
67
|
export { CANVAS_FRAME_SRCDOC, getFrameScale, getFrameWidth, useCanvasFrame };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-canvas-frame-headless",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.3",
|
|
4
4
|
"description": "A headless canvas frame: an isolated document at a width, scaled down to fit a narrower pane, with its styles adopted into it, and no styling of its own.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"headless",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"typecheck": "tsc"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@esposter/configuration": "4.3.
|
|
46
|
+
"@esposter/configuration": "4.3.3",
|
|
47
47
|
"@vue/test-utils": "^2.5.1",
|
|
48
48
|
"happy-dom": "^21.0.4",
|
|
49
49
|
"tsdown": "^0.23.1"
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"vue": "^3.5.44"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "955bbc130ad9b28877fd4ae8efc73a045141ce01"
|
|
55
55
|
}
|