@bluepic/embed 0.6.49 → 0.6.50
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/bluepic-embed.iife.js +4 -4
- package/dist/bluepic-embed.umd.js +4 -4
- package/dist/main.cjs +4 -4
- package/dist/main.mjs +24 -19
- package/dist/style.css +1 -1
- package/dist/util/slotVNodes.d.ts +13 -1
- package/package.json +3 -2
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
import { VNode } from 'vue';
|
|
2
|
-
|
|
2
|
+
type SlotFn = (...args: any[]) => VNode[] | VNode;
|
|
3
|
+
/**
|
|
4
|
+
* Renders a slot (usually `trigger`) as a list of VNodes and collects the DOM
|
|
5
|
+
* elements they mount to.
|
|
6
|
+
*
|
|
7
|
+
* Takes a GETTER for the slot, not the slot itself: when the parent re-renders,
|
|
8
|
+
* Vue swaps in a new slot function on `slots`, and a function captured at setup
|
|
9
|
+
* keeps rendering the old closure forever. That froze trigger contents (labels,
|
|
10
|
+
* click handlers of v-for items). `onBeforeUpdate` dirties the VNode list so
|
|
11
|
+
* every render of the owner calls the current slot function.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useSlotVNodes(getSlot: () => SlotFn | undefined): {
|
|
3
14
|
setSlotRef: (index: number) => (vnode: any) => void;
|
|
4
15
|
slotElements: import("vue").Ref<Node[], Node[]>;
|
|
5
16
|
vNodes: import("vue").ComputedRef<VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
6
17
|
[key: string]: any;
|
|
7
18
|
}>[]>;
|
|
8
19
|
};
|
|
20
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bluepic/embed",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.50",
|
|
4
4
|
"description": "Bluepic embed sdk",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -46,7 +46,8 @@
|
|
|
46
46
|
"test:imagestates": "tsx src/util/imageStates/imageStates.test.ts",
|
|
47
47
|
"test:imageaspect": "tsx src/util/imageAspect/imageAspect.test.ts",
|
|
48
48
|
"test:blankdata": "tsx src/util/blankData.test.ts",
|
|
49
|
-
"test:fieldstatus": "tsx src/util/fieldStatus.test.ts"
|
|
49
|
+
"test:fieldstatus": "tsx src/util/fieldStatus.test.ts",
|
|
50
|
+
"test:slotvnodes": "tsx src/util/slotVNodes.test.ts"
|
|
50
51
|
},
|
|
51
52
|
"peerDependencies": {
|
|
52
53
|
"vue": "^3.5.23"
|