@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ButtonGroup } from "./ButtonGroup.svelte";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ButtonGroup } from './ButtonGroup.svelte';
|
|
@@ -11,7 +11,7 @@ type DragDropContext = {
|
|
|
11
11
|
};
|
|
12
12
|
declare const DragDropContext: import("svelte").Component<{
|
|
13
13
|
[key: string]: any;
|
|
14
|
-
contextKey?: import("../../../typedef").ContextKey;
|
|
14
|
+
contextKey?: import("../../../state/context/typedef.js").ContextKey;
|
|
15
15
|
base?: string;
|
|
16
16
|
classes?: string;
|
|
17
17
|
children: import("svelte").Snippet;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
DROPPING
|
|
13
13
|
} from '../../../constants/states/drag.js';
|
|
14
14
|
|
|
15
|
-
/** @typedef {import('
|
|
15
|
+
/** @typedef {import('../../typedef.js').SimulatedDragEvent} SimulatedDragEvent */
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* @type {{
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
* element: HTMLElement,
|
|
33
33
|
* rect: DOMRect
|
|
34
34
|
* }]>,
|
|
35
|
-
* contextKey?: import('../../../typedef').ContextKey,
|
|
35
|
+
* contextKey?: import('../../../state/context/typedef.js').ContextKey,
|
|
36
36
|
* isDragging?: boolean,
|
|
37
37
|
* isDropping?: boolean,
|
|
38
38
|
* isDragPreview?: boolean,
|
|
@@ -65,7 +65,7 @@ declare const Draggable: import("svelte").Component<{
|
|
|
65
65
|
element: HTMLElement;
|
|
66
66
|
rect: DOMRect;
|
|
67
67
|
}]>;
|
|
68
|
-
contextKey?: import("../../../typedef").ContextKey;
|
|
68
|
+
contextKey?: import("../../../state/context/typedef.js").ContextKey;
|
|
69
69
|
isDragging?: boolean;
|
|
70
70
|
isDropping?: boolean;
|
|
71
71
|
isDragPreview?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { toStateClasses } from '../../../design/index.js';
|
|
3
3
|
import { createOrGetDragState } from './drag-state.svelte.js';
|
|
4
|
-
import { GridLayers } from '
|
|
4
|
+
import { GridLayers } from '../../components.js';
|
|
5
5
|
import { generateLocalId } from '../../../util/unique';
|
|
6
6
|
import {
|
|
7
7
|
READY,
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
CANNOT_DROP
|
|
11
11
|
} from '../../../constants/states/drop.js';
|
|
12
12
|
|
|
13
|
-
/** @typedef {import('
|
|
14
|
-
/** @typedef {import('
|
|
13
|
+
/** @typedef {import('../../typedef.js').DragData} DragData */
|
|
14
|
+
/** @typedef {import('../../typedef.js').DropData} DropData */
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* @type {{
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* maxHeight?: string,
|
|
26
26
|
* heightMode?: 'fixed' | 'flexible' | 'fill',
|
|
27
27
|
* children?: import('svelte').Snippet,
|
|
28
|
-
* contextKey?: import('../../../typedef').ContextKey,
|
|
28
|
+
* contextKey?: import('../../../state/context/typedef.js').ContextKey,
|
|
29
29
|
* dropPreviewSnippet?: import('svelte').Snippet<[DragData]>,
|
|
30
30
|
* isDragOver?: boolean,
|
|
31
31
|
* canDrop?: boolean,
|
|
@@ -63,8 +63,8 @@ declare const DropZone: import("svelte").Component<{
|
|
|
63
63
|
maxHeight?: string;
|
|
64
64
|
heightMode?: "fixed" | "flexible" | "fill";
|
|
65
65
|
children?: import("svelte").Snippet;
|
|
66
|
-
contextKey?: import("../../../typedef").ContextKey;
|
|
67
|
-
dropPreviewSnippet?: import("svelte").Snippet<[import("
|
|
66
|
+
contextKey?: import("../../../state/context/typedef.js").ContextKey;
|
|
67
|
+
dropPreviewSnippet?: import("svelte").Snippet<[import("../../typedef.js").DragData]>;
|
|
68
68
|
isDragOver?: boolean;
|
|
69
69
|
canDrop?: boolean;
|
|
70
70
|
onDragEnter?: (detail: {
|
|
@@ -80,7 +80,7 @@ declare const DropZone: import("svelte").Component<{
|
|
|
80
80
|
event: DragEvent;
|
|
81
81
|
zone: string;
|
|
82
82
|
}) => void;
|
|
83
|
-
onDrop?: (detail: import("
|
|
83
|
+
onDrop?: (detail: import("../../typedef.js").DropData) => any | Promise<any>;
|
|
84
84
|
onDropStart?: (detail: {
|
|
85
85
|
event: DragEvent;
|
|
86
86
|
zone: string;
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* base?: string,
|
|
14
14
|
* classes?: string,
|
|
15
15
|
* children?: import('svelte').Snippet,
|
|
16
|
-
* contextKey?: import('../../../typedef').ContextKey,
|
|
17
|
-
* dropPreviewSnippet?: import('svelte').Snippet<[import('
|
|
16
|
+
* contextKey?: import('../../../state/context/typedef.js').ContextKey,
|
|
17
|
+
* dropPreviewSnippet?: import('svelte').Snippet<[import('./typedef.js').DragData]>,
|
|
18
18
|
* isDragOver?: boolean,
|
|
19
19
|
* canDrop?: boolean,
|
|
20
20
|
* onDragEnter?: (detail: {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
* event: DragEvent,
|
|
31
31
|
* zone: string
|
|
32
32
|
* }) => void,
|
|
33
|
-
* onDrop?: (detail: import('
|
|
33
|
+
* onDrop?: (detail: import('./typedef.js').DropData) => any | Promise<any>,
|
|
34
34
|
* onDropStart?: (detail: {
|
|
35
35
|
* event: DragEvent,
|
|
36
36
|
* zone: string,
|
|
@@ -9,7 +9,7 @@ type DropZoneArea = {
|
|
|
9
9
|
accepts?: (item: any) => boolean;
|
|
10
10
|
fillContainer?: boolean;
|
|
11
11
|
aspectRatio?: string;
|
|
12
|
-
overflow?: "scroll" | "auto" | "
|
|
12
|
+
overflow?: "scroll" | "auto" | "hidden" | "visible";
|
|
13
13
|
base?: string;
|
|
14
14
|
classes?: string;
|
|
15
15
|
children?: Snippet<[]>;
|
|
@@ -57,8 +57,8 @@ declare const DropZoneArea: import("svelte").Component<{
|
|
|
57
57
|
base?: string;
|
|
58
58
|
classes?: string;
|
|
59
59
|
children?: import("svelte").Snippet;
|
|
60
|
-
contextKey?: import("../../../typedef").ContextKey;
|
|
61
|
-
dropPreviewSnippet?: import("svelte").Snippet<[import("
|
|
60
|
+
contextKey?: import("../../../state/context/typedef.js").ContextKey;
|
|
61
|
+
dropPreviewSnippet?: import("svelte").Snippet<[import("./typedef.js").DragData]>;
|
|
62
62
|
isDragOver?: boolean;
|
|
63
63
|
canDrop?: boolean;
|
|
64
64
|
onDragEnter?: (detail: {
|
|
@@ -74,7 +74,7 @@ declare const DropZoneArea: import("svelte").Component<{
|
|
|
74
74
|
event: DragEvent;
|
|
75
75
|
zone: string;
|
|
76
76
|
}) => void;
|
|
77
|
-
onDrop?: (detail: import("
|
|
77
|
+
onDrop?: (detail: import("./typedef.js").DropData) => any | Promise<any>;
|
|
78
78
|
onDropStart?: (detail: {
|
|
79
79
|
event: DragEvent;
|
|
80
80
|
zone: string;
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* base?: string,
|
|
15
15
|
* classes?: string,
|
|
16
16
|
* children?: import('svelte').Snippet,
|
|
17
|
-
* contextKey?: import('../../../typedef').ContextKey,
|
|
18
|
-
* dropPreviewSnippet?: import('svelte').Snippet<[import('
|
|
17
|
+
* contextKey?: import('../../../state/context/typedef.js').ContextKey,
|
|
18
|
+
* dropPreviewSnippet?: import('svelte').Snippet<[import('./typedef.js').DragData]>,
|
|
19
19
|
* isDragOver?: boolean,
|
|
20
20
|
* canDrop?: boolean,
|
|
21
21
|
* onDragEnter?: (detail: {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
* event: DragEvent,
|
|
32
32
|
* zone: string
|
|
33
33
|
* }) => void,
|
|
34
|
-
* onDrop?: (detail: import('
|
|
34
|
+
* onDrop?: (detail: import('./typedef.js').DropData) => any | Promise<any>,
|
|
35
35
|
* onDropStart?: (detail: {
|
|
36
36
|
* event: DragEvent,
|
|
37
37
|
* zone: string,
|
|
@@ -59,8 +59,8 @@ declare const DropZoneList: import("svelte").Component<{
|
|
|
59
59
|
base?: string;
|
|
60
60
|
classes?: string;
|
|
61
61
|
children?: import("svelte").Snippet;
|
|
62
|
-
contextKey?: import("../../../typedef").ContextKey;
|
|
63
|
-
dropPreviewSnippet?: import("svelte").Snippet<[import("
|
|
62
|
+
contextKey?: import("../../../state/context/typedef.js").ContextKey;
|
|
63
|
+
dropPreviewSnippet?: import("svelte").Snippet<[import("./typedef.js").DragData]>;
|
|
64
64
|
isDragOver?: boolean;
|
|
65
65
|
canDrop?: boolean;
|
|
66
66
|
onDragEnter?: (detail: {
|
|
@@ -76,7 +76,7 @@ declare const DropZoneList: import("svelte").Component<{
|
|
|
76
76
|
event: DragEvent;
|
|
77
77
|
zone: string;
|
|
78
78
|
}) => void;
|
|
79
|
-
onDrop?: (detail: import("
|
|
79
|
+
onDrop?: (detail: import("./typedef.js").DropData) => any | Promise<any>;
|
|
80
80
|
onDropStart?: (detail: {
|
|
81
81
|
event: DragEvent;
|
|
82
82
|
zone: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export const createOrGetDragState: (contextKey?: import("../../../typedef").ContextKey) => DragState;
|
|
2
|
-
export const createDragState: (contextKey?: import("../../../typedef").ContextKey) => DragState;
|
|
3
|
-
export const getDragState: (contextKey?: import("../../../typedef").ContextKey) => DragState;
|
|
4
|
-
export type SimulatedDragEvent = import("
|
|
5
|
-
/** @typedef {import('
|
|
1
|
+
export const createOrGetDragState: (contextKey?: import("../../../state/context/typedef.js").ContextKey) => DragState;
|
|
2
|
+
export const createDragState: (contextKey?: import("../../../state/context/typedef.js").ContextKey) => DragState;
|
|
3
|
+
export const getDragState: (contextKey?: import("../../../state/context/typedef.js").ContextKey) => DragState;
|
|
4
|
+
export type SimulatedDragEvent = import("../../typedef.js").SimulatedDragEvent;
|
|
5
|
+
/** @typedef {import('../../typedef.js').SimulatedDragEvent} SimulatedDragEvent */
|
|
6
6
|
declare class DragState {
|
|
7
7
|
draggables: Map<any, any>;
|
|
8
8
|
draggableIdCount: number;
|
|
@@ -61,9 +61,9 @@ declare class DragState {
|
|
|
61
61
|
handleDropAtPoint(x: number, y: number, event: DragEvent | SimulatedDragEvent): void;
|
|
62
62
|
/**
|
|
63
63
|
* @param {string} draggableId
|
|
64
|
-
* @param {import('
|
|
64
|
+
* @param {import('./typedef.js').DragData} dragData
|
|
65
65
|
*/
|
|
66
|
-
start(draggableId: string, dragData: import("
|
|
66
|
+
start(draggableId: string, dragData: import("./typedef.js").DragData): void;
|
|
67
67
|
/**
|
|
68
68
|
* @param {string} draggableId
|
|
69
69
|
*/
|
|
@@ -73,9 +73,9 @@ declare class DragState {
|
|
|
73
73
|
* Get a drag data by draggable id
|
|
74
74
|
*
|
|
75
75
|
* @param {string} draggableId
|
|
76
|
-
* @returns {import('
|
|
76
|
+
* @returns {import('./typedef.js').DragData|undefined}
|
|
77
77
|
*/
|
|
78
|
-
getDraggableById(draggableId: string): import("
|
|
78
|
+
getDraggableById(draggableId: string): import("./typedef.js").DragData | undefined;
|
|
79
79
|
/**
|
|
80
80
|
* Get a drag data. Extracts draggable id from the supplied DragEvent
|
|
81
81
|
*
|
|
@@ -86,9 +86,9 @@ declare class DragState {
|
|
|
86
86
|
getDraggable(event: DragEvent | SimulatedDragEvent): any | null;
|
|
87
87
|
/**
|
|
88
88
|
* Get the most recently started drag operation (convenience method)
|
|
89
|
-
* @returns {import('
|
|
89
|
+
* @returns {import('./typedef.js').DragData|undefined}
|
|
90
90
|
*/
|
|
91
|
-
get current(): import("
|
|
91
|
+
get current(): import("./typedef.js").DragData | undefined;
|
|
92
92
|
/**
|
|
93
93
|
* @returns {boolean}
|
|
94
94
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// drag-state.svelte.js
|
|
2
|
-
import { defineStateContext } from '../../../
|
|
2
|
+
import { defineStateContext } from '../../../state/context.js';
|
|
3
3
|
|
|
4
|
-
/** @typedef {import('
|
|
4
|
+
/** @typedef {import('../../typedef.js').SimulatedDragEvent} SimulatedDragEvent */
|
|
5
5
|
|
|
6
6
|
class DragState {
|
|
7
7
|
// Existing draggables map
|
|
@@ -216,7 +216,7 @@ class DragState {
|
|
|
216
216
|
|
|
217
217
|
/**
|
|
218
218
|
* @param {string} draggableId
|
|
219
|
-
* @param {import('
|
|
219
|
+
* @param {import('./typedef.js').DragData} dragData
|
|
220
220
|
*/
|
|
221
221
|
start(draggableId, dragData) {
|
|
222
222
|
// console.debug('DragState.start called:', draggableId, dragData);
|
|
@@ -257,7 +257,7 @@ class DragState {
|
|
|
257
257
|
* Get a drag data by draggable id
|
|
258
258
|
*
|
|
259
259
|
* @param {string} draggableId
|
|
260
|
-
* @returns {import('
|
|
260
|
+
* @returns {import('./typedef.js').DragData|undefined}
|
|
261
261
|
*/
|
|
262
262
|
getDraggableById(draggableId) {
|
|
263
263
|
return this.draggables.get(draggableId);
|
|
@@ -303,7 +303,7 @@ class DragState {
|
|
|
303
303
|
|
|
304
304
|
/**
|
|
305
305
|
* Get the most recently started drag operation (convenience method)
|
|
306
|
-
* @returns {import('
|
|
306
|
+
* @returns {import('./typedef.js').DragData|undefined}
|
|
307
307
|
*/
|
|
308
308
|
get current() {
|
|
309
309
|
const entries = Array.from(this.draggables.entries());
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
} from './gamebox.util.js';
|
|
8
8
|
|
|
9
9
|
import { enableContainerScaling } from '../../../design/index.js';
|
|
10
|
-
// import { enableContainerScaling } from '@hkdigital/lib-
|
|
10
|
+
// import { enableContainerScaling } from '@hkdigital/lib-core/design/index.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* @typedef {{
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as GameBox } from "./GameBox.svelte";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as GameBox } from './GameBox.svelte';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as GridLayers } from "./GridLayers.svelte";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as GridLayers } from './GridLayers.svelte';
|
|
@@ -70,5 +70,5 @@ export function measureTargetLayer(container, layerId) {
|
|
|
70
70
|
// Calculate total height including margins
|
|
71
71
|
const height = rect.height > 0 ? rect.height + marginTop + marginBottom : 0;
|
|
72
72
|
|
|
73
|
-
return { element: layerElement, height };
|
|
73
|
+
return { element: /** @type {HTMLElement} */ (layerElement), height };
|
|
74
74
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export class AppLayoutState {
|
|
2
2
|
landscapeOnSmallScreen: boolean;
|
|
3
3
|
}
|
|
4
|
-
export const createOrGetState: (contextKey?: import("../../../typedef").ContextKey) => AppLayoutState;
|
|
5
|
-
export const createState: (contextKey?: import("../../../typedef").ContextKey) => AppLayoutState;
|
|
6
|
-
export const getState: (contextKey?: import("../../../typedef").ContextKey) => AppLayoutState;
|
|
4
|
+
export const createOrGetState: (contextKey?: import("../../../state/context/typedef").ContextKey) => AppLayoutState;
|
|
5
|
+
export const createState: (contextKey?: import("../../../state/context/typedef").ContextKey) => AppLayoutState;
|
|
6
|
+
export const getState: (contextKey?: import("../../../state/context/typedef").ContextKey) => AppLayoutState;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { defineStateContext } from '../../../
|
|
1
|
+
import { defineStateContext } from '../../../state/context.js';
|
|
2
2
|
|
|
3
3
|
import { browser } from '$app/environment';
|
|
4
|
-
|
|
5
4
|
import { MediaQuery } from 'svelte/reactivity';
|
|
6
5
|
|
|
7
6
|
/* ------------------------------------------------------- Define state class */
|
|
@@ -11,10 +10,10 @@ export class AppLayoutState {
|
|
|
11
10
|
|
|
12
11
|
constructor() {
|
|
13
12
|
if (browser) {
|
|
14
|
-
let mq = new MediaQuery('(max-height: 400px');
|
|
13
|
+
let mq = new MediaQuery('(max-height: 400px)');
|
|
15
14
|
|
|
16
15
|
$effect(() => {
|
|
17
|
-
this.landscapeOnSmallScreen = mq.
|
|
16
|
+
this.landscapeOnSmallScreen = mq.current ? true : false;
|
|
18
17
|
});
|
|
19
18
|
}
|
|
20
19
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as HkAppLayout } from "./HkAppLayout.svelte";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as HkAppLayout } from './HkAppLayout.svelte';
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* aspect?: string,
|
|
14
14
|
* overflow?: string,
|
|
15
15
|
* fit?: 'contain' | 'cover' | 'fill',
|
|
16
|
-
* position?: import('../../../network/typedef.js').ObjectPosition,
|
|
17
|
-
* imageSource?: import('../../../
|
|
16
|
+
* position?: import('../../../network/loaders/typedef.js').ObjectPosition,
|
|
17
|
+
* imageSource?: import('../../../config/typedef.js').ImageSource,
|
|
18
18
|
* imageLoader?: import('../../../network/loaders.js').ImageLoader,
|
|
19
19
|
* alt?: string,
|
|
20
20
|
* id?: string|Symbol
|
|
@@ -10,7 +10,7 @@ type ImageBox = {
|
|
|
10
10
|
height?: string;
|
|
11
11
|
aspect?: string;
|
|
12
12
|
overflow?: string;
|
|
13
|
-
fit?: "fill" | "
|
|
13
|
+
fit?: "fill" | "cover" | "contain";
|
|
14
14
|
position?: string;
|
|
15
15
|
imageSource?: ImageSource;
|
|
16
16
|
imageLoader?: ImageLoader;
|
|
@@ -29,8 +29,8 @@ declare const ImageBox: import("svelte").Component<{
|
|
|
29
29
|
aspect?: string;
|
|
30
30
|
overflow?: string;
|
|
31
31
|
fit?: "contain" | "cover" | "fill";
|
|
32
|
-
position?: import("../../../network/typedef.js").ObjectPosition;
|
|
33
|
-
imageSource?: import("../../../
|
|
32
|
+
position?: import("../../../network/loaders/typedef.js").ObjectPosition;
|
|
33
|
+
imageSource?: import("../../../config/typedef.js").ImageSource;
|
|
34
34
|
imageLoader?: import("../../../network/loaders.js").ImageLoader;
|
|
35
35
|
alt?: string;
|
|
36
36
|
id?: string | Symbol;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @type {{
|
|
6
|
-
* imageMeta?: import('../../../
|
|
6
|
+
* imageMeta?: import('../../../config/typedef.js').ImageSource,
|
|
7
7
|
* slideDuration?: number,
|
|
8
8
|
* nextSlideLabel?: string,
|
|
9
9
|
* presenter?: { gotoSlide: (name: string) => void, getCurrentSlideName: () => string },
|
|
@@ -14,13 +14,13 @@ type ImageSlide = {
|
|
|
14
14
|
loaded: () => void;
|
|
15
15
|
cancel: () => void;
|
|
16
16
|
};
|
|
17
|
-
fit?: "fill" | "
|
|
17
|
+
fit?: "fill" | "cover" | "contain";
|
|
18
18
|
position?: string;
|
|
19
19
|
}>): void;
|
|
20
20
|
};
|
|
21
21
|
declare const ImageSlide: import("svelte").Component<{
|
|
22
22
|
[attr: string]: any;
|
|
23
|
-
imageMeta?: import("../../../
|
|
23
|
+
imageMeta?: import("../../../config/typedef.js").ImageSource;
|
|
24
24
|
slideDuration?: number;
|
|
25
25
|
nextSlideLabel?: string;
|
|
26
26
|
presenter?: {
|
|
@@ -14,9 +14,9 @@ export class PresenterState {
|
|
|
14
14
|
/** @type {string} */
|
|
15
15
|
nextLayerLabel: string;
|
|
16
16
|
/** @type {HkPromise[]} */
|
|
17
|
-
transitionPromises: HkPromise[];
|
|
17
|
+
transitionPromises: HkPromise<any>[];
|
|
18
18
|
/** @type {HkPromise} */
|
|
19
|
-
slideLoadingPromise: HkPromise
|
|
19
|
+
slideLoadingPromise: HkPromise<any>;
|
|
20
20
|
/** @type {boolean} */
|
|
21
21
|
isSlideLoading: boolean;
|
|
22
22
|
/** @type {boolean} */
|
|
@@ -71,4 +71,4 @@ export type Layer = import("./typedef").Layer;
|
|
|
71
71
|
export type PresenterRef = import("./typedef").PresenterRef;
|
|
72
72
|
export type LoadController = import("./typedef").LoadController;
|
|
73
73
|
export type ListenerParams = import("./typedef").ListenerParams;
|
|
74
|
-
import { HkPromise } from '../../../
|
|
74
|
+
import { HkPromise } from '../../../generic/promises.js';
|
|
@@ -4,7 +4,7 @@ import { findFirst } from '../../../util/array/index.js';
|
|
|
4
4
|
|
|
5
5
|
import { untrack } from 'svelte';
|
|
6
6
|
|
|
7
|
-
import { HkPromise } from '../../../
|
|
7
|
+
import { HkPromise } from '../../../generic/promises.js';
|
|
8
8
|
|
|
9
9
|
import { STAGE_BEFORE, STAGE_SHOW } from './constants.js';
|
|
10
10
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { onMount } from 'svelte';
|
|
3
3
|
|
|
4
|
-
import { GridLayers } from '../../
|
|
4
|
+
import { GridLayers } from '../../components.js';
|
|
5
5
|
|
|
6
6
|
import { PresenterState } from './Presenter.state.svelte.js';
|
|
7
7
|
import { cssBefore, cssDuring, waitForRender } from './util.js';
|
|
@@ -13,6 +13,6 @@ declare const Presenter: import("svelte").Component<{
|
|
|
13
13
|
classes?: string;
|
|
14
14
|
slides?: import("./typedef.js").Slide[];
|
|
15
15
|
presenterRef?: import("./Presenter.state.svelte.js").PresenterRef;
|
|
16
|
-
layoutSnippet: import("svelte").Snippet<[import("
|
|
16
|
+
layoutSnippet: import("svelte").Snippet<[import("../../components.js").Slide | null, import("../../components.js").Layer]>;
|
|
17
17
|
loadingSnippet?: import("svelte").Snippet;
|
|
18
18
|
}, {}, "presenterRef">;
|
|
@@ -4,7 +4,7 @@ type PanelGridRow = {
|
|
|
4
4
|
$set?(props: Partial<{
|
|
5
5
|
base?: string;
|
|
6
6
|
bg?: string;
|
|
7
|
-
justify?: "
|
|
7
|
+
justify?: "normal" | "center" | "start" | "end" | "between" | "around" | "evenly" | "stretch";
|
|
8
8
|
justifyItems?: "center" | "start" | "end" | "stretch";
|
|
9
9
|
gap?: string;
|
|
10
10
|
classes?: string;
|
|
@@ -4,7 +4,7 @@ type PanelRow2 = {
|
|
|
4
4
|
$set?(props: Partial<{
|
|
5
5
|
base?: string;
|
|
6
6
|
bg?: string;
|
|
7
|
-
justify?: "
|
|
7
|
+
justify?: "normal" | "center" | "start" | "end" | "between" | "around" | "evenly" | "stretch";
|
|
8
8
|
justifyItems?: "center" | "start" | "end" | "stretch";
|
|
9
9
|
gap?: string;
|
|
10
10
|
classes?: string;
|
|
@@ -48,7 +48,7 @@ export class HkTabBarState {
|
|
|
48
48
|
*/
|
|
49
49
|
linkTab(index: number, tabElement: HTMLElement): void;
|
|
50
50
|
}
|
|
51
|
-
export const createOrGetState: (contextKey?: import("../../../
|
|
52
|
-
export const createState: (contextKey?: import("../../../
|
|
53
|
-
export const getState: (contextKey?: import("../../../
|
|
51
|
+
export const createOrGetState: (contextKey?: import("../../../state/context/typedef.js").ContextKey) => HkTabBarState;
|
|
52
|
+
export const createState: (contextKey?: import("../../../state/context/typedef.js").ContextKey) => HkTabBarState;
|
|
53
|
+
export const getState: (contextKey?: import("../../../state/context/typedef.js").ContextKey) => HkTabBarState;
|
|
54
54
|
export type Tab = import("./typedef.js").Tab;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
|
|
2
|
+
import { defineStateContext } from '../../../state/context.js';
|
|
3
|
+
|
|
4
|
+
import { nav } from '../../../browser/navigation.js';
|
|
3
5
|
|
|
4
6
|
import { goto } from '$app/navigation';
|
|
5
7
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import { createOrGetState } from './HkTabBar.state.svelte';
|
|
10
10
|
|
|
11
|
-
import { HkGridArea } from '
|
|
11
|
+
import { HkGridArea } from '../../primitives.js';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @type {{
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* margin?: string,
|
|
20
20
|
* classes?: string,
|
|
21
21
|
* style?: string,
|
|
22
|
-
* contextKey?:
|
|
22
|
+
* contextKey?: import('../../../state/context/typedef.js').ContextKey,
|
|
23
23
|
* children: import('svelte').Snippet,
|
|
24
24
|
* onmount?: function,
|
|
25
25
|
* domElem?: HTMLElement
|
|
@@ -9,7 +9,7 @@ type HkTabBar = {
|
|
|
9
9
|
margin?: string;
|
|
10
10
|
classes?: string;
|
|
11
11
|
style?: string;
|
|
12
|
-
contextKey?:
|
|
12
|
+
contextKey?: ContextKey;
|
|
13
13
|
children: Snippet<[]>;
|
|
14
14
|
onmount?: Function;
|
|
15
15
|
domElem?: HTMLElement;
|
|
@@ -25,7 +25,7 @@ declare const HkTabBar: import("svelte").Component<{
|
|
|
25
25
|
margin?: string;
|
|
26
26
|
classes?: string;
|
|
27
27
|
style?: string;
|
|
28
|
-
contextKey?:
|
|
28
|
+
contextKey?: import("../../../state/context/typedef.js").ContextKey;
|
|
29
29
|
children: import("svelte").Snippet;
|
|
30
30
|
onmount?: Function;
|
|
31
31
|
domElem?: HTMLElement;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export class HkTabBarSelectorState {
|
|
2
|
+
/** @type {HTMLElement|undefined} */
|
|
3
|
+
/** @type {number} */
|
|
4
|
+
selectorWidth: number;
|
|
5
|
+
selectorStyle: string;
|
|
6
|
+
/** @type {DOMRect[]} */
|
|
7
|
+
iconSizes: DOMRect[];
|
|
8
|
+
/**
|
|
9
|
+
* Link the tab bar selector to a tab bar state
|
|
10
|
+
*
|
|
11
|
+
* @param {import('./HkTabBar.state.svelte.js').HkTabBarState} tabBarState
|
|
12
|
+
*/
|
|
13
|
+
linkToTabBarState(tabBarState: import("./HkTabBar.state.svelte.js").HkTabBarState): void;
|
|
14
|
+
tabBarState: import("./HkTabBar.state.svelte.js").HkTabBarState;
|
|
15
|
+
#private;
|
|
16
|
+
}
|
|
17
|
+
export const createOrGetState: (contextKey?: import("../../../state/context/typedef.js").ContextKey) => HkTabBarSelectorState;
|
|
18
|
+
export const createState: (contextKey?: import("../../../state/context/typedef.js").ContextKey) => HkTabBarSelectorState;
|
|
19
|
+
export const getState: (contextKey?: import("../../../state/context/typedef.js").ContextKey) => HkTabBarSelectorState;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineStateContext } from '../../../
|
|
1
|
+
import { defineStateContext } from '../../../state/context.js';
|
|
2
2
|
|
|
3
3
|
import { useResizeObserver } from '../../../util/svelte/observe/index.js';
|
|
4
4
|
|
|
@@ -31,7 +31,7 @@ export class HkTabBarSelectorState {
|
|
|
31
31
|
/**
|
|
32
32
|
* Link the tab bar selector to a tab bar state
|
|
33
33
|
*
|
|
34
|
-
* @param {import('./HkTabBar.svelte').
|
|
34
|
+
* @param {import('./HkTabBar.state.svelte.js').HkTabBarState} tabBarState
|
|
35
35
|
*/
|
|
36
36
|
linkToTabBarState(tabBarState) {
|
|
37
37
|
// console.log('setBottomBar', bottomBarState);
|