dtwo 3.1.0 → 3.1.2
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/LICENSE +1 -1
- package/dist/app/compat/idle-callback.mjs +4 -2
- package/dist/app/composables/ready.mjs +3 -0
- package/dist/app/types/augments.d.ts +1 -1
- package/dist/core/runtime/hole/renderer.mjs +1 -1
- package/dist/head/runtime/components.d.ts +8 -8
- package/dist/index.mjs +29 -16
- package/dist/pages/runtime/page.d.ts +44 -15
- package/dist/pages/runtime/plugins/router.d.ts +0 -6
- package/package.json +18 -18
- package/types.d.ts +1 -1
package/LICENSE
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export const requestIdleCallback = process.server ?
|
|
1
|
+
export const requestIdleCallback = process.server ? () => {
|
|
2
|
+
} : globalThis.requestIdleCallback || ((cb) => {
|
|
2
3
|
const start = Date.now();
|
|
3
4
|
const idleDeadline = {
|
|
4
5
|
didTimeout: false,
|
|
@@ -8,6 +9,7 @@ export const requestIdleCallback = process.server ? void 0 : globalThis.requestI
|
|
|
8
9
|
cb(idleDeadline);
|
|
9
10
|
}, 1);
|
|
10
11
|
});
|
|
11
|
-
export const cancelIdleCallback = process.server ?
|
|
12
|
+
export const cancelIdleCallback = process.server ? () => {
|
|
13
|
+
} : globalThis.cancelIdleCallback || ((id) => {
|
|
12
14
|
clearTimeout(id);
|
|
13
15
|
});
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { useDtwoApp } from "../dtwo.mjs";
|
|
2
2
|
import { requestIdleCallback } from "../compat/idle-callback.mjs";
|
|
3
3
|
export const onDtwoReady = (callback) => {
|
|
4
|
+
if (process.server) {
|
|
5
|
+
return;
|
|
6
|
+
}
|
|
4
7
|
const dtwoApp = useDtwoApp();
|
|
5
8
|
if (dtwoApp.isHydrating) {
|
|
6
9
|
dtwoApp.hooks.hookOnce("app:suspense:resolve", () => {
|
|
@@ -13,7 +13,7 @@ globalThis.__publicAssetsURL = publicAssetsURL;
|
|
|
13
13
|
const getClientManifest = () => import("#build/dist/server/client.manifest.mjs").then((r) => r.default || r).then((r) => typeof r === "function" ? r() : r);
|
|
14
14
|
const getStaticRenderedHead = () => import("#head-static").then((r) => r.default || r);
|
|
15
15
|
const getServerEntry = () => import("#build/dist/server/server.mjs").then((r) => r.default || r);
|
|
16
|
-
const getSSRStyles = () => import("#build/dist/server/styles.mjs").then((r) => r.default || r);
|
|
16
|
+
const getSSRStyles = lazyCachedFunction(() => import("#build/dist/server/styles.mjs").then((r) => r.default || r));
|
|
17
17
|
const getSSRRenderer = lazyCachedFunction(async () => {
|
|
18
18
|
const manifest = await getClientManifest();
|
|
19
19
|
if (!manifest) {
|
|
@@ -48,7 +48,7 @@ export declare const NoScript: import("kdu").DefineComponent<{
|
|
|
48
48
|
translate: StringConstructor;
|
|
49
49
|
}, () => import("kdu").KNode<import("kdu").RendererNode, import("kdu").RendererElement, {
|
|
50
50
|
[key: string]: any;
|
|
51
|
-
}>[] | null | undefined, unknown, {}, {}, import("kdu").ComponentOptionsMixin, import("kdu").ComponentOptionsMixin,
|
|
51
|
+
}>[] | null | undefined, unknown, {}, {}, import("kdu").ComponentOptionsMixin, import("kdu").ComponentOptionsMixin, {}, string, import("kdu").KNodeProps & import("kdu").AllowedComponentProps & import("kdu").ComponentCustomProps, Readonly<import("kdu").ExtractPropTypes<{
|
|
52
52
|
title: StringConstructor;
|
|
53
53
|
body: BooleanConstructor;
|
|
54
54
|
renderPriority: (StringConstructor | NumberConstructor)[];
|
|
@@ -172,7 +172,7 @@ export declare const Link: import("kdu").DefineComponent<{
|
|
|
172
172
|
translate: StringConstructor;
|
|
173
173
|
}, () => import("kdu").KNode<import("kdu").RendererNode, import("kdu").RendererElement, {
|
|
174
174
|
[key: string]: any;
|
|
175
|
-
}>[] | null | undefined, unknown, {}, {}, import("kdu").ComponentOptionsMixin, import("kdu").ComponentOptionsMixin,
|
|
175
|
+
}>[] | null | undefined, unknown, {}, {}, import("kdu").ComponentOptionsMixin, import("kdu").ComponentOptionsMixin, {}, string, import("kdu").KNodeProps & import("kdu").AllowedComponentProps & import("kdu").ComponentCustomProps, Readonly<import("kdu").ExtractPropTypes<{
|
|
176
176
|
as: StringConstructor;
|
|
177
177
|
crossorigin: PropType<CrossOrigin>;
|
|
178
178
|
disabled: BooleanConstructor;
|
|
@@ -298,7 +298,7 @@ export declare const Base: import("kdu").DefineComponent<{
|
|
|
298
298
|
translate: StringConstructor;
|
|
299
299
|
}, () => import("kdu").KNode<import("kdu").RendererNode, import("kdu").RendererElement, {
|
|
300
300
|
[key: string]: any;
|
|
301
|
-
}>[] | null | undefined, unknown, {}, {}, import("kdu").ComponentOptionsMixin, import("kdu").ComponentOptionsMixin,
|
|
301
|
+
}>[] | null | undefined, unknown, {}, {}, import("kdu").ComponentOptionsMixin, import("kdu").ComponentOptionsMixin, {}, string, import("kdu").KNodeProps & import("kdu").AllowedComponentProps & import("kdu").ComponentCustomProps, Readonly<import("kdu").ExtractPropTypes<{
|
|
302
302
|
href: StringConstructor;
|
|
303
303
|
target: PropType<Target>;
|
|
304
304
|
accesskey: StringConstructor;
|
|
@@ -355,7 +355,7 @@ export declare const Title: import("kdu").DefineComponent<{
|
|
|
355
355
|
[x: string]: any;
|
|
356
356
|
}, () => import("kdu").KNode<import("kdu").RendererNode, import("kdu").RendererElement, {
|
|
357
357
|
[key: string]: any;
|
|
358
|
-
}>[] | null | undefined, {}, {}, {}, import("kdu").ComponentOptionsMixin, import("kdu").ComponentOptionsMixin,
|
|
358
|
+
}>[] | null | undefined, {}, {}, {}, import("kdu").ComponentOptionsMixin, import("kdu").ComponentOptionsMixin, {}, string, import("kdu").KNodeProps & import("kdu").AllowedComponentProps & import("kdu").ComponentCustomProps, Readonly<import("kdu").ExtractPropTypes<{
|
|
359
359
|
[x: string]: any;
|
|
360
360
|
}>>, {
|
|
361
361
|
[x: string]: any;
|
|
@@ -412,7 +412,7 @@ export declare const Meta: import("kdu").DefineComponent<{
|
|
|
412
412
|
translate: StringConstructor;
|
|
413
413
|
}, () => import("kdu").KNode<import("kdu").RendererNode, import("kdu").RendererElement, {
|
|
414
414
|
[key: string]: any;
|
|
415
|
-
}>[] | null | undefined, unknown, {}, {}, import("kdu").ComponentOptionsMixin, import("kdu").ComponentOptionsMixin,
|
|
415
|
+
}>[] | null | undefined, unknown, {}, {}, import("kdu").ComponentOptionsMixin, import("kdu").ComponentOptionsMixin, {}, string, import("kdu").KNodeProps & import("kdu").AllowedComponentProps & import("kdu").ComponentCustomProps, Readonly<import("kdu").ExtractPropTypes<{
|
|
416
416
|
charset: StringConstructor;
|
|
417
417
|
content: StringConstructor;
|
|
418
418
|
httpEquiv: PropType<HTTPEquiv>;
|
|
@@ -525,7 +525,7 @@ export declare const Style: import("kdu").DefineComponent<{
|
|
|
525
525
|
translate: StringConstructor;
|
|
526
526
|
}, () => import("kdu").KNode<import("kdu").RendererNode, import("kdu").RendererElement, {
|
|
527
527
|
[key: string]: any;
|
|
528
|
-
}>[] | null | undefined, unknown, {}, {}, import("kdu").ComponentOptionsMixin, import("kdu").ComponentOptionsMixin,
|
|
528
|
+
}>[] | null | undefined, unknown, {}, {}, import("kdu").ComponentOptionsMixin, import("kdu").ComponentOptionsMixin, {}, string, import("kdu").KNodeProps & import("kdu").AllowedComponentProps & import("kdu").ComponentCustomProps, Readonly<import("kdu").ExtractPropTypes<{
|
|
529
529
|
type: StringConstructor;
|
|
530
530
|
media: StringConstructor;
|
|
531
531
|
nonce: StringConstructor;
|
|
@@ -640,7 +640,7 @@ export declare const Html: import("kdu").DefineComponent<{
|
|
|
640
640
|
translate: StringConstructor;
|
|
641
641
|
}, () => import("kdu").KNode<import("kdu").RendererNode, import("kdu").RendererElement, {
|
|
642
642
|
[key: string]: any;
|
|
643
|
-
}>[] | null | undefined, unknown, {}, {}, import("kdu").ComponentOptionsMixin, import("kdu").ComponentOptionsMixin,
|
|
643
|
+
}>[] | null | undefined, unknown, {}, {}, import("kdu").ComponentOptionsMixin, import("kdu").ComponentOptionsMixin, {}, string, import("kdu").KNodeProps & import("kdu").AllowedComponentProps & import("kdu").ComponentCustomProps, Readonly<import("kdu").ExtractPropTypes<{
|
|
644
644
|
manifest: StringConstructor;
|
|
645
645
|
version: StringConstructor;
|
|
646
646
|
xmlns: StringConstructor;
|
|
@@ -742,7 +742,7 @@ export declare const Body: import("kdu").DefineComponent<{
|
|
|
742
742
|
translate: StringConstructor;
|
|
743
743
|
}, () => import("kdu").KNode<import("kdu").RendererNode, import("kdu").RendererElement, {
|
|
744
744
|
[key: string]: any;
|
|
745
|
-
}>[] | null | undefined, unknown, {}, {}, import("kdu").ComponentOptionsMixin, import("kdu").ComponentOptionsMixin,
|
|
745
|
+
}>[] | null | undefined, unknown, {}, {}, import("kdu").ComponentOptionsMixin, import("kdu").ComponentOptionsMixin, {}, string, import("kdu").KNodeProps & import("kdu").AllowedComponentProps & import("kdu").ComponentCustomProps, Readonly<import("kdu").ExtractPropTypes<{
|
|
746
746
|
renderPriority: (StringConstructor | NumberConstructor)[];
|
|
747
747
|
accesskey: StringConstructor;
|
|
748
748
|
autocapitalize: StringConstructor;
|
package/dist/index.mjs
CHANGED
|
@@ -7,6 +7,8 @@ import { encodePath, parseURL, stringifyQuery, parseQuery, joinURL, withTrailing
|
|
|
7
7
|
import { existsSync, readdirSync, statSync, promises } from 'node:fs';
|
|
8
8
|
import { genArrayFromRaw, genSafeVariableName, genImport, genDynamicImport, genObjectFromRawEntries, genString, genExport } from 'knitwork';
|
|
9
9
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
10
|
+
import { filename } from 'pathe/utils';
|
|
11
|
+
import { hash } from 'ohash';
|
|
10
12
|
import { kebabCase, splitByCase, pascalCase, camelCase } from 'scule';
|
|
11
13
|
import { createUnplugin } from '@dtwo/unplugin';
|
|
12
14
|
import { findStaticImports, findExports, parseStaticImport, resolvePath as resolvePath$1 } from 'mlly';
|
|
@@ -20,7 +22,7 @@ import { createRequire } from 'node:module';
|
|
|
20
22
|
import { createTransformer } from 'unctx/transform';
|
|
21
23
|
import { stripLiteral } from 'strip-literal';
|
|
22
24
|
import { createHole, scanHandlers, writeTypes, build as build$1, prepare, copyPublicAssets, prerender, createDevServer } from 'holepack';
|
|
23
|
-
import
|
|
25
|
+
import { defu } from 'defu';
|
|
24
26
|
import { dynamicEventHandler } from 'h3';
|
|
25
27
|
import { createHeadCore } from 'kdhead';
|
|
26
28
|
import { renderSSRHead } from '@kdhead/ssr';
|
|
@@ -30,7 +32,6 @@ import { debounce } from 'perfect-debounce';
|
|
|
30
32
|
import { resolveSchema, generateMarkdown, generateTypes } from 'untyped';
|
|
31
33
|
import untypedPlugin from 'untyped/babel-plugin';
|
|
32
34
|
import jiti from 'jiti';
|
|
33
|
-
import { hash } from 'ohash';
|
|
34
35
|
|
|
35
36
|
let _distDir = dirname(fileURLToPath(import.meta.url));
|
|
36
37
|
if (_distDir.match(/(chunks|shared)$/)) {
|
|
@@ -195,12 +196,11 @@ function prepareRoutes(routes, parent) {
|
|
|
195
196
|
return routes;
|
|
196
197
|
}
|
|
197
198
|
function normalizeRoutes(routes, metaImports = /* @__PURE__ */ new Set()) {
|
|
198
|
-
const dtwo = useDtwo();
|
|
199
199
|
return {
|
|
200
200
|
imports: metaImports,
|
|
201
201
|
routes: genArrayFromRaw(routes.map((page) => {
|
|
202
202
|
const file = normalize(page.file);
|
|
203
|
-
const metaImportName = genSafeVariableName(
|
|
203
|
+
const metaImportName = genSafeVariableName(filename(file) + hash(file)) + "Meta";
|
|
204
204
|
metaImports.add(genImport(`${file}?macro=true`, [{ name: "default", as: metaImportName }]));
|
|
205
205
|
let aliasCode = `${metaImportName}?.alias || []`;
|
|
206
206
|
if (Array.isArray(page.alias) && page.alias.length) {
|
|
@@ -538,6 +538,9 @@ const pagesModule = defineDtwoModule({
|
|
|
538
538
|
dtwo.options.wite.optimizeDeps = dtwo.options.wite.optimizeDeps || {};
|
|
539
539
|
dtwo.options.wite.optimizeDeps.include = dtwo.options.wite.optimizeDeps.include || [];
|
|
540
540
|
dtwo.options.wite.optimizeDeps.include.push("kdu-router");
|
|
541
|
+
dtwo.options.wite.resolve = dtwo.options.wite.resolve || {};
|
|
542
|
+
dtwo.options.wite.resolve.dedupe = dtwo.options.wite.resolve.dedupe || [];
|
|
543
|
+
dtwo.options.wite.resolve.dedupe.push("kdu-router");
|
|
541
544
|
addTemplate({
|
|
542
545
|
filename: "router.options.mjs",
|
|
543
546
|
getContents: async () => {
|
|
@@ -708,7 +711,7 @@ const componentsTypeTemplate = {
|
|
|
708
711
|
`typeof ${genDynamicImport(isAbsolute(c.filePath) ? relative(buildDir, c.filePath).replace(/(?<=\w)\.(?!kdu)\w+$/g, "") : c.filePath.replace(/(?<=\w)\.(?!kdu)\w+$/g, ""), { wrapper: false })}['${c.export}']`
|
|
709
712
|
]);
|
|
710
713
|
return `// Generated by components discovery
|
|
711
|
-
declare module '
|
|
714
|
+
declare module 'kdu' {
|
|
712
715
|
export interface GlobalComponents {
|
|
713
716
|
${componentTypes.map(([pascalName, type]) => ` '${pascalName}': ${type}`).join("\n")}
|
|
714
717
|
${componentTypes.map(([pascalName, type]) => ` 'Lazy${pascalName}': ${type}`).join("\n")}
|
|
@@ -890,10 +893,11 @@ function findComponent(components, name, mode) {
|
|
|
890
893
|
if (component) {
|
|
891
894
|
return component;
|
|
892
895
|
}
|
|
893
|
-
|
|
896
|
+
const otherModeComponent = components.find((component2) => id === component2.pascalName);
|
|
897
|
+
if (mode === "server" && otherModeComponent) {
|
|
894
898
|
return components.find((c) => c.pascalName === "ServerPlaceholder");
|
|
895
899
|
}
|
|
896
|
-
return
|
|
900
|
+
return otherModeComponent;
|
|
897
901
|
}
|
|
898
902
|
|
|
899
903
|
const PLACEHOLDER_RE = /^(k-slot|#)(fallback|placeholder)/;
|
|
@@ -1426,7 +1430,7 @@ function addDeclarationTemplates(ctx, options) {
|
|
|
1426
1430
|
});
|
|
1427
1431
|
}
|
|
1428
1432
|
|
|
1429
|
-
const version = "3.1.
|
|
1433
|
+
const version = "3.1.2";
|
|
1430
1434
|
|
|
1431
1435
|
const _require = createRequire(import.meta.url);
|
|
1432
1436
|
const kduAppPatterns = (dtwo) => [
|
|
@@ -1477,6 +1481,7 @@ const ImportProtectionPlugin = createUnplugin(function(options) {
|
|
|
1477
1481
|
};
|
|
1478
1482
|
});
|
|
1479
1483
|
|
|
1484
|
+
const TRANSFORM_MARKER = "/* _processed_dtwo_unctx_transform */\n";
|
|
1480
1485
|
const UnctxTransformPlugin = (dtwo) => {
|
|
1481
1486
|
const transformer = createTransformer({
|
|
1482
1487
|
asyncFunctions: ["defineDtwoPlugin", "defineDtwoRouteMiddleware"]
|
|
@@ -1489,14 +1494,20 @@ const UnctxTransformPlugin = (dtwo) => {
|
|
|
1489
1494
|
name: "unctx:transform",
|
|
1490
1495
|
enforce: "post",
|
|
1491
1496
|
transformInclude(id) {
|
|
1497
|
+
if (id.includes("macro=true")) {
|
|
1498
|
+
return true;
|
|
1499
|
+
}
|
|
1492
1500
|
id = normalize(id).replace(/\?.*$/, "");
|
|
1493
1501
|
return app?.plugins.some((i) => i.src === id) || app?.middleware.some((m) => m.path === id);
|
|
1494
1502
|
},
|
|
1495
1503
|
transform(code, id) {
|
|
1504
|
+
if (code.startsWith(TRANSFORM_MARKER)) {
|
|
1505
|
+
return;
|
|
1506
|
+
}
|
|
1496
1507
|
const result = transformer.transform(code);
|
|
1497
1508
|
if (result) {
|
|
1498
1509
|
return {
|
|
1499
|
-
code: result.code,
|
|
1510
|
+
code: TRANSFORM_MARKER + result.code,
|
|
1500
1511
|
map: options.sourcemap ? result.magicString.generateMap({ source: id, includeContent: true }) : void 0
|
|
1501
1512
|
};
|
|
1502
1513
|
}
|
|
@@ -1859,7 +1870,7 @@ const schemaModule = defineDtwoModule({
|
|
|
1859
1870
|
const schemas = await Promise.all(
|
|
1860
1871
|
schemaDefs.map((schemaDef) => resolveSchema(schemaDef))
|
|
1861
1872
|
);
|
|
1862
|
-
const schema2 = defu
|
|
1873
|
+
const schema2 = defu(...schemas);
|
|
1863
1874
|
await dtwo.hooks.callHook("schema:resolved", schema2);
|
|
1864
1875
|
return schema2;
|
|
1865
1876
|
}
|
|
@@ -1947,8 +1958,10 @@ async function initDtwo(dtwo) {
|
|
|
1947
1958
|
};
|
|
1948
1959
|
addWitePlugin(ImportProtectionPlugin.wite(config));
|
|
1949
1960
|
addWebpackPlugin(ImportProtectionPlugin.webpack(config));
|
|
1950
|
-
|
|
1951
|
-
|
|
1961
|
+
dtwo.hook("modules:done", () => {
|
|
1962
|
+
addWitePlugin(UnctxTransformPlugin(dtwo).wite({ sourcemap: dtwo.options.sourcemap.server || dtwo.options.sourcemap.client }));
|
|
1963
|
+
addWebpackPlugin(UnctxTransformPlugin(dtwo).webpack({ sourcemap: dtwo.options.sourcemap.server || dtwo.options.sourcemap.client }));
|
|
1964
|
+
});
|
|
1952
1965
|
if (!dtwo.options.dev) {
|
|
1953
1966
|
const removeFromServer = ["onBeforeMount", "onMounted", "onBeforeUpdate", "onRenderTracked", "onRenderTriggered", "onActivated", "onDeactivated", "onBeforeUnmount"];
|
|
1954
1967
|
const removeFromClient = ["onServerPrefetch", "onRenderTracked", "onRenderTriggered"];
|
|
@@ -2073,7 +2086,7 @@ const kduShim = {
|
|
|
2073
2086
|
filename: "types/kdu-shim.d.ts",
|
|
2074
2087
|
getContents: () => [
|
|
2075
2088
|
"declare module '*.kdu' {",
|
|
2076
|
-
" import { DefineComponent } from '
|
|
2089
|
+
" import { DefineComponent } from 'kdu'",
|
|
2077
2090
|
" const component: DefineComponent<{}, {}, any>",
|
|
2078
2091
|
" export default component",
|
|
2079
2092
|
"}"
|
|
@@ -2103,7 +2116,7 @@ const clientPluginTemplate = {
|
|
|
2103
2116
|
const imports = [];
|
|
2104
2117
|
for (const plugin of clientPlugins) {
|
|
2105
2118
|
const path = relative(ctx.dtwo.options.rootDir, plugin.src);
|
|
2106
|
-
const variable = genSafeVariableName(
|
|
2119
|
+
const variable = genSafeVariableName(filename(plugin.src)).replace(/_(45|46|47)/g, "_") + "_" + hash(path);
|
|
2107
2120
|
exports.push(variable);
|
|
2108
2121
|
imports.push(genImport(plugin.src, variable));
|
|
2109
2122
|
}
|
|
@@ -2121,7 +2134,7 @@ const serverPluginTemplate = {
|
|
|
2121
2134
|
const imports = [];
|
|
2122
2135
|
for (const plugin of serverPlugins) {
|
|
2123
2136
|
const path = relative(ctx.dtwo.options.rootDir, plugin.src);
|
|
2124
|
-
const variable = genSafeVariableName(path).replace(/_(45|46|47)/g, "_") + "_" + hash(path);
|
|
2137
|
+
const variable = genSafeVariableName(filename(path)).replace(/_(45|46|47)/g, "_") + "_" + hash(path);
|
|
2125
2138
|
exports.push(variable);
|
|
2126
2139
|
imports.push(genImport(plugin.src, variable));
|
|
2127
2140
|
}
|
|
@@ -2150,7 +2163,7 @@ declare module '#app' {
|
|
|
2150
2163
|
interface DtwoApp extends DtwoAppInjections { }
|
|
2151
2164
|
}
|
|
2152
2165
|
|
|
2153
|
-
declare module '
|
|
2166
|
+
declare module 'kdu' {
|
|
2154
2167
|
interface ComponentCustomProperties extends DtwoAppInjections { }
|
|
2155
2168
|
}
|
|
2156
2169
|
|
|
@@ -1,19 +1,48 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { KNode, KeepAliveProps, TransitionProps } from 'kdu';
|
|
2
|
+
import type { RouteLocationNormalizedLoaded } from 'kdu-router';
|
|
3
|
+
declare const _default: import("kdu").DefineComponent<{
|
|
4
|
+
name: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
};
|
|
7
|
+
transition: {
|
|
8
|
+
type: () => boolean | TransitionProps;
|
|
9
|
+
default: undefined;
|
|
10
|
+
};
|
|
11
|
+
keepalive: {
|
|
12
|
+
type: () => boolean | KeepAliveProps;
|
|
13
|
+
default: undefined;
|
|
14
|
+
};
|
|
15
|
+
route: {
|
|
16
|
+
type: () => RouteLocationNormalized;
|
|
17
|
+
};
|
|
18
|
+
pageKey: {
|
|
19
|
+
type: () => string | ((route: RouteLocationNormalizedLoaded) => string);
|
|
20
|
+
default: null;
|
|
21
|
+
};
|
|
22
|
+
}, () => KNode<import("kdu").RendererNode, import("kdu").RendererElement, {
|
|
3
23
|
[key: string]: any;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
24
|
+
}>, unknown, {}, {}, import("kdu").ComponentOptionsMixin, import("kdu").ComponentOptionsMixin, {}, string, import("kdu").KNodeProps & import("kdu").AllowedComponentProps & import("kdu").ComponentCustomProps, Readonly<import("kdu").ExtractPropTypes<{
|
|
25
|
+
name: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
};
|
|
28
|
+
transition: {
|
|
29
|
+
type: () => boolean | TransitionProps;
|
|
30
|
+
default: undefined;
|
|
31
|
+
};
|
|
32
|
+
keepalive: {
|
|
33
|
+
type: () => boolean | KeepAliveProps;
|
|
34
|
+
default: undefined;
|
|
35
|
+
};
|
|
36
|
+
route: {
|
|
37
|
+
type: () => RouteLocationNormalized;
|
|
38
|
+
};
|
|
39
|
+
pageKey: {
|
|
40
|
+
type: () => string | ((route: RouteLocationNormalizedLoaded) => string);
|
|
41
|
+
default: null;
|
|
42
|
+
};
|
|
16
43
|
}>>, {
|
|
17
|
-
|
|
44
|
+
keepalive: boolean | KeepAliveProps;
|
|
45
|
+
transition: boolean | TransitionProps;
|
|
46
|
+
pageKey: string | ((route: RouteLocationNormalizedLoaded) => string);
|
|
18
47
|
}>;
|
|
19
48
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dtwo",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"repository": "d2js/dtwo",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -34,33 +34,33 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@d2js/devalue": "2.0.2",
|
|
37
|
-
"@dtwo/kit": "3.1.
|
|
38
|
-
"@dtwo/schema": "3.1.
|
|
37
|
+
"@dtwo/kit": "3.1.2",
|
|
38
|
+
"@dtwo/schema": "3.1.2",
|
|
39
39
|
"@dtwo/telemetry": "2.1.8",
|
|
40
|
-
"@dtwo/ui-templates": "1.1.
|
|
40
|
+
"@dtwo/ui-templates": "1.1.1",
|
|
41
41
|
"@dtwo/unplugin": "1.0.0",
|
|
42
|
-
"@dtwo/wite-builder": "3.1.
|
|
43
|
-
"@kdhead/ssr": "1.0.
|
|
44
|
-
"@kdujs/reactivity": "3.2.
|
|
45
|
-
"@kdujs/shared": "3.2.
|
|
46
|
-
"@kduse/head": "1.0.
|
|
42
|
+
"@dtwo/wite-builder": "3.1.2",
|
|
43
|
+
"@kdhead/ssr": "1.0.20",
|
|
44
|
+
"@kdujs/reactivity": "3.2.48",
|
|
45
|
+
"@kdujs/shared": "3.2.48",
|
|
46
|
+
"@kduse/head": "1.0.24",
|
|
47
47
|
"chokidar": "3.5.3",
|
|
48
48
|
"cookie-es": "0.5.0",
|
|
49
|
-
"defu": "6.1.
|
|
49
|
+
"defu": "6.1.2",
|
|
50
50
|
"destr": "1.2.2",
|
|
51
|
-
"dtwc": "3.1.
|
|
51
|
+
"dtwc": "3.1.2",
|
|
52
52
|
"escape-string-regexp": "5.0.0",
|
|
53
53
|
"estree-walker": "3.0.3",
|
|
54
54
|
"fs-extra": "11.1.0",
|
|
55
55
|
"globby": "13.1.3",
|
|
56
|
-
"h3": "1.0
|
|
56
|
+
"h3": "1.1.0",
|
|
57
57
|
"hash-sum": "2.0.0",
|
|
58
|
-
"holepack": "2.
|
|
58
|
+
"holepack": "2.1.1",
|
|
59
59
|
"hookable": "5.4.2",
|
|
60
60
|
"jiti": "1.16.2",
|
|
61
|
-
"kdhead": "1.0.
|
|
62
|
-
"kdimport": "2.0
|
|
63
|
-
"kdu": "3.2.
|
|
61
|
+
"kdhead": "1.0.20",
|
|
62
|
+
"kdimport": "2.1.0",
|
|
63
|
+
"kdu": "3.2.48",
|
|
64
64
|
"kdu-bundle-renderer": "1.0.0",
|
|
65
65
|
"kdu-devtools-stub": "0.1.0",
|
|
66
66
|
"kdu-router": "4.1.6",
|
|
@@ -69,14 +69,14 @@
|
|
|
69
69
|
"mlly": "1.1.0",
|
|
70
70
|
"ofetch": "1.0.0",
|
|
71
71
|
"ohash": "1.0.0",
|
|
72
|
-
"pathe": "1.
|
|
72
|
+
"pathe": "1.1.0",
|
|
73
73
|
"perfect-debounce": "0.1.3",
|
|
74
74
|
"scule": "1.0.0",
|
|
75
75
|
"strip-literal": "1.0.0",
|
|
76
76
|
"ufo": "1.0.1",
|
|
77
77
|
"ultrahtml": "1.2.0",
|
|
78
78
|
"unctx": "2.1.1",
|
|
79
|
-
"unenv": "1.0.
|
|
79
|
+
"unenv": "1.0.3",
|
|
80
80
|
"untyped": "1.2.2"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
package/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="holepack" />
|
|
2
2
|
export * from './dist/index'
|
|
3
3
|
|
|
4
|
-
import type {
|
|
4
|
+
import type { SchemaDefinition } from '@dtwo/schema'
|
|
5
5
|
|
|
6
6
|
declare global {
|
|
7
7
|
const defineDtwoConfig: typeof import('dtwo/config')['defineDtwoConfig']
|