@vrojs/base 0.0.1 → 0.0.3

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.
Files changed (123) hide show
  1. package/dist/index.d.ts +6 -0
  2. package/dist/index.js +37 -0
  3. package/dist/style/css.js +4 -0
  4. package/dist/style/index.css +1 -0
  5. package/dist/style/index.d.ts +0 -0
  6. package/dist/style/index.js +4 -0
  7. package/dist/types/Arrayable.d.ts +1 -0
  8. package/dist/types/Arrayable.js +1 -0
  9. package/dist/types/DeepPartial.d.ts +3 -0
  10. package/dist/types/DeepPartial.js +1 -0
  11. package/dist/types/index.d.ts +2 -0
  12. package/dist/types/index.js +1 -0
  13. package/dist/utils/ComponentManager.d.ts +18 -0
  14. package/dist/utils/ComponentManager.js +21 -0
  15. package/dist/utils/format.d.ts +5 -0
  16. package/dist/utils/format.js +14 -0
  17. package/dist/utils/getSlotEntries.d.ts +5 -0
  18. package/dist/utils/getSlotEntries.js +4 -0
  19. package/dist/utils/index.d.ts +9 -0
  20. package/dist/utils/index.js +21 -0
  21. package/dist/utils/mountComponent.d.ts +5 -0
  22. package/dist/utils/mountComponent.js +12 -0
  23. package/dist/utils/parseType.d.ts +1 -0
  24. package/dist/utils/parseType.js +4 -0
  25. package/dist/utils/props.d.ts +2 -0
  26. package/dist/utils/props.js +5 -0
  27. package/dist/utils/renderComponent.d.ts +5 -0
  28. package/dist/utils/renderComponent.js +17 -0
  29. package/dist/utils/showComponent.d.ts +6 -0
  30. package/dist/utils/showComponent.js +17 -0
  31. package/dist/utils/withInstall.d.ts +3 -0
  32. package/dist/utils/withInstall.js +6 -0
  33. package/dist/vro-aspect-ratio/index.d.ts +46 -0
  34. package/dist/vro-aspect-ratio/index.js +11 -0
  35. package/dist/vro-aspect-ratio/style/css.d.ts +0 -0
  36. package/dist/vro-aspect-ratio/style/css.js +4 -0
  37. package/dist/vro-aspect-ratio/style/index.css +1 -0
  38. package/dist/vro-aspect-ratio/style/index.d.ts +0 -0
  39. package/dist/vro-aspect-ratio/style/index.js +4 -0
  40. package/dist/vro-aspect-ratio/types.d.ts +13 -0
  41. package/dist/vro-aspect-ratio/types.js +14 -0
  42. package/dist/vro-aspect-ratio/vro-aspect-ratio.vue.d.ts +29 -0
  43. package/dist/vro-aspect-ratio/vro-aspect-ratio.vue.js +25 -0
  44. package/dist/vro-aspect-ratio/vro-aspect-ratio.vue2.js +4 -0
  45. package/dist/vro-input/index.d.ts +90 -0
  46. package/dist/vro-input/index.js +11 -0
  47. package/dist/vro-input/style/css.d.ts +0 -0
  48. package/dist/vro-input/style/css.js +3 -0
  49. package/dist/vro-input/style/index.d.ts +0 -0
  50. package/dist/vro-input/style/index.js +3 -0
  51. package/dist/vro-input/types.d.ts +95 -0
  52. package/{src/vro-input/types.ts → dist/vro-input/types.js} +17 -30
  53. package/dist/vro-input/vro-input.vue.d.ts +83 -0
  54. package/dist/vro-input/vro-input.vue.js +62 -0
  55. package/dist/vro-input/vro-input.vue2.js +4 -0
  56. package/dist/vro-loading/index.d.ts +91 -0
  57. package/dist/vro-loading/index.js +11 -0
  58. package/dist/vro-loading/style/css.d.ts +0 -0
  59. package/dist/vro-loading/style/css.js +4 -0
  60. package/dist/vro-loading/style/index.css +1 -0
  61. package/dist/vro-loading/style/index.d.ts +0 -0
  62. package/dist/vro-loading/style/index.js +4 -0
  63. package/dist/vro-loading/types.d.ts +33 -0
  64. package/dist/vro-loading/types.js +33 -0
  65. package/dist/vro-loading/vro-loading.vue.d.ts +56 -0
  66. package/dist/vro-loading/vro-loading.vue.js +50 -0
  67. package/dist/vro-loading/vro-loading.vue2.js +4 -0
  68. package/dist/vro-vnr/index.d.ts +25 -0
  69. package/dist/vro-vnr/index.js +11 -0
  70. package/dist/vro-vnr/style/css.d.ts +0 -0
  71. package/dist/vro-vnr/style/css.js +3 -0
  72. package/dist/vro-vnr/style/index.d.ts +0 -0
  73. package/dist/vro-vnr/style/index.js +3 -0
  74. package/dist/vro-vnr/types.d.ts +8 -0
  75. package/dist/vro-vnr/types.js +9 -0
  76. package/dist/vro-vnr/vro-vnr.vue.d.ts +18 -0
  77. package/dist/vro-vnr/vro-vnr.vue.js +12 -0
  78. package/dist/vro-vnr/vro-vnr.vue2.js +4 -0
  79. package/package.json +16 -10
  80. package/src/index.ts +0 -8
  81. package/src/style/base.scss +0 -2
  82. package/src/style/css.ts +0 -2
  83. package/src/style/index.scss +0 -7
  84. package/src/style/index.ts +0 -1
  85. package/src/types/Arrayable.ts +0 -1
  86. package/src/types/DeepPartial.ts +0 -3
  87. package/src/types/index.ts +0 -2
  88. package/src/utils/ComponentManager.ts +0 -39
  89. package/src/utils/format.ts +0 -31
  90. package/src/utils/index.ts +0 -8
  91. package/src/utils/mountComponent.ts +0 -16
  92. package/src/utils/parseType.ts +0 -6
  93. package/src/utils/props.ts +0 -3
  94. package/src/utils/renderComponent.ts +0 -24
  95. package/src/utils/showComponent.ts +0 -24
  96. package/src/utils/withInstall.ts +0 -10
  97. package/src/vro-aspect-ratio/README.md +0 -55
  98. package/src/vro-aspect-ratio/index.ts +0 -15
  99. package/src/vro-aspect-ratio/style/css.ts +0 -2
  100. package/src/vro-aspect-ratio/style/index.scss +0 -16
  101. package/src/vro-aspect-ratio/style/index.ts +0 -1
  102. package/src/vro-aspect-ratio/types.ts +0 -15
  103. package/src/vro-aspect-ratio/vro-aspect-ratio.vue +0 -23
  104. package/src/vro-input/README.md +0 -95
  105. package/src/vro-input/index.ts +0 -15
  106. package/src/vro-input/style/css.ts +0 -2
  107. package/src/vro-input/style/index.ts +0 -1
  108. package/src/vro-input/vro-input.vue +0 -122
  109. package/src/vro-loading/README.md +0 -77
  110. package/src/vro-loading/index.ts +0 -15
  111. package/src/vro-loading/style/css.ts +0 -2
  112. package/src/vro-loading/style/index.scss +0 -119
  113. package/src/vro-loading/style/index.ts +0 -1
  114. package/src/vro-loading/types.ts +0 -39
  115. package/src/vro-loading/vro-loading.vue +0 -39
  116. package/src/vro-vnr/README.md +0 -46
  117. package/src/vro-vnr/index.ts +0 -15
  118. package/src/vro-vnr/style/css.ts +0 -2
  119. package/src/vro-vnr/style/index.ts +0 -1
  120. package/src/vro-vnr/types.ts +0 -10
  121. package/src/vro-vnr/vro-vnr.vue +0 -13
  122. /package/{src/vro-input/style/index.scss → dist/style/base.css} +0 -0
  123. /package/{src/vro-vnr/style/index.scss → dist/style/css.d.ts} +0 -0
@@ -0,0 +1,6 @@
1
+ export * from './types';
2
+ export * from './utils';
3
+ export * from './vro-aspect-ratio';
4
+ export * from './vro-input';
5
+ export * from './vro-loading';
6
+ export * from './vro-vnr';
package/dist/index.js ADDED
@@ -0,0 +1,37 @@
1
+ import { ComponentManager as e } from "./utils/ComponentManager.js";
2
+ import { parseDecimalString as t, parseNumberString as m } from "./utils/format.js";
3
+ import { getSlotEntries as f } from "./utils/getSlotEntries.js";
4
+ import { mountComponent as s } from "./utils/mountComponent.js";
5
+ import { parseType as i } from "./utils/parseType.js";
6
+ import { definePropType as V } from "./utils/props.js";
7
+ import { renderComponent as d } from "./utils/renderComponent.js";
8
+ import { showComponent as u } from "./utils/showComponent.js";
9
+ import { withInstall as C } from "./utils/withInstall.js";
10
+ import { VroAspectRatio as I } from "./vro-aspect-ratio/index.js";
11
+ import { VroInput as h } from "./vro-input/index.js";
12
+ import { VroLoading as y } from "./vro-loading/index.js";
13
+ import { VroVnr as L } from "./vro-vnr/index.js";
14
+ import { vroAspectRatioProps as T } from "./vro-aspect-ratio/types.js";
15
+ import { vroInputProps as D } from "./vro-input/types.js";
16
+ import { vroLoadingProps as M } from "./vro-loading/types.js";
17
+ import { vroVnrProps as j } from "./vro-vnr/types.js";
18
+ export {
19
+ e as ComponentManager,
20
+ I as VroAspectRatio,
21
+ h as VroInput,
22
+ y as VroLoading,
23
+ L as VroVnr,
24
+ V as definePropType,
25
+ f as getSlotEntries,
26
+ s as mountComponent,
27
+ t as parseDecimalString,
28
+ m as parseNumberString,
29
+ i as parseType,
30
+ d as renderComponent,
31
+ u as showComponent,
32
+ T as vroAspectRatioProps,
33
+ D as vroInputProps,
34
+ M as vroLoadingProps,
35
+ j as vroVnrProps,
36
+ C as withInstall
37
+ };
@@ -0,0 +1,4 @@
1
+ import './base.css';
2
+ import './index.css';
3
+ /* empty css */
4
+ /* empty css */
@@ -0,0 +1 @@
1
+ @charset "UTF-8";.vro-aspect-ratio{position:relative}.vro-aspect-ratio-inner{position:relative;width:100%}.vro-aspect-ratio-content{position:absolute;top:0;left:0;width:100%;height:100%}.vro-loading{--vro-loading-size: 32px;--vro-loading-color: currentColor;display:inline-flex;align-items:center;justify-content:center;color:var(--vro-loading-color);line-height:1;vertical-align:middle}.vro-loading__circular{width:var(--vro-loading-size);height:var(--vro-loading-size);animation:vro-loading-rotate 1.6s linear infinite}.vro-loading__circular circle{stroke:currentColor;stroke-width:4;stroke-linecap:round;stroke-dasharray:90,150;stroke-dashoffset:0;animation:vro-loading-circular 1.6s ease-in-out infinite}.vro-loading__spinner{position:relative;width:var(--vro-loading-size);height:var(--vro-loading-size);animation:vro-loading-fade 1.2s linear infinite}.vro-loading__spinner i{position:absolute;left:50%;top:0;width:2px;height:28%;background:currentColor;border-radius:999px;transform-origin:center calc(var(--vro-loading-size) / 2)}.vro-loading__spinner i:nth-child(1){opacity:calc(1 / 12);transform:translate(-50%) rotate(0)}.vro-loading__spinner i:nth-child(2){opacity:calc(2 / 12);transform:translate(-50%) rotate(30deg)}.vro-loading__spinner i:nth-child(3){opacity:.25;transform:translate(-50%) rotate(60deg)}.vro-loading__spinner i:nth-child(4){opacity:calc(4 / 12);transform:translate(-50%) rotate(90deg)}.vro-loading__spinner i:nth-child(5){opacity:calc(5 / 12);transform:translate(-50%) rotate(120deg)}.vro-loading__spinner i:nth-child(6){opacity:.5;transform:translate(-50%) rotate(150deg)}.vro-loading__spinner i:nth-child(7){opacity:calc(7 / 12);transform:translate(-50%) rotate(180deg)}.vro-loading__spinner i:nth-child(8){opacity:calc(8 / 12);transform:translate(-50%) rotate(210deg)}.vro-loading__spinner i:nth-child(9){opacity:.75;transform:translate(-50%) rotate(240deg)}.vro-loading__spinner i:nth-child(10){opacity:calc(10 / 12);transform:translate(-50%) rotate(270deg)}.vro-loading__spinner i:nth-child(11){opacity:calc(11 / 12);transform:translate(-50%) rotate(300deg)}.vro-loading__spinner i:nth-child(12){opacity:1;transform:translate(-50%) rotate(330deg)}.vro-loading__dots{display:inline-flex;align-items:center;justify-content:center;gap:calc(var(--vro-loading-size) * .12);width:var(--vro-loading-size);height:var(--vro-loading-size)}.vro-loading__dots i{width:calc(var(--vro-loading-size) * .18);height:calc(var(--vro-loading-size) * .18);background:currentColor;border-radius:50%;animation:vro-loading-dot 1s ease-in-out infinite}.vro-loading__dots i:nth-child(2){animation-delay:.15s}.vro-loading__dots i:nth-child(3){animation-delay:.3s}@keyframes vro-loading-rotate{to{transform:rotate(360deg)}}@keyframes vro-loading-circular{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-40}to{stroke-dasharray:90,150;stroke-dashoffset:-120}}@keyframes vro-loading-fade{to{transform:rotate(360deg)}}@keyframes vro-loading-dot{0%,80%,to{opacity:.35;transform:scale(.72)}40%{opacity:1;transform:scale(1)}}
File without changes
@@ -0,0 +1,4 @@
1
+ import './base.css';
2
+ import './index.css';
3
+ /* empty css */
4
+ /* empty css */
@@ -0,0 +1 @@
1
+ export type Arrayable<T> = T | T[];
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,3 @@
1
+ export type DeepPartial<T> = {
2
+ [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
3
+ };
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ export type * from './Arrayable';
2
+ export type * from './DeepPartial';
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,18 @@
1
+ type Constructor = abstract new (...args: any) => any;
2
+ export type InstanceTypeProps<T extends Constructor> = InstanceType<T>['$props'];
3
+ export type ComponentManagerMapValue<T extends Constructor = any> = {
4
+ is: T;
5
+ props: InstanceTypeProps<T>;
6
+ } | {
7
+ is: string;
8
+ props: Record<string, any>;
9
+ };
10
+ export declare class ComponentManager {
11
+ map: Record<string, ComponentManagerMapValue>;
12
+ add(name: string, props?: Record<string, any>): ComponentManager;
13
+ add<T extends Constructor>(name: string, is: T, props?: InstanceTypeProps<T>): ComponentManager;
14
+ get(name: string): ComponentManagerMapValue<any>;
15
+ del(name: string): void;
16
+ clear(): void;
17
+ }
18
+ export {};
@@ -0,0 +1,21 @@
1
+ import { isFunction as r } from "@daysnap/utils";
2
+ class o {
3
+ constructor() {
4
+ this.map = {};
5
+ }
6
+ add(t, p, s) {
7
+ return r(p.setup) ? this.map[t] = { is: p, props: s ?? {} } : this.map[t] = { is: t, props: p ?? {} }, this;
8
+ }
9
+ get(t) {
10
+ return this.map[t];
11
+ }
12
+ del(t) {
13
+ delete this.map[t];
14
+ }
15
+ clear() {
16
+ this.map = {};
17
+ }
18
+ }
19
+ export {
20
+ o as ComponentManager
21
+ };
@@ -0,0 +1,5 @@
1
+ export declare function parseNumberString(val: string): string;
2
+ export declare function parseDecimalString(val: string, options?: {
3
+ precision?: number;
4
+ allowNegativeNumber?: boolean;
5
+ }): string;
@@ -0,0 +1,14 @@
1
+ function n(t) {
2
+ return t.replace(/[^\d]/g, "");
3
+ }
4
+ function c(t, r = {}) {
5
+ const { precision: e = 0, allowNegativeNumber: s = !0 } = r, i = new RegExp(
6
+ `^${s ? "-?" : ""}(0|[1-9]\\d*)?${+e == 0 ? "" : `(\\.?\\d{0,${e}})?`}`,
7
+ "g"
8
+ );
9
+ return t = t.match(i)?.[0] ?? "", t.startsWith("-00") ? t = "-0" : t.startsWith("-.") ? t = "-" : t.startsWith(".") ? t = "" : t.startsWith("0") && !t.startsWith("0.") && t.length > 1 && (t = `${+t}`), t;
10
+ }
11
+ export {
12
+ c as parseDecimalString,
13
+ n as parseNumberString
14
+ };
@@ -0,0 +1,5 @@
1
+ export interface SlotEntry {
2
+ source: string;
3
+ target: string;
4
+ }
5
+ export declare const getSlotEntries: (slots?: Record<string, string>) => SlotEntry[];
@@ -0,0 +1,4 @@
1
+ const n = (t) => Object.entries(t ?? {}).map(([e, r]) => ({ source: e, target: r }));
2
+ export {
3
+ n as getSlotEntries
4
+ };
@@ -0,0 +1,9 @@
1
+ export * from './ComponentManager';
2
+ export * from './format';
3
+ export * from './getSlotEntries';
4
+ export * from './mountComponent';
5
+ export * from './parseType';
6
+ export * from './props';
7
+ export * from './renderComponent';
8
+ export * from './showComponent';
9
+ export * from './withInstall';
@@ -0,0 +1,21 @@
1
+ import { ComponentManager as e } from "./ComponentManager.js";
2
+ import { parseDecimalString as p, parseNumberString as m } from "./format.js";
3
+ import { getSlotEntries as f } from "./getSlotEntries.js";
4
+ import { mountComponent as a } from "./mountComponent.js";
5
+ import { parseType as s } from "./parseType.js";
6
+ import { definePropType as l } from "./props.js";
7
+ import { renderComponent as S } from "./renderComponent.js";
8
+ import { showComponent as h } from "./showComponent.js";
9
+ import { withInstall as w } from "./withInstall.js";
10
+ export {
11
+ e as ComponentManager,
12
+ l as definePropType,
13
+ f as getSlotEntries,
14
+ a as mountComponent,
15
+ p as parseDecimalString,
16
+ m as parseNumberString,
17
+ s as parseType,
18
+ S as renderComponent,
19
+ h as showComponent,
20
+ w as withInstall
21
+ };
@@ -0,0 +1,5 @@
1
+ import { Component } from 'vue';
2
+ export declare function mountComponent(component: Component, props?: any): {
3
+ instance: import('vue').App<Element>;
4
+ destroy: () => void;
5
+ };
@@ -0,0 +1,12 @@
1
+ import { createApp as d } from "vue";
2
+ function c(n, e) {
3
+ const o = document.createElement("div");
4
+ document.body.appendChild(o);
5
+ const t = d(n, e);
6
+ return t.mount(o), { instance: t, destroy: () => {
7
+ t.unmount(), document.body.removeChild(o);
8
+ } };
9
+ }
10
+ export {
11
+ c as mountComponent
12
+ };
@@ -0,0 +1 @@
1
+ export declare const parseType: (value: any) => any;
@@ -0,0 +1,4 @@
1
+ const e = (r) => Array.isArray(r) ? r.map((n) => n?.name).join(" , ") : r?.name;
2
+ export {
3
+ e as parseType
4
+ };
@@ -0,0 +1,2 @@
1
+ import { PropType } from 'vue';
2
+ export declare const definePropType: <T>(val: any) => PropType<T>;
@@ -0,0 +1,5 @@
1
+ import "vue";
2
+ const p = (e) => e;
3
+ export {
4
+ p as definePropType
5
+ };
@@ -0,0 +1,5 @@
1
+ import { AppContext, Component } from 'vue';
2
+ export declare function renderComponent(component: Component, props?: any, appContext?: AppContext | null): {
3
+ instance: import('vue').ComponentInternalInstance;
4
+ destroy: () => void;
5
+ };
@@ -0,0 +1,17 @@
1
+ import { createVNode as m, render as o } from "vue";
2
+ function i(t, d = {}, r = null) {
3
+ const e = document.createElement("div");
4
+ document.body.appendChild(e);
5
+ const n = m(t, d);
6
+ n.appContext = r, o(n, e);
7
+ const c = () => {
8
+ o(null, e), document.body.removeChild(e);
9
+ };
10
+ return {
11
+ instance: n.component,
12
+ destroy: c
13
+ };
14
+ }
15
+ export {
16
+ i as renderComponent
17
+ };
@@ -0,0 +1,6 @@
1
+ import { AppContext, Component } from 'vue';
2
+ export declare function showComponent<T extends Component, P = T extends {
3
+ new (): {
4
+ $props: infer Props;
5
+ };
6
+ } ? Props : Record<string, any>>(component: T, props: Partial<P>, appContext?: AppContext | null): Promise<any>;
@@ -0,0 +1,17 @@
1
+ import { renderComponent as w } from "./renderComponent.js";
2
+ function i(n, o, e = null) {
3
+ return new Promise((t, r) => {
4
+ const { destroy: c, instance: s } = w(
5
+ n,
6
+ {
7
+ ...o,
8
+ onClosed: () => c()
9
+ },
10
+ e ?? n._context ?? window.app?._context ?? window._app?._context
11
+ );
12
+ s.exposed.show(o).then(t).catch(r);
13
+ });
14
+ }
15
+ export {
16
+ i as showComponent
17
+ };
@@ -0,0 +1,3 @@
1
+ import { App, Plugin } from 'vue';
2
+ export type WithInstall<T> = T & Plugin;
3
+ export declare const withInstall: <T>(main: any, install?: (app: App) => void) => WithInstall<T>;
@@ -0,0 +1,6 @@
1
+ const n = (t, e) => (t.install = e ?? ((l) => {
2
+ l.component(t.name, t);
3
+ }), t);
4
+ export {
5
+ n as withInstall
6
+ };
@@ -0,0 +1,46 @@
1
+ export * from './types';
2
+ export declare const VroAspectRatio: import('..').WithInstall<{
3
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
4
+ ratio: {
5
+ type: NumberConstructor;
6
+ default: number;
7
+ };
8
+ }>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
9
+ ratio: number;
10
+ }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
11
+ P: {};
12
+ B: {};
13
+ D: {};
14
+ C: {};
15
+ M: {};
16
+ Defaults: {};
17
+ }, Readonly<import('vue').ExtractPropTypes<{
18
+ ratio: {
19
+ type: NumberConstructor;
20
+ default: number;
21
+ };
22
+ }>> & Readonly<{}>, {}, {}, {}, {}, {
23
+ ratio: number;
24
+ }>;
25
+ __isFragment?: never;
26
+ __isTeleport?: never;
27
+ __isSuspense?: never;
28
+ } & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
29
+ ratio: {
30
+ type: NumberConstructor;
31
+ default: number;
32
+ };
33
+ }>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
34
+ ratio: number;
35
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
36
+ $slots: {
37
+ default?(_: {}): any;
38
+ };
39
+ })>;
40
+ export default VroAspectRatio;
41
+ export type VroAspectRatioInstance = InstanceType<typeof VroAspectRatio>;
42
+ declare module 'vue' {
43
+ interface GlobalComponents {
44
+ VroAspectRatio: typeof VroAspectRatio;
45
+ }
46
+ }
@@ -0,0 +1,11 @@
1
+ import "@daysnap/utils";
2
+ import "vue";
3
+ import { withInstall as o } from "../utils/withInstall.js";
4
+ import t from "./vro-aspect-ratio.vue.js";
5
+ import { vroAspectRatioProps as f } from "./types.js";
6
+ const s = o(t);
7
+ export {
8
+ s as VroAspectRatio,
9
+ s as default,
10
+ f as vroAspectRatioProps
11
+ };
File without changes
@@ -0,0 +1,4 @@
1
+ import '../../style/base.css';
2
+ import './index.css';
3
+ /* empty css */
4
+ /* empty css */
@@ -0,0 +1 @@
1
+ .vro-aspect-ratio{position:relative}.vro-aspect-ratio-inner{position:relative;width:100%}.vro-aspect-ratio-content{position:absolute;top:0;left:0;width:100%;height:100%}
File without changes
@@ -0,0 +1,4 @@
1
+ import '../../style/base.css';
2
+ import './index.css';
3
+ /* empty css */
4
+ /* empty css */
@@ -0,0 +1,13 @@
1
+ import { ExtractPropTypes } from 'vue';
2
+ export declare const vroAspectRatioProps: {
3
+ /**
4
+ * 宽高比,等价于 width / height
5
+ *
6
+ * @default 1
7
+ */
8
+ ratio: {
9
+ type: NumberConstructor;
10
+ default: number;
11
+ };
12
+ };
13
+ export type VroAspectRatioProps = ExtractPropTypes<typeof vroAspectRatioProps>;
@@ -0,0 +1,14 @@
1
+ const t = {
2
+ /**
3
+ * 宽高比,等价于 width / height
4
+ *
5
+ * @default 1
6
+ */
7
+ ratio: {
8
+ type: Number,
9
+ default: 1
10
+ }
11
+ };
12
+ export {
13
+ t as vroAspectRatioProps
14
+ };
@@ -0,0 +1,29 @@
1
+ declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
3
+ slots: {
4
+ default?(_: {}): any;
5
+ };
6
+ refs: {};
7
+ rootEl: HTMLDivElement;
8
+ };
9
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
11
+ ratio: {
12
+ type: NumberConstructor;
13
+ default: number;
14
+ };
15
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
16
+ ratio: {
17
+ type: NumberConstructor;
18
+ default: number;
19
+ };
20
+ }>> & Readonly<{}>, {
21
+ ratio: number;
22
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
23
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
24
+ export default _default;
25
+ type __VLS_WithTemplateSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };
@@ -0,0 +1,25 @@
1
+ import { defineComponent as a, computed as n, createElementBlock as c, openBlock as i, createElementVNode as e, normalizeStyle as p, renderSlot as l } from "vue";
2
+ import { vroAspectRatioProps as d } from "./types.js";
3
+ const m = { class: "vro-aspect-ratio" }, v = { class: "vro-aspect-ratio-content" }, h = /* @__PURE__ */ a({
4
+ name: "VroAspectRatio",
5
+ __name: "vro-aspect-ratio",
6
+ props: d,
7
+ setup(t) {
8
+ const o = t, r = n(() => ({
9
+ paddingTop: `${100 / o.ratio}%`
10
+ }));
11
+ return (s, _) => (i(), c("div", m, [
12
+ e("div", {
13
+ class: "vro-aspect-ratio-inner",
14
+ style: p(r.value)
15
+ }, [
16
+ e("div", v, [
17
+ l(s.$slots, "default")
18
+ ])
19
+ ], 4)
20
+ ]));
21
+ }
22
+ });
23
+ export {
24
+ h as default
25
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./vro-aspect-ratio.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,90 @@
1
+ export * from './types';
2
+ export declare const VroInput: import('..').WithInstall<import('vue').DefineComponent<import('vue').ExtractPropTypes<{
3
+ type: {
4
+ type: import('vue').PropType<import('vue').InputTypeHTMLAttribute | "decimal">;
5
+ default: string;
6
+ };
7
+ modelValue: {
8
+ type: import('vue').PropType<string | number | null | undefined>;
9
+ default: string;
10
+ };
11
+ max: {
12
+ type: (NumberConstructor | StringConstructor)[];
13
+ default: number;
14
+ };
15
+ min: {
16
+ type: (NumberConstructor | StringConstructor)[];
17
+ default: number;
18
+ };
19
+ autoFix: BooleanConstructor;
20
+ maxlength: (NumberConstructor | StringConstructor)[];
21
+ placeholder: StringConstructor;
22
+ disabled: BooleanConstructor;
23
+ precision: {
24
+ type: (NumberConstructor | StringConstructor)[];
25
+ default: number;
26
+ };
27
+ formatter: import('vue').PropType<(value: string, preValue: string) => string>;
28
+ id: StringConstructor;
29
+ name: StringConstructor;
30
+ readonly: BooleanConstructor;
31
+ inputmode: import('vue').PropType<"search" | "text" | "email" | "tel" | "url" | "decimal" | "none" | "numeric" | undefined>;
32
+ }>, {
33
+ input: HTMLInputElement;
34
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
35
+ input: (value: InputEvent) => any;
36
+ blur: (value: FocusEvent) => any;
37
+ "update:modelValue": (value: string) => any;
38
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
39
+ type: {
40
+ type: import('vue').PropType<import('vue').InputTypeHTMLAttribute | "decimal">;
41
+ default: string;
42
+ };
43
+ modelValue: {
44
+ type: import('vue').PropType<string | number | null | undefined>;
45
+ default: string;
46
+ };
47
+ max: {
48
+ type: (NumberConstructor | StringConstructor)[];
49
+ default: number;
50
+ };
51
+ min: {
52
+ type: (NumberConstructor | StringConstructor)[];
53
+ default: number;
54
+ };
55
+ autoFix: BooleanConstructor;
56
+ maxlength: (NumberConstructor | StringConstructor)[];
57
+ placeholder: StringConstructor;
58
+ disabled: BooleanConstructor;
59
+ precision: {
60
+ type: (NumberConstructor | StringConstructor)[];
61
+ default: number;
62
+ };
63
+ formatter: import('vue').PropType<(value: string, preValue: string) => string>;
64
+ id: StringConstructor;
65
+ name: StringConstructor;
66
+ readonly: BooleanConstructor;
67
+ inputmode: import('vue').PropType<"search" | "text" | "email" | "tel" | "url" | "decimal" | "none" | "numeric" | undefined>;
68
+ }>> & Readonly<{
69
+ onInput?: ((value: InputEvent) => any) | undefined;
70
+ onBlur?: ((value: FocusEvent) => any) | undefined;
71
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
72
+ }>, {
73
+ precision: string | number;
74
+ type: import('vue').InputTypeHTMLAttribute | "decimal";
75
+ disabled: boolean;
76
+ modelValue: string | number | null | undefined;
77
+ max: string | number;
78
+ min: string | number;
79
+ autoFix: boolean;
80
+ readonly: boolean;
81
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
82
+ inputRef: HTMLInputElement;
83
+ }, HTMLInputElement>>;
84
+ export default VroInput;
85
+ export type VroInputInstance = InstanceType<typeof VroInput>;
86
+ declare module 'vue' {
87
+ interface GlobalComponents {
88
+ VroInput: typeof VroInput;
89
+ }
90
+ }
@@ -0,0 +1,11 @@
1
+ import "@daysnap/utils";
2
+ import "vue";
3
+ import { withInstall as o } from "../utils/withInstall.js";
4
+ import r from "./vro-input.vue.js";
5
+ import { vroInputProps as a } from "./types.js";
6
+ const f = o(r);
7
+ export {
8
+ f as VroInput,
9
+ f as default,
10
+ a as vroInputProps
11
+ };
File without changes
@@ -0,0 +1,3 @@
1
+ import '../../style/base.css';
2
+ /* empty css */
3
+ /* empty css */
File without changes
@@ -0,0 +1,3 @@
1
+ import '../../style/base.css';
2
+ /* empty css */
3
+ /* empty css */