@web-widget/vue 1.18.0 → 1.20.0
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/vite.cjs +6 -5
- package/dist/vite.d.cts +3 -3
- package/dist/vite.d.ts +3 -3
- package/dist/vite.js +6 -5
- package/dist/vue.client.d.ts +4 -7
- package/dist/vue.server.d.ts +4 -7
- package/package.json +5 -5
package/dist/vite.cjs
CHANGED
|
@@ -40,11 +40,12 @@ module.exports = __toCommonJS(vite_exports);
|
|
|
40
40
|
var import_vite_plugin = require("@web-widget/vite-plugin");
|
|
41
41
|
var VUE_INTERNAL_REQUEST = /\.vue\?vue\b.*$/;
|
|
42
42
|
var VUE_INTERNAL_SCRIPT_REQUEST = /\.vue\?vue&type=script\b.*$/;
|
|
43
|
-
function vueWebWidgetPlugin({
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
function vueWebWidgetPlugin(options) {
|
|
44
|
+
const {
|
|
45
|
+
provide = "@web-widget/vue",
|
|
46
|
+
export: exportWidget = {},
|
|
47
|
+
import: importWidget = {}
|
|
48
|
+
} = options != null ? options : {};
|
|
48
49
|
const route = /(?:\.|@)route\.vue(?:\?.*)?$/;
|
|
49
50
|
const widget = /(?:\.|@)widget\.vue(?:\?.*)?$/;
|
|
50
51
|
return (0, import_vite_plugin.webWidgetPlugin)({
|
package/dist/vite.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Plugin } from 'vite';
|
|
2
|
-
import {
|
|
2
|
+
import { WebWidgetUserConfig } from '@web-widget/vite-plugin';
|
|
3
3
|
|
|
4
|
-
interface VueWebWidgetPluginOptions extends
|
|
4
|
+
interface VueWebWidgetPluginOptions extends WebWidgetUserConfig {
|
|
5
5
|
}
|
|
6
|
-
declare function vueWebWidgetPlugin(
|
|
6
|
+
declare function vueWebWidgetPlugin(options?: VueWebWidgetPluginOptions): Plugin[];
|
|
7
7
|
|
|
8
8
|
export { type VueWebWidgetPluginOptions, vueWebWidgetPlugin as default };
|
package/dist/vite.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Plugin } from 'vite';
|
|
2
|
-
import {
|
|
2
|
+
import { WebWidgetUserConfig } from '@web-widget/vite-plugin';
|
|
3
3
|
|
|
4
|
-
interface VueWebWidgetPluginOptions extends
|
|
4
|
+
interface VueWebWidgetPluginOptions extends WebWidgetUserConfig {
|
|
5
5
|
}
|
|
6
|
-
declare function vueWebWidgetPlugin(
|
|
6
|
+
declare function vueWebWidgetPlugin(options?: VueWebWidgetPluginOptions): Plugin[];
|
|
7
7
|
|
|
8
8
|
export { type VueWebWidgetPluginOptions, vueWebWidgetPlugin as default };
|
package/dist/vite.js
CHANGED
|
@@ -19,11 +19,12 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
import { webWidgetPlugin } from "@web-widget/vite-plugin";
|
|
20
20
|
var VUE_INTERNAL_REQUEST = /\.vue\?vue\b.*$/;
|
|
21
21
|
var VUE_INTERNAL_SCRIPT_REQUEST = /\.vue\?vue&type=script\b.*$/;
|
|
22
|
-
function vueWebWidgetPlugin({
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
function vueWebWidgetPlugin(options) {
|
|
23
|
+
const {
|
|
24
|
+
provide = "@web-widget/vue",
|
|
25
|
+
export: exportWidget = {},
|
|
26
|
+
import: importWidget = {}
|
|
27
|
+
} = options != null ? options : {};
|
|
27
28
|
const route = /(?:\.|@)route\.vue(?:\?.*)?$/;
|
|
28
29
|
const widget = /(?:\.|@)widget\.vue(?:\?.*)?$/;
|
|
29
30
|
return webWidgetPlugin({
|
package/dist/vue.client.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _web_widget_schema from '@web-widget/schema';
|
|
2
2
|
import * as vue from 'vue';
|
|
3
3
|
import { PropType, VNode, App, Component } from 'vue';
|
|
4
|
-
import { RenderContext, ComponentProps } from '@web-widget/helpers';
|
|
4
|
+
import { RenderContext, ComponentProps, SerializableValue } from '@web-widget/helpers';
|
|
5
5
|
export * from '@web-widget/helpers';
|
|
6
6
|
export { useWidgetAsyncState as useWidgetState } from '@web-widget/helpers/state';
|
|
7
7
|
import { WebWidgetRendererOptions, Loader } from '@web-widget/web-widget';
|
|
@@ -58,16 +58,13 @@ declare function defineWebWidget(loader: Loader, options: DefineWebWidgetOptions
|
|
|
58
58
|
experimental_renderTarget: "light" | "shadow" | undefined;
|
|
59
59
|
}, {}>;
|
|
60
60
|
|
|
61
|
-
type
|
|
62
|
-
[key: string]:
|
|
63
|
-
} | JSONValue[];
|
|
64
|
-
type JSONProps = {
|
|
65
|
-
[key: string]: JSONValue;
|
|
61
|
+
type SerializableObject = {
|
|
62
|
+
[key: string]: SerializableValue;
|
|
66
63
|
};
|
|
67
64
|
interface CreateVueRenderOptions {
|
|
68
65
|
onCreatedApp?: (app: App<Element>, context: RenderContext, component: Component, props: ComponentProps) => Promise<void>;
|
|
69
66
|
/**@deprecated*/
|
|
70
|
-
onPrefetchData?: (context: RenderContext, component: Component, props: ComponentProps) => Promise<
|
|
67
|
+
onPrefetchData?: (context: RenderContext, component: Component, props: ComponentProps) => Promise<SerializableObject>;
|
|
71
68
|
}
|
|
72
69
|
|
|
73
70
|
declare const createVueRender: ({ onCreatedApp, onPrefetchData, }?: CreateVueRenderOptions) => (context: _web_widget_schema.RouteRenderContext<unknown, Record<string, string>> | _web_widget_schema.WidgetRenderContext<unknown>, renderOptions: _web_widget_schema.WidgetRenderOptions | _web_widget_schema.RouteRenderOptions) => Promise<string | void | ReadableStream<any> | {
|
package/dist/vue.server.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _web_widget_schema from '@web-widget/schema';
|
|
|
2
2
|
import { SSRContext } from 'vue/server-renderer';
|
|
3
3
|
import * as vue from 'vue';
|
|
4
4
|
import { PropType, VNode, App, Component } from 'vue';
|
|
5
|
-
import { RenderContext, ComponentProps } from '@web-widget/helpers';
|
|
5
|
+
import { RenderContext, ComponentProps, SerializableValue } from '@web-widget/helpers';
|
|
6
6
|
export * from '@web-widget/helpers';
|
|
7
7
|
export { useWidgetAsyncState as useWidgetState } from '@web-widget/helpers/state';
|
|
8
8
|
import { WebWidgetRendererOptions, Loader } from '@web-widget/web-widget';
|
|
@@ -59,16 +59,13 @@ declare function defineWebWidget(loader: Loader, options: DefineWebWidgetOptions
|
|
|
59
59
|
experimental_renderTarget: "light" | "shadow" | undefined;
|
|
60
60
|
}, {}>;
|
|
61
61
|
|
|
62
|
-
type
|
|
63
|
-
[key: string]:
|
|
64
|
-
} | JSONValue[];
|
|
65
|
-
type JSONProps = {
|
|
66
|
-
[key: string]: JSONValue;
|
|
62
|
+
type SerializableObject = {
|
|
63
|
+
[key: string]: SerializableValue;
|
|
67
64
|
};
|
|
68
65
|
interface CreateVueRenderOptions {
|
|
69
66
|
onCreatedApp?: (app: App<Element>, context: RenderContext, component: Component, props: ComponentProps) => Promise<void>;
|
|
70
67
|
/**@deprecated*/
|
|
71
|
-
onPrefetchData?: (context: RenderContext, component: Component, props: ComponentProps) => Promise<
|
|
68
|
+
onPrefetchData?: (context: RenderContext, component: Component, props: ComponentProps) => Promise<SerializableObject>;
|
|
72
69
|
}
|
|
73
70
|
|
|
74
71
|
declare module '@web-widget/schema' {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@web-widget/vue",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.20.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -27,16 +27,16 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@web-widget/vite-plugin": "1.
|
|
31
|
-
"@web-widget/helpers": "1.
|
|
32
|
-
"@web-widget/web-widget": "1.
|
|
30
|
+
"@web-widget/vite-plugin": "1.20.0",
|
|
31
|
+
"@web-widget/helpers": "1.20.0",
|
|
32
|
+
"@web-widget/web-widget": "1.20.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"tsup": "^8.0.1",
|
|
36
36
|
"typescript": "latest",
|
|
37
37
|
"vite": "^5.0.13",
|
|
38
38
|
"vue": ">3.3.3",
|
|
39
|
-
"@web-widget/schema": "1.
|
|
39
|
+
"@web-widget/schema": "1.20.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"vite": "^5.0.13",
|