@hkdigital/lib-core 0.3.1
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 +149 -0
- package/dist/assets/autospuiten/car-paint-picker/army-green.jpg +0 -0
- package/dist/assets/autospuiten/car-paint-picker/electric-blue.jpg +0 -0
- package/dist/assets/autospuiten/car-paint-picker/lemon-yellow.jpg +0 -0
- package/dist/assets/autospuiten/car-paint-picker/opaque-purple.jpg +0 -0
- package/dist/assets/autospuiten/car-paint-picker/rusty.jpg +0 -0
- package/dist/assets/autospuiten/car-paint-picker/sunset-orange.jpg +0 -0
- package/dist/assets/autospuiten/car-paint-picker/tomato-red.jpg +0 -0
- package/dist/assets/autospuiten/car-paint-picker.d.ts +17 -0
- package/dist/assets/autospuiten/car-paint-picker.js +41 -0
- package/dist/assets/autospuiten/labels.d.ts +7 -0
- package/dist/assets/autospuiten/labels.js +7 -0
- package/dist/classes/cache/IndexedDbCache.d.ts +216 -0
- package/dist/classes/cache/IndexedDbCache.js +1407 -0
- package/dist/classes/cache/MemoryResponseCache.d.ts +106 -0
- package/dist/classes/cache/MemoryResponseCache.js +138 -0
- package/dist/classes/cache/index.d.ts +3 -0
- package/dist/classes/cache/index.js +5 -0
- package/dist/classes/cache/typedef.d.ts +67 -0
- package/dist/classes/cache/typedef.js +41 -0
- package/dist/classes/data/IterableTree.d.ts +51 -0
- package/dist/classes/data/IterableTree.js +243 -0
- package/dist/classes/data/Selector.d.ts +30 -0
- package/dist/classes/data/Selector.js +190 -0
- package/dist/classes/data/index.d.ts +2 -0
- package/dist/classes/data/index.js +2 -0
- package/dist/classes/events/EventEmitter.d.ts +142 -0
- package/dist/classes/events/EventEmitter.js +275 -0
- package/dist/classes/events/index.d.ts +1 -0
- package/dist/classes/events/index.js +2 -0
- package/dist/classes/index.d.ts +4 -0
- package/dist/classes/index.js +4 -0
- package/dist/classes/logging/Logger.d.ts +78 -0
- package/dist/classes/logging/Logger.js +210 -0
- package/dist/classes/logging/constants.d.ts +12 -0
- package/dist/classes/logging/constants.js +16 -0
- package/dist/classes/logging/index.d.ts +2 -0
- package/dist/classes/logging/index.js +4 -0
- package/dist/classes/logging/typedef.d.ts +34 -0
- package/dist/classes/logging/typedef.js +17 -0
- package/dist/classes/promise/HkPromise.d.ts +121 -0
- package/dist/classes/promise/HkPromise.js +377 -0
- package/dist/classes/promise/index.d.ts +1 -0
- package/dist/classes/promise/index.js +1 -0
- package/dist/classes/services/ServiceBase.d.ts +163 -0
- package/dist/classes/services/ServiceBase.js +463 -0
- package/dist/classes/services/ServiceManager.d.ts +179 -0
- package/dist/classes/services/ServiceManager.js +614 -0
- package/dist/classes/services/index.d.ts +4 -0
- package/dist/classes/services/index.js +5 -0
- package/dist/classes/services/service-states.d.ts +159 -0
- package/dist/classes/services/service-states.js +205 -0
- package/dist/classes/services/typedef.d.ts +247 -0
- package/dist/classes/services/typedef.js +179 -0
- package/dist/classes/stores/SubscribersCount.d.ts +39 -0
- package/dist/classes/stores/SubscribersCount.js +107 -0
- package/dist/classes/stores/index.d.ts +1 -0
- package/dist/classes/stores/index.js +1 -0
- package/dist/classes/streams/LogTransformStream.d.ts +4 -0
- package/dist/classes/streams/LogTransformStream.js +19 -0
- package/dist/classes/streams/ServerEventsStore.d.ts +22 -0
- package/dist/classes/streams/ServerEventsStore.js +110 -0
- package/dist/classes/streams/TimeStampSource.d.ts +13 -0
- package/dist/classes/streams/TimeStampSource.js +26 -0
- package/dist/classes/streams/index.d.ts +3 -0
- package/dist/classes/streams/index.js +3 -0
- package/dist/classes/svelte/audio/AudioLoader.svelte.d.ts +30 -0
- package/dist/classes/svelte/audio/AudioLoader.svelte.js +58 -0
- package/dist/classes/svelte/audio/AudioScene.svelte.d.ts +74 -0
- package/dist/classes/svelte/audio/AudioScene.svelte.js +324 -0
- package/dist/classes/svelte/audio/mocks.d.ts +7 -0
- package/dist/classes/svelte/audio/mocks.js +35 -0
- package/dist/classes/svelte/finite-state-machine/FiniteStateMachine.svelte.d.ts +50 -0
- package/dist/classes/svelte/finite-state-machine/FiniteStateMachine.svelte.js +133 -0
- package/dist/classes/svelte/finite-state-machine/index.d.ts +1 -0
- package/dist/classes/svelte/finite-state-machine/index.js +1 -0
- package/dist/classes/svelte/image/ImageLoader.svelte.d.ts +19 -0
- package/dist/classes/svelte/image/ImageLoader.svelte.js +45 -0
- package/dist/classes/svelte/image/ImageScene.svelte.d.ts +78 -0
- package/dist/classes/svelte/image/ImageScene.svelte.js +249 -0
- package/dist/classes/svelte/image/ImageVariantsLoader.svelte.d.ts +43 -0
- package/dist/classes/svelte/image/ImageVariantsLoader.svelte.js +152 -0
- package/dist/classes/svelte/image/index.d.ts +2 -0
- package/dist/classes/svelte/image/index.js +4 -0
- package/dist/classes/svelte/image/mocks.d.ts +7 -0
- package/dist/classes/svelte/image/mocks.js +35 -0
- package/dist/classes/svelte/image/typedef.d.ts +16 -0
- package/dist/classes/svelte/image/typedef.js +8 -0
- package/dist/classes/svelte/index.d.ts +9 -0
- package/dist/classes/svelte/index.js +14 -0
- package/dist/classes/svelte/loading-state-machine/LoadingStateMachine.svelte.d.ts +12 -0
- package/dist/classes/svelte/loading-state-machine/LoadingStateMachine.svelte.js +109 -0
- package/dist/classes/svelte/loading-state-machine/constants.d.ts +12 -0
- package/dist/classes/svelte/loading-state-machine/constants.js +16 -0
- package/dist/classes/svelte/loading-state-machine/index.d.ts +2 -0
- package/dist/classes/svelte/loading-state-machine/index.js +3 -0
- package/dist/classes/svelte/network-loader/NetworkLoader.svelte.d.ts +91 -0
- package/dist/classes/svelte/network-loader/NetworkLoader.svelte.js +338 -0
- package/dist/classes/svelte/network-loader/constants.d.ts +2 -0
- package/dist/classes/svelte/network-loader/constants.js +3 -0
- package/dist/classes/svelte/network-loader/index.d.ts +2 -0
- package/dist/classes/svelte/network-loader/index.js +3 -0
- package/dist/classes/svelte/network-loader/mocks.d.ts +7 -0
- package/dist/classes/svelte/network-loader/mocks.js +30 -0
- package/dist/classes/svelte/network-loader/typedef.d.ts +7 -0
- package/dist/classes/svelte/network-loader/typedef.js +8 -0
- package/dist/components/area/HkArea.svelte +49 -0
- package/dist/components/area/HkArea.svelte.d.ts +26 -0
- package/dist/components/area/HkGridArea.svelte +77 -0
- package/dist/components/area/HkGridArea.svelte.d.ts +42 -0
- package/dist/components/area/index.d.ts +2 -0
- package/dist/components/area/index.js +2 -0
- package/dist/components/buttons/button/Button.svelte +82 -0
- package/dist/components/buttons/button/Button.svelte.d.ts +44 -0
- package/dist/components/buttons/button-icon-steeze/SteezeIconButton.svelte +30 -0
- package/dist/components/buttons/button-icon-steeze/SteezeIconButton.svelte.d.ts +16 -0
- package/dist/components/buttons/button-text/TextButton.svelte +21 -0
- package/dist/components/buttons/button-text/TextButton.svelte.d.ts +12 -0
- package/dist/components/buttons/index.d.ts +3 -0
- package/dist/components/buttons/index.js +3 -0
- package/dist/components/debug/debug-panel-design-scaling/DebugPanelDesignScaling.svelte +146 -0
- package/dist/components/debug/debug-panel-design-scaling/DebugPanelDesignScaling.svelte.d.ts +6 -0
- package/dist/components/debug/index.d.ts +1 -0
- package/dist/components/debug/index.js +1 -0
- package/dist/components/drag-drop/DragController.d.ts +20 -0
- package/dist/components/drag-drop/DragController.js +44 -0
- package/dist/components/drag-drop/DragDropContext.svelte +111 -0
- package/dist/components/drag-drop/DragDropContext.svelte.d.ts +18 -0
- package/dist/components/drag-drop/Draggable.svelte +519 -0
- package/dist/components/drag-drop/Draggable.svelte.d.ts +95 -0
- package/dist/components/drag-drop/DropZone.svelte +258 -0
- package/dist/components/drag-drop/DropZone.svelte.d.ts +96 -0
- package/dist/components/drag-drop/DropZoneArea.svelte +119 -0
- package/dist/components/drag-drop/DropZoneArea.svelte.d.ts +90 -0
- package/dist/components/drag-drop/DropZoneList.svelte +125 -0
- package/dist/components/drag-drop/DropZoneList.svelte.d.ts +92 -0
- package/dist/components/drag-drop/actions.d.ts +9 -0
- package/dist/components/drag-drop/actions.js +26 -0
- package/dist/components/drag-drop/drag-state.svelte.d.ts +97 -0
- package/dist/components/drag-drop/drag-state.svelte.js +322 -0
- package/dist/components/drag-drop/index.d.ts +6 -0
- package/dist/components/drag-drop/index.js +7 -0
- package/dist/components/drag-drop/util.d.ts +0 -0
- package/dist/components/drag-drop/util.js +85 -0
- package/dist/components/hkdev/blocks/TextBlock.svelte +47 -0
- package/dist/components/hkdev/blocks/TextBlock.svelte.d.ts +24 -0
- package/dist/components/hkdev/buttons/CheckButton.svelte +63 -0
- package/dist/components/hkdev/buttons/CheckButton.svelte.d.ts +34 -0
- package/dist/components/icons/HkIcon.svelte +86 -0
- package/dist/components/icons/HkIcon.svelte.d.ts +22 -0
- package/dist/components/icons/HkTabIcon.svelte +116 -0
- package/dist/components/icons/HkTabIcon.svelte.d.ts +40 -0
- package/dist/components/icons/SteezeIcon.svelte +97 -0
- package/dist/components/icons/SteezeIcon.svelte.d.ts +22 -0
- package/dist/components/icons/index.d.ts +4 -0
- package/dist/components/icons/index.js +6 -0
- package/dist/components/icons/typedef.d.ts +13 -0
- package/dist/components/icons/typedef.js +16 -0
- package/dist/components/index.d.ts +0 -0
- package/dist/components/index.js +2 -0
- package/dist/components/inputs/index.d.ts +1 -0
- package/dist/components/inputs/index.js +1 -0
- package/dist/components/inputs/text-input/TestTextInput.svelte__ +102 -0
- package/dist/components/inputs/text-input/TextInput.svelte +223 -0
- package/dist/components/inputs/text-input/TextInput.svelte.d.ts +56 -0
- package/dist/components/inputs/text-input/TextInput.svelte___ +83 -0
- package/dist/components/inputs/text-input/assets/IconInvalid.svelte +14 -0
- package/dist/components/inputs/text-input/assets/IconInvalid.svelte.d.ts +26 -0
- package/dist/components/inputs/text-input/assets/IconValid.svelte +12 -0
- package/dist/components/inputs/text-input/assets/IconValid.svelte.d.ts +26 -0
- package/dist/components/layout/grid-layers/GridLayers.svelte +63 -0
- package/dist/components/layout/grid-layers/GridLayers.svelte.d.ts +26 -0
- package/dist/components/layout/grid-layers/GridLayers.svelte__heightFrom__ +372 -0
- package/dist/components/layout/grid-layers/util.d.ts +19 -0
- package/dist/components/layout/grid-layers/util.js +74 -0
- package/dist/components/layout/index.d.ts +1 -0
- package/dist/components/layout/index.js +1 -0
- package/dist/components/panels/index.d.ts +1 -0
- package/dist/components/panels/index.js +1 -0
- package/dist/components/panels/panel/Panel.svelte +43 -0
- package/dist/components/panels/panel/Panel.svelte.d.ts +24 -0
- package/dist/components/rows/index.d.ts +2 -0
- package/dist/components/rows/index.js +3 -0
- package/dist/components/rows/panel-grid-row/PanelGridRow.svelte +104 -0
- package/dist/components/rows/panel-grid-row/PanelGridRow.svelte.d.ts +26 -0
- package/dist/components/rows/panel-row-2/PanelRow2.svelte +40 -0
- package/dist/components/rows/panel-row-2/PanelRow2.svelte.d.ts +26 -0
- package/dist/components/tab-bar/HkTabBar.state.svelte.d.ts +54 -0
- package/dist/components/tab-bar/HkTabBar.state.svelte.js +149 -0
- package/dist/components/tab-bar/HkTabBar.svelte +74 -0
- package/dist/components/tab-bar/HkTabBar.svelte.d.ts +34 -0
- package/dist/components/tab-bar/HkTabBarSelector.state.svelte.d.ts +19 -0
- package/dist/components/tab-bar/HkTabBarSelector.state.svelte.js +93 -0
- package/dist/components/tab-bar/HkTabBarSelector.svelte +49 -0
- package/dist/components/tab-bar/HkTabBarSelector.svelte.d.ts +36 -0
- package/dist/components/tab-bar/index.d.ts +5 -0
- package/dist/components/tab-bar/index.js +17 -0
- package/dist/components/tab-bar/typedef.d.ts +8 -0
- package/dist/components/tab-bar/typedef.js +11 -0
- package/dist/config/imagetools-config.d.ts +26 -0
- package/dist/config/imagetools-config.js +189 -0
- package/dist/config/imagetools.d.ts +72 -0
- package/dist/constants/bases.d.ts +10 -0
- package/dist/constants/bases.js +13 -0
- package/dist/constants/errors/api.d.ts +10 -0
- package/dist/constants/errors/api.js +9 -0
- package/dist/constants/errors/generic.d.ts +20 -0
- package/dist/constants/errors/generic.js +20 -0
- package/dist/constants/errors/http.d.ts +16 -0
- package/dist/constants/errors/http.js +16 -0
- package/dist/constants/errors/index.d.ts +4 -0
- package/dist/constants/errors/index.js +4 -0
- package/dist/constants/errors/jwt.d.ts +8 -0
- package/dist/constants/errors/jwt.js +5 -0
- package/dist/constants/http/headers.d.ts +5 -0
- package/dist/constants/http/headers.js +6 -0
- package/dist/constants/http/index.d.ts +2 -0
- package/dist/constants/http/index.js +2 -0
- package/dist/constants/http/methods.d.ts +7 -0
- package/dist/constants/http/methods.js +14 -0
- package/dist/constants/index.d.ts +2 -0
- package/dist/constants/index.js +3 -0
- package/dist/constants/mime/application.d.ts +3 -0
- package/dist/constants/mime/application.js +5 -0
- package/dist/constants/mime/audio.d.ts +10 -0
- package/dist/constants/mime/audio.js +13 -0
- package/dist/constants/mime/image.d.ts +3 -0
- package/dist/constants/mime/image.js +3 -0
- package/dist/constants/mime/index.d.ts +4 -0
- package/dist/constants/mime/index.js +4 -0
- package/dist/constants/mime/text.d.ts +2 -0
- package/dist/constants/mime/text.js +2 -0
- package/dist/constants/regexp/index.d.ts +3 -0
- package/dist/constants/regexp/index.js +31 -0
- package/dist/constants/regexp/inspiratie.js__ +95 -0
- package/dist/constants/regexp/text.d.ts +47 -0
- package/dist/constants/regexp/text.js +49 -0
- package/dist/constants/regexp/user.d.ts +6 -0
- package/dist/constants/regexp/user.js +33 -0
- package/dist/constants/regexp/web.d.ts +1 -0
- package/dist/constants/regexp/web.js +3 -0
- package/dist/constants/state-labels/drag-states.d.ts +5 -0
- package/dist/constants/state-labels/drag-states.js +6 -0
- package/dist/constants/state-labels/drop-states.d.ts +4 -0
- package/dist/constants/state-labels/drop-states.js +6 -0
- package/dist/constants/state-labels/input-states.d.ts +8 -0
- package/dist/constants/state-labels/input-states.js +11 -0
- package/dist/constants/state-labels/submit-states.d.ts +4 -0
- package/dist/constants/state-labels/submit-states.js +4 -0
- package/dist/constants/time.d.ts +18 -0
- package/dist/constants/time.js +28 -0
- package/dist/css/utilities.css +43 -0
- package/dist/design/design-config.d.ts +157 -0
- package/dist/design/design-config.js +73 -0
- package/dist/design/tailwind-theme-extend.d.ts +23 -0
- package/dist/design/tailwind-theme-extend.js +158 -0
- package/dist/features/button-group/ButtonGroup.svelte +82 -0
- package/dist/features/button-group/ButtonGroup.svelte.d.ts +34 -0
- package/dist/features/button-group/typedef.d.ts +7 -0
- package/dist/features/button-group/typedef.js +10 -0
- package/dist/features/compare-left-right/CompareLeftRight.svelte +179 -0
- package/dist/features/compare-left-right/CompareLeftRight.svelte.d.ts +18 -0
- package/dist/features/compare-left-right/index.d.ts +1 -0
- package/dist/features/compare-left-right/index.js +1 -0
- package/dist/features/game-box/GameBox.svelte +577 -0
- package/dist/features/game-box/GameBox.svelte.d.ts +140 -0
- package/dist/features/game-box/gamebox.util.d.ts +32 -0
- package/dist/features/game-box/gamebox.util.js +83 -0
- package/dist/features/hk-app-layout/HkAppLayout.state.svelte.d.ts +6 -0
- package/dist/features/hk-app-layout/HkAppLayout.state.svelte.js +25 -0
- package/dist/features/hk-app-layout/HkAppLayout.svelte +251 -0
- package/dist/features/hk-app-layout/HkAppLayout.svelte.d.ts +19 -0
- package/dist/features/image-box/ImageBox.svelte +210 -0
- package/dist/features/image-box/ImageBox.svelte.d.ts +38 -0
- package/dist/features/image-box/index.d.ts +4 -0
- package/dist/features/image-box/index.js +5 -0
- package/dist/features/image-box/typedef.d.ts +4 -0
- package/dist/features/image-box/typedef.js +32 -0
- package/dist/features/index.d.ts +11 -0
- package/dist/features/index.js +23 -0
- package/dist/features/presenter/ImageSlide.svelte +64 -0
- package/dist/features/presenter/ImageSlide.svelte.d.ts +36 -0
- package/dist/features/presenter/Presenter.state.svelte.d.ts +74 -0
- package/dist/features/presenter/Presenter.state.svelte.js +638 -0
- package/dist/features/presenter/Presenter.svelte +142 -0
- package/dist/features/presenter/Presenter.svelte.d.ts +18 -0
- package/dist/features/presenter/constants.d.ts +5 -0
- package/dist/features/presenter/constants.js +7 -0
- package/dist/features/presenter/index.d.ts +6 -0
- package/dist/features/presenter/index.js +10 -0
- package/dist/features/presenter/typedef.d.ts +92 -0
- package/dist/features/presenter/typedef.js +106 -0
- package/dist/features/presenter/util.d.ts +63 -0
- package/dist/features/presenter/util.js +210 -0
- package/dist/features/virtual-viewport/VirtualViewport.svelte +196 -0
- package/dist/features/virtual-viewport/VirtualViewport.svelte.d.ts +42 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +0 -0
- package/dist/logging/adapters/console.d.ts +48 -0
- package/dist/logging/adapters/console.js +114 -0
- package/dist/logging/adapters/pino.d.ts +25 -0
- package/dist/logging/adapters/pino.js +60 -0
- package/dist/logging/constants.d.ts +1 -0
- package/dist/logging/constants.js +1 -0
- package/dist/logging/factories/client.d.ts +10 -0
- package/dist/logging/factories/client.js +21 -0
- package/dist/logging/factories/server.d.ts +10 -0
- package/dist/logging/factories/server.js +22 -0
- package/dist/logging/factories/universal.d.ts +9 -0
- package/dist/logging/factories/universal.js +23 -0
- package/dist/logging/index.d.ts +5 -0
- package/dist/logging/index.js +8 -0
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.js +1 -0
- package/dist/schemas/validate-url.d.ts +30 -0
- package/dist/schemas/validate-url.js +180 -0
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js +1 -0
- package/dist/server/logger.d.ts +25 -0
- package/dist/server/logger.js +94 -0
- package/dist/states/index.d.ts +1 -0
- package/dist/states/index.js +1 -0
- package/dist/states/navigation.svelte.d.ts +23 -0
- package/dist/states/navigation.svelte.js +55 -0
- package/dist/stores/index.d.ts +1 -0
- package/dist/stores/index.js +1 -0
- package/dist/stores/theme.d.ts +28 -0
- package/dist/stores/theme.js +80 -0
- package/dist/themes/hkdev/components/blocks/text-block.css +34 -0
- package/dist/themes/hkdev/components/boxes/game-box.css +11 -0
- package/dist/themes/hkdev/components/buttons/button-icon-steeze.css +22 -0
- package/dist/themes/hkdev/components/buttons/button-text.css +32 -0
- package/dist/themes/hkdev/components/buttons/button.css +146 -0
- package/dist/themes/hkdev/components/buttons/skip-button.css +5 -0
- package/dist/themes/hkdev/components/drag-drop/draggable.css +73 -0
- package/dist/themes/hkdev/components/drag-drop/drop-zone.css +58 -0
- package/dist/themes/hkdev/components/icons/icon-steeze.css +16 -0
- package/dist/themes/hkdev/components/inputs/text-input.css +102 -0
- package/dist/themes/hkdev/components/panels/panel.css +25 -0
- package/dist/themes/hkdev/components/rows/panel-grid-row.css +4 -0
- package/dist/themes/hkdev/components/rows/panel-row-2.css +5 -0
- package/dist/themes/hkdev/components.css +29 -0
- package/dist/themes/hkdev/debug.css +2 -0
- package/dist/themes/hkdev/global/layout.css +32 -0
- package/dist/themes/hkdev/global/on-colors.css +32 -0
- package/dist/themes/hkdev/globals.css +4 -0
- package/dist/themes/hkdev/responsive.css +12 -0
- package/dist/themes/hkdev/theme-ext.d.ts +4 -0
- package/dist/themes/hkdev/theme-ext.js +12 -0
- package/dist/themes/hkdev/theme.css +219 -0
- package/dist/themes/index.d.ts +1 -0
- package/dist/themes/index.js +1 -0
- package/dist/typedef/context.d.ts +3 -0
- package/dist/typedef/context.js +6 -0
- package/dist/typedef/drag.d.ts +29 -0
- package/dist/typedef/drag.js +25 -0
- package/dist/typedef/drop.d.ts +15 -0
- package/dist/typedef/drop.js +12 -0
- package/dist/typedef/image.d.ts +12 -0
- package/dist/typedef/image.js +38 -0
- package/dist/typedef/index.d.ts +4 -0
- package/dist/typedef/index.js +4 -0
- package/dist/util/array/index.d.ts +183 -0
- package/dist/util/array/index.js +436 -0
- package/dist/util/bases/base58.d.ts +58 -0
- package/dist/util/bases/base58.js +262 -0
- package/dist/util/bases/index.d.ts +1 -0
- package/dist/util/bases/index.js +1 -0
- package/dist/util/compare/index.d.ts +68 -0
- package/dist/util/compare/index.js +247 -0
- package/dist/util/css/css-vars.d.ts +24 -0
- package/dist/util/css/css-vars.js +83 -0
- package/dist/util/css/index.d.ts +1 -0
- package/dist/util/css/index.js +1 -0
- package/dist/util/design-system/components/states.d.ts +15 -0
- package/dist/util/design-system/components/states.js +22 -0
- package/dist/util/design-system/css/clamp.d.ts +17 -0
- package/dist/util/design-system/css/clamp.js +66 -0
- package/dist/util/design-system/css/root-design-vars.d.ts +77 -0
- package/dist/util/design-system/css/root-design-vars.js +102 -0
- package/dist/util/design-system/index.d.ts +5 -0
- package/dist/util/design-system/index.js +5 -0
- package/dist/util/design-system/layout/scaling.d.ts +98 -0
- package/dist/util/design-system/layout/scaling.js +228 -0
- package/dist/util/design-system/skeleton.d.ts +41 -0
- package/dist/util/design-system/skeleton.js +208 -0
- package/dist/util/design-system/tailwind.d.ts +183 -0
- package/dist/util/design-system/tailwind.js +288 -0
- package/dist/util/env/index.d.ts +1 -0
- package/dist/util/env/index.js +9 -0
- package/dist/util/exceptions/index.d.ts +15 -0
- package/dist/util/exceptions/index.js +23 -0
- package/dist/util/expect/arrays.d.ts +30 -0
- package/dist/util/expect/arrays.js +47 -0
- package/dist/util/expect/index.d.ts +103 -0
- package/dist/util/expect/index.js +259 -0
- package/dist/util/expect/primitives.d.ts +30 -0
- package/dist/util/expect/primitives.js +55 -0
- package/dist/util/expect/url.d.ts +32 -0
- package/dist/util/expect/url.js +60 -0
- package/dist/util/function/index.d.ts +34 -0
- package/dist/util/function/index.js +218 -0
- package/dist/util/geo/index.d.ts +10 -0
- package/dist/util/geo/index.js +26 -0
- package/dist/util/http/caching.d.ts +28 -0
- package/dist/util/http/caching.js +263 -0
- package/dist/util/http/errors.d.ts +18 -0
- package/dist/util/http/errors.js +97 -0
- package/dist/util/http/headers.d.ts +40 -0
- package/dist/util/http/headers.js +75 -0
- package/dist/util/http/http-request.d.ts +267 -0
- package/dist/util/http/http-request.js +578 -0
- package/dist/util/http/index.d.ts +6 -0
- package/dist/util/http/index.js +22 -0
- package/dist/util/http/json-request.d.ts +84 -0
- package/dist/util/http/json-request.js +224 -0
- package/dist/util/http/mocks.d.ts +20 -0
- package/dist/util/http/mocks.js +65 -0
- package/dist/util/http/response.d.ts +125 -0
- package/dist/util/http/response.js +294 -0
- package/dist/util/http/test-data__/content-length-test-hkdigital-small.V4HfZyBQ.avif +0 -0
- package/dist/util/http/typedef.d.ts +184 -0
- package/dist/util/http/typedef.js +93 -0
- package/dist/util/http/url.d.ts +25 -0
- package/dist/util/http/url.js +52 -0
- package/dist/util/image/index.d.ts +25 -0
- package/dist/util/image/index.js +86 -0
- package/dist/util/index.d.ts +3 -0
- package/dist/util/index.js +3 -0
- package/dist/util/is/index.d.ts +68 -0
- package/dist/util/is/index.js +140 -0
- package/dist/util/iterate/index.d.ts +131 -0
- package/dist/util/iterate/index.js +234 -0
- package/dist/util/object/index.d.ts +326 -0
- package/dist/util/object/index.js +1361 -0
- package/dist/util/singleton/index.d.ts +34 -0
- package/dist/util/singleton/index.js +97 -0
- package/dist/util/string/array-path.d.ts +15 -0
- package/dist/util/string/array-path.js +75 -0
- package/dist/util/string/convert.d.ts +22 -0
- package/dist/util/string/convert.js +54 -0
- package/dist/util/string/fs.d.ts +55 -0
- package/dist/util/string/fs.js +226 -0
- package/dist/util/string/index.d.ts +5 -0
- package/dist/util/string/index.js +5 -0
- package/dist/util/string/interpolate.d.ts +22 -0
- package/dist/util/string/interpolate.js +61 -0
- package/dist/util/string/pad.d.ts +8 -0
- package/dist/util/string/pad.js +10 -0
- package/dist/util/svelte/index.d.ts +3 -0
- package/dist/util/svelte/index.js +4 -0
- package/dist/util/svelte/loading/loading-tracker.svelte.d.ts +31 -0
- package/dist/util/svelte/loading/loading-tracker.svelte.js +108 -0
- package/dist/util/svelte/observe/index.d.ts +10 -0
- package/dist/util/svelte/observe/index.js +49 -0
- package/dist/util/svelte/state-context/index.d.ts +18 -0
- package/dist/util/svelte/state-context/index.js +117 -0
- package/dist/util/svelte/wait/index.d.ts +15 -0
- package/dist/util/svelte/wait/index.js +38 -0
- package/dist/util/sveltekit/index.d.ts +1 -0
- package/dist/util/sveltekit/index.js +1 -0
- package/dist/util/sveltekit/route-folders/index.d.ts +28 -0
- package/dist/util/sveltekit/route-folders/index.js +101 -0
- package/dist/util/time/index.d.ts +108 -0
- package/dist/util/time/index.js +323 -0
- package/dist/util/unique/index.d.ts +81 -0
- package/dist/util/unique/index.js +249 -0
- package/dist/valibot/date.js__ +10 -0
- package/dist/valibot/index.d.ts +4 -0
- package/dist/valibot/index.js +9 -0
- package/dist/valibot/url.d.ts +26 -0
- package/dist/valibot/url.js +95 -0
- package/dist/valibot/user.d.ts +6 -0
- package/dist/valibot/user.js +23 -0
- package/dist/zod/all.d.ts +6 -0
- package/dist/zod/all.js +33 -0
- package/dist/zod/generic.d.ts +6 -0
- package/dist/zod/generic.js +11 -0
- package/dist/zod/javascript.d.ts +8 -0
- package/dist/zod/javascript.js +32 -0
- package/dist/zod/user.d.ts +9 -0
- package/dist/zod/user.js +16 -0
- package/dist/zod/web.d.ts +21 -0
- package/dist/zod/web.js +52 -0
- package/package.json +133 -0
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
};
|
|
16
|
+
declare const HkArea: import("svelte").Component<{
|
|
17
|
+
base?: string;
|
|
18
|
+
bg?: string;
|
|
19
|
+
padding?: string;
|
|
20
|
+
margin?: string;
|
|
21
|
+
classes?: string;
|
|
22
|
+
style?: string;
|
|
23
|
+
children: import("svelte").Snippet;
|
|
24
|
+
} & {
|
|
25
|
+
[attr: string]: any;
|
|
26
|
+
}, {}, "domElem">;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
/**
|
|
3
|
+
* Grid area component
|
|
4
|
+
* This component contains a DIV that has display: grid set. It is
|
|
5
|
+
* wrapped in a box which makes it possible to add box attributes
|
|
6
|
+
* such as margins.
|
|
7
|
+
*
|
|
8
|
+
* Following component guidelines from Skeleton
|
|
9
|
+
* @see https://next.skeleton.dev/docs/resources/contribute/components
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import HkArea from './HkArea.svelte';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @type {{
|
|
16
|
+
* base?: string,
|
|
17
|
+
* bg?: string,
|
|
18
|
+
* padding?: string,
|
|
19
|
+
* margin?: string,
|
|
20
|
+
* classes?: string,
|
|
21
|
+
* style?: string,
|
|
22
|
+
* boxBase?: string,
|
|
23
|
+
* boxBg?: string,
|
|
24
|
+
* boxPadding?: string,
|
|
25
|
+
* boxMargin?: string,
|
|
26
|
+
* boxClasses?: string,
|
|
27
|
+
* boxAttrs?: { [attr: string]: * },
|
|
28
|
+
* children: import('svelte').Snippet
|
|
29
|
+
* } & { [attr: string]: any }}
|
|
30
|
+
*/
|
|
31
|
+
let {
|
|
32
|
+
// Style
|
|
33
|
+
base,
|
|
34
|
+
bg,
|
|
35
|
+
padding,
|
|
36
|
+
margin,
|
|
37
|
+
classes,
|
|
38
|
+
style,
|
|
39
|
+
boxBase,
|
|
40
|
+
boxBg,
|
|
41
|
+
boxPadding,
|
|
42
|
+
boxMargin,
|
|
43
|
+
boxClasses,
|
|
44
|
+
boxAttrs,
|
|
45
|
+
|
|
46
|
+
// Snippets
|
|
47
|
+
children,
|
|
48
|
+
|
|
49
|
+
// DOM Element's
|
|
50
|
+
domElem = $bindable(),
|
|
51
|
+
boxDomElem = $bindable(),
|
|
52
|
+
|
|
53
|
+
// Attributes
|
|
54
|
+
...attrs
|
|
55
|
+
} = $props();
|
|
56
|
+
</script>
|
|
57
|
+
|
|
58
|
+
<div
|
|
59
|
+
data-hk-grid-area-box
|
|
60
|
+
class="{boxBase} {boxBg} {boxPadding} {boxMargin} {boxClasses}"
|
|
61
|
+
{...boxAttrs}
|
|
62
|
+
bind:this={boxDomElem}
|
|
63
|
+
>
|
|
64
|
+
<HkArea
|
|
65
|
+
data-hk-grid-area
|
|
66
|
+
base="grid {base}"
|
|
67
|
+
bind:domElem
|
|
68
|
+
{bg}
|
|
69
|
+
{padding}
|
|
70
|
+
{margin}
|
|
71
|
+
{classes}
|
|
72
|
+
{style}
|
|
73
|
+
{...attrs}
|
|
74
|
+
>
|
|
75
|
+
{@render children()}
|
|
76
|
+
</HkArea>
|
|
77
|
+
</div>
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
};
|
|
24
|
+
declare const HkGridArea: import("svelte").Component<{
|
|
25
|
+
base?: string;
|
|
26
|
+
bg?: string;
|
|
27
|
+
padding?: string;
|
|
28
|
+
margin?: string;
|
|
29
|
+
classes?: string;
|
|
30
|
+
style?: string;
|
|
31
|
+
boxBase?: string;
|
|
32
|
+
boxBg?: string;
|
|
33
|
+
boxPadding?: string;
|
|
34
|
+
boxMargin?: string;
|
|
35
|
+
boxClasses?: string;
|
|
36
|
+
boxAttrs?: {
|
|
37
|
+
[attr: string]: any;
|
|
38
|
+
};
|
|
39
|
+
children: import("svelte").Snippet;
|
|
40
|
+
} & {
|
|
41
|
+
[attr: string]: any;
|
|
42
|
+
}, {}, "domElem" | "boxDomElem">;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { toStateClasses } from '../../../util/design-system/index.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @type {{
|
|
6
|
+
* base?: string,
|
|
7
|
+
* bg?: string,
|
|
8
|
+
* classes?: string,
|
|
9
|
+
* type?: string,
|
|
10
|
+
* role?: 'primary' | 'secondary' | 'tertiary' | 'custom',
|
|
11
|
+
* size?: 'sm' | 'md' | 'lg',
|
|
12
|
+
* variant?: string,
|
|
13
|
+
* mode?: 'light'|'dark'
|
|
14
|
+
* buttonType?: 'button' | 'submit' | 'reset',
|
|
15
|
+
* active?: boolean,
|
|
16
|
+
* selected?: boolean,
|
|
17
|
+
* loading?: boolean,
|
|
18
|
+
* error?: boolean,
|
|
19
|
+
* disabled?: boolean,
|
|
20
|
+
* snippetLoading?: import('svelte').Snippet,
|
|
21
|
+
* snippetError?: import('svelte').Snippet,
|
|
22
|
+
* children: import('svelte').Snippet,
|
|
23
|
+
* [key: string]: any
|
|
24
|
+
* }}
|
|
25
|
+
*/
|
|
26
|
+
const {
|
|
27
|
+
// Style
|
|
28
|
+
base,
|
|
29
|
+
bg,
|
|
30
|
+
classes,
|
|
31
|
+
|
|
32
|
+
type = '',
|
|
33
|
+
role = 'primary',
|
|
34
|
+
size = 'md',
|
|
35
|
+
variant = '',
|
|
36
|
+
mode = 'light',
|
|
37
|
+
|
|
38
|
+
buttonType = 'button',
|
|
39
|
+
|
|
40
|
+
// States
|
|
41
|
+
active = $bindable(false),
|
|
42
|
+
selected = $bindable(false),
|
|
43
|
+
loading = $bindable(false),
|
|
44
|
+
error = $bindable(false),
|
|
45
|
+
disabled = $bindable(false),
|
|
46
|
+
|
|
47
|
+
// Snippets
|
|
48
|
+
snippetLoading,
|
|
49
|
+
snippetError,
|
|
50
|
+
children,
|
|
51
|
+
|
|
52
|
+
// Attributes
|
|
53
|
+
...attrs
|
|
54
|
+
} = $props();
|
|
55
|
+
|
|
56
|
+
let stateClasses = $derived.by(() => {
|
|
57
|
+
return toStateClasses({ active, selected, loading, error, disabled });
|
|
58
|
+
});
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
<button
|
|
62
|
+
data-component="button"
|
|
63
|
+
data-type={type}
|
|
64
|
+
data-role={role}
|
|
65
|
+
data-size={size}
|
|
66
|
+
data-variant={variant}
|
|
67
|
+
data-mode={mode}
|
|
68
|
+
type={buttonType}
|
|
69
|
+
class="{base} {bg} {classes} {stateClasses}"
|
|
70
|
+
disabled={disabled || loading}
|
|
71
|
+
aria-busy={loading}
|
|
72
|
+
aria-pressed={selected}
|
|
73
|
+
{...attrs}
|
|
74
|
+
>
|
|
75
|
+
{#if loading && snippetLoading}
|
|
76
|
+
{@render snippetLoading()}
|
|
77
|
+
{:else if error && snippetError}
|
|
78
|
+
{@render snippetError()}
|
|
79
|
+
{:else}
|
|
80
|
+
{@render children()}
|
|
81
|
+
{/if}
|
|
82
|
+
</button>
|
|
@@ -0,0 +1,44 @@
|
|
|
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?: "custom" | "primary" | "secondary" | "tertiary";
|
|
11
|
+
size?: "sm" | "md" | "lg";
|
|
12
|
+
variant?: string;
|
|
13
|
+
mode?: "light" | "dark";
|
|
14
|
+
buttonType?: "reset" | "submit" | "button";
|
|
15
|
+
active?: boolean;
|
|
16
|
+
selected?: boolean;
|
|
17
|
+
loading?: boolean;
|
|
18
|
+
error?: boolean;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
snippetLoading?: Snippet<[]>;
|
|
21
|
+
snippetError?: Snippet<[]>;
|
|
22
|
+
children: Snippet<[]>;
|
|
23
|
+
}>): void;
|
|
24
|
+
};
|
|
25
|
+
declare const Button: import("svelte").Component<{
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
base?: string;
|
|
28
|
+
bg?: string;
|
|
29
|
+
classes?: string;
|
|
30
|
+
type?: string;
|
|
31
|
+
role?: "primary" | "secondary" | "tertiary" | "custom";
|
|
32
|
+
size?: "sm" | "md" | "lg";
|
|
33
|
+
variant?: string;
|
|
34
|
+
mode?: "light" | "dark";
|
|
35
|
+
buttonType?: "button" | "submit" | "reset";
|
|
36
|
+
active?: boolean;
|
|
37
|
+
selected?: boolean;
|
|
38
|
+
loading?: boolean;
|
|
39
|
+
error?: boolean;
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
snippetLoading?: import("svelte").Snippet;
|
|
42
|
+
snippetError?: import("svelte").Snippet;
|
|
43
|
+
children: import("svelte").Snippet;
|
|
44
|
+
}, {}, "error" | "loading" | "active" | "selected" | "disabled">;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import Button from '../button/Button.svelte';
|
|
3
|
+
|
|
4
|
+
import { SteezeIcon } from '../../icons/index.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @type {{
|
|
8
|
+
* src: import('../../icons/typedef.js').IconSource,
|
|
9
|
+
* iconSize?: string,
|
|
10
|
+
* theme?: string,
|
|
11
|
+
* [key: string]: any
|
|
12
|
+
* }}
|
|
13
|
+
*/
|
|
14
|
+
const {
|
|
15
|
+
// Icon
|
|
16
|
+
src,
|
|
17
|
+
iconSize,
|
|
18
|
+
theme,
|
|
19
|
+
|
|
20
|
+
// Snippets
|
|
21
|
+
children,
|
|
22
|
+
|
|
23
|
+
// Attributes
|
|
24
|
+
...attrs
|
|
25
|
+
} = $props();
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<Button type="icon-steeze" {...attrs}>
|
|
29
|
+
<SteezeIcon {src} size={iconSize} {theme} />
|
|
30
|
+
</Button>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export default SteezeIconButton;
|
|
2
|
+
type SteezeIconButton = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<{
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
src: IconSource;
|
|
7
|
+
iconSize?: string;
|
|
8
|
+
theme?: string;
|
|
9
|
+
}>): void;
|
|
10
|
+
};
|
|
11
|
+
declare const SteezeIconButton: import("svelte").Component<{
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
src: import("../../icons/typedef.js").IconSource;
|
|
14
|
+
iconSize?: string;
|
|
15
|
+
theme?: string;
|
|
16
|
+
}, {}, "">;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import Button from '../button/Button.svelte';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @type {{
|
|
6
|
+
* children: import('svelte').Snippet,
|
|
7
|
+
* [key: string]: any
|
|
8
|
+
* }}
|
|
9
|
+
*/
|
|
10
|
+
const {
|
|
11
|
+
// Snippets
|
|
12
|
+
children,
|
|
13
|
+
|
|
14
|
+
// Attributes
|
|
15
|
+
...attrs
|
|
16
|
+
} = $props();
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<Button type="text" {...attrs}>
|
|
20
|
+
{@render children()}
|
|
21
|
+
</Button>
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
};
|
|
9
|
+
declare const TextButton: import("svelte").Component<{
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
children: import("svelte").Snippet;
|
|
12
|
+
}, {}, "">;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { onMount } from 'svelte';
|
|
3
|
+
import { DESIGN, CLAMPING } from '../../../design/design-config.js';
|
|
4
|
+
import {
|
|
5
|
+
enableScalingUI,
|
|
6
|
+
getAllRootScalingVars
|
|
7
|
+
} from '../../../util/design-system/index.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Holds the current scaling values for the debug panel
|
|
11
|
+
* @type {Object}
|
|
12
|
+
*/
|
|
13
|
+
let scalingValues = $state({
|
|
14
|
+
scaleW: 0,
|
|
15
|
+
scaleH: 0,
|
|
16
|
+
scaleViewport: 0,
|
|
17
|
+
scaleUI: 0,
|
|
18
|
+
scaleTextBase: 0,
|
|
19
|
+
scaleTextHeading: 0,
|
|
20
|
+
scaleTextUI: 0
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Controls visibility of the debug panel
|
|
25
|
+
*/
|
|
26
|
+
let showDebugPanel = $state(false);
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Updates scaling values for the debug panel
|
|
30
|
+
*/
|
|
31
|
+
function updateDebugValues() {
|
|
32
|
+
// Get scaling values
|
|
33
|
+
scalingValues = getAllRootScalingVars();
|
|
34
|
+
|
|
35
|
+
// Update window size display if in browser context
|
|
36
|
+
if (typeof window !== 'undefined') {
|
|
37
|
+
const windowSizeElement = document.getElementById('window-size');
|
|
38
|
+
if (windowSizeElement) {
|
|
39
|
+
windowSizeElement.textContent = `${window.innerWidth}×${window.innerHeight}px`;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
onMount(() => {
|
|
45
|
+
// Initialize the design scaling system
|
|
46
|
+
//const cleanup = () => {};
|
|
47
|
+
const cleanup = enableScalingUI(DESIGN, CLAMPING);
|
|
48
|
+
|
|
49
|
+
// Update debug values initially
|
|
50
|
+
updateDebugValues();
|
|
51
|
+
|
|
52
|
+
// Set up event listener for updating debug values on resize
|
|
53
|
+
window.addEventListener('resize', updateDebugValues);
|
|
54
|
+
|
|
55
|
+
// Return combined cleanup function
|
|
56
|
+
return () => {
|
|
57
|
+
cleanup();
|
|
58
|
+
window.removeEventListener('resize', updateDebugValues);
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Toggle debug panel visibility
|
|
64
|
+
*/
|
|
65
|
+
function toggleDebugPanel() {
|
|
66
|
+
showDebugPanel = !showDebugPanel;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Format a number to 2 decimal places
|
|
71
|
+
* @param {number} value - The number to format
|
|
72
|
+
* @returns {string} Formatted number
|
|
73
|
+
*/
|
|
74
|
+
function formatNumber(value) {
|
|
75
|
+
return value.toFixed(2);
|
|
76
|
+
}
|
|
77
|
+
</script>
|
|
78
|
+
|
|
79
|
+
<!-- Debug Panel -->
|
|
80
|
+
{#if showDebugPanel}
|
|
81
|
+
<div
|
|
82
|
+
class="fixed bottom-0 right-0 bg-black bg-opacity-75 text-white p-2 text-ui-md z-50 font-mono"
|
|
83
|
+
>
|
|
84
|
+
<div class="flex justify-between items-center mb-1">
|
|
85
|
+
<h3 class="font-bold">Design System Scaling</h3>
|
|
86
|
+
<button
|
|
87
|
+
onclick={toggleDebugPanel}
|
|
88
|
+
class="ml-2 px-1.5 bg-gray-700 hover:bg-gray-600 rounded"
|
|
89
|
+
>
|
|
90
|
+
×
|
|
91
|
+
</button>
|
|
92
|
+
</div>
|
|
93
|
+
<div class="grid grid-cols-2 gap-x-2 gap-y-0.5">
|
|
94
|
+
<div class="text-gray-400">Design Width:</div>
|
|
95
|
+
<div>{DESIGN.width}px</div>
|
|
96
|
+
|
|
97
|
+
<div class="text-gray-400">Design Height:</div>
|
|
98
|
+
<div>{DESIGN.height}px</div>
|
|
99
|
+
|
|
100
|
+
<div class="text-gray-400">Window:</div>
|
|
101
|
+
<div id="window-size">...</div>
|
|
102
|
+
|
|
103
|
+
<div class="text-gray-400">Scale W:</div>
|
|
104
|
+
<div>{formatNumber(scalingValues.scaleW)}</div>
|
|
105
|
+
|
|
106
|
+
<div class="text-gray-400">Scale H:</div>
|
|
107
|
+
<div>{formatNumber(scalingValues.scaleH)}</div>
|
|
108
|
+
|
|
109
|
+
<div class="text-gray-400">Viewport:</div>
|
|
110
|
+
<div>{formatNumber(scalingValues.scaleViewport)}</div>
|
|
111
|
+
|
|
112
|
+
<div class="text-gray-400">UI:</div>
|
|
113
|
+
<div>{formatNumber(scalingValues.scaleUI)}</div>
|
|
114
|
+
|
|
115
|
+
<div class="text-gray-400">Text Content:</div>
|
|
116
|
+
<div>{formatNumber(scalingValues.scaleTextBase)}</div>
|
|
117
|
+
|
|
118
|
+
<div class="text-gray-400">Text Heading:</div>
|
|
119
|
+
<div>{formatNumber(scalingValues.scaleTextHeading)}</div>
|
|
120
|
+
|
|
121
|
+
<div class="text-gray-400">Text UI:</div>
|
|
122
|
+
<div>{formatNumber(scalingValues.scaleTextUI)}</div>
|
|
123
|
+
</div>
|
|
124
|
+
|
|
125
|
+
<div class="mt-1 pt-1 border-t border-gray-600 text-gray-400">
|
|
126
|
+
<div>Clamping:</div>
|
|
127
|
+
<div class="grid grid-cols-3 text-2xs">
|
|
128
|
+
<div>UI: {CLAMPING.ui.min} - {CLAMPING.ui.max}</div>
|
|
129
|
+
<div>
|
|
130
|
+
Content: {CLAMPING.textBase.min} - {CLAMPING.textBase.max}
|
|
131
|
+
</div>
|
|
132
|
+
<div>
|
|
133
|
+
Heading: {CLAMPING.textHeading.min} - {CLAMPING.textHeading.max}
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
{:else}
|
|
139
|
+
<!-- Debug Panel Toggle Button -->
|
|
140
|
+
<button
|
|
141
|
+
onclick={toggleDebugPanel}
|
|
142
|
+
class="fixed bottom-0 right-0 bg-black bg-opacity-75 text-white p-16ut py-8ut text-ui-md z-50 font-mono hover:bg-opacity-90"
|
|
143
|
+
>
|
|
144
|
+
Show Debug
|
|
145
|
+
</button>
|
|
146
|
+
{/if}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export default DebugPanelDesignScaling;
|
|
2
|
+
type DebugPanelDesignScaling = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<Record<string, never>>): void;
|
|
5
|
+
};
|
|
6
|
+
declare const DebugPanelDesignScaling: import("svelte").Component<Record<string, never>, {}, "">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as DebugPanelDesignScaling } from "./debug-panel-design-scaling/DebugPanelDesignScaling.svelte";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as DebugPanelDesignScaling } from './debug-panel-design-scaling/DebugPanelDesignScaling.svelte';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Controller for customizing drag
|
|
3
|
+
* E.g. set a custom preview image
|
|
4
|
+
*/
|
|
5
|
+
export class DragController {
|
|
6
|
+
/**
|
|
7
|
+
* @param {DragEvent} event - The drag event
|
|
8
|
+
*/
|
|
9
|
+
constructor(event: DragEvent);
|
|
10
|
+
event: DragEvent;
|
|
11
|
+
dataTransfer: DataTransfer;
|
|
12
|
+
targetElement: HTMLElement;
|
|
13
|
+
offsetX: number;
|
|
14
|
+
offsetY: number;
|
|
15
|
+
/**
|
|
16
|
+
* Apply the default preview (uses the draggable element itself)
|
|
17
|
+
* @returns {boolean}
|
|
18
|
+
*/
|
|
19
|
+
applyDefaultPreview(): boolean;
|
|
20
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Controller for customizing drag
|
|
3
|
+
* E.g. set a custom preview image
|
|
4
|
+
*/
|
|
5
|
+
export class DragController {
|
|
6
|
+
/**
|
|
7
|
+
* @param {DragEvent} event - The drag event
|
|
8
|
+
*/
|
|
9
|
+
constructor(event) {
|
|
10
|
+
this.event = event;
|
|
11
|
+
this.dataTransfer = event.dataTransfer;
|
|
12
|
+
this.targetElement = /** @type {HTMLElement} */ (event.currentTarget);
|
|
13
|
+
|
|
14
|
+
// Calculate natural offsets by default (to prevent "jumping")
|
|
15
|
+
const rect = this.targetElement.getBoundingClientRect();
|
|
16
|
+
this.offsetX = event.clientX - rect.left;
|
|
17
|
+
this.offsetY = event.clientY - rect.top;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Apply the default preview (uses the draggable element itself)
|
|
22
|
+
* @returns {boolean}
|
|
23
|
+
*/
|
|
24
|
+
applyDefaultPreview() {
|
|
25
|
+
if (
|
|
26
|
+
!this.dataTransfer ||
|
|
27
|
+
!this.dataTransfer.setDragImage
|
|
28
|
+
) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
try {
|
|
33
|
+
this.dataTransfer.setDragImage(
|
|
34
|
+
this.targetElement,
|
|
35
|
+
this.offsetX,
|
|
36
|
+
this.offsetY
|
|
37
|
+
);
|
|
38
|
+
return true;
|
|
39
|
+
} catch (err) {
|
|
40
|
+
console.error('Failed to set default drag preview:', err);
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|