@hkdigital/lib-core 0.3.14 → 0.4.3
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 +18 -9
- package/dist/auth/errors.d.ts +1 -0
- package/dist/auth/errors.js +1 -0
- package/dist/{states → browser/navigation}/navigation.svelte.js +1 -1
- package/dist/browser/navigation.d.ts +1 -0
- package/dist/browser/navigation.js +1 -0
- package/dist/config/README.md +5 -5
- package/dist/config/generators/imagetools.d.ts +2 -0
- package/dist/config/generators/imagetools.js +23 -10
- package/dist/config/generators/vite.js +1 -1
- package/dist/config/imagetools.d.ts +5 -5
- package/dist/config/typedef.d.ts +11 -0
- package/dist/config/typedef.js +17 -0
- package/dist/design/README.md +211 -66
- package/dist/design/config/{design-config.d.ts → design-tokens.d.ts} +23 -10
- package/dist/design/config/design-tokens.js +107 -0
- package/dist/design/generators/index.d.ts +51 -0
- package/dist/design/generators/index.js +124 -0
- package/dist/design/index.d.ts +3 -4
- package/dist/design/index.js +24 -41
- package/dist/design/plugins/skeleton.d.ts +4 -2
- package/dist/design/plugins/skeleton.js +3 -2
- package/dist/design/themes/hkdev/components/buttons/button-text.css +38 -25
- package/dist/design/themes/hkdev/theme-ext.js +1 -1
- package/dist/design/utils/clamp.js +1 -1
- package/dist/design/utils/root-vars.d.ts +50 -39
- package/dist/design/utils/root-vars.js +127 -29
- package/dist/{classes/data → generic/data/classes}/IterableTree.js +2 -2
- package/dist/{classes/data → generic/data/classes}/Selector.js +1 -1
- package/dist/generic/data/classes/typedef.d.ts +24 -0
- package/dist/generic/data/classes/typedef.js +14 -0
- package/dist/generic/data.d.ts +2 -0
- package/dist/generic/data.js +2 -0
- package/dist/generic/errors.d.ts +2 -0
- package/dist/generic/errors.js +2 -0
- package/dist/generic/events.d.ts +1 -0
- package/dist/generic/events.js +1 -0
- package/dist/{classes/promise → generic/promises/classes}/HkPromise.d.ts +17 -7
- package/dist/{classes/promise → generic/promises/classes}/HkPromise.js +20 -10
- package/dist/generic/promises.d.ts +1 -0
- package/dist/generic/promises.js +1 -0
- package/dist/{classes/streams → generic/streaming/classes}/ServerEventsStore.d.ts +1 -1
- package/dist/{classes/streams → generic/streaming/classes}/ServerEventsStore.js +2 -2
- package/dist/generic/streaming.d.ts +3 -0
- package/dist/generic/streaming.js +3 -0
- package/dist/generic/typedef.d.ts +1 -0
- package/dist/generic/typedef.js +1 -0
- package/dist/index.js +1 -0
- package/dist/logging/errors.d.ts +7 -0
- package/dist/logging/errors.js +11 -0
- package/dist/logging/index.d.ts +2 -3
- package/dist/logging/index.js +3 -4
- package/dist/logging/internal/adapters/console.d.ts +1 -16
- package/dist/logging/internal/adapters/console.js +322 -14
- package/dist/logging/internal/adapters/formatting.d.ts +69 -0
- package/dist/logging/internal/adapters/formatting.js +395 -0
- package/dist/logging/internal/adapters/pino.js +128 -27
- package/dist/logging/internal/adapters/typedef.d.ts +30 -0
- package/dist/logging/internal/adapters/typedef.js +11 -0
- package/dist/logging/internal/factories/client.js +1 -1
- package/dist/logging/internal/factories/server.js +12 -2
- package/dist/logging/internal/logger/Logger.d.ts +9 -7
- package/dist/logging/internal/logger/Logger.js +44 -9
- package/dist/logging/internal/test-errors.d.ts +35 -0
- package/dist/logging/internal/test-errors.js +137 -0
- package/dist/network/cache/IndexedDbCache.d.ts +1 -1
- package/dist/network/cache/MemoryResponseCache.d.ts +5 -0
- package/dist/network/cache/MemoryResponseCache.js +5 -2
- package/dist/network/errors.d.ts +2 -0
- package/dist/network/errors.js +2 -0
- package/dist/network/http/caching.js +1 -1
- package/dist/network/http/errors.d.ts +2 -2
- package/dist/network/http/errors.js +5 -13
- package/dist/network/http/http-request.js +1 -1
- package/dist/network/http/json-request.js +1 -1
- package/dist/network/http/response.js +1 -1
- package/dist/network/http/url.js +1 -1
- package/dist/network/loaders/README.md +14 -7
- package/dist/network/loaders/audio/AudioScene.svelte.js +3 -2
- package/dist/network/loaders/image/ImageLoader.svelte.d.ts +2 -2
- package/dist/network/loaders/image/ImageLoader.svelte.js +1 -1
- package/dist/network/loaders/image/ImageScene.svelte.d.ts +2 -2
- package/dist/network/loaders/image/ImageScene.svelte.js +9 -8
- package/dist/network/loaders/image/ImageVariantsLoader.svelte.d.ts +5 -5
- package/dist/network/loaders/image/ImageVariantsLoader.svelte.js +14 -13
- package/dist/network/loaders/image/utils/index.d.ts +2 -2
- package/dist/network/loaders/image/utils/index.js +9 -12
- package/dist/network/loaders/typedef.d.ts +0 -9
- package/dist/network/loaders/typedef.js +0 -12
- package/dist/network/states/NetworkLoader.svelte.d.ts +1 -1
- package/dist/network/states/NetworkLoader.svelte.js +3 -2
- package/dist/services/index.d.ts +0 -2
- package/dist/services/index.js +0 -3
- package/dist/services/service-base/ServiceBase.d.ts +2 -2
- package/dist/services/service-base/ServiceBase.js +15 -11
- package/dist/services/service-base/typedef.d.ts +2 -31
- package/dist/services/service-base/typedef.js +3 -2
- package/dist/services/service-manager/ServiceManager.d.ts +3 -3
- package/dist/services/service-manager/ServiceManager.js +2 -2
- package/dist/services/service-manager/typedef.d.ts +3 -3
- package/dist/services/service-manager/typedef.js +3 -3
- package/dist/services/typedef.d.ts +2 -0
- package/dist/services/typedef.js +2 -0
- package/dist/{classes/svelte → state/classes}/loading-state-machine/LoadingStateMachine.svelte.d.ts +1 -1
- package/dist/{classes/svelte → state/classes}/loading-state-machine/LoadingStateMachine.svelte.js +1 -1
- package/dist/state/classes/subscribers-count/index.d.ts +1 -0
- package/dist/state/classes/subscribers-count/index.js +1 -0
- package/dist/state/classes.d.ts +3 -0
- package/dist/state/classes.js +3 -0
- package/dist/{util/svelte/state-context/index.d.ts → state/context/state-context.d.ts} +1 -1
- package/dist/{util/svelte/state-context/index.js → state/context/state-context.js} +4 -4
- package/dist/state/context.d.ts +1 -0
- package/dist/state/context.js +1 -0
- package/dist/state/stores.d.ts +1 -0
- package/dist/state/stores.js +1 -0
- package/dist/ui/README.md +49 -0
- package/dist/ui/components/button-group/index.d.ts +1 -0
- package/dist/ui/components/button-group/index.js +1 -0
- package/dist/ui/{primitives → components}/drag-drop/DragDropContext.svelte +1 -1
- package/dist/ui/{primitives → components}/drag-drop/DragDropContext.svelte.d.ts +1 -1
- package/dist/ui/{primitives → components}/drag-drop/Draggable.svelte +2 -2
- package/dist/ui/{primitives → components}/drag-drop/Draggable.svelte.d.ts +1 -1
- package/dist/ui/{primitives → components}/drag-drop/DropZone.svelte +4 -4
- package/dist/ui/{primitives → components}/drag-drop/DropZone.svelte.d.ts +3 -3
- package/dist/ui/{primitives → components}/drag-drop/DropZoneArea.svelte +3 -3
- package/dist/ui/{primitives → components}/drag-drop/DropZoneArea.svelte.d.ts +4 -4
- package/dist/ui/{primitives → components}/drag-drop/DropZoneList.svelte +3 -3
- package/dist/ui/{primitives → components}/drag-drop/DropZoneList.svelte.d.ts +3 -3
- package/dist/ui/{primitives → components}/drag-drop/drag-state.svelte.d.ts +11 -11
- package/dist/ui/{primitives → components}/drag-drop/drag-state.svelte.js +5 -5
- package/dist/ui/components/drag-drop/typedef.d.ts +2 -0
- package/dist/ui/components/drag-drop/typedef.js +2 -0
- package/dist/ui/components/game-box/GameBox.svelte +1 -1
- package/dist/ui/components/game-box/index.d.ts +1 -0
- package/dist/ui/components/game-box/index.js +1 -0
- package/dist/ui/components/grid-layers/index.d.ts +1 -0
- package/dist/ui/components/grid-layers/index.js +1 -0
- package/dist/ui/{primitives/layout → components}/grid-layers/util.js +1 -1
- package/dist/ui/components/hk-app-layout/HkAppLayout.state.svelte.d.ts +3 -3
- package/dist/ui/components/hk-app-layout/HkAppLayout.state.svelte.js +3 -4
- package/dist/ui/components/hk-app-layout/index.d.ts +1 -0
- package/dist/ui/components/hk-app-layout/index.js +1 -0
- package/dist/ui/components/image-box/ImageBox.svelte +2 -2
- package/dist/ui/components/image-box/ImageBox.svelte.d.ts +3 -3
- package/dist/ui/components/image-box/index.d.ts +1 -1
- package/dist/ui/components/presenter/ImageSlide.svelte +1 -1
- package/dist/ui/components/presenter/ImageSlide.svelte.d.ts +2 -2
- package/dist/ui/components/presenter/Presenter.state.svelte.d.ts +3 -3
- package/dist/ui/components/presenter/Presenter.state.svelte.js +1 -1
- package/dist/ui/components/presenter/Presenter.svelte +1 -1
- package/dist/ui/components/presenter/Presenter.svelte.d.ts +1 -1
- package/dist/ui/{primitives → components}/rows/panel-grid-row/PanelGridRow.svelte.d.ts +1 -1
- package/dist/ui/{primitives → components}/rows/panel-row-2/PanelRow2.svelte.d.ts +1 -1
- package/dist/ui/{primitives → components}/tab-bar/HkTabBar.state.svelte.d.ts +3 -3
- package/dist/ui/{primitives → components}/tab-bar/HkTabBar.state.svelte.js +4 -2
- package/dist/ui/{primitives → components}/tab-bar/HkTabBar.svelte +2 -2
- package/dist/ui/{primitives → components}/tab-bar/HkTabBar.svelte.d.ts +2 -2
- package/dist/ui/components/tab-bar/HkTabBarSelector.state.svelte.d.ts +19 -0
- package/dist/ui/{primitives → components}/tab-bar/HkTabBarSelector.state.svelte.js +2 -2
- package/dist/ui/{primitives → components}/tab-bar/HkTabBarSelector.svelte +1 -1
- package/dist/ui/{primitives → components}/tab-bar/HkTabBarSelector.svelte.d.ts +2 -2
- package/dist/ui/{primitives → components}/tab-bar/typedef.d.ts +1 -1
- package/dist/ui/{primitives → components}/tab-bar/typedef.js +1 -1
- package/dist/ui/components/typedef.d.ts +5 -0
- package/dist/ui/components/typedef.js +5 -0
- package/dist/ui/components/virtual-viewport/index.d.ts +1 -0
- package/dist/ui/components/virtual-viewport/index.js +1 -0
- package/dist/ui/components.d.ts +11 -0
- package/dist/ui/components.js +11 -0
- package/dist/ui/{primitives/hkdev → dev}/blocks/TextBlock.svelte +1 -1
- package/dist/ui/{primitives/debug → dev}/debug-panel-design-scaling/DebugPanelDesignScaling.svelte +8 -8
- package/dist/ui/dev.d.ts +3 -0
- package/dist/ui/dev.js +3 -0
- package/dist/ui/primitives/buttons/button/Button.svelte.d.ts +1 -1
- package/dist/ui/primitives/buttons/button-text/TextButton.svelte +1 -1
- package/dist/ui/primitives/typedef.d.ts +1 -0
- package/dist/ui/primitives/typedef.js +1 -0
- package/dist/ui/primitives.d.ts +5 -0
- package/dist/ui/primitives.js +5 -0
- package/dist/ui/typedef.d.ts +2 -0
- package/dist/ui/typedef.js +2 -0
- package/dist/util/array/index.js +1 -1
- package/dist/util/bases/base58.d.ts +3 -3
- package/dist/util/bases/base58.js +3 -3
- package/dist/util/compare/index.d.ts +4 -5
- package/dist/util/compare/index.js +3 -4
- package/dist/util/exceptions/index.js +1 -1
- package/dist/util/expect/arrays.d.ts +11 -11
- package/dist/util/expect/arrays.js +14 -6
- package/dist/util/expect/index.js +2 -2
- package/dist/util/expect/primitives.d.ts +6 -5
- package/dist/util/expect/primitives.js +15 -5
- package/dist/util/expect/url.d.ts +6 -5
- package/dist/util/expect/url.js +15 -5
- package/dist/util/function/index.d.ts +1 -14
- package/dist/util/index.d.ts +5 -0
- package/dist/util/index.js +13 -0
- package/dist/util/is/index.d.ts +3 -2
- package/dist/util/is/index.js +2 -1
- package/dist/util/iterate/index.d.ts +6 -8
- package/dist/util/iterate/index.js +5 -5
- package/dist/util/object/index.d.ts +1 -2
- package/dist/util/object/index.js +2 -3
- package/dist/util/ssr/index.d.ts +16 -0
- package/dist/util/ssr/index.js +44 -0
- package/dist/util/svelte/index.d.ts +1 -1
- package/dist/util/svelte/index.js +1 -1
- package/dist/util/time/index.d.ts +2 -2
- package/dist/util/time/index.js +1 -1
- package/dist/valibot/index.d.ts +1 -1
- package/dist/valibot/index.js +27 -1
- package/package.json +4 -4
- 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 +0 -17
- package/dist/assets/autospuiten/car-paint-picker.js +0 -41
- package/dist/assets/autospuiten/labels.d.ts +0 -7
- package/dist/assets/autospuiten/labels.js +0 -7
- package/dist/classes/data/index.d.ts +0 -2
- package/dist/classes/data/index.js +0 -2
- package/dist/classes/event-emitter/index.d.ts +0 -1
- package/dist/classes/event-emitter/index.js +0 -2
- package/dist/classes/index.d.ts +0 -4
- package/dist/classes/index.js +0 -4
- package/dist/classes/promise/index.d.ts +0 -1
- package/dist/classes/promise/index.js +0 -1
- package/dist/classes/stores/index.d.ts +0 -1
- package/dist/classes/stores/index.js +0 -1
- package/dist/classes/streams/index.d.ts +0 -3
- package/dist/classes/streams/index.js +0 -3
- package/dist/classes/svelte/index.d.ts +0 -1
- package/dist/classes/svelte/index.js +0 -1
- package/dist/design/config/design-config.js +0 -73
- package/dist/design/tailwind-theme-extend.d.ts +0 -23
- package/dist/design/tailwind-theme-extend.js +0 -158
- package/dist/errors/index.d.ts +0 -5
- package/dist/errors/index.js +0 -5
- package/dist/logging/internal/factories/universal.d.ts +0 -9
- package/dist/logging/internal/factories/universal.js +0 -22
- package/dist/services/service-base/index.d.ts +0 -3
- package/dist/services/service-base/index.js +0 -3
- package/dist/states/index.d.ts +0 -1
- package/dist/states/index.js +0 -1
- package/dist/stores/index.d.ts +0 -1
- package/dist/stores/index.js +0 -1
- package/dist/typedef/index.d.ts +0 -4
- package/dist/typedef/index.js +0 -4
- package/dist/ui/primitives/debug/index.d.ts +0 -1
- package/dist/ui/primitives/debug/index.js +0 -1
- package/dist/ui/primitives/index.d.ts +0 -0
- package/dist/ui/primitives/index.js +0 -2
- package/dist/ui/primitives/layout/grid-layers/GridLayers.svelte__heightFrom__ +0 -372
- package/dist/ui/primitives/layout/index.d.ts +0 -1
- package/dist/ui/primitives/layout/index.js +0 -1
- package/dist/ui/primitives/tab-bar/HkTabBarSelector.state.svelte.d.ts +0 -19
- /package/dist/{errors → auth/errors}/jwt.d.ts +0 -0
- /package/dist/{errors → auth/errors}/jwt.js +0 -0
- /package/dist/{states → browser/navigation}/navigation.svelte.d.ts +0 -0
- /package/dist/{classes/data → generic/data/classes}/IterableTree.d.ts +0 -0
- /package/dist/{classes/data → generic/data/classes}/Selector.d.ts +0 -0
- /package/dist/{classes → generic}/data/typedef.d.ts +0 -0
- /package/dist/{classes → generic}/data/typedef.js +0 -0
- /package/dist/{errors → generic/errors}/generic.d.ts +0 -0
- /package/dist/{errors → generic/errors}/generic.js +0 -0
- /package/dist/{errors → generic/errors}/promise.d.ts +0 -0
- /package/dist/{errors → generic/errors}/promise.js +0 -0
- /package/dist/{classes/event-emitter → generic/events/classes}/EventEmitter.d.ts +0 -0
- /package/dist/{classes/event-emitter → generic/events/classes}/EventEmitter.js +0 -0
- /package/dist/{classes/streams → generic/streaming/classes}/LogTransformStream.d.ts +0 -0
- /package/dist/{classes/streams → generic/streaming/classes}/LogTransformStream.js +0 -0
- /package/dist/{classes/streams → generic/streaming/classes}/TimeStampSource.d.ts +0 -0
- /package/dist/{classes/streams → generic/streaming/classes}/TimeStampSource.js +0 -0
- /package/dist/logging/{internal/constants.d.ts → constants.d.ts} +0 -0
- /package/dist/logging/{internal/constants.js → constants.js} +0 -0
- /package/dist/logging/{internal/typedef.d.ts → typedef.d.ts} +0 -0
- /package/dist/logging/{internal/typedef.js → typedef.js} +0 -0
- /package/dist/{errors → network/errors}/api.d.ts +0 -0
- /package/dist/{errors → network/errors}/api.js +0 -0
- /package/dist/{errors → network/errors}/http.d.ts +0 -0
- /package/dist/{errors → network/errors}/http.js +0 -0
- /package/dist/{classes/svelte → state/classes}/finite-state-machine/FiniteStateMachine.svelte.d.ts +0 -0
- /package/dist/{classes/svelte → state/classes}/finite-state-machine/FiniteStateMachine.svelte.js +0 -0
- /package/dist/{classes/svelte → state/classes}/finite-state-machine/index.d.ts +0 -0
- /package/dist/{classes/svelte → state/classes}/finite-state-machine/index.js +0 -0
- /package/dist/{classes/svelte → state/classes}/loading-state-machine/constants.d.ts +0 -0
- /package/dist/{classes/svelte → state/classes}/loading-state-machine/constants.js +0 -0
- /package/dist/{classes/svelte → state/classes}/loading-state-machine/index.d.ts +0 -0
- /package/dist/{classes/svelte → state/classes}/loading-state-machine/index.js +0 -0
- /package/dist/{classes/stores → state/classes/subscribers-count}/SubscribersCount.d.ts +0 -0
- /package/dist/{classes/stores → state/classes/subscribers-count}/SubscribersCount.js +0 -0
- /package/dist/{typedef/context.d.ts → state/context/typedef.d.ts} +0 -0
- /package/dist/{typedef/context.js → state/context/typedef.js} +0 -0
- /package/dist/{stores → state/stores}/theme.d.ts +0 -0
- /package/dist/{stores → state/stores}/theme.js +0 -0
- /package/dist/ui/{primitives → components}/drag-drop/DragController.d.ts +0 -0
- /package/dist/ui/{primitives → components}/drag-drop/DragController.js +0 -0
- /package/dist/ui/{primitives → components}/drag-drop/actions.d.ts +0 -0
- /package/dist/ui/{primitives → components}/drag-drop/actions.js +0 -0
- /package/dist/ui/{primitives → components}/drag-drop/index.d.ts +0 -0
- /package/dist/ui/{primitives → components}/drag-drop/index.js +0 -0
- /package/dist/{typedef → ui/components/drag-drop/typedef}/drag.d.ts +0 -0
- /package/dist/{typedef → ui/components/drag-drop/typedef}/drag.js +0 -0
- /package/dist/{typedef → ui/components/drag-drop/typedef}/drop.d.ts +0 -0
- /package/dist/{typedef → ui/components/drag-drop/typedef}/drop.js +0 -0
- /package/dist/ui/{primitives → components}/drag-drop/util.d.ts +0 -0
- /package/dist/ui/{primitives → components}/drag-drop/util.js +0 -0
- /package/dist/ui/{primitives/layout → components}/grid-layers/GridLayers.svelte +0 -0
- /package/dist/ui/{primitives/layout → components}/grid-layers/GridLayers.svelte.d.ts +0 -0
- /package/dist/ui/{primitives/layout → components}/grid-layers/util.d.ts +0 -0
- /package/dist/ui/{primitives → components}/rows/index.d.ts +0 -0
- /package/dist/ui/{primitives → components}/rows/index.js +0 -0
- /package/dist/ui/{primitives → components}/rows/panel-grid-row/PanelGridRow.svelte +0 -0
- /package/dist/ui/{primitives → components}/rows/panel-row-2/PanelRow2.svelte +0 -0
- /package/dist/ui/{primitives → components}/tab-bar/index.d.ts +0 -0
- /package/dist/ui/{primitives → components}/tab-bar/index.js +0 -0
- /package/dist/ui/{primitives/hkdev → dev}/blocks/TextBlock.svelte.d.ts +0 -0
- /package/dist/ui/{primitives/hkdev → dev}/buttons/CheckButton.svelte +0 -0
- /package/dist/ui/{primitives/hkdev → dev}/buttons/CheckButton.svelte.d.ts +0 -0
- /package/dist/ui/{primitives/debug → dev}/debug-panel-design-scaling/DebugPanelDesignScaling.svelte.d.ts +0 -0
|
@@ -1,60 +1,62 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Generates a complete HTML style tag with CSS custom properties for
|
|
3
|
-
* the design system based on provided configuration.
|
|
3
|
+
* the design system based on provided design tokens configuration.
|
|
4
4
|
*
|
|
5
|
-
* @param {Object}
|
|
6
|
-
* @param {
|
|
7
|
-
* @param {number}
|
|
8
|
-
* @param {
|
|
9
|
-
* @param {Object}
|
|
10
|
-
* @param {
|
|
11
|
-
* @param {number}
|
|
12
|
-
* @param {
|
|
13
|
-
* @param {
|
|
14
|
-
* @param {number}
|
|
15
|
-
* @param {
|
|
16
|
-
* @param {
|
|
17
|
-
* @param {number}
|
|
18
|
-
* @param {
|
|
19
|
-
* @param {
|
|
20
|
-
* @param {number}
|
|
5
|
+
* @param {Object} designTokens - Complete design tokens object
|
|
6
|
+
* @param {Object} designTokens.DESIGN - Design dimensions configuration
|
|
7
|
+
* @param {number} designTokens.DESIGN.width - The design width in pixels
|
|
8
|
+
* @param {number} designTokens.DESIGN.height - The design height in pixels
|
|
9
|
+
* @param {Object} designTokens.CLAMPING - Scaling configuration parameters
|
|
10
|
+
* @param {Object} designTokens.CLAMPING.ui - UI clamping configuration
|
|
11
|
+
* @param {number} designTokens.CLAMPING.ui.min - Minimum UI scaling factor
|
|
12
|
+
* @param {number} designTokens.CLAMPING.ui.max - Maximum UI scaling factor
|
|
13
|
+
* @param {Object} designTokens.CLAMPING.textBase - Base text scaling configuration
|
|
14
|
+
* @param {number} designTokens.CLAMPING.textBase.min - Minimum base text scaling
|
|
15
|
+
* @param {number} designTokens.CLAMPING.textBase.max - Maximum base text scaling
|
|
16
|
+
* @param {Object} designTokens.CLAMPING.textHeading - Heading text clamping configuration
|
|
17
|
+
* @param {number} designTokens.CLAMPING.textHeading.min - Minimum heading text scaling
|
|
18
|
+
* @param {number} designTokens.CLAMPING.textHeading.max - Maximum heading text scaling
|
|
19
|
+
* @param {Object} designTokens.CLAMPING.textUi - UI text clamping configuration
|
|
20
|
+
* @param {number} designTokens.CLAMPING.textUi.min - Minimum UI text scaling
|
|
21
|
+
* @param {number} designTokens.CLAMPING.textUi.max - Maximum UI text scaling
|
|
21
22
|
*
|
|
22
23
|
* @returns {string} Complete HTML style tag with design system CSS variables
|
|
23
24
|
*
|
|
24
25
|
* @example
|
|
25
26
|
* // +layout.svelte
|
|
26
27
|
* <script>
|
|
27
|
-
* import {
|
|
28
|
-
*
|
|
29
|
-
* import { rootDesignVarsHTML } from './root-vars.js';
|
|
28
|
+
* import { designTokens, designTokensToRootCssVars } from '@hkdigital/lib-core/design/index.js';
|
|
30
29
|
* </script>
|
|
31
30
|
*
|
|
32
31
|
* <svelte:head>
|
|
33
|
-
* {@html
|
|
32
|
+
* {@html designTokensToRootCssVars(designTokens)}
|
|
34
33
|
* </svelte:head>
|
|
35
34
|
*
|
|
36
35
|
* // Generates style tag for use in svelte:head
|
|
37
36
|
* // <style>:root { --design-width: 1920; ... }</style>
|
|
38
37
|
*/
|
|
39
|
-
export function
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
ui: {
|
|
44
|
-
min: number;
|
|
45
|
-
max: number;
|
|
46
|
-
};
|
|
47
|
-
textBase: {
|
|
48
|
-
min: number;
|
|
49
|
-
max: number;
|
|
38
|
+
export function designTokensToRootCssVars(designTokens: {
|
|
39
|
+
DESIGN: {
|
|
40
|
+
width: number;
|
|
41
|
+
height: number;
|
|
50
42
|
};
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
43
|
+
CLAMPING: {
|
|
44
|
+
ui: {
|
|
45
|
+
min: number;
|
|
46
|
+
max: number;
|
|
47
|
+
};
|
|
48
|
+
textBase: {
|
|
49
|
+
min: number;
|
|
50
|
+
max: number;
|
|
51
|
+
};
|
|
52
|
+
textHeading: {
|
|
53
|
+
min: number;
|
|
54
|
+
max: number;
|
|
55
|
+
};
|
|
56
|
+
textUi: {
|
|
57
|
+
min: number;
|
|
58
|
+
max: number;
|
|
59
|
+
};
|
|
58
60
|
};
|
|
59
61
|
}): string;
|
|
60
62
|
/**
|
|
@@ -75,3 +77,12 @@ export function getRootCssDesignHeight(): number;
|
|
|
75
77
|
* @returns {Object} An object containing all scaling factors
|
|
76
78
|
*/
|
|
77
79
|
export function getAllRootScalingVars(): any;
|
|
80
|
+
/**
|
|
81
|
+
* Extract a CSS variable value from document root
|
|
82
|
+
*
|
|
83
|
+
* @param {string} varName - CSS variable name without '--'
|
|
84
|
+
* @param {boolean} [useCache=false]
|
|
85
|
+
*
|
|
86
|
+
* @returns {any} Parsed value or default
|
|
87
|
+
*/
|
|
88
|
+
export function getRootCssVar(varName: string, useCache?: boolean): any;
|
|
@@ -1,48 +1,136 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* CSS Variables Utilities
|
|
3
|
+
* Copied from $lib/util/css/css-vars.js to make design system self-contained
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
let cssVarCache = {};
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Normalizes a CSS variable name to ensure it has the -- prefix
|
|
10
|
+
*
|
|
11
|
+
* @param {string} varName - The CSS variable name
|
|
12
|
+
* @returns {string} Normalized variable name with -- prefix
|
|
13
|
+
*/
|
|
14
|
+
function normalizeCssVarName(varName) {
|
|
15
|
+
if (typeof varName !== 'string') {
|
|
16
|
+
throw new Error('Variable name must be a string');
|
|
17
|
+
}
|
|
18
|
+
return varName.startsWith('--') ? varName : `--${varName}`;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Extract a CSS variable value from document root
|
|
23
|
+
*
|
|
24
|
+
* @param {string} varName - CSS variable name without '--'
|
|
25
|
+
* @param {boolean} [useCache=false]
|
|
26
|
+
*
|
|
27
|
+
* @returns {any} Parsed value or default
|
|
28
|
+
*/
|
|
29
|
+
function getRootCssVar(varName, useCache = false) {
|
|
30
|
+
if (cssVarCache[varName] !== undefined && useCache) {
|
|
31
|
+
return cssVarCache[varName];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Get computed style from document root
|
|
35
|
+
const rootStyle = getComputedStyle(document.documentElement);
|
|
36
|
+
const declaration = rootStyle.getPropertyValue(`--${varName}`).trim();
|
|
37
|
+
|
|
38
|
+
if (!declaration) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
let result;
|
|
43
|
+
|
|
44
|
+
// Try to parse as number
|
|
45
|
+
if (!isNaN(parseFloat(declaration))) {
|
|
46
|
+
result = parseFloat(declaration);
|
|
47
|
+
} else {
|
|
48
|
+
// Return string value
|
|
49
|
+
result = declaration;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Cache the result
|
|
53
|
+
cssVarCache[varName] = result;
|
|
54
|
+
return result;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Sets a CSS variable in :root to a new value
|
|
59
|
+
*
|
|
60
|
+
* @param {string} varName - The CSS variable name (with or without --)
|
|
61
|
+
* @param {string|number} value - The new value to set
|
|
62
|
+
* @returns {boolean} True if successful, false otherwise
|
|
63
|
+
*/
|
|
64
|
+
function setRootCssVar(varName, value) {
|
|
65
|
+
try {
|
|
66
|
+
if (varName === undefined || varName === null) {
|
|
67
|
+
throw new Error('Variable name cannot be null or undefined');
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (value === undefined || value === null) {
|
|
71
|
+
throw new Error('Value cannot be null or undefined');
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const normalizedName = normalizeCssVarName(varName);
|
|
75
|
+
|
|
76
|
+
// Convert to string if numeric
|
|
77
|
+
const formattedValue = typeof value === 'number' ? `${value}` : value;
|
|
78
|
+
|
|
79
|
+
document.documentElement.style.setProperty(normalizedName, formattedValue);
|
|
80
|
+
|
|
81
|
+
delete cssVarCache[varName];
|
|
82
|
+
|
|
83
|
+
return true;
|
|
84
|
+
} catch (error) {
|
|
85
|
+
console.error(`Error setting CSS variable ${varName}:`, error);
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
2
89
|
|
|
3
90
|
/**
|
|
4
91
|
* Generates a complete HTML style tag with CSS custom properties for
|
|
5
|
-
* the design system based on provided configuration.
|
|
92
|
+
* the design system based on provided design tokens configuration.
|
|
6
93
|
*
|
|
7
|
-
* @param {Object}
|
|
8
|
-
* @param {
|
|
9
|
-
* @param {number}
|
|
10
|
-
* @param {
|
|
11
|
-
* @param {Object}
|
|
12
|
-
* @param {
|
|
13
|
-
* @param {number}
|
|
14
|
-
* @param {
|
|
15
|
-
* @param {
|
|
16
|
-
* @param {number}
|
|
17
|
-
* @param {
|
|
18
|
-
* @param {
|
|
19
|
-
* @param {number}
|
|
20
|
-
* @param {
|
|
21
|
-
* @param {
|
|
22
|
-
* @param {number}
|
|
94
|
+
* @param {Object} designTokens - Complete design tokens object
|
|
95
|
+
* @param {Object} designTokens.DESIGN - Design dimensions configuration
|
|
96
|
+
* @param {number} designTokens.DESIGN.width - The design width in pixels
|
|
97
|
+
* @param {number} designTokens.DESIGN.height - The design height in pixels
|
|
98
|
+
* @param {Object} designTokens.CLAMPING - Scaling configuration parameters
|
|
99
|
+
* @param {Object} designTokens.CLAMPING.ui - UI clamping configuration
|
|
100
|
+
* @param {number} designTokens.CLAMPING.ui.min - Minimum UI scaling factor
|
|
101
|
+
* @param {number} designTokens.CLAMPING.ui.max - Maximum UI scaling factor
|
|
102
|
+
* @param {Object} designTokens.CLAMPING.textBase - Base text scaling configuration
|
|
103
|
+
* @param {number} designTokens.CLAMPING.textBase.min - Minimum base text scaling
|
|
104
|
+
* @param {number} designTokens.CLAMPING.textBase.max - Maximum base text scaling
|
|
105
|
+
* @param {Object} designTokens.CLAMPING.textHeading - Heading text clamping configuration
|
|
106
|
+
* @param {number} designTokens.CLAMPING.textHeading.min - Minimum heading text scaling
|
|
107
|
+
* @param {number} designTokens.CLAMPING.textHeading.max - Maximum heading text scaling
|
|
108
|
+
* @param {Object} designTokens.CLAMPING.textUi - UI text clamping configuration
|
|
109
|
+
* @param {number} designTokens.CLAMPING.textUi.min - Minimum UI text scaling
|
|
110
|
+
* @param {number} designTokens.CLAMPING.textUi.max - Maximum UI text scaling
|
|
23
111
|
*
|
|
24
112
|
* @returns {string} Complete HTML style tag with design system CSS variables
|
|
25
113
|
*
|
|
26
114
|
* @example
|
|
27
115
|
* // +layout.svelte
|
|
28
116
|
* <script>
|
|
29
|
-
* import {
|
|
30
|
-
*
|
|
31
|
-
* import { rootDesignVarsHTML } from './root-vars.js';
|
|
117
|
+
* import { designTokens, designTokensToRootCssVars } from '@hkdigital/lib-core/design/index.js';
|
|
32
118
|
* </script>
|
|
33
119
|
*
|
|
34
120
|
* <svelte:head>
|
|
35
|
-
* {@html
|
|
121
|
+
* {@html designTokensToRootCssVars(designTokens)}
|
|
36
122
|
* </svelte:head>
|
|
37
123
|
*
|
|
38
124
|
* // Generates style tag for use in svelte:head
|
|
39
125
|
* // <style>:root { --design-width: 1920; ... }</style>
|
|
40
126
|
*/
|
|
41
|
-
export function
|
|
127
|
+
export function designTokensToRootCssVars(designTokens) {
|
|
128
|
+
const { DESIGN, CLAMPING } = designTokens;
|
|
129
|
+
|
|
42
130
|
return `<style>:root {
|
|
43
131
|
/* Design dimensions */
|
|
44
|
-
--design-width: ${
|
|
45
|
-
--design-height: ${
|
|
132
|
+
--design-width: ${DESIGN.width};
|
|
133
|
+
--design-height: ${DESIGN.height};
|
|
46
134
|
|
|
47
135
|
/* Scaling factors */
|
|
48
136
|
--scale-w: 1;
|
|
@@ -52,10 +140,10 @@ export function rootDesignVarsHTML(design, clamping) {
|
|
|
52
140
|
--scale-viewport: 1;
|
|
53
141
|
|
|
54
142
|
/* Base clamping units */
|
|
55
|
-
--scale-ui: clamp(${
|
|
56
|
-
--scale-text-base: clamp(${
|
|
57
|
-
--scale-text-heading: clamp(${
|
|
58
|
-
--scale-text-ui: clamp(${
|
|
143
|
+
--scale-ui: clamp(${CLAMPING.ui.min}, var(--scale-viewport), ${CLAMPING.ui.max});
|
|
144
|
+
--scale-text-base: clamp(${CLAMPING.textBase.min}, var(--scale-viewport), ${CLAMPING.textBase.max});
|
|
145
|
+
--scale-text-heading: clamp(${CLAMPING.textHeading.min}, var(--scale-viewport), ${CLAMPING.textHeading.max});
|
|
146
|
+
--scale-text-ui: clamp(${CLAMPING.textUi.min}, var(--scale-viewport), ${CLAMPING.textUi.max});
|
|
59
147
|
}</style>`;
|
|
60
148
|
}
|
|
61
149
|
|
|
@@ -68,6 +156,16 @@ export function getRootCssDesignWidth() {
|
|
|
68
156
|
return getRootCssVar('design-width');
|
|
69
157
|
}
|
|
70
158
|
|
|
159
|
+
/**
|
|
160
|
+
* Extract a CSS variable value from document root (exported for use by other design system utilities)
|
|
161
|
+
*
|
|
162
|
+
* @param {string} varName - CSS variable name without '--'
|
|
163
|
+
* @param {boolean} [useCache=false]
|
|
164
|
+
*
|
|
165
|
+
* @returns {any} Parsed value or default
|
|
166
|
+
*/
|
|
167
|
+
export { getRootCssVar };
|
|
168
|
+
|
|
71
169
|
/**
|
|
72
170
|
* Get design height from CSS variables
|
|
73
171
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* ------------------------------------------------------------------ Imports */
|
|
2
2
|
|
|
3
|
-
import * as expect from '
|
|
3
|
+
import * as expect from '../../../util/expect/index.js';
|
|
4
4
|
|
|
5
|
-
import { PATH_SEPARATOR } from '
|
|
5
|
+
import { PATH_SEPARATOR } from '../../../util/object/index.js';
|
|
6
6
|
|
|
7
7
|
/* ------------------------------------------------------------------ Typedef */
|
|
8
8
|
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
/* ------------------------------------------------------------------ Imports */
|
|
30
30
|
|
|
31
|
-
import * as expect from '
|
|
31
|
+
import * as expect from '../../../util/expect/index.js';
|
|
32
32
|
|
|
33
33
|
/* ------------------------------------------------------------------- Export */
|
|
34
34
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare const _default: {};
|
|
2
|
+
export default _default;
|
|
3
|
+
export type IterableTreeOptions = {
|
|
4
|
+
/**
|
|
5
|
+
* - Whether to walk into array elements
|
|
6
|
+
*/
|
|
7
|
+
walkArrays?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* - Whether to ignore empty object leaves
|
|
10
|
+
*/
|
|
11
|
+
ignoreEmptyObjectLeaves?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* - Whether to expand path keys
|
|
14
|
+
*/
|
|
15
|
+
expandPathKeys?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* - Whether to output intermediate nodes
|
|
18
|
+
*/
|
|
19
|
+
outputIntermediateNodes?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* - Whether to use depth-first traversal
|
|
22
|
+
*/
|
|
23
|
+
depthFirst?: boolean;
|
|
24
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic data class type definitions
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @typedef {object} IterableTreeOptions
|
|
7
|
+
* @property {boolean} [walkArrays=false] - Whether to walk into array elements
|
|
8
|
+
* @property {boolean} [ignoreEmptyObjectLeaves=false] - Whether to ignore empty object leaves
|
|
9
|
+
* @property {boolean} [expandPathKeys=false] - Whether to expand path keys
|
|
10
|
+
* @property {boolean} [outputIntermediateNodes=false] - Whether to output intermediate nodes
|
|
11
|
+
* @property {boolean} [depthFirst=true] - Whether to use depth-first traversal
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
export default {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as EventEmitter } from "./events/classes/EventEmitter.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as EventEmitter } from './events/classes/EventEmitter.js';
|
|
@@ -2,12 +2,16 @@
|
|
|
2
2
|
* HkPromise extends the default javascript Promise class
|
|
3
3
|
* - Exposes methods to interact with the state of the
|
|
4
4
|
* promise, such as 'resolve' and 'reject'
|
|
5
|
+
*
|
|
6
|
+
* @template T
|
|
7
|
+
* @extends {Promise<T>}
|
|
8
|
+
* @implements {PromiseLike<T>}
|
|
5
9
|
*/
|
|
6
|
-
export default class HkPromise extends Promise<
|
|
10
|
+
export default class HkPromise<T> extends Promise<T> implements PromiseLike<T> {
|
|
7
11
|
/**
|
|
8
|
-
* @param {(resolveFn?:
|
|
12
|
+
* @param {(resolveFn?: (value: T | PromiseLike<T>) => void, rejectFn?: (reason?: any) => void) => void} [initFn]
|
|
9
13
|
*/
|
|
10
|
-
constructor(initFn?: (resolveFn?:
|
|
14
|
+
constructor(initFn?: (resolveFn?: (value: T | PromiseLike<T>) => void, rejectFn?: (reason?: any) => void) => void);
|
|
11
15
|
/**
|
|
12
16
|
* Get value of property [resolved]
|
|
13
17
|
*
|
|
@@ -108,15 +112,21 @@ export default class HkPromise extends Promise<any> {
|
|
|
108
112
|
/**
|
|
109
113
|
* Register a callback that is called when the promise resolves
|
|
110
114
|
*
|
|
111
|
-
* @
|
|
115
|
+
* @template TResult1
|
|
116
|
+
* @template TResult2
|
|
117
|
+
* @param {((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null} [onfulfilled]
|
|
118
|
+
* @param {((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null} [onrejected]
|
|
119
|
+
* @returns {Promise<TResult1 | TResult2>}
|
|
112
120
|
*/
|
|
113
|
-
then(
|
|
121
|
+
then<TResult1, TResult2>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
|
|
114
122
|
/**
|
|
115
123
|
* Register a callback that is called when the promise rejects, is
|
|
116
124
|
* cancelled or times out
|
|
117
125
|
*
|
|
118
|
-
* @
|
|
126
|
+
* @template TResult
|
|
127
|
+
* @param {((reason: any) => TResult | PromiseLike<TResult>) | undefined | null} [onrejected]
|
|
128
|
+
* @returns {Promise<T | TResult>}
|
|
119
129
|
*/
|
|
120
|
-
catch(
|
|
130
|
+
catch<TResult>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
|
|
121
131
|
#private;
|
|
122
132
|
}
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
|
|
35
35
|
/* ------------------------------------------------------------------ Imports */
|
|
36
36
|
|
|
37
|
-
import * as expect from '
|
|
37
|
+
import * as expect from '../../../util/expect/index.js';
|
|
38
38
|
|
|
39
|
-
import { noop } from '
|
|
39
|
+
import { noop } from '../../../util/function/index.js';
|
|
40
40
|
|
|
41
|
-
import { PromiseError } from '../../errors
|
|
41
|
+
import { PromiseError } from '../../errors.js';
|
|
42
42
|
|
|
43
43
|
/* ---------------------------------------------------------------- Internals */
|
|
44
44
|
|
|
@@ -48,6 +48,10 @@ import { PromiseError } from '../../errors/promise.js';
|
|
|
48
48
|
* HkPromise extends the default javascript Promise class
|
|
49
49
|
* - Exposes methods to interact with the state of the
|
|
50
50
|
* promise, such as 'resolve' and 'reject'
|
|
51
|
+
*
|
|
52
|
+
* @template T
|
|
53
|
+
* @extends {Promise<T>}
|
|
54
|
+
* @implements {PromiseLike<T>}
|
|
51
55
|
*/
|
|
52
56
|
export default class HkPromise extends Promise {
|
|
53
57
|
// Private fields using modern JavaScript syntax
|
|
@@ -62,7 +66,7 @@ export default class HkPromise extends Promise {
|
|
|
62
66
|
#hasThen = false;
|
|
63
67
|
|
|
64
68
|
/**
|
|
65
|
-
* @param {(resolveFn?:
|
|
69
|
+
* @param {(resolveFn?: (value: T | PromiseLike<T>) => void, rejectFn?: (reason?: any) => void) => void} [initFn]
|
|
66
70
|
*/
|
|
67
71
|
constructor(initFn) {
|
|
68
72
|
let _resolveFn;
|
|
@@ -364,21 +368,27 @@ export default class HkPromise extends Promise {
|
|
|
364
368
|
/**
|
|
365
369
|
* Register a callback that is called when the promise resolves
|
|
366
370
|
*
|
|
367
|
-
* @
|
|
371
|
+
* @template TResult1
|
|
372
|
+
* @template TResult2
|
|
373
|
+
* @param {((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null} [onfulfilled]
|
|
374
|
+
* @param {((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null} [onrejected]
|
|
375
|
+
* @returns {Promise<TResult1 | TResult2>}
|
|
368
376
|
*/
|
|
369
|
-
then(
|
|
377
|
+
then(onfulfilled, onrejected) {
|
|
370
378
|
this.#hasThen = true;
|
|
371
379
|
|
|
372
|
-
return super.then(
|
|
380
|
+
return super.then(onfulfilled, onrejected);
|
|
373
381
|
}
|
|
374
382
|
|
|
375
383
|
/**
|
|
376
384
|
* Register a callback that is called when the promise rejects, is
|
|
377
385
|
* cancelled or times out
|
|
378
386
|
*
|
|
379
|
-
* @
|
|
387
|
+
* @template TResult
|
|
388
|
+
* @param {((reason: any) => TResult | PromiseLike<TResult>) | undefined | null} [onrejected]
|
|
389
|
+
* @returns {Promise<T | TResult>}
|
|
380
390
|
*/
|
|
381
|
-
catch(
|
|
382
|
-
return super.catch(
|
|
391
|
+
catch(onrejected) {
|
|
392
|
+
return super.catch(onrejected);
|
|
383
393
|
}
|
|
384
394
|
} // end class
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as HkPromise } from "./promises/classes/HkPromise.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as HkPromise } from './promises/classes/HkPromise.js';
|
|
@@ -2,9 +2,9 @@ import { writable } from 'svelte/store';
|
|
|
2
2
|
|
|
3
3
|
// eslint-disable-next-line no-unused-vars
|
|
4
4
|
import * as v from 'valibot';
|
|
5
|
-
import { AbsOrRelUrl } from '
|
|
5
|
+
import { AbsOrRelUrl } from '../../../valibot/index.js';
|
|
6
6
|
|
|
7
|
-
import SubscribersCount from '
|
|
7
|
+
import { SubscribersCount } from '../../../state/classes.js';
|
|
8
8
|
|
|
9
9
|
// > Class
|
|
10
10
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./data/typedef.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './data/typedef.js';
|
package/dist/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// Leave this file here or publish wont work
|
package/dist/logging/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { createServerLogger } from "./internal/factories/server.js";
|
|
2
2
|
export { createClientLogger } from "./internal/factories/client.js";
|
|
3
|
-
export { createLogger } from "./internal/factories/universal.js";
|
|
4
3
|
export { Logger } from "./internal/logger/index.js";
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./
|
|
4
|
+
export * from "./constants.js";
|
|
5
|
+
export * from "./typedef.js";
|
package/dist/logging/index.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
// Factories
|
|
2
2
|
export { createServerLogger } from './internal/factories/server.js';
|
|
3
3
|
export { createClientLogger } from './internal/factories/client.js';
|
|
4
|
-
export { createLogger } from './internal/factories/universal.js';
|
|
5
4
|
|
|
6
|
-
// Logger (advanced usage)
|
|
5
|
+
// Logger (for advanced usage)
|
|
7
6
|
export { Logger } from './internal/logger/index.js';
|
|
8
7
|
|
|
9
8
|
// Constants and typedefs
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './
|
|
9
|
+
export * from './constants.js';
|
|
10
|
+
export * from './typedef.js';
|
|
@@ -22,22 +22,6 @@ export class ConsoleAdapter {
|
|
|
22
22
|
* @param {Object} logEvent - Log event from Logger
|
|
23
23
|
*/
|
|
24
24
|
handleLog(logEvent: any): void;
|
|
25
|
-
/**
|
|
26
|
-
* Get CSS styles for browser console
|
|
27
|
-
*
|
|
28
|
-
* @param {string} level - Log level
|
|
29
|
-
* @returns {string} CSS styles
|
|
30
|
-
* @private
|
|
31
|
-
*/
|
|
32
|
-
private _getStyles;
|
|
33
|
-
/**
|
|
34
|
-
* Get appropriate console method for log level
|
|
35
|
-
*
|
|
36
|
-
* @param {string} level - Log level
|
|
37
|
-
* @returns {string} Console method name
|
|
38
|
-
* @private
|
|
39
|
-
*/
|
|
40
|
-
private _getConsoleMethod;
|
|
41
25
|
/**
|
|
42
26
|
* Create a child logger with additional context
|
|
43
27
|
*
|
|
@@ -45,4 +29,5 @@ export class ConsoleAdapter {
|
|
|
45
29
|
* @returns {ConsoleAdapter} New adapter instance with context
|
|
46
30
|
*/
|
|
47
31
|
child(context: any): ConsoleAdapter;
|
|
32
|
+
#private;
|
|
48
33
|
}
|