@mekari/pixel3-tour 0.0.1-dev.0

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.
@@ -0,0 +1,11 @@
1
+ import { TourState, TourClasses, TourApiMachine } from './tour.types.js';
2
+ import '@mekari/pixel3-utils';
3
+ import '@popperjs/core';
4
+
5
+ /**
6
+ * Exported tour connects.
7
+ */
8
+
9
+ declare function tourConnect(state: TourState, classes: TourClasses): TourApiMachine;
10
+
11
+ export { tourConnect };
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/modules/tour.connects.ts
22
+ var tour_connects_exports = {};
23
+ __export(tour_connects_exports, {
24
+ tourConnect: () => tourConnect
25
+ });
26
+ module.exports = __toCommonJS(tour_connects_exports);
27
+ var import_pixel3_utils = require("@mekari/pixel3-utils");
28
+ function tourConnect(state, classes) {
29
+ const {
30
+ id,
31
+ steps,
32
+ stepIndex,
33
+ isDisableScroll,
34
+ isManual,
35
+ isDebug
36
+ } = state;
37
+ const idx = id != null ? id : `mp-tour-${(0, import_pixel3_utils.useId)()}`;
38
+ return {
39
+ id,
40
+ steps,
41
+ stepIndex,
42
+ isDisableScroll,
43
+ isManual,
44
+ isDebug,
45
+ rootProps: {
46
+ class: classes.root,
47
+ "data-pixel-component": "MpTour"
48
+ },
49
+ overlayProps: {
50
+ id: `${idx}-overlay`,
51
+ class: classes.overlay,
52
+ "data-pixel-component": "MpTourOverlay"
53
+ },
54
+ panelProps: {
55
+ id: `${idx}`,
56
+ class: classes.panel,
57
+ "data-pixel-component": "MpTourPanel"
58
+ }
59
+ };
60
+ }
61
+ __name(tourConnect, "tourConnect");
62
+ // Annotate the CommonJS export names for ESM import in node:
63
+ 0 && (module.exports = {
64
+ tourConnect
65
+ });
@@ -0,0 +1,7 @@
1
+ import {
2
+ tourConnect
3
+ } from "../chunk-5MGBFCZE.mjs";
4
+ import "../chunk-QZ7VFGWC.mjs";
5
+ export {
6
+ tourConnect
7
+ };
@@ -0,0 +1,8 @@
1
+ import * as vue from 'vue';
2
+ import { TourDefinedContext, TourApiMachine } from './tour.types.mjs';
3
+ import * as _mekari_pixel3_utils from '@mekari/pixel3-utils';
4
+ import '@popperjs/core';
5
+
6
+ declare const useTour: (props: TourDefinedContext) => vue.ComputedRef<TourApiMachine<_mekari_pixel3_utils.PropTypes>>;
7
+
8
+ export { useTour };
@@ -0,0 +1,8 @@
1
+ import * as vue from 'vue';
2
+ import { TourDefinedContext, TourApiMachine } from './tour.types.js';
3
+ import * as _mekari_pixel3_utils from '@mekari/pixel3-utils';
4
+ import '@popperjs/core';
5
+
6
+ declare const useTour: (props: TourDefinedContext) => vue.ComputedRef<TourApiMachine<_mekari_pixel3_utils.PropTypes>>;
7
+
8
+ export { useTour };
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/modules/tour.hooks.ts
22
+ var tour_hooks_exports = {};
23
+ __export(tour_hooks_exports, {
24
+ useTour: () => useTour
25
+ });
26
+ module.exports = __toCommonJS(tour_hooks_exports);
27
+ var import_vue = require("vue");
28
+ var import_recipes = require("@mekari/pixel3-styled-system/recipes");
29
+
30
+ // src/modules/tour.connects.ts
31
+ var import_pixel3_utils = require("@mekari/pixel3-utils");
32
+ function tourConnect(state, classes) {
33
+ const {
34
+ id,
35
+ steps,
36
+ stepIndex,
37
+ isDisableScroll,
38
+ isManual,
39
+ isDebug
40
+ } = state;
41
+ const idx = id != null ? id : `mp-tour-${(0, import_pixel3_utils.useId)()}`;
42
+ return {
43
+ id,
44
+ steps,
45
+ stepIndex,
46
+ isDisableScroll,
47
+ isManual,
48
+ isDebug,
49
+ rootProps: {
50
+ class: classes.root,
51
+ "data-pixel-component": "MpTour"
52
+ },
53
+ overlayProps: {
54
+ id: `${idx}-overlay`,
55
+ class: classes.overlay,
56
+ "data-pixel-component": "MpTourOverlay"
57
+ },
58
+ panelProps: {
59
+ id: `${idx}`,
60
+ class: classes.panel,
61
+ "data-pixel-component": "MpTourPanel"
62
+ }
63
+ };
64
+ }
65
+ __name(tourConnect, "tourConnect");
66
+
67
+ // src/modules/tour.hooks.ts
68
+ var useTour = /* @__PURE__ */ __name((props) => {
69
+ const context = (0, import_vue.ref)(props);
70
+ const [value] = import_recipes.tourSlotRecipe.splitVariantProps(context.value);
71
+ const classes = (0, import_recipes.tourSlotRecipe)(value);
72
+ return (0, import_vue.computed)(() => tourConnect(context.value, classes));
73
+ }, "useTour");
74
+ // Annotate the CommonJS export names for ESM import in node:
75
+ 0 && (module.exports = {
76
+ useTour
77
+ });
@@ -0,0 +1,8 @@
1
+ import {
2
+ useTour
3
+ } from "../chunk-TQSSSA7Q.mjs";
4
+ import "../chunk-5MGBFCZE.mjs";
5
+ import "../chunk-QZ7VFGWC.mjs";
6
+ export {
7
+ useTour
8
+ };
@@ -0,0 +1,31 @@
1
+ import { StepsProps } from './tour.types.mjs';
2
+ import { PropType } from 'vue';
3
+ import '@mekari/pixel3-utils';
4
+ import '@popperjs/core';
5
+
6
+ declare const tourProps: {
7
+ id: {
8
+ type: PropType<string | undefined>;
9
+ };
10
+ steps: {
11
+ type: PropType<StepsProps[] | undefined>;
12
+ };
13
+ stepIndex: {
14
+ type: PropType<number | undefined>;
15
+ };
16
+ isDisableScroll: {
17
+ type: PropType<boolean | undefined>;
18
+ default: boolean;
19
+ };
20
+ isManual: {
21
+ type: PropType<boolean | undefined>;
22
+ default: boolean;
23
+ };
24
+ isDebug: {
25
+ type: PropType<boolean | undefined>;
26
+ default: boolean;
27
+ };
28
+ };
29
+ declare const tourEmits: ("next" | "prev" | "close")[];
30
+
31
+ export { tourEmits, tourProps };
@@ -0,0 +1,31 @@
1
+ import { StepsProps } from './tour.types.js';
2
+ import { PropType } from 'vue';
3
+ import '@mekari/pixel3-utils';
4
+ import '@popperjs/core';
5
+
6
+ declare const tourProps: {
7
+ id: {
8
+ type: PropType<string | undefined>;
9
+ };
10
+ steps: {
11
+ type: PropType<StepsProps[] | undefined>;
12
+ };
13
+ stepIndex: {
14
+ type: PropType<number | undefined>;
15
+ };
16
+ isDisableScroll: {
17
+ type: PropType<boolean | undefined>;
18
+ default: boolean;
19
+ };
20
+ isManual: {
21
+ type: PropType<boolean | undefined>;
22
+ default: boolean;
23
+ };
24
+ isDebug: {
25
+ type: PropType<boolean | undefined>;
26
+ default: boolean;
27
+ };
28
+ };
29
+ declare const tourEmits: ("next" | "prev" | "close")[];
30
+
31
+ export { tourEmits, tourProps };
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/modules/tour.props.ts
21
+ var tour_props_exports = {};
22
+ __export(tour_props_exports, {
23
+ tourEmits: () => tourEmits,
24
+ tourProps: () => tourProps
25
+ });
26
+ module.exports = __toCommonJS(tour_props_exports);
27
+ var import_pixel3_utils = require("@mekari/pixel3-utils");
28
+ var tourProps = {
29
+ id: {
30
+ type: String
31
+ },
32
+ steps: {
33
+ type: Array
34
+ },
35
+ stepIndex: {
36
+ type: Number
37
+ },
38
+ isDisableScroll: {
39
+ type: Boolean,
40
+ default: false
41
+ },
42
+ isManual: {
43
+ type: Boolean,
44
+ default: false
45
+ },
46
+ isDebug: {
47
+ type: Boolean,
48
+ default: false
49
+ }
50
+ };
51
+ var tourEmits = (0, import_pixel3_utils.declareEmit)(["next", "prev", "close"]);
52
+ // Annotate the CommonJS export names for ESM import in node:
53
+ 0 && (module.exports = {
54
+ tourEmits,
55
+ tourProps
56
+ });
@@ -0,0 +1,9 @@
1
+ import {
2
+ tourEmits,
3
+ tourProps
4
+ } from "../chunk-7BC44YZN.mjs";
5
+ import "../chunk-QZ7VFGWC.mjs";
6
+ export {
7
+ tourEmits,
8
+ tourProps
9
+ };
@@ -0,0 +1,50 @@
1
+ import { Optional, PropTypes } from '@mekari/pixel3-utils';
2
+ import { Placement } from '@popperjs/core';
3
+
4
+ /**
5
+ * Exported tour types.
6
+ */
7
+
8
+ type StepsProps = {
9
+ target?: string;
10
+ isHighlighted?: boolean;
11
+ highlightColor?: string;
12
+ isScrollIntoElement?: boolean;
13
+ offset?: number;
14
+ options?: {
15
+ placement?: Placement;
16
+ };
17
+ render?: (next: () => void, prev: () => void, close: () => void) => void;
18
+ };
19
+ interface TourProps {
20
+ id?: string;
21
+ steps?: StepsProps[];
22
+ stepIndex?: number;
23
+ isDisableScroll?: boolean;
24
+ isManual?: boolean;
25
+ isDebug?: boolean;
26
+ next?: (index: number) => void;
27
+ prev?: (index: number) => void;
28
+ close?: (index: number) => void;
29
+ }
30
+ type TourDefinedContext = Optional<TourProps, 'id'>;
31
+ interface TourApiMachine<T extends PropTypes = PropTypes> {
32
+ id?: string;
33
+ steps?: StepsProps[];
34
+ stepIndex?: number;
35
+ isDisableScroll?: boolean;
36
+ isManual?: boolean;
37
+ isDebug?: boolean;
38
+ rootProps?: T['element'];
39
+ overlayProps?: T['element'];
40
+ panelProps?: T['element'];
41
+ }
42
+ interface TourState extends TourProps {
43
+ }
44
+ interface TourClasses {
45
+ root?: string;
46
+ overlay?: string;
47
+ panel?: string;
48
+ }
49
+
50
+ export { StepsProps, TourApiMachine, TourClasses, TourDefinedContext, TourProps, TourState };
@@ -0,0 +1,50 @@
1
+ import { Optional, PropTypes } from '@mekari/pixel3-utils';
2
+ import { Placement } from '@popperjs/core';
3
+
4
+ /**
5
+ * Exported tour types.
6
+ */
7
+
8
+ type StepsProps = {
9
+ target?: string;
10
+ isHighlighted?: boolean;
11
+ highlightColor?: string;
12
+ isScrollIntoElement?: boolean;
13
+ offset?: number;
14
+ options?: {
15
+ placement?: Placement;
16
+ };
17
+ render?: (next: () => void, prev: () => void, close: () => void) => void;
18
+ };
19
+ interface TourProps {
20
+ id?: string;
21
+ steps?: StepsProps[];
22
+ stepIndex?: number;
23
+ isDisableScroll?: boolean;
24
+ isManual?: boolean;
25
+ isDebug?: boolean;
26
+ next?: (index: number) => void;
27
+ prev?: (index: number) => void;
28
+ close?: (index: number) => void;
29
+ }
30
+ type TourDefinedContext = Optional<TourProps, 'id'>;
31
+ interface TourApiMachine<T extends PropTypes = PropTypes> {
32
+ id?: string;
33
+ steps?: StepsProps[];
34
+ stepIndex?: number;
35
+ isDisableScroll?: boolean;
36
+ isManual?: boolean;
37
+ isDebug?: boolean;
38
+ rootProps?: T['element'];
39
+ overlayProps?: T['element'];
40
+ panelProps?: T['element'];
41
+ }
42
+ interface TourState extends TourProps {
43
+ }
44
+ interface TourClasses {
45
+ root?: string;
46
+ overlay?: string;
47
+ panel?: string;
48
+ }
49
+
50
+ export { StepsProps, TourApiMachine, TourClasses, TourDefinedContext, TourProps, TourState };
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/modules/tour.types.ts
17
+ var tour_types_exports = {};
18
+ module.exports = __toCommonJS(tour_types_exports);
File without changes
@@ -0,0 +1,8 @@
1
+ import * as vue from 'vue';
2
+ import { StepsProps, TourProps } from './modules/tour.types.mjs';
3
+ import '@mekari/pixel3-utils';
4
+ import '@popperjs/core';
5
+
6
+ declare const tour: (isStart?: boolean, steps?: StepsProps[], options?: TourProps) => vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | undefined;
7
+
8
+ export { tour };
package/dist/tour.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ import * as vue from 'vue';
2
+ import { StepsProps, TourProps } from './modules/tour.types.js';
3
+ import '@mekari/pixel3-utils';
4
+ import '@popperjs/core';
5
+
6
+ declare const tour: (isStart?: boolean, steps?: StepsProps[], options?: TourProps) => vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | undefined;
7
+
8
+ export { tour };