@hkdigital/lib-sveltekit 0.1.1 → 0.1.2

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 (28) hide show
  1. package/dist/classes/svelte/audio/AudioScene.svelte.js +1 -1
  2. package/dist/classes/svelte/image/ImageLoader.svelte.js +1 -1
  3. package/dist/classes/svelte/image/ImageScene.svelte.js +1 -1
  4. package/dist/classes/svelte/network-loader/NetworkLoader.svelte.js +1 -1
  5. package/dist/components/area/HkArea.svelte.d.ts +14 -0
  6. package/dist/components/area/HkGridArea.svelte.d.ts +22 -0
  7. package/dist/components/boxes/game-box/GameBox.svelte.d.ts +15 -0
  8. package/dist/components/boxes/virtual-viewport/VirtualViewport.svelte.d.ts +22 -0
  9. package/dist/components/buttons/button/Button.svelte.d.ts +21 -0
  10. package/dist/components/buttons/button-text/TextButton.svelte.d.ts +7 -0
  11. package/dist/components/hkdev/blocks/TextBlock.svelte.d.ts +13 -0
  12. package/dist/components/hkdev/buttons/CheckButton.svelte.d.ts +18 -0
  13. package/dist/components/icon/HkIcon.svelte.d.ts +12 -0
  14. package/dist/components/icon/HkTabIcon.svelte.d.ts +21 -0
  15. package/dist/components/image/ImageBox.svelte.d.ts +19 -0
  16. package/dist/components/image/ResponsiveImage.svelte.d.ts +16 -0
  17. package/dist/components/inputs/text-input/TextInput.svelte.d.ts +28 -0
  18. package/dist/components/layout/HkAppLayout.svelte.d.ts +11 -0
  19. package/dist/components/layout/HkGridLayers.svelte.d.ts +23 -0
  20. package/dist/components/panels/plain-panel/PlainPanel.svelte.d.ts +12 -0
  21. package/dist/components/rows/panel-grid-row/PanelGridRow.svelte.d.ts +14 -0
  22. package/dist/components/rows/panel-row-2/PanelRow2.svelte.d.ts +14 -0
  23. package/dist/components/tab-bar/HkTabBar.svelte.d.ts +18 -0
  24. package/dist/components/tab-bar/HkTabBarSelector.svelte.d.ts +19 -0
  25. package/dist/components/widgets/compare-left-right/CompareLeftRight.svelte.d.ts +10 -0
  26. package/dist/design-system/tailwind-theme-extend.d.ts +4 -4
  27. package/dist/util/http/index.js +1 -1
  28. package/package.json +18 -18
@@ -14,7 +14,7 @@ import {
14
14
  LOADED,
15
15
  UNLOAD,
16
16
  INITIAL
17
- } from '../loading-state-machine/index.js';
17
+ } from '$lib/classes/svelte/loading-state-machine/index.js';
18
18
 
19
19
  import AudioLoader from './AudioLoader.svelte.js';
20
20
 
@@ -6,7 +6,7 @@ import {
6
6
  NetworkLoader
7
7
  // ERROR_NOT_LOADED,
8
8
  // ERROR_TRANSFERRED
9
- } from '../network-loader/index.js';
9
+ } from '$lib/classes/svelte/network-loader/index.js';
10
10
 
11
11
  /**
12
12
  * ImageLoader instance
@@ -16,7 +16,7 @@ import {
16
16
  LOADED,
17
17
  UNLOAD,
18
18
  INITIAL
19
- } from '../loading-state-machine/index.js';
19
+ } from '$lib/classes/svelte/loading-state-machine/index.js';
20
20
 
21
21
  import ImageLoader from './ImageLoader.svelte.js';
22
22
 
@@ -14,7 +14,7 @@ import {
14
14
  LOADED,
15
15
  UNLOAD,
16
16
  INITIAL
17
- } from '../loading-state-machine/index.js';
17
+ } from '$lib/classes/svelte/loading-state-machine/index.js';
18
18
 
19
19
  import * as expect from '../../../util/expect/index.js';
20
20
 
@@ -1,4 +1,18 @@
1
1
  export default HkArea;
2
+ type HkArea = {
3
+ $on?(type: string, callback: (e: any) => void): () => void;
4
+ $set?(props: Partial<{
5
+ base?: string;
6
+ bg?: string;
7
+ padding?: string;
8
+ margin?: string;
9
+ classes?: string;
10
+ style?: string;
11
+ children: Snippet<[]>;
12
+ } & {
13
+ [attr: string]: any;
14
+ }>): void;
15
+ };
2
16
  declare const HkArea: import("svelte").Component<{
3
17
  base?: string;
4
18
  bg?: string;
@@ -1,4 +1,26 @@
1
1
  export default HkGridArea;
2
+ type HkGridArea = {
3
+ $on?(type: string, callback: (e: any) => void): () => void;
4
+ $set?(props: Partial<{
5
+ base?: string;
6
+ bg?: string;
7
+ padding?: string;
8
+ margin?: string;
9
+ classes?: string;
10
+ style?: string;
11
+ boxBase?: string;
12
+ boxBg?: string;
13
+ boxPadding?: string;
14
+ boxMargin?: string;
15
+ boxClasses?: string;
16
+ boxAttrs?: {
17
+ [attr: string]: any;
18
+ };
19
+ children: Snippet<[]>;
20
+ } & {
21
+ [attr: string]: any;
22
+ }>): void;
23
+ };
2
24
  declare const HkGridArea: import("svelte").Component<{
3
25
  base?: string;
4
26
  bg?: string;
@@ -1,4 +1,19 @@
1
1
  export default GameBox;
2
+ type GameBox = {
3
+ $on?(type: string, callback: (e: any) => void): () => void;
4
+ $set?(props: Partial<{
5
+ base?: string;
6
+ bg?: string;
7
+ classes?: string;
8
+ style?: string;
9
+ aspectOnLandscape?: number;
10
+ aspectOnPortrait?: number;
11
+ onLandscape?: Snippet<[]>;
12
+ onPortrait?: Snippet<[]>;
13
+ } & {
14
+ [attr: string]: any;
15
+ }>): void;
16
+ };
2
17
  declare const GameBox: import("svelte").Component<{
3
18
  base?: string;
4
19
  bg?: string;
@@ -1,4 +1,26 @@
1
1
  export default VirtualViewport;
2
+ type VirtualViewport = {
3
+ $on?(type: string, callback: (e: any) => void): () => void;
4
+ $set?(props: Partial<{
5
+ [attr: string]: any;
6
+ base?: string;
7
+ bg?: string;
8
+ classes?: string;
9
+ width?: string;
10
+ height?: string;
11
+ overflow?: string;
12
+ designWidth?: number;
13
+ designHeight?: number;
14
+ scaleViewport?: number;
15
+ scaleW?: number;
16
+ scaleH?: number;
17
+ scaleUI?: number;
18
+ scaleTextContent?: number;
19
+ scaleTextHeading?: number;
20
+ scaleTextUI?: number;
21
+ children?: Snippet<[]>;
22
+ }>): void;
23
+ };
2
24
  declare const VirtualViewport: import("svelte").Component<{
3
25
  [attr: string]: any;
4
26
  base?: string;
@@ -1,4 +1,25 @@
1
1
  export default Button;
2
+ type Button = {
3
+ $on?(type: string, callback: (e: any) => void): () => void;
4
+ $set?(props: Partial<{
5
+ [key: string]: any;
6
+ base?: string;
7
+ bg?: string;
8
+ classes?: string;
9
+ type?: string;
10
+ role?: "primary" | "secondary";
11
+ size?: "sm" | "md" | "lg";
12
+ variant?: string;
13
+ active?: boolean;
14
+ selected?: boolean;
15
+ loading?: boolean;
16
+ error?: boolean;
17
+ disabled?: boolean;
18
+ snippetLoading?: Snippet<[]>;
19
+ snippetError?: Snippet<[]>;
20
+ children: Snippet<[]>;
21
+ }>): void;
22
+ };
2
23
  declare const Button: import("svelte").Component<{
3
24
  [key: string]: any;
4
25
  base?: string;
@@ -1,4 +1,11 @@
1
1
  export default TextButton;
2
+ type TextButton = {
3
+ $on?(type: string, callback: (e: any) => void): () => void;
4
+ $set?(props: Partial<{
5
+ [key: string]: any;
6
+ children: Snippet<[]>;
7
+ }>): void;
8
+ };
2
9
  declare const TextButton: import("svelte").Component<{
3
10
  [key: string]: any;
4
11
  children: import("svelte").Snippet;
@@ -1,4 +1,17 @@
1
1
  export default TextBlock;
2
+ type TextBlock = {
3
+ $on?(type: string, callback: (e: any) => void): () => void;
4
+ $set?(props: Partial<{
5
+ base?: string;
6
+ bg?: string;
7
+ classes?: string;
8
+ title?: Snippet<[]>;
9
+ content?: Snippet<[]>;
10
+ footer?: Snippet<[]>;
11
+ } & {
12
+ [attr: string]: any;
13
+ }>): void;
14
+ };
2
15
  declare const TextBlock: import("svelte").Component<{
3
16
  base?: string;
4
17
  bg?: string;
@@ -1,4 +1,22 @@
1
1
  export default CheckButton;
2
+ type CheckButton = {
3
+ $on?(type: string, callback: (e: any) => void): () => void;
4
+ $set?(props: Partial<{
5
+ checked?: boolean;
6
+ activeChild?: boolean;
7
+ inactiveChild?: boolean;
8
+ iconActiveBase?: string;
9
+ classes?: string;
10
+ disabled?: boolean;
11
+ title: string;
12
+ iconInactiveBase?: string;
13
+ inactiveClasses?: string;
14
+ activeClasses: string;
15
+ onclick?: () => void;
16
+ onchange?: () => void;
17
+ topic?: string;
18
+ }>): void;
19
+ };
2
20
  declare const CheckButton: import("svelte").Component<{
3
21
  checked?: boolean;
4
22
  activeChild?: boolean;
@@ -1,4 +1,16 @@
1
1
  export default HkIcon;
2
+ type HkIcon = {
3
+ $on?(type: string, callback: (e: any) => void): () => void;
4
+ $set?(props: Partial<{
5
+ src: IconSource;
6
+ size?: string;
7
+ theme?: string;
8
+ base?: string;
9
+ classes?: string;
10
+ } & {
11
+ [attr: string]: any;
12
+ }>): void;
13
+ };
2
14
  declare const HkIcon: import("svelte").Component<{
3
15
  src: import("./typedef.js").IconSource;
4
16
  size?: string;
@@ -1,4 +1,25 @@
1
1
  export default HkTabIcon;
2
+ type HkTabIcon = {
3
+ $on?(type: string, callback: (e: any) => void): () => void;
4
+ $set?(props: Partial<{
5
+ src: IconSource;
6
+ iconTheme?: string;
7
+ label?: string;
8
+ route?: string;
9
+ active?: boolean;
10
+ base?: string;
11
+ bg?: string;
12
+ padding?: string;
13
+ margin?: string;
14
+ classes?: string;
15
+ iconClasses?: string;
16
+ iconHeight?: string;
17
+ labelClasses?: string;
18
+ rect?: DOMRect;
19
+ } & {
20
+ [attr: string]: any;
21
+ }>): void;
22
+ };
2
23
  declare const HkTabIcon: import("svelte").Component<{
3
24
  src: import("./typedef.js").IconSource;
4
25
  iconTheme?: string;
@@ -1,4 +1,23 @@
1
1
  export default ImageBox;
2
+ type ImageBox = {
3
+ $on?(type: string, callback: (e: any) => void): () => void;
4
+ $set?(props: Partial<{
5
+ [attr: string]: any;
6
+ base?: string;
7
+ bg?: string;
8
+ classes?: string;
9
+ width?: string;
10
+ height?: string;
11
+ aspect?: string;
12
+ overflow?: string;
13
+ fit?: "fill" | "contain" | "cover";
14
+ position?: string;
15
+ imageMeta: ImageMeta | ImageMeta[];
16
+ imageLoader?: ImageLoader;
17
+ alt?: string;
18
+ onProgress?: (progress: LoadingProgress) => void;
19
+ }>): void;
20
+ };
2
21
  declare const ImageBox: import("svelte").Component<{
3
22
  [attr: string]: any;
4
23
  base?: string;
@@ -1,5 +1,21 @@
1
1
  export default ResponsiveImage;
2
2
  export type ImageMeta = import("../../config/typedef.js").ImageMeta;
3
+ type ResponsiveImage = {
4
+ $on?(type: string, callback: (e: any) => void): () => void;
5
+ $set?(props: Partial<{
6
+ base?: string;
7
+ classes?: string;
8
+ boxBase?: string;
9
+ boxClasses?: string;
10
+ boxAttrs?: {
11
+ [attr: string]: any;
12
+ };
13
+ images: ImageMeta[];
14
+ alt?: string;
15
+ } & {
16
+ [attr: string]: any;
17
+ }>): void;
18
+ };
3
19
  declare const ResponsiveImage: import("svelte").Component<{
4
20
  base?: string;
5
21
  classes?: string;
@@ -1,4 +1,32 @@
1
1
  export default TextInput;
2
+ type TextInput = {
3
+ $on?(type: string, callback: (e: any) => void): () => void;
4
+ $set?(props: Partial<{
5
+ base?: string;
6
+ borderShape?: string;
7
+ classes?: string;
8
+ inputBase?: string;
9
+ inputClasses?: string;
10
+ legendBase?: string;
11
+ legendClasses?: string;
12
+ iconClasses?: string;
13
+ value?: string;
14
+ type?: "number" | "url" | "text" | "email";
15
+ pattern?: string;
16
+ required?: boolean;
17
+ title?: string;
18
+ placeholder?: string;
19
+ isValid?: boolean;
20
+ isPristine?: boolean;
21
+ hasFocus?: boolean;
22
+ validate?: (value: string) => string;
23
+ iconRequired?: Snippet<[]>;
24
+ iconValid?: Snippet<[]>;
25
+ iconInvalid?: Snippet<[]>;
26
+ } & {
27
+ [attr: string]: any;
28
+ }>): void;
29
+ };
2
30
  declare const TextInput: import("svelte").Component<{
3
31
  base?: string;
4
32
  borderShape?: string;
@@ -1,4 +1,8 @@
1
1
  export default HkAppLayout;
2
+ type HkAppLayout = {
3
+ $on?(type: string, callback: (e: any) => void): () => void;
4
+ $set?(props: Partial<AppLayoutProps>): void;
5
+ };
2
6
  declare const HkAppLayout: import("svelte").Component<{
3
7
  bgPageSnippet?: import("svelte").Snippet | undefined;
4
8
  bgSnippet?: import("svelte").Snippet | undefined;
@@ -6,3 +10,10 @@ declare const HkAppLayout: import("svelte").Component<{
6
10
  bottomSnippet?: import("svelte").Snippet | undefined;
7
11
  children: import("svelte").Snippet;
8
12
  }, {}, "">;
13
+ type AppLayoutProps = {
14
+ bgPageSnippet?: import("svelte").Snippet | undefined;
15
+ bgSnippet?: import("svelte").Snippet | undefined;
16
+ topSnippet?: import("svelte").Snippet | undefined;
17
+ bottomSnippet?: import("svelte").Snippet | undefined;
18
+ children: import("svelte").Snippet;
19
+ };
@@ -1,4 +1,27 @@
1
1
  export default HkGridLayers;
2
+ type HkGridLayers = {
3
+ $on?(type: string, callback: (e: any) => void): () => void;
4
+ $set?(props: Partial<{
5
+ base?: string;
6
+ bg?: string;
7
+ padding?: string;
8
+ margin?: string;
9
+ height?: string;
10
+ classes?: string;
11
+ style?: string;
12
+ boxBase?: string;
13
+ boxBg?: string;
14
+ boxPadding?: string;
15
+ boxMargin?: string;
16
+ boxClasses?: string;
17
+ boxAttrs?: {
18
+ [attr: string]: any;
19
+ };
20
+ children: Snippet<[]>;
21
+ } & {
22
+ [attr: string]: any;
23
+ }>): void;
24
+ };
2
25
  declare const HkGridLayers: import("svelte").Component<{
3
26
  base?: string;
4
27
  bg?: string;
@@ -1,4 +1,16 @@
1
1
  export default PlainPanel;
2
+ type PlainPanel = {
3
+ $on?(type: string, callback: (e: any) => void): () => void;
4
+ $set?(props: Partial<{
5
+ base?: string;
6
+ bg?: string;
7
+ width?: string;
8
+ classes?: string;
9
+ children?: Snippet<[]>;
10
+ } & {
11
+ [attr: string]: any;
12
+ }>): void;
13
+ };
2
14
  declare const PlainPanel: import("svelte").Component<{
3
15
  base?: string;
4
16
  bg?: string;
@@ -1,4 +1,18 @@
1
1
  export default PanelGridRow;
2
+ type PanelGridRow = {
3
+ $on?(type: string, callback: (e: any) => void): () => void;
4
+ $set?(props: Partial<{
5
+ base?: string;
6
+ bg?: string;
7
+ justify?: "center" | "start" | "end" | "between" | "around" | "evenly" | "stretch" | "normal";
8
+ justifyItems?: "center" | "start" | "end" | "stretch";
9
+ gap?: string;
10
+ classes?: string;
11
+ children?: Snippet<[]>;
12
+ } & {
13
+ [attr: string]: any;
14
+ }>): void;
15
+ };
2
16
  declare const PanelGridRow: import("svelte").Component<{
3
17
  base?: string;
4
18
  bg?: string;
@@ -1,4 +1,18 @@
1
1
  export default PanelRow2;
2
+ type PanelRow2 = {
3
+ $on?(type: string, callback: (e: any) => void): () => void;
4
+ $set?(props: Partial<{
5
+ base?: string;
6
+ bg?: string;
7
+ justify?: "center" | "start" | "end" | "between" | "around" | "evenly" | "stretch" | "normal";
8
+ justifyItems?: "center" | "start" | "end" | "stretch";
9
+ gap?: string;
10
+ classes?: string;
11
+ children?: Snippet<[]>;
12
+ } & {
13
+ [attr: string]: any;
14
+ }>): void;
15
+ };
2
16
  declare const PanelRow2: import("svelte").Component<{
3
17
  base?: string;
4
18
  bg?: string;
@@ -1,4 +1,22 @@
1
1
  export default HkTabBar;
2
+ type HkTabBar = {
3
+ $on?(type: string, callback: (e: any) => void): () => void;
4
+ $set?(props: Partial<{
5
+ cols?: number;
6
+ base?: string;
7
+ bg?: string;
8
+ padding?: string;
9
+ margin?: string;
10
+ classes?: string;
11
+ style?: string;
12
+ instanceKey?: string | Symbol;
13
+ children: Snippet<[]>;
14
+ onmount?: Function;
15
+ domElem?: HTMLElement;
16
+ } & {
17
+ [attr: string]: any;
18
+ }>): void;
19
+ };
2
20
  declare const HkTabBar: import("svelte").Component<{
3
21
  cols?: number;
4
22
  base?: string;
@@ -1,4 +1,23 @@
1
1
  export default HkTabBarSelector;
2
+ type HkTabBarSelector = {
3
+ $on?(type: string, callback: (e: any) => void): () => void;
4
+ $set?(props: Partial<{
5
+ base?: string;
6
+ bg?: string;
7
+ classes?: string;
8
+ boxBase?: string;
9
+ boxBg?: string;
10
+ boxPadding?: string;
11
+ boxMargin?: string;
12
+ boxClasses?: string;
13
+ boxAttrs?: {
14
+ [attr: string]: any;
15
+ };
16
+ instanceKey?: string | Symbol;
17
+ } & {
18
+ [attr: string]: any;
19
+ }>): void;
20
+ };
2
21
  declare const HkTabBarSelector: import("svelte").Component<{
3
22
  base?: string;
4
23
  bg?: string;
@@ -1,4 +1,14 @@
1
1
  export default CompareLeftRight;
2
+ type CompareLeftRight = {
3
+ $on?(type: string, callback: (e: any) => void): () => void;
4
+ $set?(props: Partial<{
5
+ leftContent?: Snippet<[]>;
6
+ rightContent?: Snippet<[]>;
7
+ classes?: string;
8
+ dividerColor?: string;
9
+ handleColor?: string;
10
+ } & Record<string, any>>): void;
11
+ };
2
12
  declare const CompareLeftRight: import("svelte").Component<{
3
13
  leftContent?: import("svelte").Snippet;
4
14
  rightContent?: import("svelte").Snippet;
@@ -10,14 +10,14 @@ export const borderRadius: {
10
10
  [x: string]: string;
11
11
  };
12
12
  export const borderWidth: {
13
- [x: string]: string;
13
+ [key: string]: string;
14
14
  };
15
15
  export const strokeWidth: {
16
- [x: string]: string;
16
+ [key: string]: string;
17
17
  };
18
18
  export const outlineWidth: {
19
- [x: string]: string;
19
+ [key: string]: string;
20
20
  };
21
21
  export const outlineOffset: {
22
- [x: string]: string;
22
+ [key: string]: string;
23
23
  };
@@ -5,7 +5,7 @@
5
5
  // AbortError,
6
6
  // TimeoutError,
7
7
  // TypeOrValueError
8
- // } from '../../constants/errors/index.js';
8
+ // } from '$lib/constants/errors/index.js';
9
9
 
10
10
  // import { setRequestHeaders } from './headers.js';
11
11
  // import { getErrorFromResponse } from './errors.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hkdigital/lib-sveltekit",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "author": {
5
5
  "name": "HKdigital",
6
6
  "url": "https://hkdigital.nl"
@@ -63,37 +63,37 @@
63
63
  "valibot": "^0.42.1"
64
64
  },
65
65
  "devDependencies": {
66
- "@playwright/test": "^1.49.1",
66
+ "@playwright/test": "^1.50.1",
67
67
  "@skeletonlabs/skeleton": "3.0.0-next.2",
68
68
  "@skeletonlabs/skeleton-svelte": "1.0.0-next.4",
69
69
  "@steeze-ui/heroicons": "^2.4.2",
70
- "@sveltejs/adapter-auto": "^3.3.1",
71
- "@sveltejs/package": "^2.3.7",
70
+ "@sveltejs/adapter-auto": "^4.0.0",
71
+ "@sveltejs/package": "^2.3.10",
72
72
  "@sveltejs/vite-plugin-svelte": "^5.0.3",
73
73
  "@tailwindcss/typography": "^0.5.16",
74
74
  "@types/eslint": "^9.6.1",
75
75
  "autoprefixer": "^10.4.20",
76
- "eslint": "^9.18.0",
77
- "eslint-config-prettier": "^10.0.1",
78
- "eslint-plugin-svelte": "^2.46.1",
79
- "globals": "^15.14.0",
76
+ "eslint": "^9.21.0",
77
+ "eslint-config-prettier": "^10.0.2",
78
+ "eslint-plugin-svelte": "^3.0.2",
79
+ "globals": "^16.0.0",
80
80
  "jsdom": "^26.0.0",
81
- "postcss": "^8.5.1",
81
+ "postcss": "^8.5.3",
82
82
  "postcss-mixins": "^11.0.3",
83
- "prettier": "^3.4.2",
83
+ "prettier": "^3.5.3",
84
84
  "prettier-plugin-svelte": "^3.3.3",
85
- "prettier-plugin-tailwindcss": "^0.6.9",
86
- "publint": "^0.3.2",
87
- "standardized-audio-context-mock": "^9.7.15",
88
- "svelte": "^5.17.5",
85
+ "prettier-plugin-tailwindcss": "^0.6.11",
86
+ "publint": "^0.3.7",
87
+ "standardized-audio-context-mock": "^9.7.16",
88
+ "svelte": "^5.20.5",
89
89
  "svelte-check": "^4.1.4",
90
90
  "tailwindcss": "^3.4.17",
91
- "typescript": "^5.7.3",
92
- "vite": "^6.0.7",
91
+ "typescript": "^5.8.2",
92
+ "vite": "^6.2.0",
93
93
  "vite-imagetools": "^7.0.5",
94
- "vitest": "^2.1.8"
94
+ "vitest": "^3.0.7"
95
95
  },
96
96
  "dependencies": {
97
- "zod": "^3.24.1"
97
+ "zod": "^3.24.2"
98
98
  }
99
99
  }