rune-lab 0.4.5 → 0.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/RuneProvider.svelte.d.ts +12 -20
- package/dist/i18n/message-resolver.test.d.ts +1 -0
- package/dist/i18n/messages.d.ts +2 -0
- package/dist/i18n/messages.js +7 -0
- package/dist/i18n/paraglide/README.md +29 -12
- package/dist/i18n/paraglide/messages/_index.js +0 -18
- package/dist/i18n/paraglide/runtime.js +98 -12
- package/dist/i18n/paraglide/server.js +57 -18
- package/dist/kernel/src/persistence/createConfigStore.svelte.js +14 -7
- package/dist/kernel/src/persistence/drivers.test.d.ts +1 -0
- package/dist/kernel/src/persistence/provider.test.d.ts +1 -0
- package/dist/kernel/src/registry/registry.test.d.ts +1 -0
- package/dist/mod.js +1 -1
- package/dist/runes/layout/src/AppSettingSelector.svelte +5 -10
- package/dist/runes/layout/src/AppSettingSelector.svelte.d.ts +35 -21
- package/dist/runes/layout/src/ConnectedNavigationPanel.svelte +4 -2
- package/dist/runes/layout/src/ConnectedNavigationPanel.svelte.d.ts +13 -19
- package/dist/runes/layout/src/ConnectedWorkspaceStrip.svelte +4 -2
- package/dist/runes/layout/src/ConnectedWorkspaceStrip.svelte.d.ts +12 -19
- package/dist/runes/layout/src/ContentArea.svelte.d.ts +7 -19
- package/dist/runes/layout/src/DetailPanel.svelte.d.ts +6 -19
- package/dist/runes/layout/src/Icon.svelte +5 -1
- package/dist/runes/layout/src/Icon.svelte.d.ts +6 -16
- package/dist/runes/layout/src/LanguageSelector.svelte +8 -4
- package/dist/runes/layout/src/LanguageSelector.svelte.d.ts +11 -19
- package/dist/runes/layout/src/NavigationPanel.svelte +11 -9
- package/dist/runes/layout/src/NavigationPanel.svelte.d.ts +16 -19
- package/dist/runes/layout/src/ResourceSelector.svelte +22 -21
- package/dist/runes/layout/src/ResourceSelector.svelte.d.ts +52 -18
- package/dist/runes/layout/src/ThemeSelector.svelte +9 -6
- package/dist/runes/layout/src/ThemeSelector.svelte.d.ts +11 -19
- package/dist/runes/layout/src/WorkspaceLayout.svelte.d.ts +7 -20
- package/dist/runes/layout/src/WorkspaceStrip.svelte +8 -6
- package/dist/runes/layout/src/WorkspaceStrip.svelte.d.ts +10 -19
- package/dist/runes/layout/src/language.svelte.d.ts +4 -0
- package/dist/runes/layout/src/language.svelte.js +8 -0
- package/dist/runes/layout/src/theme.svelte.d.ts +4 -0
- package/dist/runes/layout/src/theme.svelte.js +8 -0
- package/dist/runes/palettes/src/commands/CommandPalette.svelte +5 -1
- package/dist/runes/palettes/src/commands/CommandPalette.svelte.d.ts +5 -19
- package/dist/runes/palettes/src/notifications/NotificationBell.svelte.d.ts +7 -20
- package/dist/runes/palettes/src/notifications/Toaster.svelte.d.ts +30 -15
- package/dist/runes/palettes/src/notifications/bridge.d.ts +1 -1
- package/dist/runes/palettes/src/notifications/bridge.js +1 -1
- package/dist/runes/palettes/src/shortcuts/ShortcutPalette.svelte.d.ts +10 -25
- package/dist/runes/plugins/money/src/CurrencySelector.svelte +8 -4
- package/dist/runes/plugins/money/src/CurrencySelector.svelte.d.ts +11 -19
- package/dist/runes/plugins/money/src/MoneyDisplay.svelte.d.ts +36 -19
- package/dist/runes/plugins/money/src/MoneyInput.svelte.d.ts +7 -20
- package/dist/runes/plugins/money/src/currency.svelte.d.ts +4 -0
- package/dist/runes/plugins/money/src/currency.svelte.js +13 -1
- package/dist/runes/plugins/money/src/currency.test.d.ts +1 -0
- package/dist/runes/plugins/money/src/exchange-rate.test.d.ts +1 -0
- package/dist/runes/plugins/money/src/money-primitive.test.d.ts +1 -0
- package/dist/runes/plugins/money/src/money.test.d.ts +1 -0
- package/dist/runes/plugins/money/src/strategies.test.d.ts +1 -0
- package/package.json +6 -15
- package/LICENSE +0 -21
- package/README.md +0 -314
- package/dist/i18n/paraglide/messages/active_toasts.js +0 -101
- package/dist/i18n/paraglide/messages/api_status.js +0 -101
- package/dist/i18n/paraglide/messages/app_info.js +0 -101
- package/dist/i18n/paraglide/messages/appearance.js +0 -101
- package/dist/i18n/paraglide/messages/commands_label.js +0 -101
- package/dist/i18n/paraglide/messages/current_currency.js +0 -101
- package/dist/i18n/paraglide/messages/current_language.js +0 -101
- package/dist/i18n/paraglide/messages/current_theme.js +0 -101
- package/dist/i18n/paraglide/messages/currently_in_queue.js +0 -101
- package/dist/i18n/paraglide/messages/extended_controls.js +0 -101
- package/dist/i18n/paraglide/messages/live_store_dashboard.js +0 -101
- package/dist/i18n/paraglide/messages/localization.js +0 -101
- package/dist/i18n/paraglide/messages/name_label.js +0 -101
- package/dist/i18n/paraglide/messages/real_time_monitor_desc.js +0 -101
- package/dist/i18n/paraglide/messages/registered_in_registry.js +0 -101
- package/dist/i18n/paraglide/messages/state_label.js +0 -101
- package/dist/i18n/paraglide/messages/url_label.js +0 -101
- package/dist/i18n/paraglide/messages/version_label.js +0 -101
|
@@ -5,11 +5,13 @@
|
|
|
5
5
|
import { createNavigationConnection } from "./connection-factory.js";
|
|
6
6
|
import type { Snippet } from "svelte";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
interface Props {
|
|
9
9
|
sections: NavigationSection[];
|
|
10
10
|
header?: Snippet;
|
|
11
11
|
footer?: Snippet;
|
|
12
|
-
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
let { sections, header, footer }: Props = $props();
|
|
13
15
|
|
|
14
16
|
const layoutStore = getLayoutStore();
|
|
15
17
|
const connection = createNavigationConnection(layoutStore);
|
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
slots: {};
|
|
8
|
-
exports?: {};
|
|
9
|
-
bindings?: string;
|
|
10
|
-
};
|
|
11
|
-
export type ConnectedNavigationPanelProps = typeof __propDef.props;
|
|
12
|
-
export type ConnectedNavigationPanelEvents = typeof __propDef.events;
|
|
13
|
-
export type ConnectedNavigationPanelSlots = typeof __propDef.slots;
|
|
14
|
-
export default class ConnectedNavigationPanel extends SvelteComponentTyped<
|
|
15
|
-
ConnectedNavigationPanelProps,
|
|
16
|
-
ConnectedNavigationPanelEvents,
|
|
17
|
-
ConnectedNavigationPanelSlots
|
|
18
|
-
> {
|
|
1
|
+
import { type NavigationSection } from "../../../kernel/src/mod.js";
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
interface Props {
|
|
4
|
+
sections: NavigationSection[];
|
|
5
|
+
header?: Snippet;
|
|
6
|
+
footer?: Snippet;
|
|
19
7
|
}
|
|
20
|
-
|
|
8
|
+
declare const ConnectedNavigationPanel: import("svelte").Component<
|
|
9
|
+
Props,
|
|
10
|
+
{},
|
|
11
|
+
""
|
|
12
|
+
>;
|
|
13
|
+
type ConnectedNavigationPanel = ReturnType<typeof ConnectedNavigationPanel>;
|
|
14
|
+
export default ConnectedNavigationPanel;
|
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
import { createWorkspaceConnection } from "./connection-factory.js";
|
|
6
6
|
import type { Snippet } from "svelte";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
interface Props {
|
|
9
9
|
items: WorkspaceItem[];
|
|
10
10
|
globalActions?: Snippet;
|
|
11
|
-
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let { items, globalActions }: Props = $props();
|
|
12
14
|
|
|
13
15
|
const layoutStore = getLayoutStore();
|
|
14
16
|
const connection = createWorkspaceConnection(layoutStore);
|
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
slots: {};
|
|
8
|
-
exports?: {};
|
|
9
|
-
bindings?: string;
|
|
10
|
-
};
|
|
11
|
-
export type ConnectedWorkspaceStripProps = typeof __propDef.props;
|
|
12
|
-
export type ConnectedWorkspaceStripEvents = typeof __propDef.events;
|
|
13
|
-
export type ConnectedWorkspaceStripSlots = typeof __propDef.slots;
|
|
14
|
-
export default class ConnectedWorkspaceStrip extends SvelteComponentTyped<
|
|
15
|
-
ConnectedWorkspaceStripProps,
|
|
16
|
-
ConnectedWorkspaceStripEvents,
|
|
17
|
-
ConnectedWorkspaceStripSlots
|
|
18
|
-
> {
|
|
1
|
+
import { type WorkspaceItem } from "../../../kernel/src/mod.js";
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
interface Props {
|
|
4
|
+
items: WorkspaceItem[];
|
|
5
|
+
globalActions?: Snippet;
|
|
19
6
|
}
|
|
20
|
-
|
|
7
|
+
declare const ConnectedWorkspaceStrip: import("svelte").Component<
|
|
8
|
+
Props,
|
|
9
|
+
{},
|
|
10
|
+
""
|
|
11
|
+
>;
|
|
12
|
+
type ConnectedWorkspaceStrip = ReturnType<typeof ConnectedWorkspaceStrip>;
|
|
13
|
+
export default ConnectedWorkspaceStrip;
|
|
@@ -1,20 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
};
|
|
7
|
-
slots: {};
|
|
8
|
-
exports?: {};
|
|
9
|
-
bindings?: string;
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
header?: Snippet;
|
|
4
|
+
children: Snippet;
|
|
10
5
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export
|
|
14
|
-
export default class ContentArea extends SvelteComponentTyped<
|
|
15
|
-
ContentAreaProps,
|
|
16
|
-
ContentAreaEvents,
|
|
17
|
-
ContentAreaSlots
|
|
18
|
-
> {
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
6
|
+
declare const ContentArea: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type ContentArea = ReturnType<typeof ContentArea>;
|
|
8
|
+
export default ContentArea;
|
|
@@ -1,20 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
events: {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
};
|
|
7
|
-
slots: {};
|
|
8
|
-
exports?: {};
|
|
9
|
-
bindings?: string;
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
children: Snippet;
|
|
10
4
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export
|
|
14
|
-
export default class DetailPanel extends SvelteComponentTyped<
|
|
15
|
-
DetailPanelProps,
|
|
16
|
-
DetailPanelEvents,
|
|
17
|
-
DetailPanelSlots
|
|
18
|
-
> {
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
5
|
+
declare const DetailPanel: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
6
|
+
type DetailPanel = ReturnType<typeof DetailPanel>;
|
|
7
|
+
export default DetailPanel;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
2
|
+
interface Props {
|
|
3
|
+
name: string;
|
|
4
|
+
class?: string;
|
|
5
|
+
}
|
|
6
|
+
let { name, class: className = "" }: Props = $props();
|
|
3
7
|
</script>
|
|
4
8
|
|
|
5
9
|
<span class="material-symbols-outlined {className}">
|
|
@@ -1,17 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
events: {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
};
|
|
7
|
-
slots: {};
|
|
8
|
-
exports?: {};
|
|
9
|
-
bindings?: string;
|
|
10
|
-
};
|
|
11
|
-
export type IconProps = typeof __propDef.props;
|
|
12
|
-
export type IconEvents = typeof __propDef.events;
|
|
13
|
-
export type IconSlots = typeof __propDef.slots;
|
|
14
|
-
export default class Icon
|
|
15
|
-
extends SvelteComponentTyped<IconProps, IconEvents, IconSlots> {
|
|
1
|
+
interface Props {
|
|
2
|
+
name: string;
|
|
3
|
+
class?: string;
|
|
16
4
|
}
|
|
17
|
-
|
|
5
|
+
declare const Icon: import("svelte").Component<Props, {}, "">;
|
|
6
|
+
type Icon = ReturnType<typeof Icon>;
|
|
7
|
+
export default Icon;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import ResourceSelector from "./ResourceSelector.svelte";
|
|
3
3
|
import { getLanguageStore } from "../../../kernel/src/mod.js";
|
|
4
|
+
import { getLanguageName } from "./language.svelte.js";
|
|
4
5
|
|
|
5
6
|
const languageStore = getLanguageStore();
|
|
6
7
|
|
|
@@ -23,11 +24,13 @@
|
|
|
23
24
|
filterKeys={[...allowedLocales]}
|
|
24
25
|
{onchange}
|
|
25
26
|
>
|
|
26
|
-
{#snippet triggerLabel(active)}
|
|
27
|
-
<
|
|
27
|
+
{#snippet triggerLabel(active: any)}
|
|
28
|
+
<div class="flex items-center gap-2">
|
|
29
|
+
<span class="text-lg">{active.flag}</span>
|
|
30
|
+
</div>
|
|
28
31
|
{/snippet}
|
|
29
32
|
|
|
30
|
-
{#snippet item(l)}
|
|
33
|
+
{#snippet item(l: any)}
|
|
31
34
|
<button
|
|
32
35
|
class="flex items-center gap-3 w-full"
|
|
33
36
|
onclick={() => {
|
|
@@ -37,7 +40,8 @@
|
|
|
37
40
|
}}
|
|
38
41
|
>
|
|
39
42
|
<span class="text-lg">{l.flag}</span>
|
|
40
|
-
<span>{l.code
|
|
43
|
+
<span class="text-xs opacity-50 uppercase">{l.code}</span>
|
|
44
|
+
<span class="flex-grow text-left">{getLanguageName(l)}</span>
|
|
41
45
|
</button>
|
|
42
46
|
{/snippet}
|
|
43
47
|
</ResourceSelector>
|
|
@@ -1,20 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
};
|
|
7
|
-
slots: {};
|
|
8
|
-
exports?: {};
|
|
9
|
-
bindings?: string;
|
|
1
|
+
type $$ComponentProps = {
|
|
2
|
+
languages?: string[];
|
|
3
|
+
current?: string;
|
|
4
|
+
onchange?: (value: string) => void;
|
|
10
5
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
> {
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
6
|
+
declare const LanguageSelector: import("svelte").Component<
|
|
7
|
+
$$ComponentProps,
|
|
8
|
+
{},
|
|
9
|
+
"current"
|
|
10
|
+
>;
|
|
11
|
+
type LanguageSelector = ReturnType<typeof LanguageSelector>;
|
|
12
|
+
export default LanguageSelector;
|
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
import type { Snippet } from "svelte";
|
|
4
4
|
import type { NavigationItem, NavigationSection } from "../../../kernel/src/mod.js";
|
|
5
5
|
|
|
6
|
+
interface Props {
|
|
7
|
+
header?: Snippet;
|
|
8
|
+
sections: NavigationSection[];
|
|
9
|
+
footer?: Snippet;
|
|
10
|
+
activeId?: string | null;
|
|
11
|
+
collapsedIds?: Set<string>;
|
|
12
|
+
onSelect?: (item: NavigationItem) => void;
|
|
13
|
+
onToggle?: (id: string, isOpen: boolean) => void;
|
|
14
|
+
}
|
|
15
|
+
|
|
6
16
|
let {
|
|
7
17
|
header,
|
|
8
18
|
sections = [],
|
|
@@ -11,15 +21,7 @@
|
|
|
11
21
|
collapsedIds = new Set(),
|
|
12
22
|
onSelect,
|
|
13
23
|
onToggle,
|
|
14
|
-
} = $props
|
|
15
|
-
header?: Snippet;
|
|
16
|
-
sections: NavigationSection[];
|
|
17
|
-
footer?: Snippet;
|
|
18
|
-
activeId?: string | null;
|
|
19
|
-
collapsedIds?: Set<string>;
|
|
20
|
-
onSelect?: (item: NavigationItem) => void;
|
|
21
|
-
onToggle?: (id: string, isOpen: boolean) => void;
|
|
22
|
-
}>();
|
|
24
|
+
}: Props = $props();
|
|
23
25
|
|
|
24
26
|
function handleItemClick(item: NavigationItem) {
|
|
25
27
|
onSelect?.(item);
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export default class NavigationPanel extends SvelteComponentTyped<
|
|
15
|
-
NavigationPanelProps,
|
|
16
|
-
NavigationPanelEvents,
|
|
17
|
-
NavigationPanelSlots
|
|
18
|
-
> {
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
import type {
|
|
3
|
+
NavigationItem,
|
|
4
|
+
NavigationSection,
|
|
5
|
+
} from "../../../kernel/src/mod.js";
|
|
6
|
+
interface Props {
|
|
7
|
+
header?: Snippet;
|
|
8
|
+
sections: NavigationSection[];
|
|
9
|
+
footer?: Snippet;
|
|
10
|
+
activeId?: string | null;
|
|
11
|
+
collapsedIds?: Set<string>;
|
|
12
|
+
onSelect?: (item: NavigationItem) => void;
|
|
13
|
+
onToggle?: (id: string, isOpen: boolean) => void;
|
|
19
14
|
}
|
|
20
|
-
|
|
15
|
+
declare const NavigationPanel: import("svelte").Component<Props, {}, "">;
|
|
16
|
+
type NavigationPanel = ReturnType<typeof NavigationPanel>;
|
|
17
|
+
export default NavigationPanel;
|
|
@@ -1,36 +1,38 @@
|
|
|
1
|
-
<script lang="ts">
|
|
1
|
+
<script lang="ts" generics="T">
|
|
2
2
|
import AppSettingSelector from "./AppSettingSelector.svelte";
|
|
3
3
|
import type { ConfigStore } from "../../../kernel/src/mod.js";
|
|
4
|
-
import
|
|
4
|
+
import { m } from "../../../i18n/messages.js";
|
|
5
5
|
import { getContext, type Snippet } from "svelte";
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
store,
|
|
9
|
-
idKey,
|
|
10
|
-
filterKeys = [],
|
|
11
|
-
triggerLabel,
|
|
12
|
-
item,
|
|
13
|
-
onchange,
|
|
14
|
-
direction = "bottom",
|
|
15
|
-
responsive = true,
|
|
16
|
-
}: {
|
|
7
|
+
interface Props {
|
|
17
8
|
/** ConfigStore instance to bind to */
|
|
18
|
-
store: ConfigStore<
|
|
9
|
+
store: ConfigStore<T>;
|
|
19
10
|
/** Key to use as identifier (e.g., "name", "code") */
|
|
20
11
|
idKey: string;
|
|
21
12
|
/** Optional subset of IDs to show */
|
|
22
13
|
filterKeys?: string[];
|
|
23
14
|
/** Snippet to render the trigger button content */
|
|
24
|
-
triggerLabel: Snippet<[
|
|
15
|
+
triggerLabel: Snippet<[T]>;
|
|
25
16
|
/** Snippet to render each option in the dropdown */
|
|
26
|
-
item: Snippet<[
|
|
17
|
+
item: Snippet<[T]>;
|
|
27
18
|
/** Callback when selection changes */
|
|
28
19
|
onchange?: (value: string) => void;
|
|
29
20
|
/** Dropdown direction */
|
|
30
21
|
direction?: "top" | "bottom" | "left" | "right" | "end" | "auto";
|
|
31
22
|
/** Whether to show responsive mobile modal */
|
|
32
23
|
responsive?: boolean;
|
|
33
|
-
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
let {
|
|
27
|
+
store,
|
|
28
|
+
idKey,
|
|
29
|
+
filterKeys = [],
|
|
30
|
+
triggerLabel,
|
|
31
|
+
item,
|
|
32
|
+
onchange,
|
|
33
|
+
direction = "bottom",
|
|
34
|
+
responsive = true,
|
|
35
|
+
}: Props = $props();
|
|
34
36
|
|
|
35
37
|
const userDictionary =
|
|
36
38
|
getContext<Record<string, any>>("rl:dictionary") ?? {};
|
|
@@ -41,12 +43,11 @@
|
|
|
41
43
|
* 2. Paraglide messages
|
|
42
44
|
* 3. Raw key fallback
|
|
43
45
|
*/
|
|
44
|
-
|
|
46
|
+
function resolveLabel(item: any): string {
|
|
45
47
|
const key = String(item[idKey]);
|
|
46
48
|
if (typeof userDictionary[key] === "function")
|
|
47
49
|
return userDictionary[key]();
|
|
48
|
-
if (typeof (
|
|
49
|
-
return (rlMessages as any)[key]();
|
|
50
|
+
if (typeof (m as any)[key] === "function") return (m as any)[key]();
|
|
50
51
|
return key;
|
|
51
52
|
}
|
|
52
53
|
|
|
@@ -61,11 +62,11 @@
|
|
|
61
62
|
);
|
|
62
63
|
</script>
|
|
63
64
|
|
|
64
|
-
{#snippet _triggerLabel(v:
|
|
65
|
+
{#snippet _triggerLabel(v: T)}
|
|
65
66
|
{@render triggerLabel(v)}
|
|
66
67
|
{/snippet}
|
|
67
68
|
|
|
68
|
-
{#snippet _item(option:
|
|
69
|
+
{#snippet _item(option: T)}
|
|
69
70
|
{@render item(option)}
|
|
70
71
|
{/snippet}
|
|
71
72
|
|
|
@@ -1,23 +1,57 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import type { ConfigStore } from "../../../kernel/src/mod.js";
|
|
2
|
+
import { type Snippet } from "svelte";
|
|
3
|
+
declare function $$render<T>(): {
|
|
3
4
|
props: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
/** ConfigStore instance to bind to */
|
|
6
|
+
store: ConfigStore<T>;
|
|
7
|
+
/** Key to use as identifier (e.g., "name", "code") */
|
|
8
|
+
idKey: string;
|
|
9
|
+
/** Optional subset of IDs to show */
|
|
10
|
+
filterKeys?: string[];
|
|
11
|
+
/** Snippet to render the trigger button content */
|
|
12
|
+
triggerLabel: Snippet<[T]>;
|
|
13
|
+
/** Snippet to render each option in the dropdown */
|
|
14
|
+
item: Snippet<[T]>;
|
|
15
|
+
/** Callback when selection changes */
|
|
16
|
+
onchange?: (value: string) => void;
|
|
17
|
+
/** Dropdown direction */
|
|
18
|
+
direction?: "top" | "bottom" | "left" | "right" | "end" | "auto";
|
|
19
|
+
/** Whether to show responsive mobile modal */
|
|
20
|
+
responsive?: boolean;
|
|
8
21
|
};
|
|
22
|
+
exports: {};
|
|
23
|
+
bindings: "";
|
|
9
24
|
slots: {};
|
|
10
|
-
|
|
11
|
-
bindings?: string;
|
|
25
|
+
events: {};
|
|
12
26
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
27
|
+
declare class __sveltets_Render<T> {
|
|
28
|
+
props(): ReturnType<typeof $$render<T>>["props"];
|
|
29
|
+
events(): ReturnType<typeof $$render<T>>["events"];
|
|
30
|
+
slots(): ReturnType<typeof $$render<T>>["slots"];
|
|
31
|
+
bindings(): "";
|
|
32
|
+
exports(): {};
|
|
33
|
+
}
|
|
34
|
+
interface $$IsomorphicComponent {
|
|
35
|
+
new <T>(
|
|
36
|
+
options: import("svelte").ComponentConstructorOptions<
|
|
37
|
+
ReturnType<__sveltets_Render<T>["props"]>
|
|
38
|
+
>,
|
|
39
|
+
):
|
|
40
|
+
& import("svelte").SvelteComponent<
|
|
41
|
+
ReturnType<__sveltets_Render<T>["props"]>,
|
|
42
|
+
ReturnType<__sveltets_Render<T>["events"]>,
|
|
43
|
+
ReturnType<__sveltets_Render<T>["slots"]>
|
|
44
|
+
>
|
|
45
|
+
& {
|
|
46
|
+
$$bindings?: ReturnType<__sveltets_Render<T>["bindings"]>;
|
|
47
|
+
}
|
|
48
|
+
& ReturnType<__sveltets_Render<T>["exports"]>;
|
|
49
|
+
<T>(
|
|
50
|
+
internal: unknown,
|
|
51
|
+
props: ReturnType<__sveltets_Render<T>["props"]> & {},
|
|
52
|
+
): ReturnType<__sveltets_Render<T>["exports"]>;
|
|
53
|
+
z_$$bindings?: ReturnType<__sveltets_Render<any>["bindings"]>;
|
|
22
54
|
}
|
|
23
|
-
|
|
55
|
+
declare const ResourceSelector: $$IsomorphicComponent;
|
|
56
|
+
type ResourceSelector<T> = InstanceType<typeof ResourceSelector<T>>;
|
|
57
|
+
export default ResourceSelector;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import ResourceSelector from "./ResourceSelector.svelte";
|
|
3
|
-
import { getThemeStore
|
|
3
|
+
import { getThemeStore } from "../../../kernel/src/mod.js";
|
|
4
|
+
import { getThemeName } from "./theme.svelte.js";
|
|
4
5
|
|
|
5
6
|
const themeStore = getThemeStore();
|
|
6
7
|
|
|
@@ -21,11 +22,13 @@
|
|
|
21
22
|
filterKeys={themes}
|
|
22
23
|
{onchange}
|
|
23
24
|
>
|
|
24
|
-
{#snippet triggerLabel(active)}
|
|
25
|
-
<
|
|
25
|
+
{#snippet triggerLabel(active: any)}
|
|
26
|
+
<div class="flex items-center gap-2">
|
|
27
|
+
<span class="text-lg">{active.icon}</span>
|
|
28
|
+
</div>
|
|
26
29
|
{/snippet}
|
|
27
30
|
|
|
28
|
-
{#snippet item(t)}
|
|
31
|
+
{#snippet item(t: any)}
|
|
29
32
|
<button
|
|
30
33
|
class="flex items-center gap-3 w-full"
|
|
31
34
|
onclick={() => {
|
|
@@ -42,8 +45,8 @@
|
|
|
42
45
|
bind:group={themeStore.current}
|
|
43
46
|
/>
|
|
44
47
|
<span class="text-lg">{t.icon}</span>
|
|
45
|
-
<span class="capitalize">
|
|
46
|
-
{t
|
|
48
|
+
<span class="flex-grow text-left capitalize">
|
|
49
|
+
{getThemeName(t)}
|
|
47
50
|
</span>
|
|
48
51
|
</button>
|
|
49
52
|
{/snippet}
|
|
@@ -1,20 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
};
|
|
7
|
-
slots: {};
|
|
8
|
-
exports?: {};
|
|
9
|
-
bindings?: string;
|
|
1
|
+
type $$ComponentProps = {
|
|
2
|
+
themes?: string[];
|
|
3
|
+
current?: string;
|
|
4
|
+
onchange?: (value: string) => void;
|
|
10
5
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
> {
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
6
|
+
declare const ThemeSelector: import("svelte").Component<
|
|
7
|
+
$$ComponentProps,
|
|
8
|
+
{},
|
|
9
|
+
"current"
|
|
10
|
+
>;
|
|
11
|
+
type ThemeSelector = ReturnType<typeof ThemeSelector>;
|
|
12
|
+
export default ThemeSelector;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
1
|
import type { Snippet } from "svelte";
|
|
3
2
|
import type { LayoutConfig } from "./types.js";
|
|
4
3
|
export interface WorkspaceLayoutProps {
|
|
@@ -28,22 +27,10 @@ export interface WorkspaceLayoutProps {
|
|
|
28
27
|
/** Controlled override for detail panel visibility */
|
|
29
28
|
detailOpen?: boolean;
|
|
30
29
|
}
|
|
31
|
-
declare const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
bindings?: string;
|
|
39
|
-
};
|
|
40
|
-
type WorkspaceLayoutProps_ = typeof __propDef.props;
|
|
41
|
-
export type WorkspaceLayoutEvents = typeof __propDef.events;
|
|
42
|
-
export type WorkspaceLayoutSlots = typeof __propDef.slots;
|
|
43
|
-
export default class WorkspaceLayout extends SvelteComponentTyped<
|
|
44
|
-
WorkspaceLayoutProps_,
|
|
45
|
-
WorkspaceLayoutEvents,
|
|
46
|
-
WorkspaceLayoutSlots
|
|
47
|
-
> {
|
|
48
|
-
}
|
|
49
|
-
export {};
|
|
30
|
+
declare const WorkspaceLayout: import("svelte").Component<
|
|
31
|
+
WorkspaceLayoutProps,
|
|
32
|
+
{},
|
|
33
|
+
"navOpen" | "detailOpen"
|
|
34
|
+
>;
|
|
35
|
+
type WorkspaceLayout = ReturnType<typeof WorkspaceLayout>;
|
|
36
|
+
export default WorkspaceLayout;
|
|
@@ -3,17 +3,19 @@
|
|
|
3
3
|
import type { Snippet } from "svelte";
|
|
4
4
|
import type { WorkspaceItem } from "../../../kernel/src/mod.js";
|
|
5
5
|
|
|
6
|
+
interface Props {
|
|
7
|
+
items: WorkspaceItem[];
|
|
8
|
+
globalActions?: Snippet;
|
|
9
|
+
activeId?: string | null;
|
|
10
|
+
onSelect?: (id: string, item: WorkspaceItem) => void;
|
|
11
|
+
}
|
|
12
|
+
|
|
6
13
|
let {
|
|
7
14
|
items = [],
|
|
8
15
|
globalActions,
|
|
9
16
|
activeId,
|
|
10
17
|
onSelect,
|
|
11
|
-
} = $props
|
|
12
|
-
items: WorkspaceItem[];
|
|
13
|
-
globalActions?: Snippet;
|
|
14
|
-
activeId?: string | null;
|
|
15
|
-
onSelect?: (id: string, item: WorkspaceItem) => void;
|
|
16
|
-
}>();
|
|
18
|
+
}: Props = $props();
|
|
17
19
|
|
|
18
20
|
function handleWorkspaceClick(item: WorkspaceItem) {
|
|
19
21
|
onSelect?.(item.id, item);
|
|
@@ -1,20 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
exports?: {};
|
|
9
|
-
bindings?: string;
|
|
10
|
-
};
|
|
11
|
-
export type WorkspaceStripProps = typeof __propDef.props;
|
|
12
|
-
export type WorkspaceStripEvents = typeof __propDef.events;
|
|
13
|
-
export type WorkspaceStripSlots = typeof __propDef.slots;
|
|
14
|
-
export default class WorkspaceStrip extends SvelteComponentTyped<
|
|
15
|
-
WorkspaceStripProps,
|
|
16
|
-
WorkspaceStripEvents,
|
|
17
|
-
WorkspaceStripSlots
|
|
18
|
-
> {
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
import type { WorkspaceItem } from "../../../kernel/src/mod.js";
|
|
3
|
+
interface Props {
|
|
4
|
+
items: WorkspaceItem[];
|
|
5
|
+
globalActions?: Snippet;
|
|
6
|
+
activeId?: string | null;
|
|
7
|
+
onSelect?: (id: string, item: WorkspaceItem) => void;
|
|
19
8
|
}
|
|
20
|
-
|
|
9
|
+
declare const WorkspaceStrip: import("svelte").Component<Props, {}, "">;
|
|
10
|
+
type WorkspaceStrip = ReturnType<typeof WorkspaceStrip>;
|
|
11
|
+
export default WorkspaceStrip;
|