dynim-vue 1.0.2 → 1.0.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/DynimProvider.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* - Visual builder UI (when user has edit permissions)
|
|
7
7
|
* - Shared context for bundles to access Vue, packages, etc.
|
|
8
8
|
*/
|
|
9
|
-
import { type InjectionKey, type PropType
|
|
9
|
+
import { type InjectionKey, type PropType } from 'vue';
|
|
10
10
|
import * as Vue from 'vue';
|
|
11
11
|
import type { CodeMessage } from 'dynim-core';
|
|
12
12
|
export interface DynimConfig {
|
|
@@ -44,7 +44,7 @@ export interface DynimContextValue {
|
|
|
44
44
|
/** Whether bundle is loading */
|
|
45
45
|
isBundleLoading: boolean;
|
|
46
46
|
}
|
|
47
|
-
export declare const DynimInjectionKey: InjectionKey<
|
|
47
|
+
export declare const DynimInjectionKey: InjectionKey<DynimContextValue>;
|
|
48
48
|
/**
|
|
49
49
|
* DynimProvider - Wrap your app with this to enable Dynim functionality
|
|
50
50
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DynimProvider.d.ts","sourceRoot":"","sources":["../src/DynimProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAWL,KAAK,YAAY,EACjB,KAAK,QAAQ,
|
|
1
|
+
{"version":3,"file":"DynimProvider.d.ts","sourceRoot":"","sources":["../src/DynimProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAWL,KAAK,YAAY,EACjB,KAAK,QAAQ,EAEd,MAAM,KAAK,CAAC;AACb,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAS3B,OAAO,KAAK,EAIV,WAAW,EAEZ,MAAM,YAAY,CAAC;AAIpB,MAAM,WAAW,WAAW;IAC1B,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,OAAO,CAAC;QAAE,KAAK,EAA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
|
package/dist/DynimProvider.js
CHANGED
|
@@ -335,8 +335,12 @@ export const DynimProvider = defineComponent({
|
|
|
335
335
|
loadBundleRef?.(bundleUrl);
|
|
336
336
|
pendingBundleProjectIdRef = null;
|
|
337
337
|
});
|
|
338
|
-
// Provide context
|
|
339
|
-
provide(DynimInjectionKey, contextValue);
|
|
338
|
+
// Provide context
|
|
339
|
+
provide(DynimInjectionKey, contextValue.value);
|
|
340
|
+
// Watch for context value changes and update provided value
|
|
341
|
+
watch(contextValue, (newValue) => {
|
|
342
|
+
provide(DynimInjectionKey, newValue);
|
|
343
|
+
});
|
|
340
344
|
// Render function
|
|
341
345
|
return () => {
|
|
342
346
|
// Render content
|
|
@@ -377,5 +381,5 @@ export function useDynim() {
|
|
|
377
381
|
if (!context) {
|
|
378
382
|
throw new Error('useDynim must be used within a DynimProvider');
|
|
379
383
|
}
|
|
380
|
-
return context
|
|
384
|
+
return context;
|
|
381
385
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dynim-vue",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"dev": "tsc --watch"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"dynim-core": "^1.0.
|
|
30
|
+
"dynim-core": "^1.0.28"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"vue": ">=3.3.0",
|