Tracking de l'application VApp (IHM du jeu)

This commit is contained in:
2025-05-11 18:04:12 +02:00
commit 89e9db9b62
17763 changed files with 3718499 additions and 0 deletions

View File

@ -0,0 +1,27 @@
.v-responsive {
display: flex;
flex: 1 0 auto;
max-height: 100%;
max-width: 100%;
overflow: hidden;
position: relative;
}
.v-responsive--inline {
display: inline-flex;
flex: 0 0 auto;
}
.v-responsive__content {
flex: 1 0 0px;
max-width: 100%;
}
.v-responsive__sizer ~ .v-responsive__content {
margin-inline-start: -100%;
}
.v-responsive__sizer {
flex: 1 0 0px;
transition: padding-bottom 0.2s cubic-bezier(0.4, 0, 0.2, 1);
pointer-events: none;
}

View File

@ -0,0 +1,54 @@
import { createVNode as _createVNode } from "vue";
// Styles
import "./VResponsive.css";
// Composables
import { makeComponentProps } from "../../composables/component.mjs";
import { makeDimensionProps, useDimension } from "../../composables/dimensions.mjs"; // Utilities
import { computed } from 'vue';
import { genericComponent, propsFactory, useRender } from "../../util/index.mjs";
export function useAspectStyles(props) {
return {
aspectStyles: computed(() => {
const ratio = Number(props.aspectRatio);
return ratio ? {
paddingBottom: String(1 / ratio * 100) + '%'
} : undefined;
})
};
}
export const makeVResponsiveProps = propsFactory({
aspectRatio: [String, Number],
contentClass: String,
inline: Boolean,
...makeComponentProps(),
...makeDimensionProps()
}, 'VResponsive');
export const VResponsive = genericComponent()({
name: 'VResponsive',
props: makeVResponsiveProps(),
setup(props, _ref) {
let {
slots
} = _ref;
const {
aspectStyles
} = useAspectStyles(props);
const {
dimensionStyles
} = useDimension(props);
useRender(() => _createVNode("div", {
"class": ['v-responsive', {
'v-responsive--inline': props.inline
}, props.class],
"style": [dimensionStyles.value, props.style]
}, [_createVNode("div", {
"class": "v-responsive__sizer",
"style": aspectStyles.value
}, null), slots.additional?.(), slots.default && _createVNode("div", {
"class": ['v-responsive__content', props.contentClass]
}, [slots.default()])]));
return {};
}
});
//# sourceMappingURL=VResponsive.mjs.map

View File

@ -0,0 +1 @@
{"version":3,"file":"VResponsive.mjs","names":["makeComponentProps","makeDimensionProps","useDimension","computed","genericComponent","propsFactory","useRender","useAspectStyles","props","aspectStyles","ratio","Number","aspectRatio","paddingBottom","String","undefined","makeVResponsiveProps","contentClass","inline","Boolean","VResponsive","name","setup","_ref","slots","dimensionStyles","_createVNode","class","value","style","additional","default"],"sources":["../../../src/components/VResponsive/VResponsive.tsx"],"sourcesContent":["// Styles\nimport './VResponsive.sass'\n\n// Composables\nimport { makeComponentProps } from '@/composables/component'\nimport { makeDimensionProps, useDimension } from '@/composables/dimensions'\n\n// Utilities\nimport { computed } from 'vue'\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\nexport type VResponsiveSlots = {\n default: never\n additional: never\n}\n\nexport function useAspectStyles (props: { aspectRatio?: string | number }) {\n return {\n aspectStyles: computed(() => {\n const ratio = Number(props.aspectRatio)\n\n return ratio\n ? { paddingBottom: String(1 / ratio * 100) + '%' }\n : undefined\n }),\n }\n}\n\nexport const makeVResponsiveProps = propsFactory({\n aspectRatio: [String, Number],\n contentClass: String,\n inline: Boolean,\n\n ...makeComponentProps(),\n ...makeDimensionProps(),\n}, 'VResponsive')\n\nexport const VResponsive = genericComponent<VResponsiveSlots>()({\n name: 'VResponsive',\n\n props: makeVResponsiveProps(),\n\n setup (props, { slots }) {\n const { aspectStyles } = useAspectStyles(props)\n const { dimensionStyles } = useDimension(props)\n\n useRender(() => (\n <div\n class={[\n 'v-responsive',\n { 'v-responsive--inline': props.inline },\n props.class,\n ]}\n style={[\n dimensionStyles.value,\n props.style,\n ]}\n >\n <div class=\"v-responsive__sizer\" style={ aspectStyles.value } />\n\n { slots.additional?.() }\n\n { slots.default && (\n <div class={['v-responsive__content', props.contentClass]}>{ slots.default() }</div>\n )}\n </div>\n ))\n\n return {}\n },\n})\n\nexport type VResponsive = InstanceType<typeof VResponsive>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,kBAAkB;AAAA,SAClBC,kBAAkB,EAAEC,YAAY,4CAEzC;AACA,SAASC,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AAY,CAACmB;IAAK,UAEzDJ,KAAK,CAACM,UAAU,GAAG,CAAC,EAEpBN,KAAK,CAACO,OAAO,IAAAL,YAAA;MAAA,SACD,CAAC,uBAAuB,EAAElB,KAAK,CAACS,YAAY;IAAC,IAAIO,KAAK,CAACO,OAAO,CAAC,CAAC,EAC7E,EAEJ,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}

View File

@ -0,0 +1,25 @@
@use '../../styles/settings'
.v-responsive
display: flex
flex: 1 0 auto
max-height: 100%
max-width: 100%
overflow: hidden
position: relative
&--inline
display: inline-flex
flex: 0 0 auto
.v-responsive__content
flex: 1 0 0px
max-width: 100%
.v-responsive__sizer ~ .v-responsive__content
margin-inline-start: -100%
.v-responsive__sizer
flex: 1 0 0px
transition: padding-bottom 0.2s settings.$standard-easing
pointer-events: none

View File

@ -0,0 +1,176 @@
import * as vue from 'vue';
import { ComponentPropsOptions, ExtractPropTypes } from 'vue';
interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {
filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T): Partial<Pick<T, U>>;
}
declare const VResponsive: {
new (...args: any[]): vue.CreateComponentPublicInstance<{
inline: boolean;
style: vue.StyleValue;
} & {
height?: string | number | undefined;
width?: string | number | undefined;
aspectRatio?: string | number | undefined;
maxHeight?: string | number | undefined;
maxWidth?: string | number | undefined;
minHeight?: string | number | undefined;
minWidth?: string | number | undefined;
class?: any;
contentClass?: string | undefined;
} & {
$children?: vue.VNodeChild | {
default?: (() => vue.VNodeChild) | undefined;
additional?: (() => vue.VNodeChild) | undefined;
} | (() => vue.VNodeChild);
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
additional?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:additional"?: false | (() => vue.VNodeChild) | undefined;
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
inline: boolean;
style: vue.StyleValue;
} & {
height?: string | number | undefined;
width?: string | number | undefined;
aspectRatio?: string | number | undefined;
maxHeight?: string | number | undefined;
maxWidth?: string | number | undefined;
minHeight?: string | number | undefined;
minWidth?: string | number | undefined;
class?: any;
contentClass?: string | undefined;
} & {
$children?: vue.VNodeChild | {
default?: (() => vue.VNodeChild) | undefined;
additional?: (() => vue.VNodeChild) | undefined;
} | (() => vue.VNodeChild);
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
additional?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:additional"?: false | (() => vue.VNodeChild) | undefined;
}, {
inline: boolean;
style: vue.StyleValue;
}, true, {}, vue.SlotsType<Partial<{
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
additional: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>, {
P: {};
B: {};
D: {};
C: {};
M: {};
Defaults: {};
}, {
inline: boolean;
style: vue.StyleValue;
} & {
height?: string | number | undefined;
width?: string | number | undefined;
aspectRatio?: string | number | undefined;
maxHeight?: string | number | undefined;
maxWidth?: string | number | undefined;
minHeight?: string | number | undefined;
minWidth?: string | number | undefined;
class?: any;
contentClass?: string | undefined;
} & {
$children?: vue.VNodeChild | {
default?: (() => vue.VNodeChild) | undefined;
additional?: (() => vue.VNodeChild) | undefined;
} | (() => vue.VNodeChild);
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
additional?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:additional"?: false | (() => vue.VNodeChild) | undefined;
}, {}, {}, {}, {}, {
inline: boolean;
style: vue.StyleValue;
}>;
__isFragment?: undefined;
__isTeleport?: undefined;
__isSuspense?: undefined;
} & vue.ComponentOptionsBase<{
inline: boolean;
style: vue.StyleValue;
} & {
height?: string | number | undefined;
width?: string | number | undefined;
aspectRatio?: string | number | undefined;
maxHeight?: string | number | undefined;
maxWidth?: string | number | undefined;
minHeight?: string | number | undefined;
minWidth?: string | number | undefined;
class?: any;
contentClass?: string | undefined;
} & {
$children?: vue.VNodeChild | {
default?: (() => vue.VNodeChild) | undefined;
additional?: (() => vue.VNodeChild) | undefined;
} | (() => vue.VNodeChild);
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
additional?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:additional"?: false | (() => vue.VNodeChild) | undefined;
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
inline: boolean;
style: vue.StyleValue;
}, {}, string, vue.SlotsType<Partial<{
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
additional: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
height: (StringConstructor | NumberConstructor)[];
maxHeight: (StringConstructor | NumberConstructor)[];
maxWidth: (StringConstructor | NumberConstructor)[];
minHeight: (StringConstructor | NumberConstructor)[];
minWidth: (StringConstructor | NumberConstructor)[];
width: (StringConstructor | NumberConstructor)[];
class: vue.PropType<any>;
style: {
type: vue.PropType<vue.StyleValue>;
default: null;
};
aspectRatio: (StringConstructor | NumberConstructor)[];
contentClass: StringConstructor;
inline: BooleanConstructor;
}, vue.ExtractPropTypes<{
height: (StringConstructor | NumberConstructor)[];
maxHeight: (StringConstructor | NumberConstructor)[];
maxWidth: (StringConstructor | NumberConstructor)[];
minHeight: (StringConstructor | NumberConstructor)[];
minWidth: (StringConstructor | NumberConstructor)[];
width: (StringConstructor | NumberConstructor)[];
class: vue.PropType<any>;
style: {
type: vue.PropType<vue.StyleValue>;
default: null;
};
aspectRatio: (StringConstructor | NumberConstructor)[];
contentClass: StringConstructor;
inline: BooleanConstructor;
}>>;
type VResponsive = InstanceType<typeof VResponsive>;
export { VResponsive };

View File

@ -0,0 +1,2 @@
export { VResponsive } from "./VResponsive.mjs";
//# sourceMappingURL=index.mjs.map

View File

@ -0,0 +1 @@
{"version":3,"file":"index.mjs","names":["VResponsive"],"sources":["../../../src/components/VResponsive/index.ts"],"sourcesContent":["export { VResponsive } from './VResponsive'\n"],"mappings":"SAASA,WAAW"}