zartui 3.1.11 → 3.1.12

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 (54) hide show
  1. package/README.md +23 -23
  2. package/es/composables/use-touch.d.ts +1 -0
  3. package/es/composables/use-touch.mjs +8 -1
  4. package/es/config-provider/types.d.ts +1 -1
  5. package/es/floating-bubble/FloatingBubble.d.ts +81 -0
  6. package/es/floating-bubble/FloatingBubble.mjs +181 -0
  7. package/es/floating-bubble/index.css +1 -0
  8. package/es/floating-bubble/index.d.ts +63 -0
  9. package/es/floating-bubble/index.mjs +10 -0
  10. package/es/floating-bubble/style/index.d.ts +1 -0
  11. package/es/floating-bubble/style/index.mjs +4 -0
  12. package/es/floating-bubble/types.d.ts +20 -0
  13. package/es/floating-bubble/types.mjs +0 -0
  14. package/es/index.d.ts +2 -1
  15. package/es/index.mjs +4 -1
  16. package/es/lazyload/vue-lazyload/index.d.ts +55 -55
  17. package/es/utils/closest.d.ts +1 -0
  18. package/es/utils/closest.mjs +8 -0
  19. package/es/utils/constant.d.ts +1 -0
  20. package/es/utils/constant.mjs +3 -1
  21. package/es/utils/index.d.ts +1 -0
  22. package/es/utils/index.mjs +1 -0
  23. package/es/vue-sfc-shim.d.ts +6 -6
  24. package/es/vue-tsx-shim.d.ts +23 -23
  25. package/lib/composables/use-touch.d.ts +1 -0
  26. package/lib/composables/use-touch.js +8 -1
  27. package/lib/config-provider/types.d.ts +1 -1
  28. package/lib/floating-bubble/FloatingBubble.d.ts +81 -0
  29. package/lib/floating-bubble/FloatingBubble.js +210 -0
  30. package/lib/floating-bubble/index.css +1 -0
  31. package/lib/floating-bubble/index.d.ts +63 -0
  32. package/lib/floating-bubble/index.js +39 -0
  33. package/lib/floating-bubble/style/index.d.ts +1 -0
  34. package/lib/floating-bubble/style/index.js +4 -0
  35. package/lib/floating-bubble/types.d.ts +20 -0
  36. package/lib/floating-bubble/types.js +15 -0
  37. package/lib/index.css +1 -1
  38. package/lib/index.d.ts +2 -1
  39. package/lib/index.js +4 -1
  40. package/lib/lazyload/vue-lazyload/index.d.ts +55 -55
  41. package/lib/utils/closest.d.ts +1 -0
  42. package/lib/utils/closest.js +27 -0
  43. package/lib/utils/constant.d.ts +1 -0
  44. package/lib/utils/constant.js +3 -1
  45. package/lib/utils/index.d.ts +1 -0
  46. package/lib/utils/index.js +1 -0
  47. package/lib/vue-sfc-shim.d.ts +6 -6
  48. package/lib/vue-tsx-shim.d.ts +23 -23
  49. package/lib/web-types.json +1 -1
  50. package/lib/zartui.cjs.js +644 -457
  51. package/lib/zartui.es.js +644 -457
  52. package/lib/zartui.js +644 -457
  53. package/lib/zartui.min.js +1 -1
  54. package/package.json +3 -3
package/lib/index.d.ts CHANGED
@@ -19,6 +19,7 @@ export * from "./dropdown-item";
19
19
  export * from "./dropdown-menu";
20
20
  export * from "./empty";
21
21
  export * from "./field";
22
+ export * from "./floating-bubble";
22
23
  export * from "./form";
23
24
  export * from "./grid";
24
25
  export * from "./grid-item";
@@ -78,4 +79,4 @@ declare namespace _default {
78
79
  }
79
80
  export default _default;
80
81
  export function install(app: any): void;
81
- export const version: "3.1.11";
82
+ export const version: "3.1.12";
package/lib/index.js CHANGED
@@ -44,6 +44,7 @@ var import_dropdown_item = require("./dropdown-item");
44
44
  var import_dropdown_menu = require("./dropdown-menu");
45
45
  var import_empty = require("./empty");
46
46
  var import_field = require("./field");
47
+ var import_floating_bubble = require("./floating-bubble");
47
48
  var import_form = require("./form");
48
49
  var import_grid = require("./grid");
49
50
  var import_grid_item = require("./grid-item");
@@ -117,6 +118,7 @@ __reExport(stdin_exports, require("./dropdown-item"), module.exports);
117
118
  __reExport(stdin_exports, require("./dropdown-menu"), module.exports);
118
119
  __reExport(stdin_exports, require("./empty"), module.exports);
119
120
  __reExport(stdin_exports, require("./field"), module.exports);
121
+ __reExport(stdin_exports, require("./floating-bubble"), module.exports);
120
122
  __reExport(stdin_exports, require("./form"), module.exports);
121
123
  __reExport(stdin_exports, require("./grid"), module.exports);
122
124
  __reExport(stdin_exports, require("./grid-item"), module.exports);
@@ -170,7 +172,7 @@ __reExport(stdin_exports, require("./time-picker"), module.exports);
170
172
  __reExport(stdin_exports, require("./timeline"), module.exports);
171
173
  __reExport(stdin_exports, require("./toast"), module.exports);
172
174
  __reExport(stdin_exports, require("./uploader"), module.exports);
173
- const version = "3.1.11";
175
+ const version = "3.1.12";
174
176
  function install(app) {
175
177
  const components = [
176
178
  import_action_sheet.ActionSheet,
@@ -194,6 +196,7 @@ function install(app) {
194
196
  import_dropdown_menu.DropdownMenu,
195
197
  import_empty.Empty,
196
198
  import_field.Field,
199
+ import_floating_bubble.FloatingBubble,
197
200
  import_form.Form,
198
201
  import_grid.Grid,
199
202
  import_grid_item.GridItem,
@@ -1,55 +1,55 @@
1
- import type { App } from 'vue';
2
-
3
- declare type ListenEvent =
4
- | 'scroll'
5
- | 'wheel'
6
- | 'mousewheel'
7
- | 'resize'
8
- | 'animationend'
9
- | 'transitionend'
10
- | 'touchmove';
11
-
12
- // eslint-disable-next-line
13
- declare type Callback = (listener: any, options: LazyloadOptions) => void;
14
-
15
- declare type Filter = {
16
- webp?: Callback;
17
- progressive?: Callback;
18
- };
19
-
20
- declare type Adapter = {
21
- error?: Callback;
22
- loaded?: Callback;
23
- loading?: Callback;
24
- };
25
-
26
- export declare type LazyloadOptions = {
27
- error?: string;
28
- filter?: Filter;
29
- silent?: boolean;
30
- adapter?: Adapter;
31
- loading?: string;
32
- attempt?: number;
33
- preLoad?: number;
34
- observer?: boolean;
35
- lazyImage?: boolean;
36
- throttleWait?: number;
37
- listenEvents?: ListenEvent[];
38
- dispatchEvent?: boolean;
39
- lazyComponent?: boolean;
40
- observerOptions?: IntersectionObserverInit;
41
- };
42
-
43
- export declare const Lazyload: {
44
- install(app: App, options?: LazyloadOptions): void;
45
- };
46
-
47
- declare module '@vue/runtime-core' {
48
- interface ComponentCustomProperties {
49
- $Lazyload: {
50
- $on: (event: string, handler: Callback) => void;
51
- $off: (event: string, handler?: Callback) => void;
52
- $once: (event: string, handler: Callback) => void;
53
- };
54
- }
55
- }
1
+ import type { App } from 'vue';
2
+
3
+ declare type ListenEvent =
4
+ | 'scroll'
5
+ | 'wheel'
6
+ | 'mousewheel'
7
+ | 'resize'
8
+ | 'animationend'
9
+ | 'transitionend'
10
+ | 'touchmove';
11
+
12
+ // eslint-disable-next-line
13
+ declare type Callback = (listener: any, options: LazyloadOptions) => void;
14
+
15
+ declare type Filter = {
16
+ webp?: Callback;
17
+ progressive?: Callback;
18
+ };
19
+
20
+ declare type Adapter = {
21
+ error?: Callback;
22
+ loaded?: Callback;
23
+ loading?: Callback;
24
+ };
25
+
26
+ export declare type LazyloadOptions = {
27
+ error?: string;
28
+ filter?: Filter;
29
+ silent?: boolean;
30
+ adapter?: Adapter;
31
+ loading?: string;
32
+ attempt?: number;
33
+ preLoad?: number;
34
+ observer?: boolean;
35
+ lazyImage?: boolean;
36
+ throttleWait?: number;
37
+ listenEvents?: ListenEvent[];
38
+ dispatchEvent?: boolean;
39
+ lazyComponent?: boolean;
40
+ observerOptions?: IntersectionObserverInit;
41
+ };
42
+
43
+ export declare const Lazyload: {
44
+ install(app: App, options?: LazyloadOptions): void;
45
+ };
46
+
47
+ declare module '@vue/runtime-core' {
48
+ interface ComponentCustomProperties {
49
+ $Lazyload: {
50
+ $on: (event: string, handler: Callback) => void;
51
+ $off: (event: string, handler?: Callback) => void;
52
+ $once: (event: string, handler: Callback) => void;
53
+ };
54
+ }
55
+ }
@@ -0,0 +1 @@
1
+ export declare function closest(arr: number[], target: number): number;
@@ -0,0 +1,27 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var stdin_exports = {};
19
+ __export(stdin_exports, {
20
+ closest: () => closest
21
+ });
22
+ module.exports = __toCommonJS(stdin_exports);
23
+ function closest(arr, target) {
24
+ return arr.reduce(
25
+ (pre, cur) => Math.abs(pre - target) < Math.abs(cur - target) ? pre : cur
26
+ );
27
+ }
@@ -11,3 +11,4 @@ export declare const HAPTICS_FEEDBACK = "zt-haptics-feedback";
11
11
  export declare const ELLIPSIS = "zt-ellipsis";
12
12
  export declare const FORM_KEY: InjectionKey<FormProvide>;
13
13
  export declare const LONG_PRESS_START_TIME = 500;
14
+ export declare const TAP_OFFSET = 5;
@@ -27,7 +27,8 @@ __export(stdin_exports, {
27
27
  ELLIPSIS: () => ELLIPSIS,
28
28
  FORM_KEY: () => FORM_KEY,
29
29
  HAPTICS_FEEDBACK: () => HAPTICS_FEEDBACK,
30
- LONG_PRESS_START_TIME: () => LONG_PRESS_START_TIME
30
+ LONG_PRESS_START_TIME: () => LONG_PRESS_START_TIME,
31
+ TAP_OFFSET: () => TAP_OFFSET
31
32
  });
32
33
  module.exports = __toCommonJS(stdin_exports);
33
34
  const BORDER = "zt-hairline";
@@ -41,3 +42,4 @@ const HAPTICS_FEEDBACK = "zt-haptics-feedback";
41
42
  const ELLIPSIS = "zt-ellipsis";
42
43
  const FORM_KEY = Symbol("zt-form");
43
44
  const LONG_PRESS_START_TIME = 500;
45
+ const TAP_OFFSET = 5;
@@ -7,3 +7,4 @@ export * from './constant';
7
7
  export * from './validate';
8
8
  export * from './interceptor';
9
9
  export * from './with-install';
10
+ export * from './closest';
@@ -23,3 +23,4 @@ __reExport(stdin_exports, require("./constant"), module.exports);
23
23
  __reExport(stdin_exports, require("./validate"), module.exports);
24
24
  __reExport(stdin_exports, require("./interceptor"), module.exports);
25
25
  __reExport(stdin_exports, require("./with-install"), module.exports);
26
+ __reExport(stdin_exports, require("./closest"), module.exports);
@@ -1,6 +1,6 @@
1
- declare module '*.vue' {
2
- // eslint-disable-next-line
3
- import { DefineComponent } from 'vue';
4
- const Component: DefineComponent;
5
- export default Component;
6
- }
1
+ declare module '*.vue' {
2
+ // eslint-disable-next-line
3
+ import { DefineComponent } from 'vue';
4
+ const Component: DefineComponent;
5
+ export default Component;
6
+ }
@@ -1,23 +1,23 @@
1
- import 'vue';
2
-
3
- type EventHandler = (...args: any[]) => void;
4
-
5
- declare module 'vue' {
6
- interface ComponentCustomProps {
7
- id?: string;
8
- role?: string;
9
- tabindex?: number;
10
- onClick?: EventHandler;
11
- onTouchend?: EventHandler;
12
- onTouchmove?: EventHandler;
13
- onTouchstart?: EventHandler;
14
- onTouchcancel?: EventHandler;
15
- onTouchmovePassive?: EventHandler;
16
- onTouchstartPassive?: EventHandler;
17
- }
18
-
19
- interface HTMLAttributes {
20
- onTouchmovePassive?: EventHandler;
21
- onTouchstartPassive?: EventHandler;
22
- }
23
- }
1
+ import 'vue';
2
+
3
+ type EventHandler = (...args: any[]) => void;
4
+
5
+ declare module 'vue' {
6
+ interface ComponentCustomProps {
7
+ id?: string;
8
+ role?: string;
9
+ tabindex?: number;
10
+ onClick?: EventHandler;
11
+ onTouchend?: EventHandler;
12
+ onTouchmove?: EventHandler;
13
+ onTouchstart?: EventHandler;
14
+ onTouchcancel?: EventHandler;
15
+ onTouchmovePassive?: EventHandler;
16
+ onTouchstartPassive?: EventHandler;
17
+ }
18
+
19
+ interface HTMLAttributes {
20
+ onTouchmovePassive?: EventHandler;
21
+ onTouchstartPassive?: EventHandler;
22
+ }
23
+ }