@usertour/helpers 0.0.56 → 0.0.58
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.
- package/README.md +0 -3
- package/dist/__tests__/condition.test.cjs +0 -5
- package/dist/__tests__/condition.test.js +2 -2
- package/dist/__tests__/content-helper.test.cjs +0 -5
- package/dist/__tests__/content-helper.test.js +3 -3
- package/dist/{chunk-73OREOHT.js → chunk-7EZSPJW4.js} +0 -6
- package/dist/{chunk-X6R6AH7G.js → chunk-FHPXPUN3.js} +1 -1
- package/dist/{chunk-RQ4UE7ZB.js → chunk-HNOXFGE2.js} +2 -2
- package/dist/{chunk-SR6B3UAJ.js → chunk-RYJKESYH.js} +4 -2
- package/dist/conditions/condition.cjs +0 -5
- package/dist/conditions/condition.js +2 -2
- package/dist/conditions/index.cjs +0 -5
- package/dist/conditions/index.js +2 -2
- package/dist/content-helper.cjs +0 -5
- package/dist/content-helper.js +3 -3
- package/dist/convert-settings.cjs +4 -2
- package/dist/convert-settings.js +1 -1
- package/dist/helper.cjs +0 -7
- package/dist/helper.d.cts +1 -4
- package/dist/helper.d.ts +1 -4
- package/dist/helper.js +1 -3
- package/dist/index.cjs +4 -9
- package/dist/index.d.cts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +4 -6
- package/package.json +2 -4
package/README.md
CHANGED
|
@@ -30,7 +30,6 @@ This package provides various utility functions for the UserTour project:
|
|
|
30
30
|
- **ID Generation**: Unique ID generation with cuid2
|
|
31
31
|
- **Object Utilities**: Deep merging, equality checking
|
|
32
32
|
- **Color Utilities**: Color formatting and manipulation with chroma-js
|
|
33
|
-
- **Class Utilities**: Class name merging with clsx and tailwind-merge
|
|
34
33
|
- **Type Utilities**: Type-safe utility functions
|
|
35
34
|
- **Validation**: Input validation helpers
|
|
36
35
|
- **Formatting**: Data formatting utilities
|
|
@@ -44,8 +43,6 @@ This package depends on:
|
|
|
44
43
|
- `deepmerge-ts` - Type-safe deep merging
|
|
45
44
|
- `@paralleldrive/cuid2` - Unique ID generation
|
|
46
45
|
- `class-variance-authority` - Class name variants
|
|
47
|
-
- `clsx` - Conditional class names
|
|
48
|
-
- `tailwind-merge` - Tailwind class merging
|
|
49
46
|
- `uuid` - UUID generation
|
|
50
47
|
|
|
51
48
|
## Development
|
|
@@ -419,13 +419,8 @@ function evaluateDateTimeCondition(logic, actualValue, expectedValue) {
|
|
|
419
419
|
}
|
|
420
420
|
|
|
421
421
|
// src/helper.ts
|
|
422
|
-
var import_clsx = require("clsx");
|
|
423
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
424
422
|
var import_uuid = require("uuid");
|
|
425
423
|
var import_cuid2 = require("@paralleldrive/cuid2");
|
|
426
|
-
function cn(...inputs) {
|
|
427
|
-
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
428
|
-
}
|
|
429
424
|
var cuid = () => {
|
|
430
425
|
return (0, import_cuid2.createId)();
|
|
431
426
|
};
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
evaluateRulesConditions,
|
|
3
3
|
filterConditionsByType,
|
|
4
4
|
isConditionsActived
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-FHPXPUN3.js";
|
|
6
6
|
import "../chunk-YYIGUZNZ.js";
|
|
7
7
|
import "../chunk-PAESAL23.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-7EZSPJW4.js";
|
|
9
9
|
import "../chunk-KYDXF7SU.js";
|
|
10
10
|
import "../chunk-JQWKLXW6.js";
|
|
11
11
|
import "../chunk-GFH3VWOC.js";
|
|
@@ -29,13 +29,8 @@ var import_types4 = require("@usertour/types");
|
|
|
29
29
|
var import_types3 = require("@usertour/types");
|
|
30
30
|
|
|
31
31
|
// src/helper.ts
|
|
32
|
-
var import_clsx = require("clsx");
|
|
33
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
34
32
|
var import_uuid = require("uuid");
|
|
35
33
|
var import_cuid2 = require("@paralleldrive/cuid2");
|
|
36
|
-
function cn(...inputs) {
|
|
37
|
-
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
38
|
-
}
|
|
39
34
|
var cuid = () => {
|
|
40
35
|
return (0, import_cuid2.createId)();
|
|
41
36
|
};
|
|
@@ -14,12 +14,12 @@ import {
|
|
|
14
14
|
isQuestionElement,
|
|
15
15
|
isRestrictedType,
|
|
16
16
|
processQuestionElements
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-HNOXFGE2.js";
|
|
18
18
|
import "../chunk-7ODE2AIC.js";
|
|
19
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-FHPXPUN3.js";
|
|
20
20
|
import "../chunk-YYIGUZNZ.js";
|
|
21
21
|
import "../chunk-PAESAL23.js";
|
|
22
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-7EZSPJW4.js";
|
|
23
23
|
import "../chunk-KYDXF7SU.js";
|
|
24
24
|
import "../chunk-JQWKLXW6.js";
|
|
25
25
|
import "../chunk-GFH3VWOC.js";
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
// src/helper.ts
|
|
2
|
-
import { clsx } from "clsx";
|
|
3
|
-
import { twMerge } from "tailwind-merge";
|
|
4
2
|
import { v4 } from "uuid";
|
|
5
3
|
import { createId } from "@paralleldrive/cuid2";
|
|
6
|
-
function cn(...inputs) {
|
|
7
|
-
return twMerge(clsx(inputs));
|
|
8
|
-
}
|
|
9
4
|
var cuid = () => {
|
|
10
5
|
return createId();
|
|
11
6
|
};
|
|
@@ -56,7 +51,6 @@ var getRandomColor = () => {
|
|
|
56
51
|
};
|
|
57
52
|
|
|
58
53
|
export {
|
|
59
|
-
cn,
|
|
60
54
|
cuid,
|
|
61
55
|
formatDate,
|
|
62
56
|
absoluteUrl,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
// src/convert-settings.ts
|
|
10
10
|
import { defaultSettings } from "@usertour/types";
|
|
11
11
|
import { deepmerge } from "deepmerge-ts";
|
|
12
|
-
var defaultFontFamily = '-apple-system,
|
|
12
|
+
var defaultFontFamily = '-apple-system, "system-ui", "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';
|
|
13
13
|
var mergeThemeDefaultSettings = (settings) => {
|
|
14
14
|
return deepmerge(defaultSettings, settings);
|
|
15
15
|
};
|
|
@@ -219,7 +219,9 @@ var convertToCssVars = (settings, type = "tooltip") => {
|
|
|
219
219
|
"--usertour-checklist-trigger-counter-background-color": settings.checklistLauncher.counter.background,
|
|
220
220
|
"--usertour-checklist-trigger-counter-font-color": settings.checklistLauncher.counter.color,
|
|
221
221
|
"--usertour-checklist-trigger-font-color-rgb": settings.checklistLauncher.color.color,
|
|
222
|
-
"--usertour-checklist-trigger-font-color":
|
|
222
|
+
"--usertour-checklist-trigger-font-color": hexToHSLString(
|
|
223
|
+
settings.checklistLauncher.color.color
|
|
224
|
+
),
|
|
223
225
|
"--usertour-checklist-trigger-font-weight": settings.checklistLauncher.fontWeight,
|
|
224
226
|
"--usertour-checkmark-background-color": settings.checklist.checkmarkColor,
|
|
225
227
|
"--usertour-checklist-trigger-height": `${settings.checklistLauncher.height}px`,
|
|
@@ -434,13 +434,8 @@ function evaluateDateTimeCondition(logic, actualValue, expectedValue) {
|
|
|
434
434
|
}
|
|
435
435
|
|
|
436
436
|
// src/helper.ts
|
|
437
|
-
var import_clsx = require("clsx");
|
|
438
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
439
437
|
var import_uuid = require("uuid");
|
|
440
438
|
var import_cuid2 = require("@paralleldrive/cuid2");
|
|
441
|
-
function cn(...inputs) {
|
|
442
|
-
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
443
|
-
}
|
|
444
439
|
var cuid = () => {
|
|
445
440
|
return (0, import_cuid2.createId)();
|
|
446
441
|
};
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
isConditionsActived,
|
|
9
9
|
isEqual,
|
|
10
10
|
regenerateConditionIds
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-FHPXPUN3.js";
|
|
12
12
|
import "../chunk-YYIGUZNZ.js";
|
|
13
13
|
import "../chunk-PAESAL23.js";
|
|
14
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-7EZSPJW4.js";
|
|
15
15
|
import "../chunk-KYDXF7SU.js";
|
|
16
16
|
import "../chunk-JQWKLXW6.js";
|
|
17
17
|
import "../chunk-GFH3VWOC.js";
|
|
@@ -479,13 +479,8 @@ function evaluateDateTimeCondition(logic, actualValue, expectedValue) {
|
|
|
479
479
|
}
|
|
480
480
|
|
|
481
481
|
// src/helper.ts
|
|
482
|
-
var import_clsx = require("clsx");
|
|
483
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
484
482
|
var import_uuid = require("uuid");
|
|
485
483
|
var import_cuid2 = require("@paralleldrive/cuid2");
|
|
486
|
-
function cn(...inputs) {
|
|
487
|
-
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
488
|
-
}
|
|
489
484
|
var cuid = () => {
|
|
490
485
|
return (0, import_cuid2.createId)();
|
|
491
486
|
};
|
package/dist/conditions/index.js
CHANGED
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
isConditionsActived,
|
|
10
10
|
isEqual,
|
|
11
11
|
regenerateConditionIds
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-FHPXPUN3.js";
|
|
13
13
|
import {
|
|
14
14
|
evaluateUrlCondition,
|
|
15
15
|
isMatchUrlPattern
|
|
16
16
|
} from "../chunk-YYIGUZNZ.js";
|
|
17
17
|
import "../chunk-PAESAL23.js";
|
|
18
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-7EZSPJW4.js";
|
|
19
19
|
import {
|
|
20
20
|
evaluateAttributeCondition
|
|
21
21
|
} from "../chunk-KYDXF7SU.js";
|
package/dist/content-helper.cjs
CHANGED
|
@@ -50,13 +50,8 @@ module.exports = __toCommonJS(content_helper_exports);
|
|
|
50
50
|
var import_types3 = require("@usertour/types");
|
|
51
51
|
|
|
52
52
|
// src/helper.ts
|
|
53
|
-
var import_clsx = require("clsx");
|
|
54
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
55
53
|
var import_uuid = require("uuid");
|
|
56
54
|
var import_cuid2 = require("@paralleldrive/cuid2");
|
|
57
|
-
function cn(...inputs) {
|
|
58
|
-
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
59
|
-
}
|
|
60
55
|
var cuid = () => {
|
|
61
56
|
return (0, import_cuid2.createId)();
|
|
62
57
|
};
|
package/dist/content-helper.js
CHANGED
|
@@ -14,12 +14,12 @@ import {
|
|
|
14
14
|
isQuestionElement,
|
|
15
15
|
isRestrictedType,
|
|
16
16
|
processQuestionElements
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-HNOXFGE2.js";
|
|
18
18
|
import "./chunk-7ODE2AIC.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-FHPXPUN3.js";
|
|
20
20
|
import "./chunk-YYIGUZNZ.js";
|
|
21
21
|
import "./chunk-PAESAL23.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-7EZSPJW4.js";
|
|
23
23
|
import "./chunk-KYDXF7SU.js";
|
|
24
24
|
import "./chunk-JQWKLXW6.js";
|
|
25
25
|
import "./chunk-GFH3VWOC.js";
|
|
@@ -74,7 +74,7 @@ var objHasOwn = ObjProto.hasOwnProperty;
|
|
|
74
74
|
var isUndefined = (x) => x === void 0;
|
|
75
75
|
|
|
76
76
|
// src/convert-settings.ts
|
|
77
|
-
var defaultFontFamily = '-apple-system,
|
|
77
|
+
var defaultFontFamily = '-apple-system, "system-ui", "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';
|
|
78
78
|
var mergeThemeDefaultSettings = (settings) => {
|
|
79
79
|
return (0, import_deepmerge_ts.deepmerge)(import_types.defaultSettings, settings);
|
|
80
80
|
};
|
|
@@ -284,7 +284,9 @@ var convertToCssVars = (settings, type = "tooltip") => {
|
|
|
284
284
|
"--usertour-checklist-trigger-counter-background-color": settings.checklistLauncher.counter.background,
|
|
285
285
|
"--usertour-checklist-trigger-counter-font-color": settings.checklistLauncher.counter.color,
|
|
286
286
|
"--usertour-checklist-trigger-font-color-rgb": settings.checklistLauncher.color.color,
|
|
287
|
-
"--usertour-checklist-trigger-font-color":
|
|
287
|
+
"--usertour-checklist-trigger-font-color": hexToHSLString(
|
|
288
|
+
settings.checklistLauncher.color.color
|
|
289
|
+
),
|
|
288
290
|
"--usertour-checklist-trigger-font-weight": settings.checklistLauncher.fontWeight,
|
|
289
291
|
"--usertour-checkmark-background-color": settings.checklist.checkmarkColor,
|
|
290
292
|
"--usertour-checklist-trigger-height": `${settings.checklistLauncher.height}px`,
|
package/dist/convert-settings.js
CHANGED
package/dist/helper.cjs
CHANGED
|
@@ -21,7 +21,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var helper_exports = {};
|
|
22
22
|
__export(helper_exports, {
|
|
23
23
|
absoluteUrl: () => absoluteUrl,
|
|
24
|
-
cn: () => cn,
|
|
25
24
|
cuid: () => cuid,
|
|
26
25
|
evalCode: () => evalCode,
|
|
27
26
|
formatDate: () => formatDate,
|
|
@@ -30,13 +29,8 @@ __export(helper_exports, {
|
|
|
30
29
|
uuidV4: () => uuidV4
|
|
31
30
|
});
|
|
32
31
|
module.exports = __toCommonJS(helper_exports);
|
|
33
|
-
var import_clsx = require("clsx");
|
|
34
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
35
32
|
var import_uuid = require("uuid");
|
|
36
33
|
var import_cuid2 = require("@paralleldrive/cuid2");
|
|
37
|
-
function cn(...inputs) {
|
|
38
|
-
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
39
|
-
}
|
|
40
34
|
var cuid = () => {
|
|
41
35
|
return (0, import_cuid2.createId)();
|
|
42
36
|
};
|
|
@@ -88,7 +82,6 @@ var getRandomColor = () => {
|
|
|
88
82
|
// Annotate the CommonJS export names for ESM import in node:
|
|
89
83
|
0 && (module.exports = {
|
|
90
84
|
absoluteUrl,
|
|
91
|
-
cn,
|
|
92
85
|
cuid,
|
|
93
86
|
evalCode,
|
|
94
87
|
formatDate,
|
package/dist/helper.d.cts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { ClassValue } from 'clsx';
|
|
2
|
-
|
|
3
|
-
declare function cn(...inputs: ClassValue[]): string;
|
|
4
1
|
declare const cuid: () => string;
|
|
5
2
|
declare function formatDate(input: string | number): string;
|
|
6
3
|
declare function absoluteUrl(path: string): string;
|
|
@@ -13,4 +10,4 @@ declare function hexToRgb(hex: string): {
|
|
|
13
10
|
declare const evalCode: (code: string) => any;
|
|
14
11
|
declare const getRandomColor: () => string;
|
|
15
12
|
|
|
16
|
-
export { absoluteUrl,
|
|
13
|
+
export { absoluteUrl, cuid, evalCode, formatDate, getRandomColor, hexToRgb, uuidV4 };
|
package/dist/helper.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { ClassValue } from 'clsx';
|
|
2
|
-
|
|
3
|
-
declare function cn(...inputs: ClassValue[]): string;
|
|
4
1
|
declare const cuid: () => string;
|
|
5
2
|
declare function formatDate(input: string | number): string;
|
|
6
3
|
declare function absoluteUrl(path: string): string;
|
|
@@ -13,4 +10,4 @@ declare function hexToRgb(hex: string): {
|
|
|
13
10
|
declare const evalCode: (code: string) => any;
|
|
14
11
|
declare const getRandomColor: () => string;
|
|
15
12
|
|
|
16
|
-
export { absoluteUrl,
|
|
13
|
+
export { absoluteUrl, cuid, evalCode, formatDate, getRandomColor, hexToRgb, uuidV4 };
|
package/dist/helper.js
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
absoluteUrl,
|
|
3
|
-
cn,
|
|
4
3
|
cuid,
|
|
5
4
|
evalCode,
|
|
6
5
|
formatDate,
|
|
7
6
|
getRandomColor,
|
|
8
7
|
hexToRgb,
|
|
9
8
|
uuidV4
|
|
10
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7EZSPJW4.js";
|
|
11
10
|
import "./chunk-XEO3YXBM.js";
|
|
12
11
|
export {
|
|
13
12
|
absoluteUrl,
|
|
14
|
-
cn,
|
|
15
13
|
cuid,
|
|
16
14
|
evalCode,
|
|
17
15
|
formatDate,
|
package/dist/index.cjs
CHANGED
|
@@ -44,7 +44,6 @@ __export(src_exports, {
|
|
|
44
44
|
assignableWindow: () => assignableWindow,
|
|
45
45
|
buildConfig: () => buildConfig,
|
|
46
46
|
capitalizeFirstLetter: () => capitalizeFirstLetter,
|
|
47
|
-
cn: () => cn,
|
|
48
47
|
conditionsIsSame: () => conditionsIsSame,
|
|
49
48
|
convertSettings: () => convertSettings,
|
|
50
49
|
convertTimeConditionLegacyToV2: () => convertTimeConditionLegacyToV2,
|
|
@@ -334,7 +333,7 @@ var isFile = (x) => {
|
|
|
334
333
|
};
|
|
335
334
|
|
|
336
335
|
// src/convert-settings.ts
|
|
337
|
-
var defaultFontFamily = '-apple-system,
|
|
336
|
+
var defaultFontFamily = '-apple-system, "system-ui", "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';
|
|
338
337
|
var mergeThemeDefaultSettings = (settings) => {
|
|
339
338
|
return (0, import_deepmerge_ts.deepmerge)(import_types.defaultSettings, settings);
|
|
340
339
|
};
|
|
@@ -544,7 +543,9 @@ var convertToCssVars = (settings, type = "tooltip") => {
|
|
|
544
543
|
"--usertour-checklist-trigger-counter-background-color": settings.checklistLauncher.counter.background,
|
|
545
544
|
"--usertour-checklist-trigger-counter-font-color": settings.checklistLauncher.counter.color,
|
|
546
545
|
"--usertour-checklist-trigger-font-color-rgb": settings.checklistLauncher.color.color,
|
|
547
|
-
"--usertour-checklist-trigger-font-color":
|
|
546
|
+
"--usertour-checklist-trigger-font-color": hexToHSLString(
|
|
547
|
+
settings.checklistLauncher.color.color
|
|
548
|
+
),
|
|
548
549
|
"--usertour-checklist-trigger-font-weight": settings.checklistLauncher.fontWeight,
|
|
549
550
|
"--usertour-checkmark-background-color": settings.checklist.checkmarkColor,
|
|
550
551
|
"--usertour-checklist-trigger-height": `${settings.checklistLauncher.height}px`,
|
|
@@ -1281,13 +1282,8 @@ var wait = (seconds) => {
|
|
|
1281
1282
|
};
|
|
1282
1283
|
|
|
1283
1284
|
// src/helper.ts
|
|
1284
|
-
var import_clsx = require("clsx");
|
|
1285
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
1286
1285
|
var import_uuid = require("uuid");
|
|
1287
1286
|
var import_cuid2 = require("@paralleldrive/cuid2");
|
|
1288
|
-
function cn(...inputs) {
|
|
1289
|
-
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
1290
|
-
}
|
|
1291
1287
|
var cuid = () => {
|
|
1292
1288
|
return (0, import_cuid2.createId)();
|
|
1293
1289
|
};
|
|
@@ -1994,7 +1990,6 @@ var duplicateStep = (step) => {
|
|
|
1994
1990
|
assignableWindow,
|
|
1995
1991
|
buildConfig,
|
|
1996
1992
|
capitalizeFirstLetter,
|
|
1997
|
-
cn,
|
|
1998
1993
|
conditionsIsSame,
|
|
1999
1994
|
convertSettings,
|
|
2000
1995
|
convertTimeConditionLegacyToV2,
|
package/dist/index.d.cts
CHANGED
|
@@ -8,7 +8,7 @@ export { AbortController, ArrayProto, XMLHttpRequest, assignableWindow, document
|
|
|
8
8
|
export { buildConfig, defaultContentConfig, extractLinkUrl, isPublishedAtLeastOneEnvironment, isPublishedInAllEnvironments, replaceUserAttr } from './content.cjs';
|
|
9
9
|
export { deepClone, parseUrlParams, wait } from './utils.cjs';
|
|
10
10
|
export { generateStateColors, hexToHSLString, hexToRGBStr } from './color.cjs';
|
|
11
|
-
export { absoluteUrl,
|
|
11
|
+
export { absoluteUrl, cuid, evalCode, formatDate, getRandomColor, hexToRgb, uuidV4 } from './helper.cjs';
|
|
12
12
|
export { allConditionsHaveIds, assignConditionIds, conditionsIsSame, evaluateRule, evaluateRulesConditions, filterConditionsByType, isConditionsActived, regenerateConditionIds } from './conditions/condition.cjs';
|
|
13
13
|
export { evaluateUrlCondition, isMatchUrlPattern } from './conditions/url.cjs';
|
|
14
14
|
export { convertTimeConditionLegacyToV2, evaluateTimeCondition, isTimeConditionDataLegacy, isTimeConditionDataV2, normalizeTimeConditionData } from './conditions/time.cjs';
|
|
@@ -19,4 +19,3 @@ export { default as isEqual } from 'fast-deep-equal';
|
|
|
19
19
|
import '@usertour/types';
|
|
20
20
|
import './storage.cjs';
|
|
21
21
|
import '@usertour/types/';
|
|
22
|
-
import 'clsx';
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export { AbortController, ArrayProto, XMLHttpRequest, assignableWindow, document
|
|
|
8
8
|
export { buildConfig, defaultContentConfig, extractLinkUrl, isPublishedAtLeastOneEnvironment, isPublishedInAllEnvironments, replaceUserAttr } from './content.js';
|
|
9
9
|
export { deepClone, parseUrlParams, wait } from './utils.js';
|
|
10
10
|
export { generateStateColors, hexToHSLString, hexToRGBStr } from './color.js';
|
|
11
|
-
export { absoluteUrl,
|
|
11
|
+
export { absoluteUrl, cuid, evalCode, formatDate, getRandomColor, hexToRgb, uuidV4 } from './helper.js';
|
|
12
12
|
export { allConditionsHaveIds, assignConditionIds, conditionsIsSame, evaluateRule, evaluateRulesConditions, filterConditionsByType, isConditionsActived, regenerateConditionIds } from './conditions/condition.js';
|
|
13
13
|
export { evaluateUrlCondition, isMatchUrlPattern } from './conditions/url.js';
|
|
14
14
|
export { convertTimeConditionLegacyToV2, evaluateTimeCondition, isTimeConditionDataLegacy, isTimeConditionDataV2, normalizeTimeConditionData } from './conditions/time.js';
|
|
@@ -19,4 +19,3 @@ export { default as isEqual } from 'fast-deep-equal';
|
|
|
19
19
|
import '@usertour/types';
|
|
20
20
|
import './storage.js';
|
|
21
21
|
import '@usertour/types/';
|
|
22
|
-
import 'clsx';
|
package/dist/index.js
CHANGED
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
isQuestionElement,
|
|
39
39
|
isRestrictedType,
|
|
40
40
|
processQuestionElements
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-HNOXFGE2.js";
|
|
42
42
|
import "./chunk-7ODE2AIC.js";
|
|
43
43
|
import {
|
|
44
44
|
allConditionsHaveIds,
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
isConditionsActived,
|
|
51
51
|
isEqual,
|
|
52
52
|
regenerateConditionIds
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-FHPXPUN3.js";
|
|
54
54
|
import {
|
|
55
55
|
evaluateUrlCondition,
|
|
56
56
|
isMatchUrlPattern
|
|
@@ -58,14 +58,13 @@ import {
|
|
|
58
58
|
import "./chunk-PAESAL23.js";
|
|
59
59
|
import {
|
|
60
60
|
absoluteUrl,
|
|
61
|
-
cn,
|
|
62
61
|
cuid,
|
|
63
62
|
evalCode,
|
|
64
63
|
formatDate,
|
|
65
64
|
getRandomColor,
|
|
66
65
|
hexToRgb,
|
|
67
66
|
uuidV4
|
|
68
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-7EZSPJW4.js";
|
|
69
68
|
import {
|
|
70
69
|
evaluateAttributeCondition
|
|
71
70
|
} from "./chunk-KYDXF7SU.js";
|
|
@@ -81,7 +80,7 @@ import {
|
|
|
81
80
|
convertSettings,
|
|
82
81
|
convertToCssVars,
|
|
83
82
|
mergeThemeDefaultSettings
|
|
84
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-RYJKESYH.js";
|
|
85
84
|
import {
|
|
86
85
|
generateStateColors,
|
|
87
86
|
hexToHSLString,
|
|
@@ -155,7 +154,6 @@ export {
|
|
|
155
154
|
assignableWindow,
|
|
156
155
|
buildConfig,
|
|
157
156
|
capitalizeFirstLetter,
|
|
158
|
-
cn,
|
|
159
157
|
conditionsIsSame,
|
|
160
158
|
convertSettings,
|
|
161
159
|
convertTimeConditionLegacyToV2,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usertour/helpers",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.58",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Utility functions and helpers shared across the UserTour project",
|
|
6
6
|
"homepage": "https://www.usertour.io",
|
|
@@ -29,14 +29,12 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@paralleldrive/cuid2": "^2.2.2",
|
|
32
|
-
"@usertour/types": "^0.0.
|
|
32
|
+
"@usertour/types": "^0.0.43",
|
|
33
33
|
"chroma-js": "^3.1.2",
|
|
34
34
|
"class-variance-authority": "^0.4.0",
|
|
35
|
-
"clsx": "^1.2.1",
|
|
36
35
|
"date-fns": "^2.30.0",
|
|
37
36
|
"deepmerge-ts": "^7.1.3",
|
|
38
37
|
"fast-deep-equal": "^3.1.3",
|
|
39
|
-
"tailwind-merge": "^1.13.2",
|
|
40
38
|
"uuid": "^9.0.1"
|
|
41
39
|
},
|
|
42
40
|
"devDependencies": {
|