Tracking de l'application VApp (IHM du jeu)
This commit is contained in:
147
VApp/node_modules/@vuetify/loader-shared/dist/index.cjs
generated
vendored
Normal file
147
VApp/node_modules/@vuetify/loader-shared/dist/index.cjs
generated
vendored
Normal file
@ -0,0 +1,147 @@
|
||||
'use strict';
|
||||
|
||||
const node_module = require('node:module');
|
||||
const path = require('upath');
|
||||
const vue = require('vue');
|
||||
const importMap = require('vuetify/dist/json/importMap.json');
|
||||
const importMapLabs = require('vuetify/dist/json/importMap-labs.json');
|
||||
|
||||
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
||||
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
||||
|
||||
const path__default = /*#__PURE__*/_interopDefaultCompat(path);
|
||||
const importMap__default = /*#__PURE__*/_interopDefaultCompat(importMap);
|
||||
const importMapLabs__default = /*#__PURE__*/_interopDefaultCompat(importMapLabs);
|
||||
|
||||
function parseTemplate(source) {
|
||||
const components = createSet(source.matchAll(/(?:var|const) (\w+) = _resolveComponent\("([\w-.]+)"\);?/gm));
|
||||
const directives = createSet(source.matchAll(/(?:var|const) (\w+) = _resolveDirective\("([\w-.]+)"\);?/gm));
|
||||
return { components, directives };
|
||||
}
|
||||
function createSet(matches) {
|
||||
return new Set(Array.from(matches, (i) => ({
|
||||
symbol: i[1],
|
||||
name: vue.capitalize(vue.camelize(i[2])),
|
||||
index: i.index,
|
||||
length: i[0].length
|
||||
})));
|
||||
}
|
||||
|
||||
function getImports(source, options) {
|
||||
const { components, directives } = parseTemplate(source);
|
||||
const resolvedComponents = [];
|
||||
const resolvedDirectives = [];
|
||||
const imports = /* @__PURE__ */ new Map();
|
||||
const ignore = isObject(options.autoImport) && options.autoImport.ignore || null;
|
||||
const includeLabs = isObject(options.autoImport) && options.autoImport.labs;
|
||||
const map = includeLabs ? {
|
||||
components: { ...importMap__default.components, ...importMapLabs__default.components },
|
||||
directives: importMap__default.directives
|
||||
} : importMap__default;
|
||||
if (components.size || directives.size) {
|
||||
components.forEach((component) => {
|
||||
if (ignore?.includes(component.name))
|
||||
return;
|
||||
if (component.name in importMap__default.components) {
|
||||
resolvedComponents.push(component);
|
||||
} else if (includeLabs && component.name in importMapLabs__default.components) {
|
||||
resolvedComponents.push(component);
|
||||
}
|
||||
});
|
||||
directives.forEach((directive) => {
|
||||
if (importMap__default.directives.includes(directive.name) && !ignore?.includes(directive.name)) {
|
||||
resolvedDirectives.push(directive);
|
||||
}
|
||||
});
|
||||
}
|
||||
resolvedComponents.forEach((component) => {
|
||||
addImport(imports, component.name, component.symbol, "vuetify/lib/" + map.components[component.name].from);
|
||||
});
|
||||
resolvedDirectives.forEach((directive) => {
|
||||
addImport(imports, directive.name, directive.symbol, "vuetify/lib/directives/index.mjs");
|
||||
});
|
||||
return {
|
||||
imports,
|
||||
components: resolvedComponents,
|
||||
directives: resolvedDirectives
|
||||
};
|
||||
}
|
||||
function addImport(imports, name, as, from) {
|
||||
if (!imports.has(from)) {
|
||||
imports.set(from, []);
|
||||
}
|
||||
imports.get(from).push(`${name} as ${as}`);
|
||||
}
|
||||
|
||||
function generateImports(source, options) {
|
||||
const { imports, components, directives } = getImports(source, options);
|
||||
let code = "";
|
||||
if (components.length || directives.length) {
|
||||
code += "\n\n/* Vuetify */\n";
|
||||
Array.from(imports).sort((a, b) => a[0] < b[0] ? -1 : a[0] > b[0] ? 1 : 0).forEach(([from, names]) => {
|
||||
code += `import { ${names.join(", ")} } from "${from}"
|
||||
`;
|
||||
});
|
||||
code += "\n";
|
||||
source = [...components, ...directives].reduce((acc, v) => {
|
||||
return acc.slice(0, v.index) + " ".repeat(v.length) + acc.slice(v.index + v.length);
|
||||
}, source);
|
||||
}
|
||||
return { code, source };
|
||||
}
|
||||
|
||||
const require$1 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));
|
||||
function resolveVuetifyBase() {
|
||||
return path__default.dirname(require$1.resolve("vuetify/package.json", { paths: [process.cwd()] }));
|
||||
}
|
||||
function isObject(value) {
|
||||
return value !== null && typeof value === "object";
|
||||
}
|
||||
function includes(arr, val) {
|
||||
return arr.includes(val);
|
||||
}
|
||||
function normalizePath(p) {
|
||||
p = path__default.normalize(p);
|
||||
return /^[a-z]:\//i.test(p) ? "/" + p : p;
|
||||
}
|
||||
function toKebabCase(str = "") {
|
||||
return str.replace(/[^a-z]/gi, "-").replace(/\B([A-Z])/g, "-$1").toLowerCase();
|
||||
}
|
||||
const defaultTags = {
|
||||
video: ["src", "poster"],
|
||||
source: ["src"],
|
||||
img: ["src"],
|
||||
image: ["xlink:href", "href"],
|
||||
use: ["xlink:href", "href"]
|
||||
};
|
||||
const transformAssetUrls = {
|
||||
VAppBar: ["image"],
|
||||
VAvatar: ["image"],
|
||||
VBanner: ["avatar"],
|
||||
VCard: ["image", "prependAvatar", "appendAvatar"],
|
||||
VCardItem: ["prependAvatar", "appendAvatar"],
|
||||
VCarouselItem: ["src", "lazySrc", "srcset"],
|
||||
VChip: ["prependAvatar", "appendAvatar"],
|
||||
VImg: ["src", "lazySrc", "srcset"],
|
||||
VListItem: ["prependAvatar", "appendAvatar"],
|
||||
VNavigationDrawer: ["image"],
|
||||
VParallax: ["src", "lazySrc", "srcset"],
|
||||
VToolbar: ["image"]
|
||||
};
|
||||
for (const [tag, attrs] of Object.entries(transformAssetUrls)) {
|
||||
attrs.forEach((attr) => {
|
||||
if (/[A-Z]/.test(attr)) {
|
||||
attrs.push(toKebabCase(attr));
|
||||
}
|
||||
});
|
||||
transformAssetUrls[toKebabCase(tag)] = attrs;
|
||||
}
|
||||
Object.assign(transformAssetUrls, defaultTags);
|
||||
|
||||
exports.generateImports = generateImports;
|
||||
exports.includes = includes;
|
||||
exports.isObject = isObject;
|
||||
exports.normalizePath = normalizePath;
|
||||
exports.resolveVuetifyBase = resolveVuetifyBase;
|
||||
exports.toKebabCase = toKebabCase;
|
||||
exports.transformAssetUrls = transformAssetUrls;
|
28
VApp/node_modules/@vuetify/loader-shared/dist/index.d.cts
generated
vendored
Normal file
28
VApp/node_modules/@vuetify/loader-shared/dist/index.d.cts
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
import * as Components from 'vuetify/components';
|
||||
import * as Directives from 'vuetify/directives';
|
||||
|
||||
declare function generateImports(source: string, options: Options): {
|
||||
code: string;
|
||||
source: string;
|
||||
};
|
||||
|
||||
interface Options {
|
||||
autoImport?: ImportPluginOptions;
|
||||
styles?: true | 'none' | 'sass' | {
|
||||
configFile: string;
|
||||
};
|
||||
}
|
||||
interface ObjectImportPluginOptions {
|
||||
labs?: boolean;
|
||||
ignore?: (keyof typeof Components | keyof typeof Directives)[];
|
||||
}
|
||||
type ImportPluginOptions = boolean | ObjectImportPluginOptions;
|
||||
|
||||
declare function resolveVuetifyBase(): string;
|
||||
declare function isObject(value: any): value is object;
|
||||
declare function includes(arr: any[], val: any): boolean;
|
||||
declare function normalizePath(p: string): string;
|
||||
declare function toKebabCase(str?: string): string;
|
||||
declare const transformAssetUrls: Record<string, string[]>;
|
||||
|
||||
export { type ImportPluginOptions, type ObjectImportPluginOptions, type Options, generateImports, includes, isObject, normalizePath, resolveVuetifyBase, toKebabCase, transformAssetUrls };
|
28
VApp/node_modules/@vuetify/loader-shared/dist/index.d.mts
generated
vendored
Normal file
28
VApp/node_modules/@vuetify/loader-shared/dist/index.d.mts
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
import * as Components from 'vuetify/components';
|
||||
import * as Directives from 'vuetify/directives';
|
||||
|
||||
declare function generateImports(source: string, options: Options): {
|
||||
code: string;
|
||||
source: string;
|
||||
};
|
||||
|
||||
interface Options {
|
||||
autoImport?: ImportPluginOptions;
|
||||
styles?: true | 'none' | 'sass' | {
|
||||
configFile: string;
|
||||
};
|
||||
}
|
||||
interface ObjectImportPluginOptions {
|
||||
labs?: boolean;
|
||||
ignore?: (keyof typeof Components | keyof typeof Directives)[];
|
||||
}
|
||||
type ImportPluginOptions = boolean | ObjectImportPluginOptions;
|
||||
|
||||
declare function resolveVuetifyBase(): string;
|
||||
declare function isObject(value: any): value is object;
|
||||
declare function includes(arr: any[], val: any): boolean;
|
||||
declare function normalizePath(p: string): string;
|
||||
declare function toKebabCase(str?: string): string;
|
||||
declare const transformAssetUrls: Record<string, string[]>;
|
||||
|
||||
export { type ImportPluginOptions, type ObjectImportPluginOptions, type Options, generateImports, includes, isObject, normalizePath, resolveVuetifyBase, toKebabCase, transformAssetUrls };
|
28
VApp/node_modules/@vuetify/loader-shared/dist/index.d.ts
generated
vendored
Normal file
28
VApp/node_modules/@vuetify/loader-shared/dist/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
import * as Components from 'vuetify/components';
|
||||
import * as Directives from 'vuetify/directives';
|
||||
|
||||
declare function generateImports(source: string, options: Options): {
|
||||
code: string;
|
||||
source: string;
|
||||
};
|
||||
|
||||
interface Options {
|
||||
autoImport?: ImportPluginOptions;
|
||||
styles?: true | 'none' | 'sass' | {
|
||||
configFile: string;
|
||||
};
|
||||
}
|
||||
interface ObjectImportPluginOptions {
|
||||
labs?: boolean;
|
||||
ignore?: (keyof typeof Components | keyof typeof Directives)[];
|
||||
}
|
||||
type ImportPluginOptions = boolean | ObjectImportPluginOptions;
|
||||
|
||||
declare function resolveVuetifyBase(): string;
|
||||
declare function isObject(value: any): value is object;
|
||||
declare function includes(arr: any[], val: any): boolean;
|
||||
declare function normalizePath(p: string): string;
|
||||
declare function toKebabCase(str?: string): string;
|
||||
declare const transformAssetUrls: Record<string, string[]>;
|
||||
|
||||
export { type ImportPluginOptions, type ObjectImportPluginOptions, type Options, generateImports, includes, isObject, normalizePath, resolveVuetifyBase, toKebabCase, transformAssetUrls };
|
132
VApp/node_modules/@vuetify/loader-shared/dist/index.mjs
generated
vendored
Normal file
132
VApp/node_modules/@vuetify/loader-shared/dist/index.mjs
generated
vendored
Normal file
@ -0,0 +1,132 @@
|
||||
import { createRequire } from 'node:module';
|
||||
import path from 'upath';
|
||||
import { capitalize, camelize } from 'vue';
|
||||
import importMap from 'vuetify/dist/json/importMap.json' assert { type: 'json' };
|
||||
import importMapLabs from 'vuetify/dist/json/importMap-labs.json' assert { type: 'json' };
|
||||
|
||||
function parseTemplate(source) {
|
||||
const components = createSet(source.matchAll(/(?:var|const) (\w+) = _resolveComponent\("([\w-.]+)"\);?/gm));
|
||||
const directives = createSet(source.matchAll(/(?:var|const) (\w+) = _resolveDirective\("([\w-.]+)"\);?/gm));
|
||||
return { components, directives };
|
||||
}
|
||||
function createSet(matches) {
|
||||
return new Set(Array.from(matches, (i) => ({
|
||||
symbol: i[1],
|
||||
name: capitalize(camelize(i[2])),
|
||||
index: i.index,
|
||||
length: i[0].length
|
||||
})));
|
||||
}
|
||||
|
||||
function getImports(source, options) {
|
||||
const { components, directives } = parseTemplate(source);
|
||||
const resolvedComponents = [];
|
||||
const resolvedDirectives = [];
|
||||
const imports = /* @__PURE__ */ new Map();
|
||||
const ignore = isObject(options.autoImport) && options.autoImport.ignore || null;
|
||||
const includeLabs = isObject(options.autoImport) && options.autoImport.labs;
|
||||
const map = includeLabs ? {
|
||||
components: { ...importMap.components, ...importMapLabs.components },
|
||||
directives: importMap.directives
|
||||
} : importMap;
|
||||
if (components.size || directives.size) {
|
||||
components.forEach((component) => {
|
||||
if (ignore?.includes(component.name))
|
||||
return;
|
||||
if (component.name in importMap.components) {
|
||||
resolvedComponents.push(component);
|
||||
} else if (includeLabs && component.name in importMapLabs.components) {
|
||||
resolvedComponents.push(component);
|
||||
}
|
||||
});
|
||||
directives.forEach((directive) => {
|
||||
if (importMap.directives.includes(directive.name) && !ignore?.includes(directive.name)) {
|
||||
resolvedDirectives.push(directive);
|
||||
}
|
||||
});
|
||||
}
|
||||
resolvedComponents.forEach((component) => {
|
||||
addImport(imports, component.name, component.symbol, "vuetify/lib/" + map.components[component.name].from);
|
||||
});
|
||||
resolvedDirectives.forEach((directive) => {
|
||||
addImport(imports, directive.name, directive.symbol, "vuetify/lib/directives/index.mjs");
|
||||
});
|
||||
return {
|
||||
imports,
|
||||
components: resolvedComponents,
|
||||
directives: resolvedDirectives
|
||||
};
|
||||
}
|
||||
function addImport(imports, name, as, from) {
|
||||
if (!imports.has(from)) {
|
||||
imports.set(from, []);
|
||||
}
|
||||
imports.get(from).push(`${name} as ${as}`);
|
||||
}
|
||||
|
||||
function generateImports(source, options) {
|
||||
const { imports, components, directives } = getImports(source, options);
|
||||
let code = "";
|
||||
if (components.length || directives.length) {
|
||||
code += "\n\n/* Vuetify */\n";
|
||||
Array.from(imports).sort((a, b) => a[0] < b[0] ? -1 : a[0] > b[0] ? 1 : 0).forEach(([from, names]) => {
|
||||
code += `import { ${names.join(", ")} } from "${from}"
|
||||
`;
|
||||
});
|
||||
code += "\n";
|
||||
source = [...components, ...directives].reduce((acc, v) => {
|
||||
return acc.slice(0, v.index) + " ".repeat(v.length) + acc.slice(v.index + v.length);
|
||||
}, source);
|
||||
}
|
||||
return { code, source };
|
||||
}
|
||||
|
||||
const require = createRequire(import.meta.url);
|
||||
function resolveVuetifyBase() {
|
||||
return path.dirname(require.resolve("vuetify/package.json", { paths: [process.cwd()] }));
|
||||
}
|
||||
function isObject(value) {
|
||||
return value !== null && typeof value === "object";
|
||||
}
|
||||
function includes(arr, val) {
|
||||
return arr.includes(val);
|
||||
}
|
||||
function normalizePath(p) {
|
||||
p = path.normalize(p);
|
||||
return /^[a-z]:\//i.test(p) ? "/" + p : p;
|
||||
}
|
||||
function toKebabCase(str = "") {
|
||||
return str.replace(/[^a-z]/gi, "-").replace(/\B([A-Z])/g, "-$1").toLowerCase();
|
||||
}
|
||||
const defaultTags = {
|
||||
video: ["src", "poster"],
|
||||
source: ["src"],
|
||||
img: ["src"],
|
||||
image: ["xlink:href", "href"],
|
||||
use: ["xlink:href", "href"]
|
||||
};
|
||||
const transformAssetUrls = {
|
||||
VAppBar: ["image"],
|
||||
VAvatar: ["image"],
|
||||
VBanner: ["avatar"],
|
||||
VCard: ["image", "prependAvatar", "appendAvatar"],
|
||||
VCardItem: ["prependAvatar", "appendAvatar"],
|
||||
VCarouselItem: ["src", "lazySrc", "srcset"],
|
||||
VChip: ["prependAvatar", "appendAvatar"],
|
||||
VImg: ["src", "lazySrc", "srcset"],
|
||||
VListItem: ["prependAvatar", "appendAvatar"],
|
||||
VNavigationDrawer: ["image"],
|
||||
VParallax: ["src", "lazySrc", "srcset"],
|
||||
VToolbar: ["image"]
|
||||
};
|
||||
for (const [tag, attrs] of Object.entries(transformAssetUrls)) {
|
||||
attrs.forEach((attr) => {
|
||||
if (/[A-Z]/.test(attr)) {
|
||||
attrs.push(toKebabCase(attr));
|
||||
}
|
||||
});
|
||||
transformAssetUrls[toKebabCase(tag)] = attrs;
|
||||
}
|
||||
Object.assign(transformAssetUrls, defaultTags);
|
||||
|
||||
export { generateImports, includes, isObject, normalizePath, resolveVuetifyBase, toKebabCase, transformAssetUrls };
|
Reference in New Issue
Block a user