@marianmeres/stuic 1.104.0 → 1.106.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.
@@ -1,3 +1,2 @@
1
1
  import type { AlertConfirmPromptIcons } from './AlertConfirmPrompt.svelte';
2
- export declare function iconFeatherAlertTriangle(props: any): string;
3
2
  export declare const acpDefaultIcons: AlertConfirmPromptIcons;
@@ -1,112 +1,8 @@
1
- // taken from @marianmeres/icons-fns
2
- export function iconFeatherAlertTriangle(props) {
3
- // Backward compatible signature support: fn(cls, size, style)
4
- if (props === null || props === undefined)
5
- props = {};
6
- if (typeof props !== 'object')
7
- props = { class: props || '' };
8
- if (arguments.length > 1)
9
- props.size ??= arguments[1];
10
- if (arguments.length > 2)
11
- props.style ??= arguments[2];
12
- //
13
- const { size, class: cls, style, strokeWidth } = props;
14
- let attrs = Object.entries(props)
15
- .filter(([k, v]) => !/^class|size|style|strokeWidth$/.test(k))
16
- .reduce((m, [k, v]) => [...m, `${k}="${v}"`], [])
17
- .join(' ');
18
- return `<svg ${style ? `style="${style}" ` : ''}${cls ? `class="${cls}" ` : ''}width="${size || 24}" height="${size || 24}" stroke-width="${strokeWidth ?? 2}" ${attrs ? `${attrs} ` : ''}viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>`;
19
- }
20
- function iconFeatherAlertCircle(props) {
21
- // Backward compatible signature support: fn(cls, size, style)
22
- if (props === null || props === undefined)
23
- props = {};
24
- if (typeof props !== 'object')
25
- props = { class: props || '' };
26
- if (arguments.length > 1)
27
- props.size ??= arguments[1];
28
- if (arguments.length > 2)
29
- props.style ??= arguments[2];
30
- //
31
- const { size, class: cls, style, strokeWidth } = props;
32
- let attrs = Object.entries(props)
33
- .filter(([k, v]) => !/^class|size|style|strokeWidth$/.test(k))
34
- .reduce((m, [k, v]) => [...m, `${k}="${v}"`], [])
35
- .join(' ');
36
- return `<svg ${style ? `style="${style}" ` : ''}${cls ? `class="${cls}" ` : ''}width="${size || 24}" height="${size || 24}" stroke-width="${strokeWidth ?? 2}" ${attrs ? `${attrs} ` : ''}viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>`;
37
- }
38
- function iconFeatherCheckCircle(props) {
39
- // Backward compatible signature support: fn(cls, size, style)
40
- if (props === null || props === undefined)
41
- props = {};
42
- if (typeof props !== 'object')
43
- props = { class: props || '' };
44
- if (arguments.length > 1)
45
- props.size ??= arguments[1];
46
- if (arguments.length > 2)
47
- props.style ??= arguments[2];
48
- //
49
- const { size, class: cls, style, strokeWidth } = props;
50
- let attrs = Object.entries(props)
51
- .filter(([k, v]) => !/^class|size|style|strokeWidth$/.test(k))
52
- .reduce((m, [k, v]) => [...m, `${k}="${v}"`], [])
53
- .join(' ');
54
- return `<svg ${style ? `style="${style}" ` : ''}${cls ? `class="${cls}" ` : ''}width="${size || 24}" height="${size || 24}" stroke-width="${strokeWidth ?? 2}" ${attrs ? `${attrs} ` : ''}viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>`;
55
- }
56
- function iconFeatherXOctagon(props) {
57
- // Backward compatible signature support: fn(cls, size, style)
58
- if (props === null || props === undefined)
59
- props = {};
60
- if (typeof props !== 'object')
61
- props = { class: props || '' };
62
- if (arguments.length > 1)
63
- props.size ??= arguments[1];
64
- if (arguments.length > 2)
65
- props.style ??= arguments[2];
66
- //
67
- const { size, class: cls, style, strokeWidth } = props;
68
- let attrs = Object.entries(props)
69
- .filter(([k, v]) => !/^class|size|style|strokeWidth$/.test(k))
70
- .reduce((m, [k, v]) => [...m, `${k}="${v}"`], [])
71
- .join(' ');
72
- return `<svg ${style ? `style="${style}" ` : ''}${cls ? `class="${cls}" ` : ''}width="${size || 24}" height="${size || 24}" stroke-width="${strokeWidth ?? 2}" ${attrs ? `${attrs} ` : ''}viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>`;
73
- }
74
- function iconFeatherInfo(props) {
75
- // Backward compatible signature support: fn(cls, size, style)
76
- if (props === null || props === undefined)
77
- props = {};
78
- if (typeof props !== 'object')
79
- props = { class: props || '' };
80
- if (arguments.length > 1)
81
- props.size ??= arguments[1];
82
- if (arguments.length > 2)
83
- props.style ??= arguments[2];
84
- //
85
- const { size, class: cls, style, strokeWidth } = props;
86
- let attrs = Object.entries(props)
87
- .filter(([k, v]) => !/^class|size|style|strokeWidth$/.test(k))
88
- .reduce((m, [k, v]) => [...m, `${k}="${v}"`], [])
89
- .join(' ');
90
- return `<svg ${style ? `style="${style}" ` : ''}${cls ? `class="${cls}" ` : ''}width="${size || 24}" height="${size || 24}" stroke-width="${strokeWidth ?? 2}" ${attrs ? `${attrs} ` : ''}viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>`;
91
- }
92
- function iconFeatherRefreshCw(props) {
93
- // Backward compatible signature support: fn(cls, size, style)
94
- if (props === null || props === undefined)
95
- props = {};
96
- if (typeof props !== 'object')
97
- props = { class: props || '' };
98
- if (arguments.length > 1)
99
- props.size ??= arguments[1];
100
- if (arguments.length > 2)
101
- props.style ??= arguments[2];
102
- //
103
- const { size, class: cls, style, strokeWidth } = props;
104
- let attrs = Object.entries(props)
105
- .filter(([k, v]) => !/^class|size|style|strokeWidth$/.test(k))
106
- .reduce((m, [k, v]) => [...m, `${k}="${v}"`], [])
107
- .join(' ');
108
- return `<svg ${style ? `style="${style}" ` : ''}${cls ? `class="${cls}" ` : ''}width="${size || 24}" height="${size || 24}" stroke-width="${strokeWidth ?? 2}" ${attrs ? `${attrs} ` : ''}viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"><polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path></svg>`;
109
- }
1
+ import { iconFeatherAlertTriangle } from '@marianmeres/icons-fns/feather/iconFeatherAlertTriangle.js';
2
+ import { iconFeatherCheckCircle } from '@marianmeres/icons-fns/feather/iconFeatherCheckCircle.js';
3
+ import { iconFeatherInfo } from '@marianmeres/icons-fns/feather/iconFeatherInfo.js';
4
+ import { iconFeatherRefreshCw } from '@marianmeres/icons-fns/feather/iconFeatherRefreshCw.js';
5
+ import { iconFeatherXOctagon } from '@marianmeres/icons-fns/feather/iconFeatherXOctagon.js';
110
6
  export const acpDefaultIcons = {
111
7
  info: () => iconFeatherInfo({}),
112
8
  success: () => iconFeatherCheckCircle({}),
@@ -1,3 +1,2 @@
1
1
  import type { NotificationType } from './notifications.js';
2
- export declare function iconFeatherAlertTriangle(props: any): string;
3
2
  export declare const notificationsDefaultIcons: Record<NotificationType, () => string>;
@@ -1,94 +1,7 @@
1
- // taken from @marianmeres/icons-fns
2
- export function iconFeatherAlertTriangle(props) {
3
- // Backward compatible signature support: fn(cls, size, style)
4
- if (props === null || props === undefined)
5
- props = {};
6
- if (typeof props !== 'object')
7
- props = { class: props || '' };
8
- if (arguments.length > 1)
9
- props.size ??= arguments[1];
10
- if (arguments.length > 2)
11
- props.style ??= arguments[2];
12
- //
13
- const { size, class: cls, style, strokeWidth } = props;
14
- let attrs = Object.entries(props)
15
- .filter(([k, v]) => !/^class|size|style|strokeWidth$/.test(k))
16
- .reduce((m, [k, v]) => [...m, `${k}="${v}"`], [])
17
- .join(' ');
18
- return `<svg ${style ? `style="${style}" ` : ''}${cls ? `class="${cls}" ` : ''}width="${size || 24}" height="${size || 24}" stroke-width="${strokeWidth ?? 2}" ${attrs ? `${attrs} ` : ''}viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>`;
19
- }
20
- function iconFeatherAlertCircle(props) {
21
- // Backward compatible signature support: fn(cls, size, style)
22
- if (props === null || props === undefined)
23
- props = {};
24
- if (typeof props !== 'object')
25
- props = { class: props || '' };
26
- if (arguments.length > 1)
27
- props.size ??= arguments[1];
28
- if (arguments.length > 2)
29
- props.style ??= arguments[2];
30
- //
31
- const { size, class: cls, style, strokeWidth } = props;
32
- let attrs = Object.entries(props)
33
- .filter(([k, v]) => !/^class|size|style|strokeWidth$/.test(k))
34
- .reduce((m, [k, v]) => [...m, `${k}="${v}"`], [])
35
- .join(' ');
36
- return `<svg ${style ? `style="${style}" ` : ''}${cls ? `class="${cls}" ` : ''}width="${size || 24}" height="${size || 24}" stroke-width="${strokeWidth ?? 2}" ${attrs ? `${attrs} ` : ''}viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>`;
37
- }
38
- function iconFeatherCheckCircle(props) {
39
- // Backward compatible signature support: fn(cls, size, style)
40
- if (props === null || props === undefined)
41
- props = {};
42
- if (typeof props !== 'object')
43
- props = { class: props || '' };
44
- if (arguments.length > 1)
45
- props.size ??= arguments[1];
46
- if (arguments.length > 2)
47
- props.style ??= arguments[2];
48
- //
49
- const { size, class: cls, style, strokeWidth } = props;
50
- let attrs = Object.entries(props)
51
- .filter(([k, v]) => !/^class|size|style|strokeWidth$/.test(k))
52
- .reduce((m, [k, v]) => [...m, `${k}="${v}"`], [])
53
- .join(' ');
54
- return `<svg ${style ? `style="${style}" ` : ''}${cls ? `class="${cls}" ` : ''}width="${size || 24}" height="${size || 24}" stroke-width="${strokeWidth ?? 2}" ${attrs ? `${attrs} ` : ''}viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>`;
55
- }
56
- function iconFeatherXOctagon(props) {
57
- // Backward compatible signature support: fn(cls, size, style)
58
- if (props === null || props === undefined)
59
- props = {};
60
- if (typeof props !== 'object')
61
- props = { class: props || '' };
62
- if (arguments.length > 1)
63
- props.size ??= arguments[1];
64
- if (arguments.length > 2)
65
- props.style ??= arguments[2];
66
- //
67
- const { size, class: cls, style, strokeWidth } = props;
68
- let attrs = Object.entries(props)
69
- .filter(([k, v]) => !/^class|size|style|strokeWidth$/.test(k))
70
- .reduce((m, [k, v]) => [...m, `${k}="${v}"`], [])
71
- .join(' ');
72
- return `<svg ${style ? `style="${style}" ` : ''}${cls ? `class="${cls}" ` : ''}width="${size || 24}" height="${size || 24}" stroke-width="${strokeWidth ?? 2}" ${attrs ? `${attrs} ` : ''}viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>`;
73
- }
74
- function iconFeatherInfo(props) {
75
- // Backward compatible signature support: fn(cls, size, style)
76
- if (props === null || props === undefined)
77
- props = {};
78
- if (typeof props !== 'object')
79
- props = { class: props || '' };
80
- if (arguments.length > 1)
81
- props.size ??= arguments[1];
82
- if (arguments.length > 2)
83
- props.style ??= arguments[2];
84
- //
85
- const { size, class: cls, style, strokeWidth } = props;
86
- let attrs = Object.entries(props)
87
- .filter(([k, v]) => !/^class|size|style|strokeWidth$/.test(k))
88
- .reduce((m, [k, v]) => [...m, `${k}="${v}"`], [])
89
- .join(' ');
90
- return `<svg ${style ? `style="${style}" ` : ''}${cls ? `class="${cls}" ` : ''}width="${size || 24}" height="${size || 24}" stroke-width="${strokeWidth ?? 2}" ${attrs ? `${attrs} ` : ''}viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>`;
91
- }
1
+ import { iconFeatherAlertTriangle } from '@marianmeres/icons-fns/feather/iconFeatherAlertTriangle.js';
2
+ import { iconFeatherCheckCircle } from '@marianmeres/icons-fns/feather/iconFeatherCheckCircle.js';
3
+ import { iconFeatherInfo } from '@marianmeres/icons-fns/feather/iconFeatherInfo.js';
4
+ import { iconFeatherXOctagon } from '@marianmeres/icons-fns/feather/iconFeatherXOctagon.js';
92
5
  export const notificationsDefaultIcons = {
93
6
  info: () => iconFeatherInfo({}),
94
7
  success: () => iconFeatherCheckCircle({}),
package/dist/index.d.ts CHANGED
@@ -22,13 +22,14 @@ export { default as Switch, SwitchConfig, type SwitchPreHook, } from './componen
22
22
  export { default as Thc, type THC, isTHCNotEmpty } from './components/Thc/Thc.svelte';
23
23
  export { default as X } from './components/X/X.svelte';
24
24
  export { autogrow } from './actions/autogrow.js';
25
+ export { autoscroll } from './actions/autoscroll.js';
25
26
  export { draggable, droppable, type DraggableOptions, type DroppableOptions, } from './actions/drag-drop.js';
26
27
  export { focusTrap, type FocusTrapOptions } from './actions/focus-trap.js';
27
28
  export { onOutside } from './actions/on-outside.js';
28
29
  export { preSubmitValidityCheck } from './actions/pre-submit-validity-check.js';
29
30
  export { tooltip, TooltipConfig, type TooltipOptions, } from './actions/tooltip/tooltip.js';
30
- export { validate, type ValidateOptions, type ValidationResult, } from './actions/validate.js';
31
31
  export { trim } from './actions/trim.js';
32
+ export { validate, type ValidateOptions, type ValidationResult, } from './actions/validate.js';
32
33
  export { calculateAlignment } from './utils/calculate-alignment.js';
33
34
  export { DevicePointer } from './utils/device-pointer.js';
34
35
  export { getId } from './utils/get-id.js';
package/dist/index.js CHANGED
@@ -37,13 +37,14 @@ export { default as Thc, isTHCNotEmpty } from './components/Thc/Thc.svelte';
37
37
  export { default as X } from './components/X/X.svelte';
38
38
  // actions
39
39
  export { autogrow } from './actions/autogrow.js';
40
+ export { autoscroll } from './actions/autoscroll.js';
40
41
  export { draggable, droppable, } from './actions/drag-drop.js';
41
42
  export { focusTrap } from './actions/focus-trap.js';
42
43
  export { onOutside } from './actions/on-outside.js';
43
44
  export { preSubmitValidityCheck } from './actions/pre-submit-validity-check.js';
44
45
  export { tooltip, TooltipConfig, } from './actions/tooltip/tooltip.js';
45
- export { validate, } from './actions/validate.js';
46
46
  export { trim } from './actions/trim.js';
47
+ export { validate, } from './actions/validate.js';
47
48
  // utils
48
49
  export { calculateAlignment } from './utils/calculate-alignment.js';
49
50
  export { DevicePointer } from './utils/device-pointer.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/stuic",
3
- "version": "1.104.0",
3
+ "version": "1.106.0",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run package && node ./scripts/date.js",
@@ -32,7 +32,6 @@
32
32
  "svelte": "^4.0.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@marianmeres/icons-fns": "^2.1.0",
36
35
  "@marianmeres/parse-boolean": "^1.1.7",
37
36
  "@marianmeres/random-human-readable": "^1.6.1",
38
37
  "@marianmeres/release": "^1.1.2",
@@ -63,6 +62,7 @@
63
62
  "type": "module",
64
63
  "dependencies": {
65
64
  "@marianmeres/clog": "^1.0.1",
65
+ "@marianmeres/icons-fns": "^4.0.4",
66
66
  "@marianmeres/store": "^1.5.0",
67
67
  "@marianmeres/switch-store": "^1.3.1",
68
68
  "@marianmeres/ticker": "^1.5.0",