@weapp-vite/web 1.3.32 → 1.3.34
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/compiler/wxml/compile.mjs +3 -2
- package/dist/compiler/wxml/compile.mjs.map +1 -1
- package/dist/compiler/wxml/renderer.mjs +1 -1
- package/dist/css/wxss.d.mts +1 -1
- package/dist/index.d.mts +2 -0
- package/dist/plugin/index.d.mts +1 -2
- package/dist/plugin/path.mjs +1 -1
- package/dist/plugin/types.d.mts +0 -1
- package/dist/runtime/component/constants.mjs +1 -1
- package/dist/runtime/component/dom.mjs +1 -1
- package/dist/runtime/component/index.d.mts +1 -2
- package/dist/runtime/component/types.d.mts +1 -2
- package/dist/runtime/execution.d.mts +1 -1
- package/dist/runtime/index.d.mts +1 -0
- package/dist/runtime/legacyTemplate/expression.mjs +1 -1
- package/dist/runtime/legacyTemplate/index.d.mts +0 -1
- package/dist/runtime/polyfill/auth.mjs +1 -1
- package/dist/runtime/polyfill/deviceAuthSystemApi.d.mts +0 -1
- package/dist/runtime/polyfill/index.d.mts +1 -2
- package/dist/runtime/polyfill/index.mjs +1 -1
- package/dist/runtime/polyfill/network/request.mjs +1 -1
- package/dist/runtime/polyfill/network/status.mjs +1 -1
- package/dist/runtime/polyfill/routeRuntime/options.d.mts +2 -1
- package/dist/runtime/polyfill/routeRuntime.d.mts +1 -1
- package/dist/runtime/polyfill/runtimeDataApi.d.mts +0 -1
- package/dist/runtime/polyfill/subscribe.mjs +1 -1
- package/dist/runtime/polyfill/system.mjs +1 -1
- package/dist/runtime/polyfill/types/common.d.mts +1 -2
- package/dist/runtime/polyfill/types/locationRuntime.d.mts +1 -2
- package/dist/runtime/polyfill/types/mediaAuth.d.mts +1 -2
- package/dist/runtime/polyfill/types/platformRuntime.d.mts +1 -2
- package/dist/runtime/polyfill/types/systemAuth.d.mts +1 -2
- package/dist/runtime/polyfill/uiMediaApi.d.mts +0 -1
- package/dist/runtime/polyfill.d.mts +2 -1
- package/dist/runtime/renderContext.d.mts +1 -0
- package/dist/runtime/renderContext.mjs +1 -1
- package/dist/runtime/template.d.mts +1 -2
- package/dist/shared/wxml.mjs +1 -1
- package/package.json +7 -7
|
@@ -29,14 +29,15 @@ function compileWxml(options) {
|
|
|
29
29
|
continue;
|
|
30
30
|
}
|
|
31
31
|
try {
|
|
32
|
-
|
|
32
|
+
const result = compileWxml({
|
|
33
33
|
id: target,
|
|
34
34
|
source,
|
|
35
35
|
resolveTemplatePath: options.resolveTemplatePath,
|
|
36
36
|
resolveWxsPath: options.resolveWxsPath,
|
|
37
37
|
dependencyContext,
|
|
38
38
|
expandDependencies: false
|
|
39
|
-
})
|
|
39
|
+
});
|
|
40
|
+
expandDependencyTree(result.dependencies, target);
|
|
40
41
|
} catch (error) {
|
|
41
42
|
if (error instanceof Error && error.message) warnings.push(`[web] 无法解析模板依赖: ${target} ${error.message}`);
|
|
42
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile.mjs","names":[],"sources":["../../../src/compiler/wxml/compile.ts"],"sourcesContent":["import type {\n ImportEntry,\n IncludeEntry,\n TemplateDefinition,\n WxmlCompileOptions,\n WxmlCompileResult,\n WxsEntry,\n} from './types'\n\nimport { readFileSync } from 'node:fs'\nimport { addDependency, createDependencyContext, warnCircularTemplate, warnReadTemplate } from './dependency'\nimport { buildNavigationBarAttrs, extractNavigationBarFromPageMeta } from './navigation'\nimport { parseWxml } from './parser'\nimport { renderer } from './renderer'\nimport { collectSpecialNodes, normalizeTemplatePath, shouldMarkWxsImport, toRelativeImport } from './specialNodes'\n\nexport function compileWxml(options: WxmlCompileOptions): WxmlCompileResult {\n const dependencyContext = options.dependencyContext ?? createDependencyContext()\n const expandDependencies = options.expandDependencies ?? !options.dependencyContext\n const warnings = dependencyContext.warnings\n\n const expandDependencyTree = (dependencies: string[], importer: string) => {\n for (const target of dependencies) {\n if (!target) {\n continue\n }\n if (dependencyContext.active.has(target)) {\n warnCircularTemplate(dependencyContext, importer, target)\n continue\n }\n if (dependencyContext.visited.has(target)) {\n continue\n }\n dependencyContext.visited.add(target)\n dependencyContext.active.add(target)\n let source: string\n try {\n source = readFileSync(target, 'utf8')\n }\n catch {\n warnReadTemplate(dependencyContext, target)\n dependencyContext.active.delete(target)\n continue\n }\n try {\n const result = compileWxml({\n id: target,\n source,\n resolveTemplatePath: options.resolveTemplatePath,\n resolveWxsPath: options.resolveWxsPath,\n dependencyContext,\n expandDependencies: false,\n })\n expandDependencyTree(result.dependencies, target)\n }\n catch (error) {\n if (error instanceof Error && error.message) {\n warnings.push(`[web] 无法解析模板依赖: ${target} ${error.message}`)\n }\n }\n dependencyContext.active.delete(target)\n }\n }\n\n let nodes = parseWxml(options.source)\n let navigationBarAttrs: Record<string, string> | undefined\n if (options.navigationBar) {\n const extracted = extractNavigationBarFromPageMeta(nodes)\n nodes = extracted.nodes\n if (extracted.warnings.length > 0) {\n warnings.push(...extracted.warnings)\n }\n navigationBarAttrs = extracted.attrs\n }\n\n const templates: TemplateDefinition[] = []\n const includes: IncludeEntry[] = []\n const imports: ImportEntry[] = []\n const wxs: WxsEntry[] = []\n const wxsModules = new Map<string, string>()\n\n const renderNodesList = collectSpecialNodes(nodes, {\n templates,\n includes,\n imports,\n wxs,\n wxsModules,\n warnings,\n sourceId: options.id,\n resolveTemplate: (raw: string) => options.resolveTemplatePath(raw, options.id),\n resolveWxs: (raw: string) => options.resolveWxsPath(raw, options.id),\n })\n\n if (options.navigationBar && options.navigationBar.config.navigationStyle !== 'custom') {\n const attrs = buildNavigationBarAttrs(options.navigationBar.config, navigationBarAttrs)\n renderNodesList.unshift({\n type: 'element',\n name: 'weapp-navigation-bar',\n attribs: attrs,\n })\n }\n\n const importLines: string[] = [\n `import { html } from 'lit'`,\n `import { repeat } from 'lit/directives/repeat.js'`,\n ]\n const bodyLines: string[] = []\n const directDependencies: string[] = []\n\n for (const entry of imports) {\n const importPath = normalizeTemplatePath(toRelativeImport(options.id, entry.id))\n importLines.push(`import { templates as ${entry.importName} } from '${importPath}'`)\n addDependency(entry.id, dependencyContext, directDependencies)\n }\n\n for (const entry of includes) {\n const importPath = normalizeTemplatePath(toRelativeImport(options.id, entry.id))\n importLines.push(`import { render as ${entry.importName} } from '${importPath}'`)\n addDependency(entry.id, dependencyContext, directDependencies)\n }\n\n for (const entry of wxs) {\n if (entry.kind === 'src') {\n const baseImport = normalizeTemplatePath(toRelativeImport(options.id, entry.value))\n const importPath = shouldMarkWxsImport(entry.value)\n ? `${baseImport}?wxs`\n : baseImport\n importLines.push(`import ${entry.importName} from '${importPath}'`)\n addDependency(entry.value, dependencyContext, directDependencies)\n }\n }\n\n if (templates.length > 0 || imports.length > 0) {\n const templatePairs: string[] = []\n for (const entry of imports) {\n templatePairs.push(`...${entry.importName}`)\n }\n for (const template of templates) {\n const rendered = renderer.renderNodes(template.nodes, 'scope', '__wxs_modules', options.componentTags)\n templatePairs.push(`${JSON.stringify(template.name)}: (scope, ctx) => ${rendered}`)\n }\n bodyLines.push(`const __templates = { ${templatePairs.join(', ')} }`)\n }\n else {\n bodyLines.push(`const __templates = {}`)\n }\n\n if (wxs.length > 0) {\n bodyLines.push(`const __wxs_inline_cache = Object.create(null)`)\n bodyLines.push(`let __wxs_modules = {}`)\n const wxsMapEntries: string[] = []\n for (const entry of wxs) {\n if (entry.kind === 'inline') {\n const inlineCode = entry.value.trim()\n const cacheKey = JSON.stringify(entry.module)\n if (inlineCode) {\n bodyLines.push(`function ${entry.importName}(ctx) {`)\n bodyLines.push(` if (!__wxs_inline_cache[${cacheKey}]) {`)\n bodyLines.push(` __wxs_inline_cache[${cacheKey}] = ctx.createWxsModule(${JSON.stringify(inlineCode)}, ${JSON.stringify(options.id)})`)\n bodyLines.push(` }`)\n bodyLines.push(` return __wxs_inline_cache[${cacheKey}]`)\n bodyLines.push(`}`)\n }\n else {\n bodyLines.push(`function ${entry.importName}() { return {} }`)\n }\n wxsMapEntries.push(`${JSON.stringify(entry.module)}: ${entry.importName}(ctx)`)\n continue\n }\n wxsMapEntries.push(`${JSON.stringify(entry.module)}: ${entry.importName}`)\n }\n bodyLines.push(`function __resolveWxsModules(ctx) {`)\n bodyLines.push(` return { ${wxsMapEntries.join(', ')} }`)\n bodyLines.push(`}`)\n }\n else {\n bodyLines.push(`const __wxs_modules = {}`)\n }\n\n const includesRender = includes.map(entry => `${entry.importName}(scope, ctx)`)\n const renderContent = renderer.renderNodes(renderNodesList, 'scope', '__wxs_modules', options.componentTags)\n const contentExpr = includesRender.length > 0\n ? `[${[...includesRender, renderContent].join(', ')}]`\n : renderContent\n\n bodyLines.push(`export function render(scope, ctx) {`)\n if (wxs.length > 0) {\n bodyLines.push(` __wxs_modules = __resolveWxsModules(ctx)`)\n }\n bodyLines.push(` return ${contentExpr}`)\n bodyLines.push(`}`)\n bodyLines.push(`export const templates = __templates`)\n bodyLines.push(`export default render`)\n\n if (expandDependencies) {\n dependencyContext.visited.add(options.id)\n dependencyContext.active.add(options.id)\n expandDependencyTree(directDependencies, options.id)\n dependencyContext.active.delete(options.id)\n }\n\n const code = [...importLines, '', ...bodyLines].join('\\n')\n const dependencies = expandDependencies ? dependencyContext.dependencies : directDependencies\n return {\n code,\n dependencies,\n warnings: warnings.length > 0 ? warnings : undefined,\n }\n}\n"],"mappings":";;;;;;;;AAgBA,SAAgB,YAAY,SAAgD;CAC1E,MAAM,oBAAoB,QAAQ,qBAAqB,wBAAwB;CAC/E,MAAM,qBAAqB,QAAQ,sBAAsB,CAAC,QAAQ;CAClE,MAAM,WAAW,kBAAkB;CAEnC,MAAM,wBAAwB,cAAwB,aAAqB;EACzE,KAAK,MAAM,UAAU,cAAc;GACjC,IAAI,CAAC,QACH;GAEF,IAAI,kBAAkB,OAAO,IAAI,MAAM,GAAG;IACxC,qBAAqB,mBAAmB,UAAU,MAAM;IACxD;GACF;GACA,IAAI,kBAAkB,QAAQ,IAAI,MAAM,GACtC;GAEF,kBAAkB,QAAQ,IAAI,MAAM;GACpC,kBAAkB,OA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tC,IAAI,oBAAoB;EACtB,kBAAkB,QAAQ,IAAI,QAAQ,EAAE;EACxC,kBAAkB,OAAO,IAAI,QAAQ,EAAE;EACvC,qBAAqB,oBAAoB,QAAQ,EAAE;EACnD,kBAAkB,OAAO,OAAO,QAAQ,EAAE;CAC5C;CAIA,OAAO;EACL,MAHW;GAAC,GAAG;GAAa;GAAI,GAAG;EAAS,CAAC,CAAC,KAAK,IAGhD;EACH,cAHmB,qBAAqB,kBAAkB,eAAe;EAIzE,UAAU,SAAS,SAAS,IAAI,WAAW;CAC7C;AACF"}
|
|
1
|
+
{"version":3,"file":"compile.mjs","names":[],"sources":["../../../src/compiler/wxml/compile.ts"],"sourcesContent":["import type {\n ImportEntry,\n IncludeEntry,\n TemplateDefinition,\n WxmlCompileOptions,\n WxmlCompileResult,\n WxsEntry,\n} from './types'\n\nimport { readFileSync } from 'node:fs'\nimport { addDependency, createDependencyContext, warnCircularTemplate, warnReadTemplate } from './dependency'\nimport { buildNavigationBarAttrs, extractNavigationBarFromPageMeta } from './navigation'\nimport { parseWxml } from './parser'\nimport { renderer } from './renderer'\nimport { collectSpecialNodes, normalizeTemplatePath, shouldMarkWxsImport, toRelativeImport } from './specialNodes'\n\nexport function compileWxml(options: WxmlCompileOptions): WxmlCompileResult {\n const dependencyContext = options.dependencyContext ?? createDependencyContext()\n const expandDependencies = options.expandDependencies ?? !options.dependencyContext\n const warnings = dependencyContext.warnings\n\n const expandDependencyTree = (dependencies: string[], importer: string) => {\n for (const target of dependencies) {\n if (!target) {\n continue\n }\n if (dependencyContext.active.has(target)) {\n warnCircularTemplate(dependencyContext, importer, target)\n continue\n }\n if (dependencyContext.visited.has(target)) {\n continue\n }\n dependencyContext.visited.add(target)\n dependencyContext.active.add(target)\n let source: string\n try {\n source = readFileSync(target, 'utf8')\n }\n catch {\n warnReadTemplate(dependencyContext, target)\n dependencyContext.active.delete(target)\n continue\n }\n try {\n const result = compileWxml({\n id: target,\n source,\n resolveTemplatePath: options.resolveTemplatePath,\n resolveWxsPath: options.resolveWxsPath,\n dependencyContext,\n expandDependencies: false,\n })\n expandDependencyTree(result.dependencies, target)\n }\n catch (error) {\n if (error instanceof Error && error.message) {\n warnings.push(`[web] 无法解析模板依赖: ${target} ${error.message}`)\n }\n }\n dependencyContext.active.delete(target)\n }\n }\n\n let nodes = parseWxml(options.source)\n let navigationBarAttrs: Record<string, string> | undefined\n if (options.navigationBar) {\n const extracted = extractNavigationBarFromPageMeta(nodes)\n nodes = extracted.nodes\n if (extracted.warnings.length > 0) {\n warnings.push(...extracted.warnings)\n }\n navigationBarAttrs = extracted.attrs\n }\n\n const templates: TemplateDefinition[] = []\n const includes: IncludeEntry[] = []\n const imports: ImportEntry[] = []\n const wxs: WxsEntry[] = []\n const wxsModules = new Map<string, string>()\n\n const renderNodesList = collectSpecialNodes(nodes, {\n templates,\n includes,\n imports,\n wxs,\n wxsModules,\n warnings,\n sourceId: options.id,\n resolveTemplate: (raw: string) => options.resolveTemplatePath(raw, options.id),\n resolveWxs: (raw: string) => options.resolveWxsPath(raw, options.id),\n })\n\n if (options.navigationBar && options.navigationBar.config.navigationStyle !== 'custom') {\n const attrs = buildNavigationBarAttrs(options.navigationBar.config, navigationBarAttrs)\n renderNodesList.unshift({\n type: 'element',\n name: 'weapp-navigation-bar',\n attribs: attrs,\n })\n }\n\n const importLines: string[] = [\n `import { html } from 'lit'`,\n `import { repeat } from 'lit/directives/repeat.js'`,\n ]\n const bodyLines: string[] = []\n const directDependencies: string[] = []\n\n for (const entry of imports) {\n const importPath = normalizeTemplatePath(toRelativeImport(options.id, entry.id))\n importLines.push(`import { templates as ${entry.importName} } from '${importPath}'`)\n addDependency(entry.id, dependencyContext, directDependencies)\n }\n\n for (const entry of includes) {\n const importPath = normalizeTemplatePath(toRelativeImport(options.id, entry.id))\n importLines.push(`import { render as ${entry.importName} } from '${importPath}'`)\n addDependency(entry.id, dependencyContext, directDependencies)\n }\n\n for (const entry of wxs) {\n if (entry.kind === 'src') {\n const baseImport = normalizeTemplatePath(toRelativeImport(options.id, entry.value))\n const importPath = shouldMarkWxsImport(entry.value)\n ? `${baseImport}?wxs`\n : baseImport\n importLines.push(`import ${entry.importName} from '${importPath}'`)\n addDependency(entry.value, dependencyContext, directDependencies)\n }\n }\n\n if (templates.length > 0 || imports.length > 0) {\n const templatePairs: string[] = []\n for (const entry of imports) {\n templatePairs.push(`...${entry.importName}`)\n }\n for (const template of templates) {\n const rendered = renderer.renderNodes(template.nodes, 'scope', '__wxs_modules', options.componentTags)\n templatePairs.push(`${JSON.stringify(template.name)}: (scope, ctx) => ${rendered}`)\n }\n bodyLines.push(`const __templates = { ${templatePairs.join(', ')} }`)\n }\n else {\n bodyLines.push(`const __templates = {}`)\n }\n\n if (wxs.length > 0) {\n bodyLines.push(`const __wxs_inline_cache = Object.create(null)`)\n bodyLines.push(`let __wxs_modules = {}`)\n const wxsMapEntries: string[] = []\n for (const entry of wxs) {\n if (entry.kind === 'inline') {\n const inlineCode = entry.value.trim()\n const cacheKey = JSON.stringify(entry.module)\n if (inlineCode) {\n bodyLines.push(`function ${entry.importName}(ctx) {`)\n bodyLines.push(` if (!__wxs_inline_cache[${cacheKey}]) {`)\n bodyLines.push(` __wxs_inline_cache[${cacheKey}] = ctx.createWxsModule(${JSON.stringify(inlineCode)}, ${JSON.stringify(options.id)})`)\n bodyLines.push(` }`)\n bodyLines.push(` return __wxs_inline_cache[${cacheKey}]`)\n bodyLines.push(`}`)\n }\n else {\n bodyLines.push(`function ${entry.importName}() { return {} }`)\n }\n wxsMapEntries.push(`${JSON.stringify(entry.module)}: ${entry.importName}(ctx)`)\n continue\n }\n wxsMapEntries.push(`${JSON.stringify(entry.module)}: ${entry.importName}`)\n }\n bodyLines.push(`function __resolveWxsModules(ctx) {`)\n bodyLines.push(` return { ${wxsMapEntries.join(', ')} }`)\n bodyLines.push(`}`)\n }\n else {\n bodyLines.push(`const __wxs_modules = {}`)\n }\n\n const includesRender = includes.map(entry => `${entry.importName}(scope, ctx)`)\n const renderContent = renderer.renderNodes(renderNodesList, 'scope', '__wxs_modules', options.componentTags)\n const contentExpr = includesRender.length > 0\n ? `[${[...includesRender, renderContent].join(', ')}]`\n : renderContent\n\n bodyLines.push(`export function render(scope, ctx) {`)\n if (wxs.length > 0) {\n bodyLines.push(` __wxs_modules = __resolveWxsModules(ctx)`)\n }\n bodyLines.push(` return ${contentExpr}`)\n bodyLines.push(`}`)\n bodyLines.push(`export const templates = __templates`)\n bodyLines.push(`export default render`)\n\n if (expandDependencies) {\n dependencyContext.visited.add(options.id)\n dependencyContext.active.add(options.id)\n expandDependencyTree(directDependencies, options.id)\n dependencyContext.active.delete(options.id)\n }\n\n const code = [...importLines, '', ...bodyLines].join('\\n')\n const dependencies = expandDependencies ? dependencyContext.dependencies : directDependencies\n return {\n code,\n dependencies,\n warnings: warnings.length > 0 ? warnings : undefined,\n }\n}\n"],"mappings":";;;;;;;;AAgBA,SAAgB,YAAY,SAAgD;CAC1E,MAAM,oBAAoB,QAAQ,qBAAqB,wBAAwB;CAC/E,MAAM,qBAAqB,QAAQ,sBAAsB,CAAC,QAAQ;CAClE,MAAM,WAAW,kBAAkB;CAEnC,MAAM,wBAAwB,cAAwB,aAAqB;EACzE,KAAK,MAAM,UAAU,cAAc;GACjC,IAAI,CAAC,QACH;GAEF,IAAI,kBAAkB,OAAO,IAAI,MAAM,GAAG;IACxC,qBAAqB,mBAAmB,UAAU,MAAM;IACxD;GACF;GACA,IAAI,kBAAkB,QAAQ,IAAI,MAAM,GACtC;GAEF,kBAAkB,QAAQ,IAAI,MAAM;GACpC,kBAAkB,OAAO,IAAI,MAAM;GACnC,IAAI;GACJ,IAAI;IACF,SAAS,aAAa,QAAQ,MAAM;GACtC,QACM;IACJ,iBAAiB,mBAAmB,MAAM;IAC1C,kBAAkB,OAAO,OAAO,MAAM;IACtC;GACF;GACA,IAAI;IACF,MAAM,SAAS,YAAY;KACzB,IAAI;KACJ;KACA,qBAAqB,QAAQ;KAC7B,gBAAgB,QAAQ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AAS,CAAC,CAAC,KAAK,IAGhD;EACH,cAHmB,qBAAqB,kBAAkB,eAAe;EAIzE,UAAU,SAAS,SAAS,IAAI,WAAW;CAC7C;AACF"}
|
package/dist/css/wxss.d.mts
CHANGED
|
@@ -21,5 +21,5 @@ interface WxssTransformResult {
|
|
|
21
21
|
}
|
|
22
22
|
declare function transformWxssToCss(source: string, options?: WxssTransformOptions): WxssTransformResult;
|
|
23
23
|
//#endregion
|
|
24
|
-
export { WxssTransformOptions, transformWxssToCss };
|
|
24
|
+
export { WxssTransformOptions, WxssTransformResult, transformWxssToCss };
|
|
25
25
|
//# sourceMappingURL=wxss.d.mts.map
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { transformWxssToCss } from "./css/wxss.mjs";
|
|
2
2
|
import { WeappWebPluginOptions } from "./plugin/types.mjs";
|
|
3
3
|
import { weappWebPlugin } from "./plugin/index.mjs";
|
|
4
|
+
import "./plugin.mjs";
|
|
4
5
|
import { ButtonFormConfig, ensureButtonDefined, setButtonFormConfig } from "./runtime/button/index.mjs";
|
|
5
6
|
import { RenderContext, createRenderContext } from "./runtime/renderContext.mjs";
|
|
6
7
|
import { createTemplate, renderTemplate } from "./runtime/legacyTemplate/index.mjs";
|
|
@@ -16,4 +17,5 @@ import { canIUse, createInterstitialAd, createRewardedVideoAd, getExtConfig, get
|
|
|
16
17
|
import { RpxConfig, setupRpx } from "./runtime/rpx.mjs";
|
|
17
18
|
import { injectStyle, removeStyle } from "./runtime/style.mjs";
|
|
18
19
|
import { RuntimeWarningLevel, RuntimeWarningOptions, setRuntimeWarningOptions } from "./runtime/warning.mjs";
|
|
20
|
+
import "./runtime/index.mjs";
|
|
19
21
|
export { type ButtonFormConfig, type NavigationBarMetrics, type RenderContext, type RpxConfig, type RuntimeWarningLevel, type RuntimeWarningOptions, type TemplateRenderer, type TemplateScope, type WeappWebPluginOptions, authorize, canIUse, checkSession, chooseAddress, chooseFile, chooseImage, chooseLocation, chooseMedia, chooseMessageFile, chooseVideo, clearStorage, clearStorageSync, compressImage, compressVideo, createCanvasContext, createInterstitialAd, createRenderContext, createRewardedVideoAd, createSelectorQuery, createTemplate, createVKSession, createVideoContext, createWorker, defineComponent, downloadFile, ensureButtonDefined, exitMiniProgram, getAccountInfoSync, getAppAuthorizeSetting, getAppBaseInfo, getBatteryInfo, getBatteryInfoSync, getClipboardData, getDeviceInfo, getEnterOptionsSync, getExtConfig, getExtConfigSync, getFileSystemManager, getFuzzyLocation, getImageInfo, getLaunchOptionsSync, getLocation, getLogManager, getMenuButtonBoundingClientRect, getNetworkType, getRuntimeExecutionMode, getSetting, getStorage, getStorageInfo, getStorageInfoSync, getStorageSync, getSystemInfo, getSystemInfoSync, getSystemSetting, getUpdateManager, getUserInfo, getUserProfile, getVideoInfo, getWindowInfo, hideKeyboard, hideLoading, hideNavigationBarLoading, hideTabBar, initializePageRoutes, injectStyle, loadSubPackage, login, makePhoneCall, navigateBack, navigateTo, navigateToMiniProgram, nextTick, offNetworkStatusChange, offWindowResize, onNetworkStatusChange, onWindowResize, openAppAuthorizeSetting, openCustomerServiceChat, openDocument, openLocation, openSetting, openVideoEditor, pageScrollTo, preloadSubpackage, previewImage, previewMedia, reLaunch, redirectTo, registerApp, registerComponent, registerPage, removeStorage, removeStorageSync, removeStyle, renderTemplate, reportAnalytics, request, requestPayment, requestSubscribeMessage, saveFile, saveFileToDisk, saveImageToPhotosAlbum, saveVideoToPhotosAlbum, scanCode, setBackgroundColor, setBackgroundTextStyle, setButtonFormConfig, setClipboardData, setNavigationBarColor, setNavigationBarMetrics, setNavigationBarTitle, setRuntimeExecutionMode, setRuntimeWarningOptions, setStorage, setStorageSync, setupRpx, showActionSheet, showLoading, showModal, showNavigationBarLoading, showShareMenu, showTabBar, showToast, startPullDownRefresh, stopPullDownRefresh, switchTab, transformWxssToCss, updateShareMenu, uploadFile, vibrateShort, weappWebPlugin };
|
package/dist/plugin/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { WeappWebPluginOptions } from "./types.mjs";
|
|
2
2
|
import { SourceMap } from "magic-string";
|
|
3
|
-
|
|
4
3
|
//#region src/plugin/index.d.ts
|
|
5
4
|
interface WebPluginContext {
|
|
6
5
|
warn?: (message: string) => void;
|
|
@@ -29,5 +28,5 @@ interface WeappWebVitePlugin {
|
|
|
29
28
|
}
|
|
30
29
|
declare function weappWebPlugin(options?: WeappWebPluginOptions): WeappWebVitePlugin;
|
|
31
30
|
//#endregion
|
|
32
|
-
export { weappWebPlugin };
|
|
31
|
+
export { type WeappWebPluginOptions, weappWebPlugin };
|
|
33
32
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/plugin/path.mjs
CHANGED
|
@@ -81,5 +81,5 @@ function resolveWxsPathSync(raw, importer, srcRoot) {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
//#endregion
|
|
84
|
-
export { appendInlineQuery, cleanUrl, isHtmlEntry, isInsideDir, normalizePath, relativeModuleId, resolveRuntimePolyfillPath, resolveTemplatePathSync, resolveWxsPathSync, toPosixId, toRelativeImport, toViteFsImport };
|
|
84
|
+
export { appendInlineQuery, cleanUrl, isHtmlEntry, isInsideDir, normalizePath, relativeModuleId, resolveFileWithExtensionsSync, resolveImportBase, resolveRuntimePolyfillPath, resolveTemplatePathSync, resolveWxsPathSync, toPosixId, toRelativeImport, toViteFsImport };
|
|
85
85
|
//# sourceMappingURL=path.mjs.map
|
package/dist/plugin/types.d.mts
CHANGED
|
@@ -9,5 +9,5 @@ const EVENT_ATTRIBUTE_PREFIXES = [MINI_PROGRAM_EVENT_ATTRIBUTE_PREFIX, WECHAT_LE
|
|
|
9
9
|
const EVENT_FLAG_ATTRIBUTE_PREFIXES = [MINI_PROGRAM_EVENT_FLAG_ATTRIBUTE_PREFIX, WECHAT_LEGACY_EVENT_FLAG_ATTRIBUTE_PREFIX];
|
|
10
10
|
|
|
11
11
|
//#endregion
|
|
12
|
-
export { EVENT_ATTRIBUTE_PREFIXES, EVENT_FLAG_ATTRIBUTE_PREFIXES, FallbackElement, MINI_PROGRAM_EVENT_ATTRIBUTE_PREFIX, MINI_PROGRAM_EVENT_FLAG_ATTRIBUTE_PREFIX, supportsLit };
|
|
12
|
+
export { EVENT_ATTRIBUTE_PREFIXES, EVENT_FLAG_ATTRIBUTE_PREFIXES, FallbackElement, MINI_PROGRAM_EVENT_ATTRIBUTE_PREFIX, MINI_PROGRAM_EVENT_FLAG_ATTRIBUTE_PREFIX, WECHAT_LEGACY_EVENT_ATTRIBUTE_PREFIX, WECHAT_LEGACY_EVENT_FLAG_ATTRIBUTE_PREFIX, supportsLit };
|
|
13
13
|
//# sourceMappingURL=constants.mjs.map
|
|
@@ -28,5 +28,5 @@ function selectRuntimeComponents(instance, selector) {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
//#endregion
|
|
31
|
-
export { createScopedSelectorQuery, resolveRenderRoot, selectRuntimeComponent, selectRuntimeComponents };
|
|
31
|
+
export { createScopedSelectorQuery, resolveQueryRoot, resolveRenderRoot, selectRuntimeComponent, selectRuntimeComponents };
|
|
32
32
|
//# sourceMappingURL=dom.mjs.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ComponentConstructor, ComponentOptions, ComponentPublicInstance, DefineComponentOptions, PropertyOption } from "./types.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/runtime/component/index.d.ts
|
|
4
3
|
declare function defineComponent(tagName: string, options: DefineComponentOptions): ComponentConstructor;
|
|
5
4
|
//#endregion
|
|
6
|
-
export { defineComponent };
|
|
5
|
+
export { type ComponentOptions, type ComponentPublicInstance, defineComponent };
|
|
7
6
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { TemplateRenderer } from "../template.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/runtime/component/types.d.ts
|
|
4
3
|
type DataRecord = Record<string, any>;
|
|
5
4
|
interface PropertyOption {
|
|
@@ -45,5 +44,5 @@ type ComponentConstructor = CustomElementConstructor & {
|
|
|
45
44
|
__weappUpdate?: (options: DefineComponentOptions) => void;
|
|
46
45
|
};
|
|
47
46
|
//#endregion
|
|
48
|
-
export { ComponentConstructor, ComponentOptions, ComponentPublicInstance, DefineComponentOptions, PropertyOption };
|
|
47
|
+
export { ComponentConstructor, ComponentOptions, ComponentPublicInstance, DataRecord, DefineComponentOptions, LifeTimeHooks, PageLifeTimeHooks, PropertyOption };
|
|
49
48
|
//# sourceMappingURL=types.d.mts.map
|
|
@@ -3,5 +3,5 @@ type RuntimeExecutionMode = 'compat' | 'safe' | 'strict';
|
|
|
3
3
|
declare function getRuntimeExecutionMode(): RuntimeExecutionMode;
|
|
4
4
|
declare function setRuntimeExecutionMode(mode?: RuntimeExecutionMode | string): void;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { getRuntimeExecutionMode, setRuntimeExecutionMode };
|
|
6
|
+
export { RuntimeExecutionMode, getRuntimeExecutionMode, setRuntimeExecutionMode };
|
|
7
7
|
//# sourceMappingURL=execution.d.mts.map
|
package/dist/runtime/index.d.mts
CHANGED
|
@@ -10,6 +10,7 @@ import { getEnterOptionsSync, getLaunchOptionsSync, initializePageRoutes, naviga
|
|
|
10
10
|
import { clearStorage, clearStorageSync, createCanvasContext, createSelectorQuery, createVKSession, createVideoContext, createWorker, downloadFile, exitMiniProgram, getFileSystemManager, getStorage, getStorageInfo, getStorageInfoSync, getStorageSync, hideKeyboard, loadSubPackage, navigateToMiniProgram, nextTick, pageScrollTo, preloadSubpackage, removeStorage, removeStorageSync, request, setStorage, setStorageSync, startPullDownRefresh, stopPullDownRefresh, uploadFile } from "./polyfill/runtimeDataApi.mjs";
|
|
11
11
|
import { chooseAddress, chooseFile, chooseImage, chooseLocation, chooseMedia, chooseMessageFile, chooseVideo, compressImage, compressVideo, getClipboardData, getImageInfo, getVideoInfo, hideLoading, hideTabBar, makePhoneCall, openCustomerServiceChat, openDocument, openLocation, openVideoEditor, previewImage, previewMedia, requestPayment, requestSubscribeMessage, saveFile, saveFileToDisk, saveImageToPhotosAlbum, saveVideoToPhotosAlbum, scanCode, setClipboardData, showActionSheet, showLoading, showModal, showShareMenu, showTabBar, showToast, updateShareMenu } from "./polyfill/uiMediaApi.mjs";
|
|
12
12
|
import { canIUse, createInterstitialAd, createRewardedVideoAd, getExtConfig, getExtConfigSync, getLogManager, getUpdateManager, hideNavigationBarLoading, reportAnalytics, setBackgroundColor, setBackgroundTextStyle, setNavigationBarColor, setNavigationBarTitle, showNavigationBarLoading } from "./polyfill/index.mjs";
|
|
13
|
+
import "./polyfill.mjs";
|
|
13
14
|
import { RpxConfig, setupRpx } from "./rpx.mjs";
|
|
14
15
|
import { injectStyle, removeStyle } from "./style.mjs";
|
|
15
16
|
import { RuntimeWarningLevel, RuntimeWarningOptions, setRuntimeWarningOptions } from "./warning.mjs";
|
|
@@ -109,5 +109,5 @@ function resolveAttributeValue(value, scope) {
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
//#endregion
|
|
112
|
-
export { createChildScope, createScope, escapeAttribute, evaluateExpression, interpolateText, normalizeList, resolveAttributeValue };
|
|
112
|
+
export { createChildScope, createScope, escapeAttribute, escapeHtml, evaluateExpression, interpolateText, normalizeList, resolveAttributeValue };
|
|
113
113
|
//# sourceMappingURL=expression.mjs.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { LegacyTemplateRenderer, LegacyTemplateScope } from "./types.mjs";
|
|
2
2
|
import { ChildNode } from "domhandler";
|
|
3
|
-
|
|
4
3
|
//#region src/runtime/legacyTemplate/index.d.ts
|
|
5
4
|
declare function renderTemplate(nodes: ChildNode[], scope?: LegacyTemplateScope): string;
|
|
6
5
|
declare function createTemplate(source: string): LegacyTemplateRenderer;
|
|
@@ -116,5 +116,5 @@ function resolveUserProfileDecision() {
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
//#endregion
|
|
119
|
-
export { buildAuthSettingSnapshot, buildUserProfilePayload, generateLoginCode, normalizeAuthScope, resolveAuthorizeDecision, resolveCheckSessionState, resolveUserProfileDecision, syncOpenAppAuthorizeSettingPreset, syncOpenSettingPreset };
|
|
119
|
+
export { buildAuthSettingSnapshot, buildUserProfilePayload, generateLoginCode, normalizeAppAuthorizeStatus, normalizeAuthScope, normalizeAuthorizeDecision, normalizeUserLanguage, resolveAuthorizeDecision, resolveCheckSessionState, resolveUserProfileDecision, syncOpenAppAuthorizeSettingPreset, syncOpenSettingPreset };
|
|
120
120
|
//# sourceMappingURL=auth.mjs.map
|
|
@@ -3,7 +3,6 @@ import { GetFuzzyLocationOptions, GetLocationOptions, GetNetworkTypeOptions, Net
|
|
|
3
3
|
import { AuthorizeOptions, GetSettingOptions, OpenSettingOptions } from "./types/mediaAuth.mjs";
|
|
4
4
|
import { BatteryInfo, GetBatteryInfoSuccessResult, VibrateShortOptions } from "./types/platformRuntime.mjs";
|
|
5
5
|
import { AccountInfoSync, AppAuthorizeSetting, AppBaseInfo, CheckSessionOptions, DeviceInfo, GetSystemInfoOptions, GetUserInfoOptions, GetUserProfileOptions, LoginOptions, MenuButtonBoundingClientRect, OpenAppAuthorizeSettingOptions, SystemInfo, SystemSetting, WindowInfo } from "./types/systemAuth.mjs";
|
|
6
|
-
|
|
7
6
|
//#region src/runtime/polyfill/deviceAuthSystemApi.d.ts
|
|
8
7
|
declare function vibrateShort(options?: VibrateShortOptions): Promise<{
|
|
9
8
|
errMsg: string;
|
|
@@ -4,7 +4,6 @@ import { authorize, checkSession, getAccountInfoSync, getAppAuthorizeSetting, ge
|
|
|
4
4
|
import { getEnterOptionsSync, getLaunchOptionsSync, initializePageRoutes, navigateBack, navigateTo, reLaunch, redirectTo, registerApp, registerComponent, registerPage, switchTab } from "./routeRuntime.mjs";
|
|
5
5
|
import { clearStorage, clearStorageSync, createCanvasContext, createSelectorQuery, createVKSession, createVideoContext, createWorker, downloadFile, exitMiniProgram, getFileSystemManager, getStorage, getStorageInfo, getStorageInfoSync, getStorageSync, hideKeyboard, loadSubPackage, navigateToMiniProgram, nextTick, pageScrollTo, preloadSubpackage, removeStorage, removeStorageSync, request, setStorage, setStorageSync, startPullDownRefresh, stopPullDownRefresh, uploadFile } from "./runtimeDataApi.mjs";
|
|
6
6
|
import { chooseAddress, chooseFile, chooseImage, chooseLocation, chooseMedia, chooseMessageFile, chooseVideo, compressImage, compressVideo, getClipboardData, getImageInfo, getVideoInfo, hideLoading, hideTabBar, makePhoneCall, openCustomerServiceChat, openDocument, openLocation, openVideoEditor, previewImage, previewMedia, requestPayment, requestSubscribeMessage, saveFile, saveFileToDisk, saveImageToPhotosAlbum, saveVideoToPhotosAlbum, scanCode, setClipboardData, showActionSheet, showLoading, showModal, showShareMenu, showTabBar, showToast, updateShareMenu } from "./uiMediaApi.mjs";
|
|
7
|
-
|
|
8
7
|
//#region src/runtime/polyfill/index.d.ts
|
|
9
8
|
declare function setNavigationBarTitle(options: {
|
|
10
9
|
title: string;
|
|
@@ -36,5 +35,5 @@ declare function getUpdateManager(): UpdateManager;
|
|
|
36
35
|
declare function getLogManager(options?: LogManagerOptions): LogManager;
|
|
37
36
|
declare function reportAnalytics(eventName: string, data?: Record<string, unknown>): void;
|
|
38
37
|
//#endregion
|
|
39
|
-
export { canIUse, createInterstitialAd, createRewardedVideoAd, getExtConfig, getExtConfigSync, getLogManager, getUpdateManager, hideNavigationBarLoading, reportAnalytics, setBackgroundColor, setBackgroundTextStyle, setNavigationBarColor, setNavigationBarTitle, showNavigationBarLoading };
|
|
38
|
+
export { authorize, canIUse, checkSession, chooseAddress, chooseFile, chooseImage, chooseLocation, chooseMedia, chooseMessageFile, chooseVideo, clearStorage, clearStorageSync, compressImage, compressVideo, createCanvasContext, createInterstitialAd, createRewardedVideoAd, createSelectorQuery, createVKSession, createVideoContext, createWorker, downloadFile, exitMiniProgram, getAccountInfoSync, getAppAuthorizeSetting, getAppBaseInfo, getBatteryInfo, getBatteryInfoSync, getClipboardData, getDeviceInfo, getEnterOptionsSync, getExtConfig, getExtConfigSync, getFileSystemManager, getFuzzyLocation, getImageInfo, getLaunchOptionsSync, getLocation, getLogManager, getMenuButtonBoundingClientRect, getNetworkType, getSetting, getStorage, getStorageInfo, getStorageInfoSync, getStorageSync, getSystemInfo, getSystemInfoSync, getSystemSetting, getUpdateManager, getUserInfo, getUserProfile, getVideoInfo, getWindowInfo, hideKeyboard, hideLoading, hideNavigationBarLoading, hideTabBar, initializePageRoutes, loadSubPackage, login, makePhoneCall, navigateBack, navigateTo, navigateToMiniProgram, nextTick, offNetworkStatusChange, offWindowResize, onNetworkStatusChange, onWindowResize, openAppAuthorizeSetting, openCustomerServiceChat, openDocument, openLocation, openSetting, openVideoEditor, pageScrollTo, preloadSubpackage, previewImage, previewMedia, reLaunch, redirectTo, registerApp, registerComponent, registerPage, removeStorage, removeStorageSync, reportAnalytics, request, requestPayment, requestSubscribeMessage, saveFile, saveFileToDisk, saveImageToPhotosAlbum, saveVideoToPhotosAlbum, scanCode, setBackgroundColor, setBackgroundTextStyle, setClipboardData, setNavigationBarColor, setNavigationBarTitle, setStorage, setStorageSync, showActionSheet, showLoading, showModal, showNavigationBarLoading, showShareMenu, showTabBar, showToast, startPullDownRefresh, stopPullDownRefresh, switchTab, updateShareMenu, uploadFile, vibrateShort };
|
|
40
39
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -106,5 +106,5 @@ if (globalTarget) {
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
//#endregion
|
|
109
|
-
export { canIUse, createInterstitialAd, createRewardedVideoAd, getExtConfig, getExtConfigSync, getLogManager, getUpdateManager, hideNavigationBarLoading, reportAnalytics, setBackgroundColor, setBackgroundTextStyle, setNavigationBarColor, setNavigationBarTitle, showNavigationBarLoading };
|
|
109
|
+
export { authorize, canIUse, checkSession, chooseAddress, chooseFile, chooseImage, chooseLocation, chooseMedia, chooseMessageFile, chooseVideo, clearStorage, clearStorageSync, compressImage, compressVideo, createCanvasContext, createInterstitialAd, createRewardedVideoAd, createSelectorQuery, createVKSession, createVideoContext, createWorker, downloadFile, exitMiniProgram, getAccountInfoSync, getAppAuthorizeSetting, getAppBaseInfo, getBatteryInfo, getBatteryInfoSync, getClipboardData, getDeviceInfo, getEnterOptionsSync, getExtConfig, getExtConfigSync, getFileSystemManager, getFuzzyLocation, getImageInfo, getLaunchOptionsSync, getLocation, getLogManager, getMenuButtonBoundingClientRect, getNetworkType, getSetting, getStorage, getStorageInfo, getStorageInfoSync, getStorageSync, getSystemInfo, getSystemInfoSync, getSystemSetting, getUpdateManager, getUserInfo, getUserProfile, getVideoInfo, getWindowInfo, hideKeyboard, hideLoading, hideNavigationBarLoading, hideTabBar, initializePageRoutes, loadSubPackage, login, makePhoneCall, navigateBack, navigateTo, navigateToMiniProgram, nextTick, offNetworkStatusChange, offWindowResize, onNetworkStatusChange, onWindowResize, openAppAuthorizeSetting, openCustomerServiceChat, openDocument, openLocation, openSetting, openVideoEditor, pageScrollTo, preloadSubpackage, previewImage, previewMedia, reLaunch, redirectTo, registerApp, registerComponent, registerPage, removeStorage, removeStorageSync, reportAnalytics, request, requestPayment, requestSubscribeMessage, saveFile, saveFileToDisk, saveImageToPhotosAlbum, saveVideoToPhotosAlbum, scanCode, setBackgroundColor, setBackgroundTextStyle, setClipboardData, setNavigationBarColor, setNavigationBarTitle, setStorage, setStorageSync, showActionSheet, showLoading, showModal, showNavigationBarLoading, showShareMenu, showTabBar, showToast, startPullDownRefresh, stopPullDownRefresh, switchTab, updateShareMenu, uploadFile, vibrateShort };
|
|
110
110
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -158,5 +158,5 @@ async function performUploadByFetch(options) {
|
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
//#endregion
|
|
161
|
-
export { performDownloadByFetch, performRequestByFetch, performUploadByFetch };
|
|
161
|
+
export { buildRequestBody, buildRequestUrl, collectResponseHeaders, createBlobObjectUrl, getRuntimeFetch, normalizeRequestHeaders, normalizeRequestMethod, parseRequestResponseData, performDownloadByFetch, performRequestByFetch, performUploadByFetch, stripUploadContentType };
|
|
162
162
|
//# sourceMappingURL=request.mjs.map
|
|
@@ -51,5 +51,5 @@ function removeNetworkStatusCallback(callback) {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
//#endregion
|
|
54
|
-
export { addNetworkStatusCallback, readNetworkStatusSnapshot, removeNetworkStatusCallback };
|
|
54
|
+
export { addNetworkStatusCallback, getNavigatorConnection, readNetworkStatusSnapshot, removeNetworkStatusCallback };
|
|
55
55
|
//# sourceMappingURL=status.mjs.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TemplateRenderer } from "../../template.mjs";
|
|
2
2
|
import { ComponentOptions, ComponentPublicInstance } from "../../component/types.mjs";
|
|
3
|
+
import "../../component/index.mjs";
|
|
3
4
|
//#region src/runtime/polyfill/routeRuntime/options.d.ts
|
|
4
5
|
interface RegisterMeta {
|
|
5
6
|
id: string;
|
|
@@ -29,5 +30,5 @@ interface AppLaunchOptions {
|
|
|
29
30
|
type PageRawOptions = ComponentOptions & PageHooks & Record<string, unknown>;
|
|
30
31
|
type ComponentRawOptions = ComponentOptions & Record<string, unknown>;
|
|
31
32
|
//#endregion
|
|
32
|
-
export { AppLaunchOptions, AppRuntime, ComponentRawOptions, PageRawOptions, RegisterMeta };
|
|
33
|
+
export { AppLaunchOptions, AppRuntime, ComponentRawOptions, PageHooks, PageRawOptions, RegisterMeta };
|
|
33
34
|
//# sourceMappingURL=options.d.mts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ButtonFormConfig } from "../button/index.mjs";
|
|
2
|
+
import "../component/index.mjs";
|
|
2
3
|
import { NavigationBarMetrics } from "../navigationBar/index.mjs";
|
|
3
4
|
import { AppLaunchOptions, AppRuntime, ComponentRawOptions, PageRawOptions, RegisterMeta } from "./routeRuntime/options.mjs";
|
|
4
|
-
|
|
5
5
|
//#region src/runtime/polyfill/routeRuntime.d.ts
|
|
6
6
|
declare function initializePageRoutes(ids: string[], options?: {
|
|
7
7
|
rpx?: {
|
|
@@ -2,7 +2,6 @@ import { MiniProgramAsyncOptions, MiniProgramBaseResult } from "./types/base.mjs
|
|
|
2
2
|
import { DownloadFileOptions, FileSystemManager, GetStorageOptions, RemoveStorageOptions, RequestOptions, SetStorageOptions, StorageInfoResult, UploadFileOptions, WorkerBridge } from "./types/common.mjs";
|
|
3
3
|
import { LoadSubPackageOptions, NavigateToMiniProgramOptions, PreloadSubpackageOptions } from "./types/locationRuntime.mjs";
|
|
4
4
|
import { CanvasContext, PageScrollToOptions, SelectorQuery, VideoContext, VkSession } from "./types/platformRuntime.mjs";
|
|
5
|
-
|
|
6
5
|
//#region src/runtime/polyfill/runtimeDataApi.d.ts
|
|
7
6
|
declare function navigateToMiniProgram(options?: NavigateToMiniProgramOptions): Promise<{
|
|
8
7
|
errMsg: string;
|
|
@@ -26,5 +26,5 @@ function resolveSubscribeDecisionMap(tmplIds) {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
//#endregion
|
|
29
|
-
export { normalizeSubscribeTemplateIds, resolveSubscribeDecisionMap };
|
|
29
|
+
export { normalizeSubscribeDecision, normalizeSubscribeTemplateIds, resolveSubscribeDecisionMap };
|
|
30
30
|
//# sourceMappingURL=subscribe.mjs.map
|
|
@@ -107,5 +107,5 @@ function buildMenuButtonRect(windowWidth, statusBarHeight) {
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
//#endregion
|
|
110
|
-
export { buildMenuButtonRect, buildWindowInfoSnapshot, readDeviceMemorySize, readSystemInfoSnapshot, resolveAccountAppId, resolveDeviceOrientation, resolveRuntimeTheme };
|
|
110
|
+
export { buildMenuButtonRect, buildWindowInfoSnapshot, normalizeMemorySize, normalizePositiveNumber, readDeviceMemorySize, readSystemInfoSnapshot, resolveAccountAppId, resolveDeviceOrientation, resolvePlatformName, resolveRuntimeTheme, resolveSystemName };
|
|
111
111
|
//# sourceMappingURL=system.mjs.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { MiniProgramAsyncOptions, MiniProgramBaseResult } from "./base.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/runtime/polyfill/types/common.d.ts
|
|
4
3
|
interface ShowToastOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
|
|
5
4
|
title?: string;
|
|
@@ -122,5 +121,5 @@ interface ChooseImageOptions extends MiniProgramAsyncOptions<ChooseImageSuccessR
|
|
|
122
121
|
sourceType?: Array<'album' | 'camera'>;
|
|
123
122
|
}
|
|
124
123
|
//#endregion
|
|
125
|
-
export { ChooseImageOptions, DownloadFileOptions, FileSystemManager, GetClipboardDataOptions, GetStorageOptions, PreviewImageOptions, RemoveStorageOptions, RequestOptions, SetClipboardDataOptions, SetStorageOptions, ShowToastOptions, StorageInfoResult, UploadFileOptions, WorkerBridge };
|
|
124
|
+
export { ChooseImageOptions, ChooseImageSuccessResult, ChooseImageTempFile, DownloadFileOptions, DownloadFileSuccessResult, FileReadOptions, FileReadResult, FileSystemManager, FileWriteOptions, GetClipboardDataOptions, GetClipboardDataSuccessResult, GetStorageOptions, GetStorageSuccessResult, PreviewImageOptions, RemoveStorageOptions, RequestOptions, RequestSuccessResult, SetClipboardDataOptions, SetStorageOptions, ShowToastOptions, StorageInfoResult, UploadFileOptions, UploadFileSuccessResult, WorkerBridge, WorkerErrorCallback, WorkerMessageCallback };
|
|
126
125
|
//# sourceMappingURL=common.d.mts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { MiniProgramAsyncOptions, MiniProgramBaseResult } from "./base.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/runtime/polyfill/types/locationRuntime.d.ts
|
|
4
3
|
interface GetLocationSuccessResult extends MiniProgramBaseResult {
|
|
5
4
|
latitude: number;
|
|
@@ -147,5 +146,5 @@ interface RequestSubscribeMessageOptions extends MiniProgramAsyncOptions<Request
|
|
|
147
146
|
tmplIds?: string[];
|
|
148
147
|
}
|
|
149
148
|
//#endregion
|
|
150
|
-
export { ChooseAddressOptions, ChooseLocationOptions, GetFuzzyLocationOptions, GetImageInfoOptions, GetLocationOptions, GetNetworkTypeOptions, LoadSubPackageOptions, LogManager, LogManagerOptions, MakePhoneCallOptions, NavigateToMiniProgramOptions, NetworkStatusChangeCallback, OpenCustomerServiceChatOptions, OpenLocationOptions, PreloadSubpackageOptions, RequestPaymentOptions, RequestSubscribeMessageOptions, RequestSubscribeMessageSuccessResult, SetBackgroundColorOptions, SetBackgroundTextStyleOptions, ShareMenuOptions, ShowLoadingOptions, TabBarOptions, UpdateManager, WindowResizeCallback };
|
|
149
|
+
export { ChooseAddressOptions, ChooseAddressSuccessResult, ChooseLocationOptions, ChooseLocationSuccessResult, GetFuzzyLocationOptions, GetFuzzyLocationSuccessResult, GetImageInfoOptions, GetImageInfoSuccessResult, GetLocationOptions, GetLocationSuccessResult, GetNetworkTypeOptions, GetNetworkTypeSuccessResult, LoadSubPackageOptions, LogManager, LogManagerOptions, MakePhoneCallOptions, NavigateToMiniProgramOptions, NetworkStatusChangeCallback, NetworkStatusResult, NetworkType, OpenCustomerServiceChatOptions, OpenLocationOptions, PreloadSubpackageOptions, RequestPaymentOptions, RequestSubscribeMessageOptions, RequestSubscribeMessageSuccessResult, SetBackgroundColorOptions, SetBackgroundTextStyleOptions, ShareMenuOptions, ShowLoadingOptions, TabBarOptions, UpdateManager, UpdateManagerCheckResult, WindowResizeCallback, WindowResizeResult };
|
|
151
150
|
//# sourceMappingURL=locationRuntime.d.mts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { MiniProgramAsyncOptions, MiniProgramBaseResult } from "./base.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/runtime/polyfill/types/mediaAuth.d.ts
|
|
4
3
|
interface AuthSettingResult {
|
|
5
4
|
authSetting: Record<string, boolean>;
|
|
@@ -148,5 +147,5 @@ interface ScanCodeOptions extends MiniProgramAsyncOptions<ScanCodeSuccessResult>
|
|
|
148
147
|
scanType?: string[];
|
|
149
148
|
}
|
|
150
149
|
//#endregion
|
|
151
|
-
export { AuthorizeOptions, ChooseFileOptions, ChooseMediaOptions, ChooseMessageFileOptions, ChooseVideoOptions, CompressImageOptions, CompressVideoOptions, GetSettingOptions, GetVideoInfoOptions, OpenSettingOptions, OpenVideoEditorOptions, PreviewMediaOptions, SaveFileOptions, SaveFileToDiskOptions, SaveImageToPhotosAlbumOptions, SaveVideoToPhotosAlbumOptions, ScanCodeOptions };
|
|
150
|
+
export { AuthSettingResult, AuthorizeOptions, ChooseFileOptions, ChooseFileSuccessResult, ChooseMediaOptions, ChooseMediaSuccessResult, ChooseMediaTempFile, ChooseMediaType, ChooseMessageFileOptions, ChooseMessageFileSuccessResult, ChooseMessageFileTempFile, ChooseVideoOptions, ChooseVideoSuccessResult, CompressImageOptions, CompressImageSuccessResult, CompressVideoOptions, CompressVideoSuccessResult, GetSettingOptions, GetSettingSuccessResult, GetVideoInfoOptions, GetVideoInfoSuccessResult, MediaPreviewSource, OpenSettingOptions, OpenSettingSuccessResult, OpenVideoEditorOptions, OpenVideoEditorSuccessResult, PreviewMediaOptions, SaveFileOptions, SaveFileSuccessResult, SaveFileToDiskOptions, SaveImageToPhotosAlbumOptions, SaveVideoToPhotosAlbumOptions, ScanCodeOptions, ScanCodeSuccessResult };
|
|
152
151
|
//# sourceMappingURL=mediaAuth.d.mts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { MiniProgramAsyncOptions, MiniProgramBaseResult } from "./base.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/runtime/polyfill/types/platformRuntime.d.ts
|
|
4
3
|
interface VibrateShortOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
|
|
5
4
|
type?: 'heavy' | 'medium' | 'light';
|
|
@@ -137,5 +136,5 @@ interface VkSession {
|
|
|
137
136
|
off: (eventName?: string, callback?: (payload: unknown) => void) => void;
|
|
138
137
|
}
|
|
139
138
|
//#endregion
|
|
140
|
-
export { AdBaseOptions, BatteryInfo, CanvasContext, GetBatteryInfoSuccessResult, GetExtConfigOptions, InterstitialAd, OpenDocumentOptions, PageScrollToOptions, RewardedVideoAd, SelectorQuery, ShowActionSheetOptions, ShowModalOptions, VibrateShortOptions, VideoContext, VkSession };
|
|
139
|
+
export { AdBaseOptions, AdError, AdLoadResult, AdShowResult, BatteryInfo, CanvasContext, GetBatteryInfoSuccessResult, GetExtConfigOptions, GetExtConfigSuccessResult, InterstitialAd, OpenDocumentOptions, PageScrollToOptions, RewardedVideoAd, RewardedVideoAdCloseResult, SelectorQuery, SelectorQueryNodeCallback, SelectorQueryNodeFields, SelectorQueryNodesRef, ShowActionSheetOptions, ShowActionSheetSuccessResult, ShowModalOptions, ShowModalSuccessResult, VibrateShortOptions, VideoContext, VkSession };
|
|
141
140
|
//# sourceMappingURL=platformRuntime.d.mts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { MiniProgramAsyncOptions, MiniProgramBaseResult } from "./base.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/runtime/polyfill/types/systemAuth.d.ts
|
|
4
3
|
interface SystemInfo {
|
|
5
4
|
brand: string;
|
|
@@ -118,5 +117,5 @@ interface AccountInfoSync {
|
|
|
118
117
|
interface GetSystemInfoSuccessResult extends MiniProgramBaseResult, SystemInfo {}
|
|
119
118
|
interface GetSystemInfoOptions extends MiniProgramAsyncOptions<GetSystemInfoSuccessResult> {}
|
|
120
119
|
//#endregion
|
|
121
|
-
export { AccountInfoSync, AppAuthorizeSetting, AppBaseInfo, CheckSessionOptions, DeviceInfo, GetSystemInfoOptions, GetUserInfoOptions, GetUserProfileOptions, LoginOptions, MenuButtonBoundingClientRect, OpenAppAuthorizeSettingOptions, SystemInfo, SystemSetting, WindowInfo };
|
|
120
|
+
export { AccountInfoSync, AppAuthorizeSetting, AppAuthorizeStatus, AppBaseInfo, CheckSessionOptions, DeviceInfo, GetSystemInfoOptions, GetSystemInfoSuccessResult, GetUserInfoOptions, GetUserProfileOptions, LoginOptions, LoginSuccessResult, MenuButtonBoundingClientRect, OpenAppAuthorizeSettingOptions, OpenAppAuthorizeSettingSuccessResult, SystemInfo, SystemSetting, UserInfo, UserProfileSuccessResult, WindowInfo };
|
|
122
121
|
//# sourceMappingURL=systemAuth.d.mts.map
|
|
@@ -3,7 +3,6 @@ import { ChooseImageOptions, GetClipboardDataOptions, PreviewImageOptions, SetCl
|
|
|
3
3
|
import { ChooseAddressOptions, ChooseLocationOptions, GetImageInfoOptions, MakePhoneCallOptions, OpenCustomerServiceChatOptions, OpenLocationOptions, RequestPaymentOptions, RequestSubscribeMessageOptions, RequestSubscribeMessageSuccessResult, ShareMenuOptions, ShowLoadingOptions, TabBarOptions } from "./types/locationRuntime.mjs";
|
|
4
4
|
import { ChooseFileOptions, ChooseMediaOptions, ChooseMessageFileOptions, ChooseVideoOptions, CompressImageOptions, CompressVideoOptions, GetVideoInfoOptions, OpenVideoEditorOptions, PreviewMediaOptions, SaveFileOptions, SaveFileToDiskOptions, SaveImageToPhotosAlbumOptions, SaveVideoToPhotosAlbumOptions, ScanCodeOptions } from "./types/mediaAuth.mjs";
|
|
5
5
|
import { OpenDocumentOptions, ShowActionSheetOptions, ShowModalOptions } from "./types/platformRuntime.mjs";
|
|
6
|
-
|
|
7
6
|
//#region src/runtime/polyfill/uiMediaApi.d.ts
|
|
8
7
|
declare function showToast(options?: ShowToastOptions): Promise<any>;
|
|
9
8
|
declare function showLoading(options?: ShowLoadingOptions): Promise<any>;
|
|
@@ -2,4 +2,5 @@ import { authorize, checkSession, getAccountInfoSync, getAppAuthorizeSetting, ge
|
|
|
2
2
|
import { getEnterOptionsSync, getLaunchOptionsSync, initializePageRoutes, navigateBack, navigateTo, reLaunch, redirectTo, registerApp, registerComponent, registerPage, switchTab } from "./polyfill/routeRuntime.mjs";
|
|
3
3
|
import { clearStorage, clearStorageSync, createCanvasContext, createSelectorQuery, createVKSession, createVideoContext, createWorker, downloadFile, exitMiniProgram, getFileSystemManager, getStorage, getStorageInfo, getStorageInfoSync, getStorageSync, hideKeyboard, loadSubPackage, navigateToMiniProgram, nextTick, pageScrollTo, preloadSubpackage, removeStorage, removeStorageSync, request, setStorage, setStorageSync, startPullDownRefresh, stopPullDownRefresh, uploadFile } from "./polyfill/runtimeDataApi.mjs";
|
|
4
4
|
import { chooseAddress, chooseFile, chooseImage, chooseLocation, chooseMedia, chooseMessageFile, chooseVideo, compressImage, compressVideo, getClipboardData, getImageInfo, getVideoInfo, hideLoading, hideTabBar, makePhoneCall, openCustomerServiceChat, openDocument, openLocation, openVideoEditor, previewImage, previewMedia, requestPayment, requestSubscribeMessage, saveFile, saveFileToDisk, saveImageToPhotosAlbum, saveVideoToPhotosAlbum, scanCode, setClipboardData, showActionSheet, showLoading, showModal, showShareMenu, showTabBar, showToast, updateShareMenu } from "./polyfill/uiMediaApi.mjs";
|
|
5
|
-
import { canIUse, createInterstitialAd, createRewardedVideoAd, getExtConfig, getExtConfigSync, getLogManager, getUpdateManager, hideNavigationBarLoading, reportAnalytics, setBackgroundColor, setBackgroundTextStyle, setNavigationBarColor, setNavigationBarTitle, showNavigationBarLoading } from "./polyfill/index.mjs";
|
|
5
|
+
import { canIUse, createInterstitialAd, createRewardedVideoAd, getExtConfig, getExtConfigSync, getLogManager, getUpdateManager, hideNavigationBarLoading, reportAnalytics, setBackgroundColor, setBackgroundTextStyle, setNavigationBarColor, setNavigationBarTitle, showNavigationBarLoading } from "./polyfill/index.mjs";
|
|
6
|
+
export { authorize, canIUse, checkSession, chooseAddress, chooseFile, chooseImage, chooseLocation, chooseMedia, chooseMessageFile, chooseVideo, clearStorage, clearStorageSync, compressImage, compressVideo, createCanvasContext, createInterstitialAd, createRewardedVideoAd, createSelectorQuery, createVKSession, createVideoContext, createWorker, downloadFile, exitMiniProgram, getAccountInfoSync, getAppAuthorizeSetting, getAppBaseInfo, getBatteryInfo, getBatteryInfoSync, getClipboardData, getDeviceInfo, getEnterOptionsSync, getExtConfig, getExtConfigSync, getFileSystemManager, getFuzzyLocation, getImageInfo, getLaunchOptionsSync, getLocation, getLogManager, getMenuButtonBoundingClientRect, getNetworkType, getSetting, getStorage, getStorageInfo, getStorageInfoSync, getStorageSync, getSystemInfo, getSystemInfoSync, getSystemSetting, getUpdateManager, getUserInfo, getUserProfile, getVideoInfo, getWindowInfo, hideKeyboard, hideLoading, hideNavigationBarLoading, hideTabBar, initializePageRoutes, loadSubPackage, login, makePhoneCall, navigateBack, navigateTo, navigateToMiniProgram, nextTick, offNetworkStatusChange, offWindowResize, onNetworkStatusChange, onWindowResize, openAppAuthorizeSetting, openCustomerServiceChat, openDocument, openLocation, openSetting, openVideoEditor, pageScrollTo, preloadSubpackage, previewImage, previewMedia, reLaunch, redirectTo, registerApp, registerComponent, registerPage, removeStorage, removeStorageSync, reportAnalytics, request, requestPayment, requestSubscribeMessage, saveFile, saveFileToDisk, saveImageToPhotosAlbum, saveVideoToPhotosAlbum, scanCode, setBackgroundColor, setBackgroundTextStyle, setClipboardData, setNavigationBarColor, setNavigationBarTitle, setStorage, setStorageSync, showActionSheet, showLoading, showModal, showNavigationBarLoading, showShareMenu, showTabBar, showToast, startPullDownRefresh, stopPullDownRefresh, switchTab, updateShareMenu, uploadFile, vibrateShort };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { RenderContext } from "./renderContext.mjs";
|
|
2
2
|
import { createTemplate, renderTemplate } from "./legacyTemplate/index.mjs";
|
|
3
3
|
import { TemplateResult } from "lit";
|
|
4
|
-
|
|
5
4
|
//#region src/runtime/template.d.ts
|
|
6
5
|
type TemplateScope = Record<string, any>;
|
|
7
6
|
type TemplateRenderer = (scope: TemplateScope, ctx: RenderContext) => TemplateResult | string | unknown;
|
|
8
7
|
//#endregion
|
|
9
|
-
export { TemplateRenderer, TemplateScope };
|
|
8
|
+
export { TemplateRenderer, TemplateScope, createTemplate, renderTemplate };
|
|
10
9
|
//# sourceMappingURL=template.d.mts.map
|
package/dist/shared/wxml.mjs
CHANGED
|
@@ -79,5 +79,5 @@ function normalizeAttributeName(name) {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
//#endregion
|
|
82
|
-
export { CONTROL_ATTRS, EVENT_KIND_ALIAS, EVENT_PREFIX_RE, SELF_CLOSING_TAGS, TEMPLATE_IMPORT_TAG_NAMES, TEMPLATE_INCLUDE_TAG_NAMES, hasControlAttribute, normalizeAttributeName, normalizeTagName, resolveControlAttributeValue };
|
|
82
|
+
export { CONTROL_ATTRS, CONTROL_ATTR_PREFIXES, EVENT_KIND_ALIAS, EVENT_PREFIX_RE, SELF_CLOSING_TAGS, TEMPLATE_IMPORT_TAG_NAMES, TEMPLATE_INCLUDE_TAG_NAMES, hasControlAttribute, normalizeAttributeName, normalizeTagName, resolveControlAttributeName, resolveControlAttributeValue };
|
|
83
83
|
//# sourceMappingURL=wxml.mjs.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weapp-vite/web",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.34",
|
|
5
5
|
"description": "Experimental web runtime for weapp-vite templates",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -48,18 +48,18 @@
|
|
|
48
48
|
"node": "^20.19.0 || >=22.12.0"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@babel/parser": "^8.0.
|
|
52
|
-
"@babel/traverse": "^8.0.
|
|
53
|
-
"@babel/types": "^8.0.
|
|
51
|
+
"@babel/parser": "^8.0.4",
|
|
52
|
+
"@babel/traverse": "^8.0.4",
|
|
53
|
+
"@babel/types": "^8.0.4",
|
|
54
54
|
"domhandler": "^6.0.1",
|
|
55
55
|
"htmlparser2": "^12.0.0",
|
|
56
56
|
"lit": "^3.3.3",
|
|
57
57
|
"magic-string": "^0.30.21",
|
|
58
58
|
"pathe": "^2.0.3",
|
|
59
|
-
"rolldown": "1.1.
|
|
59
|
+
"rolldown": "1.1.5",
|
|
60
60
|
"@weapp-core/constants": "0.1.12",
|
|
61
|
-
"@weapp-core/shared": "3.0.
|
|
62
|
-
"rolldown-require": "2.0.
|
|
61
|
+
"@weapp-core/shared": "3.0.5",
|
|
62
|
+
"rolldown-require": "2.0.20"
|
|
63
63
|
},
|
|
64
64
|
"scripts": {
|
|
65
65
|
"dev": "tsdown -w --sourcemap",
|