@hkdigital/lib-core 0.5.72 → 0.5.74
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/dist/ui/components/drag-drop/DragDropContext.svelte +1 -0
- package/dist/ui/components/drag-drop/Draggable.svelte +1 -0
- package/dist/ui/components/drag-drop/DropZone.svelte +1 -0
- package/dist/ui/components/presenter/ImageSlide.svelte +1 -0
- package/dist/ui/components/tab-bar/HkTabBar.svelte +1 -0
- package/dist/ui/components/tab-bar/HkTabBarSelector.svelte +1 -0
- package/dist/ui/primitives/icons/HkIcon.svelte +8 -7
- package/package.json +25 -25
- package/scripts/validate-imports.mjs +18 -3
|
@@ -45,23 +45,24 @@
|
|
|
45
45
|
icon = src?.[theme] ?? src?.['default'] ?? Object.values(src)?.[0];
|
|
46
46
|
});
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
if (size.slice(-1) !== '%') {
|
|
48
|
+
let normalizedSize = $derived.by(() => {
|
|
49
|
+
if (size !== '100%' && size.slice(-1) !== '%') {
|
|
50
50
|
try {
|
|
51
|
-
|
|
51
|
+
return parseInt(size, 10) + 'px';
|
|
52
52
|
} catch (error) {
|
|
53
|
-
|
|
53
|
+
return '100%';
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
|
|
56
|
+
return size;
|
|
57
|
+
});
|
|
57
58
|
</script>
|
|
58
59
|
|
|
59
60
|
<svg
|
|
60
61
|
data-hk-icon
|
|
61
62
|
{...icon?.a}
|
|
62
63
|
xmlns="http://www.w3.org/2000/svg"
|
|
63
|
-
width={
|
|
64
|
-
height={
|
|
64
|
+
width={normalizedSize}
|
|
65
|
+
height={normalizedSize}
|
|
65
66
|
class="{base} {classes}"
|
|
66
67
|
{...attrs}
|
|
67
68
|
>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hkdigital/lib-core",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.74",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "HKdigital",
|
|
6
6
|
"url": "https://hkdigital.nl"
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"./*": "./dist/*"
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
|
-
"@tailwindcss/postcss": "^4.1.
|
|
81
|
+
"@tailwindcss/postcss": "^4.1.18",
|
|
82
82
|
"postcss": "^8.5.6"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
@@ -99,45 +99,45 @@
|
|
|
99
99
|
"vite-imagetools": "^8.0.0"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
|
-
"@eslint/js": "^9.
|
|
103
|
-
"@playwright/test": "^1.
|
|
102
|
+
"@eslint/js": "^9.39.2",
|
|
103
|
+
"@playwright/test": "^1.57.0",
|
|
104
104
|
"@skeletonlabs/skeleton": "3.1.7",
|
|
105
105
|
"@skeletonlabs/skeleton-svelte": "1.3.1",
|
|
106
106
|
"@steeze-ui/heroicons": "^2.4.2",
|
|
107
107
|
"@sveltejs/adapter-auto": "^6.1.1",
|
|
108
|
-
"@sveltejs/adapter-node": "^5.
|
|
109
|
-
"@sveltejs/kit": "^2.
|
|
110
|
-
"@sveltejs/package": "^2.5.
|
|
111
|
-
"@sveltejs/vite-plugin-svelte": "^6.2.
|
|
108
|
+
"@sveltejs/adapter-node": "^5.5.0",
|
|
109
|
+
"@sveltejs/kit": "^2.49.4",
|
|
110
|
+
"@sveltejs/package": "^2.5.7",
|
|
111
|
+
"@sveltejs/vite-plugin-svelte": "^6.2.4",
|
|
112
112
|
"@tailwindcss/typography": "^0.5.19",
|
|
113
|
-
"@testing-library/svelte": "^5.
|
|
113
|
+
"@testing-library/svelte": "^5.3.1",
|
|
114
114
|
"@testing-library/user-event": "^14.6.1",
|
|
115
115
|
"@types/eslint": "^9.6.1",
|
|
116
|
-
"@types/node": "^24.8
|
|
117
|
-
"autoprefixer": "^10.4.
|
|
118
|
-
"eslint": "^9.
|
|
116
|
+
"@types/node": "^24.10.8",
|
|
117
|
+
"autoprefixer": "^10.4.23",
|
|
118
|
+
"eslint": "^9.39.2",
|
|
119
119
|
"eslint-config-prettier": "^10.1.8",
|
|
120
120
|
"eslint-plugin-import": "^2.32.0",
|
|
121
|
-
"eslint-plugin-svelte": "^3.
|
|
122
|
-
"fake-indexeddb": "^6.2.
|
|
123
|
-
"globals": "^16.
|
|
121
|
+
"eslint-plugin-svelte": "^3.14.0",
|
|
122
|
+
"fake-indexeddb": "^6.2.5",
|
|
123
|
+
"globals": "^16.5.0",
|
|
124
124
|
"jsdom": "^26.1.0",
|
|
125
|
-
"jsonwebtoken": "^9.0.
|
|
125
|
+
"jsonwebtoken": "^9.0.3",
|
|
126
126
|
"npm-check-updates": "^18.3.1",
|
|
127
127
|
"npm-run-all": "^4.1.5",
|
|
128
|
-
"pino": "^9.
|
|
129
|
-
"pino-pretty": "^13.1.
|
|
130
|
-
"prettier": "^3.
|
|
131
|
-
"prettier-plugin-svelte": "^3.4.
|
|
128
|
+
"pino": "^9.14.0",
|
|
129
|
+
"pino-pretty": "^13.1.3",
|
|
130
|
+
"prettier": "^3.7.4",
|
|
131
|
+
"prettier-plugin-svelte": "^3.4.1",
|
|
132
132
|
"prettier-plugin-tailwindcss": "^0.6.14",
|
|
133
|
-
"publint": "^0.3.
|
|
133
|
+
"publint": "^0.3.16",
|
|
134
134
|
"standardized-audio-context-mock": "^9.7.24",
|
|
135
|
-
"svelte": "^5.
|
|
136
|
-
"svelte-check": "^4.3.
|
|
135
|
+
"svelte": "^5.46.3",
|
|
136
|
+
"svelte-check": "^4.3.5",
|
|
137
137
|
"svelte-preprocess": "^6.0.3",
|
|
138
|
-
"tailwindcss": "^4.1.
|
|
138
|
+
"tailwindcss": "^4.1.18",
|
|
139
139
|
"typescript": "^5.9.3",
|
|
140
|
-
"vite": "^7.1
|
|
140
|
+
"vite": "^7.3.1",
|
|
141
141
|
"vite-imagetools": "^8.0.0",
|
|
142
142
|
"vitest": "^3.2.4"
|
|
143
143
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { readdir, readFile, stat } from 'node:fs/promises';
|
|
4
|
-
import { join, relative, resolve, dirname } from 'node:path';
|
|
4
|
+
import { join, relative, resolve, dirname, isAbsolute } from 'node:path';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
5
6
|
|
|
6
7
|
const PROJECT_ROOT = process.cwd();
|
|
7
8
|
const SRC_DIR = join(PROJECT_ROOT, 'src');
|
|
9
|
+
const SCRIPT_DIR = dirname(fileURLToPath(import.meta.url));
|
|
10
|
+
const LIB_ROOT = dirname(SCRIPT_DIR);
|
|
8
11
|
|
|
9
12
|
/**
|
|
10
13
|
* Scopes to validate for barrel exports
|
|
@@ -55,6 +58,12 @@ function resolveAliasPath(aliasPath) {
|
|
|
55
58
|
for (const [alias, target] of Object.entries(PROJECT_ALIASES)) {
|
|
56
59
|
if (aliasPath === alias || aliasPath.startsWith(alias + '/')) {
|
|
57
60
|
const pathAfterAlias = aliasPath.slice(alias.length);
|
|
61
|
+
|
|
62
|
+
// If target is already absolute, use it directly
|
|
63
|
+
if (isAbsolute(target)) {
|
|
64
|
+
return join(target, pathAfterAlias);
|
|
65
|
+
}
|
|
66
|
+
|
|
58
67
|
return join(PROJECT_ROOT, target, pathAfterAlias);
|
|
59
68
|
}
|
|
60
69
|
}
|
|
@@ -889,7 +898,13 @@ async function validateFile(filePath) {
|
|
|
889
898
|
* Main validation function
|
|
890
899
|
*/
|
|
891
900
|
async function main() {
|
|
892
|
-
|
|
901
|
+
// Load package version from lib-core's package.json
|
|
902
|
+
const pkgJsonPath = join(LIB_ROOT, 'package.json');
|
|
903
|
+
const pkgJsonContent = await readFile(pkgJsonPath, 'utf-8');
|
|
904
|
+
const pkgJson = JSON.parse(pkgJsonContent);
|
|
905
|
+
|
|
906
|
+
console.log(`Using script from @hkdigital/lib-core v${pkgJson.version}`);
|
|
907
|
+
console.log(`Validating import paths...`);
|
|
893
908
|
|
|
894
909
|
// Load project aliases from svelte.config.js
|
|
895
910
|
PROJECT_ALIASES = await loadAliases();
|
|
@@ -917,7 +932,7 @@ async function main() {
|
|
|
917
932
|
process.exit(1);
|
|
918
933
|
}
|
|
919
934
|
|
|
920
|
-
console.log('
|
|
935
|
+
console.log('\x1b[32m✔ All import paths are valid!\x1b[0m');
|
|
921
936
|
}
|
|
922
937
|
|
|
923
938
|
main().catch(error => {
|