@fuzdev/fuz_ui 0.193.1 → 0.194.0
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/Spiders.svelte +4 -2
- package/dist/Spiders.svelte.d.ts +2 -1
- package/dist/Spiders.svelte.d.ts.map +1 -1
- package/dist/StyleVariableButton.svelte +1 -1
- package/dist/contextmenu_state.svelte.d.ts +14 -14
- package/dist/contextmenu_state.svelte.d.ts.map +1 -1
- package/dist/contextmenu_state.svelte.js +3 -3
- package/dist/docs_helpers.svelte.d.ts +5 -5
- package/dist/docs_helpers.svelte.d.ts.map +1 -1
- package/dist/docs_helpers.svelte.js +1 -1
- package/dist/library.svelte.d.ts +5 -5
- package/dist/library.svelte.d.ts.map +1 -1
- package/dist/library.svelte.js +1 -1
- package/dist/mdz_components.d.ts +16 -16
- package/dist/mdz_components.d.ts.map +1 -1
- package/dist/style_variable_helpers.svelte.d.ts +4 -4
- package/dist/style_variable_helpers.svelte.d.ts.map +1 -1
- package/dist/style_variable_helpers.svelte.js +1 -1
- package/dist/tome.d.ts +10 -10
- package/dist/tome.d.ts.map +1 -1
- package/dist/tome.js +2 -2
- package/package.json +2 -2
- package/src/lib/contextmenu_state.svelte.ts +6 -6
- package/src/lib/docs_helpers.svelte.ts +2 -2
- package/src/lib/library.svelte.ts +2 -2
- package/src/lib/mdz_components.ts +18 -18
- package/src/lib/style_variable_helpers.svelte.ts +2 -2
- package/src/lib/tome.ts +4 -4
package/dist/Spiders.svelte
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
<script lang="ts">
|
|
9
9
|
import {random_int, shuffle} from '@fuzdev/fuz_util/random.js';
|
|
10
10
|
import {create_random_alea} from '@fuzdev/fuz_util/random_alea.js';
|
|
11
|
+
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
11
12
|
|
|
12
13
|
import Svg from './Svg.svelte';
|
|
13
14
|
import {logo_fuz} from './logos.js';
|
|
@@ -27,11 +28,12 @@
|
|
|
27
28
|
],
|
|
28
29
|
seed = minute_of_day(),
|
|
29
30
|
random = create_random_alea(seed),
|
|
31
|
+
...rest
|
|
30
32
|
}: {
|
|
31
33
|
spiders?: Array<string>; // for now, just colors
|
|
32
34
|
seed?: unknown;
|
|
33
35
|
random?: typeof Math.random;
|
|
34
|
-
} = $props();
|
|
36
|
+
} & SvelteHTMLElements['div'] = $props();
|
|
35
37
|
|
|
36
38
|
const shuffled = $derived(shuffle(spiders.slice(), (min, max) => random_int(min, max, random)));
|
|
37
39
|
const rotations = $derived(shuffled.map(() => random_int(0, 359, random)));
|
|
@@ -39,7 +41,7 @@
|
|
|
39
41
|
|
|
40
42
|
<!-- TODO animate each in randomly -->
|
|
41
43
|
<!-- TODO show when intersected in viewport, maybe inline `svelte-intersect` in Fuz? -->
|
|
42
|
-
<div class="spiders" style:--spider_count={spiders.length}>
|
|
44
|
+
<div {...rest} class="spiders {rest.class}" style:--spider_count={spiders.length}>
|
|
43
45
|
{#each shuffled as color, i (color)}
|
|
44
46
|
<Svg data={logo_fuz} fill={color} style="transform: rotate(${rotations[i]}deg)" />
|
|
45
47
|
{/each}
|
package/dist/Spiders.svelte.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
1
2
|
type $$ComponentProps = {
|
|
2
3
|
spiders?: Array<string>;
|
|
3
4
|
seed?: unknown;
|
|
4
5
|
random?: typeof Math.random;
|
|
5
|
-
};
|
|
6
|
+
} & SvelteHTMLElements['div'];
|
|
6
7
|
declare const Spiders: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
8
|
type Spiders = ReturnType<typeof Spiders>;
|
|
8
9
|
export default Spiders;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spiders.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/Spiders.svelte"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Spiders.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/Spiders.svelte"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAKvD,KAAK,gBAAgB,GAAI;IACxB,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,IAAI,CAAC,MAAM,CAAC;CAC5B,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;AA6C/B,QAAA,MAAM,OAAO,sDAAwC,CAAC;AACtD,KAAK,OAAO,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;AAC1C,eAAe,OAAO,CAAC"}
|
|
@@ -3,6 +3,20 @@ import type { Result } from '@fuzdev/fuz_util/result.js';
|
|
|
3
3
|
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
4
4
|
import type { Attachment } from 'svelte/attachments';
|
|
5
5
|
import { Dimensions } from './dimensions.svelte.js';
|
|
6
|
+
export declare const contextmenu_context: {
|
|
7
|
+
get: (error_message?: string) => () => ContextmenuState;
|
|
8
|
+
get_maybe: () => (() => ContextmenuState) | undefined;
|
|
9
|
+
set: (value: () => ContextmenuState) => () => ContextmenuState;
|
|
10
|
+
};
|
|
11
|
+
export declare const contextmenu_submenu_context: {
|
|
12
|
+
get: (error_message?: string) => SubmenuState;
|
|
13
|
+
get_maybe: () => SubmenuState | undefined;
|
|
14
|
+
set: (value: SubmenuState) => SubmenuState;
|
|
15
|
+
};
|
|
16
|
+
export declare const contextmenu_dimensions_context: {
|
|
17
|
+
get: () => Dimensions;
|
|
18
|
+
set: (value?: Dimensions | undefined) => Dimensions;
|
|
19
|
+
};
|
|
6
20
|
export type ContextmenuParams = Snippet | {
|
|
7
21
|
snippet: 'link';
|
|
8
22
|
props: {
|
|
@@ -128,20 +142,6 @@ export interface ContextmenuOpenOptions {
|
|
|
128
142
|
* @returns a boolean indicating if the menu was opened or not
|
|
129
143
|
*/
|
|
130
144
|
export declare const contextmenu_open: (target: HTMLElement | SVGElement, x: number, y: number, contextmenu: ContextmenuState, options?: ContextmenuOpenOptions) => boolean;
|
|
131
|
-
export declare const contextmenu_context: {
|
|
132
|
-
get: (error_message?: string) => () => ContextmenuState;
|
|
133
|
-
get_maybe: () => (() => ContextmenuState) | undefined;
|
|
134
|
-
set: (value: () => ContextmenuState) => () => ContextmenuState;
|
|
135
|
-
};
|
|
136
|
-
export declare const contextmenu_submenu_context: {
|
|
137
|
-
get: (error_message?: string) => SubmenuState;
|
|
138
|
-
get_maybe: () => SubmenuState | undefined;
|
|
139
|
-
set: (value: SubmenuState) => SubmenuState;
|
|
140
|
-
};
|
|
141
|
-
export declare const contextmenu_dimensions_context: {
|
|
142
|
-
get: () => Dimensions;
|
|
143
|
-
set: (value?: Dimensions | undefined) => Dimensions;
|
|
144
|
-
};
|
|
145
145
|
/**
|
|
146
146
|
* Registers a contextmenu root and warns if multiple non-scoped roots are detected.
|
|
147
147
|
* Only active in development mode. Automatically handles cleanup on unmount.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contextmenu_state.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/contextmenu_state.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,OAAO,EAAC,MAAM,QAAQ,CAAC;AAC/C,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,4BAA4B,CAAC;AAGvD,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAExD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAIlD,MAAM,MAAM,iBAAiB,GAC1B,OAAO,GAEP;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAA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B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,GAC5B,QAAQ,WAAW,GAAG,UAAU,EAChC,GAAG,MAAM,EACT,GAAG,MAAM,EACT,aAAa,gBAAgB,EAC7B,UAAU,sBAAsB,KAC9B,OA8BF,CAAC;AAsDF;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,GAAI,YAAY,MAAM,OAAO,KAAG,IAuBzE,CAAC"}
|
|
@@ -5,6 +5,9 @@ import { EMPTY_OBJECT } from '@fuzdev/fuz_util/object.js';
|
|
|
5
5
|
import { Dimensions } from './dimensions.svelte.js';
|
|
6
6
|
import { create_context } from './context_helpers.js';
|
|
7
7
|
import { url_to_root_relative } from './library_helpers.js';
|
|
8
|
+
export const contextmenu_context = create_context();
|
|
9
|
+
export const contextmenu_submenu_context = create_context();
|
|
10
|
+
export const contextmenu_dimensions_context = create_context(() => new Dimensions());
|
|
8
11
|
export class EntryState {
|
|
9
12
|
is_menu = false; // TODO rename to `type`?
|
|
10
13
|
menu;
|
|
@@ -393,9 +396,6 @@ const contextmenu_query_params = (target) => {
|
|
|
393
396
|
}
|
|
394
397
|
return params;
|
|
395
398
|
};
|
|
396
|
-
export const contextmenu_context = create_context();
|
|
397
|
-
export const contextmenu_submenu_context = create_context();
|
|
398
|
-
export const contextmenu_dimensions_context = create_context(() => new Dimensions());
|
|
399
399
|
// Global registry of non-scoped contextmenu roots (only used in DEV)
|
|
400
400
|
const non_scoped_roots = new Set();
|
|
401
401
|
/**
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { SvelteMap, SvelteSet } from 'svelte/reactivity';
|
|
2
|
+
export declare const docs_links_context: {
|
|
3
|
+
get: (error_message?: string) => DocsLinks;
|
|
4
|
+
get_maybe: () => DocsLinks | undefined;
|
|
5
|
+
set: (value: DocsLinks) => DocsLinks;
|
|
6
|
+
};
|
|
2
7
|
/**
|
|
3
8
|
* Convert a string to a URL-safe fragment identifier, preserving case.
|
|
4
9
|
* Unlike `slugify` from `@fuzdev/fuz_util/path.js` which lowercases,
|
|
@@ -17,11 +22,6 @@ export declare const to_docs_path_info: (path_slug: string, pathname: string, ro
|
|
|
17
22
|
path_is_selected: boolean;
|
|
18
23
|
path_segment: string | undefined;
|
|
19
24
|
};
|
|
20
|
-
export declare const docs_links_context: {
|
|
21
|
-
get: (error_message?: string) => DocsLinks;
|
|
22
|
-
get_maybe: () => DocsLinks | undefined;
|
|
23
|
-
set: (value: DocsLinks) => DocsLinks;
|
|
24
|
-
};
|
|
25
25
|
export type DocsLinkTag = 'h2' | 'h3' | 'h4';
|
|
26
26
|
export interface DocsLinkInfo {
|
|
27
27
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs_helpers.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/docs_helpers.svelte.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAE,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAKvD;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,KAAG,MAY1C,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAU,CAAC;AACzC,eAAO,MAAM,SAAS,QAAmB,CAAC;AAC1C,eAAO,MAAM,aAAa,QAAqB,CAAC;AAEhD,eAAO,MAAM,iBAAiB,GAC7B,WAAW,MAAM,EACjB,UAAU,MAAM,EAChB,kBAA6B,KAC3B;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,gBAAgB,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;CAK5E,CAAC;AAEF,
|
|
1
|
+
{"version":3,"file":"docs_helpers.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/docs_helpers.svelte.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAE,SAAS,EAAC,MAAM,mBAAm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MAAM;IAkBT,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAIxB;;;OAGG;IACH,mBAAmB,IAAI,MAAM;CAG7B"}
|
|
@@ -2,6 +2,7 @@ import { resolve } from '$app/paths';
|
|
|
2
2
|
import { SvelteMap, SvelteSet } from 'svelte/reactivity';
|
|
3
3
|
import { ensure_end, ensure_start } from '@fuzdev/fuz_util/string.js';
|
|
4
4
|
import { create_context } from './context_helpers.js';
|
|
5
|
+
export const docs_links_context = create_context();
|
|
5
6
|
/**
|
|
6
7
|
* Convert a string to a URL-safe fragment identifier, preserving case.
|
|
7
8
|
* Unlike `slugify` from `@fuzdev/fuz_util/path.js` which lowercases,
|
|
@@ -31,7 +32,6 @@ export const to_docs_path_info = (path_slug, pathname, root_path = DOCS_PATH_DEF
|
|
|
31
32
|
const path_is_selected = path_segment === path_slug; // messy but works
|
|
32
33
|
return { path, path_is_selected, path_segment };
|
|
33
34
|
};
|
|
34
|
-
export const docs_links_context = create_context();
|
|
35
35
|
export class DocsLinks {
|
|
36
36
|
root_path;
|
|
37
37
|
links = new SvelteMap();
|
package/dist/library.svelte.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import type { LibraryJson } from '@fuzdev/fuz_util/library_json.js';
|
|
2
2
|
import { Declaration } from './declaration.svelte.js';
|
|
3
3
|
import { Module } from './module.svelte.js';
|
|
4
|
+
export declare const library_context: {
|
|
5
|
+
get: (error_message?: string) => Library;
|
|
6
|
+
get_maybe: () => Library | undefined;
|
|
7
|
+
set: (value: Library) => Library;
|
|
8
|
+
};
|
|
4
9
|
/**
|
|
5
10
|
* Normalizes a URL prefix: ensures leading `/`, strips trailing `/`, returns `''` for falsy and non-string values.
|
|
6
11
|
*/
|
|
@@ -207,9 +212,4 @@ export declare class Library {
|
|
|
207
212
|
*/
|
|
208
213
|
search_declarations(query: string): Array<Declaration>;
|
|
209
214
|
}
|
|
210
|
-
export declare const library_context: {
|
|
211
|
-
get: (error_message?: string) => Library;
|
|
212
|
-
get_maybe: () => Library | undefined;
|
|
213
|
-
set: (value: Library) => Library;
|
|
214
|
-
};
|
|
215
215
|
//# sourceMappingURL=library.svelte.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/library.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,kCAAkC,CAAC;AAIlE,OAAO,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAC;AAE1C;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,OAAO,OAAO,KAAG,MAGzD,CAAC;AAEF;;;;;;;;GAQG;AACH,qBAAa,OAAO;IACnB,QAAQ,CAAC,YAAY,EAAE,WAAW,CAAiB;IAEnD;;;;OAIG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B,QAAQ,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAA4C;IACjE,QAAQ,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAA2C;IAE/D,QAAQ,CAAC,IAAI,SAAoC;IACjD,QAAQ,CAAC,SAAS,SAAyC;IAC3D,QAAQ,CAAC,QAAQ,wCAAwC;IACzD,QAAQ,CAAC,UAAU,gBAA0C;IAC7D,QAAQ,CAAC,YAAY,+CAA4C;IACjE,QAAQ,CAAC,QAAQ,+CAAwC;IACzD,QAAQ,CAAC,QAAQ,SAAwC;IACzD,QAAQ,CAAC,OAAO,+CAAuC;IACvD,QAAQ,CAAC,aAAa,+CAA6C;IACnE,QAAQ,CAAC,SAAS,UAAyC;IAE3D;;OAEG;IACH,QAAQ,CAAC,OAAO,gBAMd;IAEF;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AQ,CAAC,SAAS,SAAyC;IAC3D,QAAQ,CAAC,QAAQ,wCAAwC;IACzD,QAAQ,CAAC,UAAU,gBAA0C;IAC7D,QAAQ,CAAC,YAAY,+CAA4C;IACjE,QAAQ,CAAC,QAAQ,+CAAwC;IACzD,QAAQ,CAAC,QAAQ,SAAwC;IACzD,QAAQ,CAAC,OAAO,+CAAuC;IACvD,QAAQ,CAAC,aAAa,+CAA6C;IACnE,QAAQ,CAAC,SAAS,UAAyC;IAE3D;;OAEG;IACH,QAAQ,CAAC,OAAO,gBAMd;IAEF;;OAEG;IACH,QAAQ,CAAC,OAAO,WAId;IAEF;;OAEG;IACH,QAAQ,CAAC,cAAc,WAErB;IAEF;;OAEG;IACH,QAAQ,CAAC,YAAY,gBAAmE;IAExF;;OAEG;IACH,QAAQ,CAAC,cAAc,sBAA2D;IAElF;;OAEG;IACH,QAAQ,CAAC,mBAAmB,2BAAgE;gBAEhF,YAAY,EAAE,WAAW,EAAE,UAAU,SAAK;IAKtD;;;OAGG;IACH,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI;IAW5D;;OAEG;IACH,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,WAAW,CAAC;CAGtD"}
|
package/dist/library.svelte.js
CHANGED
|
@@ -2,6 +2,7 @@ import { ensure_start, strip_end } from '@fuzdev/fuz_util/string.js';
|
|
|
2
2
|
import { create_context } from './context_helpers.js';
|
|
3
3
|
import { Declaration } from './declaration.svelte.js';
|
|
4
4
|
import { Module } from './module.svelte.js';
|
|
5
|
+
export const library_context = create_context();
|
|
5
6
|
/**
|
|
6
7
|
* Normalizes a URL prefix: ensures leading `/`, strips trailing `/`, returns `''` for falsy and non-string values.
|
|
7
8
|
*/
|
|
@@ -94,7 +95,6 @@ export class Library {
|
|
|
94
95
|
return library_search_declarations(this.declarations, query);
|
|
95
96
|
}
|
|
96
97
|
}
|
|
97
|
-
export const library_context = create_context();
|
|
98
98
|
/**
|
|
99
99
|
* Search declarations by query string with multi-term AND logic.
|
|
100
100
|
*/
|
package/dist/mdz_components.d.ts
CHANGED
|
@@ -1,20 +1,4 @@
|
|
|
1
1
|
import type { Component } from 'svelte';
|
|
2
|
-
/**
|
|
3
|
-
* Component registry for custom Svelte components that can be used in mdz content.
|
|
4
|
-
*
|
|
5
|
-
* For example, registering 'Alert' allows using `<Alert>...</Alert>` in mdz content.
|
|
6
|
-
*
|
|
7
|
-
* The Map values are the Svelte component constructors.
|
|
8
|
-
*/
|
|
9
|
-
export type MdzComponents = Map<string, Component<any, any>>;
|
|
10
|
-
/**
|
|
11
|
-
* Element registry for HTML elements that can be used in mdz content.
|
|
12
|
-
*
|
|
13
|
-
* For example, registering 'div' allows using `<div>...</div>` in mdz content.
|
|
14
|
-
*
|
|
15
|
-
* The Map values are boolean placeholders for future configuration options.
|
|
16
|
-
*/
|
|
17
|
-
export type MdzElements = Map<string, boolean>;
|
|
18
2
|
/**
|
|
19
3
|
* Context for providing custom mdz components.
|
|
20
4
|
* Must be set by the application using mdz.
|
|
@@ -46,4 +30,20 @@ export declare const mdz_base_context: {
|
|
|
46
30
|
get_maybe: () => (() => string | undefined) | undefined;
|
|
47
31
|
set: (value: () => string | undefined) => () => string | undefined;
|
|
48
32
|
};
|
|
33
|
+
/**
|
|
34
|
+
* Component registry for custom Svelte components that can be used in mdz content.
|
|
35
|
+
*
|
|
36
|
+
* For example, registering 'Alert' allows using `<Alert>...</Alert>` in mdz content.
|
|
37
|
+
*
|
|
38
|
+
* The Map values are the Svelte component constructors.
|
|
39
|
+
*/
|
|
40
|
+
export type MdzComponents = Map<string, Component<any, any>>;
|
|
41
|
+
/**
|
|
42
|
+
* Element registry for HTML elements that can be used in mdz content.
|
|
43
|
+
*
|
|
44
|
+
* For example, registering 'div' allows using `<div>...</div>` in mdz content.
|
|
45
|
+
*
|
|
46
|
+
* The Map values are boolean placeholders for future configuration options.
|
|
47
|
+
*/
|
|
48
|
+
export type MdzElements = Map<string, boolean>;
|
|
49
49
|
//# sourceMappingURL=mdz_components.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mdz_components.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/mdz_components.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,QAAQ,CAAC;AAItC
|
|
1
|
+
{"version":3,"file":"mdz_components.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/mdz_components.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,QAAQ,CAAC;AAItC;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;CAAkC,CAAC;AAEtE;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;;CAAgC,CAAC;AAElE;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB;2CAAwB,MAAM,GAAG,SAAS;4BAAlB,MAAM,GAAG,SAAS;uBAAlB,MAAM,GAAG,SAAS,WAAlB,MAAM,GAAG,SAAS;CAAG,CAAC;AAE3E;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AAE7D;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { StyleVariable } from '@fuzdev/fuz_css/variable.js';
|
|
2
|
-
export declare class SelectedStyleVariable {
|
|
3
|
-
value: StyleVariable | null;
|
|
4
|
-
constructor(initial?: StyleVariable | null);
|
|
5
|
-
}
|
|
6
2
|
export declare const selected_variable_context: {
|
|
7
3
|
get: () => SelectedStyleVariable;
|
|
8
4
|
set: (value?: SelectedStyleVariable | undefined) => SelectedStyleVariable;
|
|
9
5
|
};
|
|
6
|
+
export declare class SelectedStyleVariable {
|
|
7
|
+
value: StyleVariable | null;
|
|
8
|
+
constructor(initial?: StyleVariable | null);
|
|
9
|
+
}
|
|
10
10
|
//# sourceMappingURL=style_variable_helpers.svelte.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style_variable_helpers.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/style_variable_helpers.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"style_variable_helpers.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/style_variable_helpers.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,6BAA6B,CAAC;AAI/D,eAAO,MAAM,yBAAyB;;;CAAwD,CAAC;AAG/F,qBAAa,qBAAqB;IACjC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAiB;gBAEhC,OAAO,GAAE,aAAa,GAAG,IAAW;CAGhD"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { create_context } from './context_helpers.js';
|
|
2
|
+
export const selected_variable_context = create_context(() => new SelectedStyleVariable(null));
|
|
2
3
|
// TODO maybe change this to a generic wrapper class for any value?
|
|
3
4
|
export class SelectedStyleVariable {
|
|
4
5
|
value = $state.raw();
|
|
@@ -6,4 +7,3 @@ export class SelectedStyleVariable {
|
|
|
6
7
|
this.value = initial;
|
|
7
8
|
}
|
|
8
9
|
}
|
|
9
|
-
export const selected_variable_context = create_context(() => new SelectedStyleVariable(null));
|
package/dist/tome.d.ts
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import type { Component } from 'svelte';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
+
export declare const tomes_context: {
|
|
4
|
+
get: (error_message?: string) => () => Map<string, Tome>;
|
|
5
|
+
get_maybe: () => (() => Map<string, Tome>) | undefined;
|
|
6
|
+
set: (value: () => Map<string, Tome>) => () => Map<string, Tome>;
|
|
7
|
+
};
|
|
8
|
+
export declare const tome_context: {
|
|
9
|
+
get: (error_message?: string) => () => Tome;
|
|
10
|
+
get_maybe: () => (() => Tome) | undefined;
|
|
11
|
+
set: (value: () => Tome) => () => Tome;
|
|
12
|
+
};
|
|
3
13
|
export declare const Tome: z.ZodObject<{
|
|
4
14
|
slug: z.ZodString;
|
|
5
15
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -18,15 +28,5 @@ export declare const tome_to_pathname: (item: Tome | string, docs_path?: string,
|
|
|
18
28
|
* The display label for a tome — its `title` if set, else its `slug`.
|
|
19
29
|
*/
|
|
20
30
|
export declare const tome_to_title: (tome: Tome) => string;
|
|
21
|
-
export declare const tomes_context: {
|
|
22
|
-
get: (error_message?: string) => () => Map<string, Tome>;
|
|
23
|
-
get_maybe: () => (() => Map<string, Tome>) | undefined;
|
|
24
|
-
set: (value: () => Map<string, Tome>) => () => Map<string, Tome>;
|
|
25
|
-
};
|
|
26
31
|
export declare const tome_get_by_slug: (slug: string) => Tome;
|
|
27
|
-
export declare const tome_context: {
|
|
28
|
-
get: (error_message?: string) => () => Tome;
|
|
29
|
-
get_maybe: () => (() => Tome) | undefined;
|
|
30
|
-
set: (value: () => Tome) => () => Tome;
|
|
31
|
-
};
|
|
32
32
|
//# sourceMappingURL=tome.d.ts.map
|
package/dist/tome.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tome.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/tome.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAMtB,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"tome.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/tome.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAMtB,eAAO,MAAM,aAAa;2CAAwB,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC;4BAAjB,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC;uBAAjB,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,WAAjB,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC;CAAG,CAAC;AAEvE,eAAO,MAAM,YAAY;2CAAwB,IAAI;4BAAJ,IAAI;uBAAJ,IAAI,WAAJ,IAAI;CAAG,CAAC;AAEzD,eAAO,MAAM,IAAI;;;;;;;;iBAoBf,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAExC;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAC5B,MAAM,IAAI,GAAG,MAAM,EACnB,kBAA6B,EAC7B,OAAO,MAAM,KACX,MAIF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,MAAM,IAAI,KAAG,MAAiC,CAAC;AAE7E,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,KAAG,IAK/C,CAAC"}
|
package/dist/tome.js
CHANGED
|
@@ -3,6 +3,8 @@ import { z } from 'zod';
|
|
|
3
3
|
import { ensure_start } from '@fuzdev/fuz_util/string.js';
|
|
4
4
|
import { create_context } from './context_helpers.js';
|
|
5
5
|
import { DOCS_PATH_DEFAULT } from './docs_helpers.svelte.js';
|
|
6
|
+
export const tomes_context = create_context();
|
|
7
|
+
export const tome_context = create_context();
|
|
6
8
|
export const Tome = z.object({
|
|
7
9
|
/**
|
|
8
10
|
* Stable identifier and URL path segment — must be a URL-safe slug
|
|
@@ -36,7 +38,6 @@ export const tome_to_pathname = (item, docs_path = DOCS_PATH_DEFAULT, hash) => {
|
|
|
36
38
|
* The display label for a tome — its `title` if set, else its `slug`.
|
|
37
39
|
*/
|
|
38
40
|
export const tome_to_title = (tome) => tome.title ?? tome.slug;
|
|
39
|
-
export const tomes_context = create_context();
|
|
40
41
|
export const tome_get_by_slug = (slug) => {
|
|
41
42
|
const get_tomes = tomes_context.get();
|
|
42
43
|
const tome = get_tomes().get(slug);
|
|
@@ -44,4 +45,3 @@ export const tome_get_by_slug = (slug) => {
|
|
|
44
45
|
throw Error(`unable to find tome "${slug}"`);
|
|
45
46
|
return tome;
|
|
46
47
|
};
|
|
47
|
-
export const tome_context = create_context();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fuzdev/fuz_ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.194.0",
|
|
4
4
|
"description": "Svelte UI library",
|
|
5
5
|
"tagline": "friendly user zystem",
|
|
6
6
|
"glyph": "🧶",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@changesets/changelog-git": "^0.2.1",
|
|
83
83
|
"@fuzdev/fuz_code": "^0.45.1",
|
|
84
|
-
"@fuzdev/fuz_css": "^0.
|
|
84
|
+
"@fuzdev/fuz_css": "^0.60.0",
|
|
85
85
|
"@fuzdev/fuz_util": "^0.61.1",
|
|
86
86
|
"@fuzdev/gro": "^0.199.1",
|
|
87
87
|
"@jridgewell/trace-mapping": "^0.3.31",
|
|
@@ -10,6 +10,12 @@ import {Dimensions} from './dimensions.svelte.js';
|
|
|
10
10
|
import {create_context} from './context_helpers.js';
|
|
11
11
|
import {url_to_root_relative} from './library_helpers.js';
|
|
12
12
|
|
|
13
|
+
export const contextmenu_context = create_context<() => ContextmenuState>();
|
|
14
|
+
|
|
15
|
+
export const contextmenu_submenu_context = create_context<SubmenuState>();
|
|
16
|
+
|
|
17
|
+
export const contextmenu_dimensions_context = create_context(() => new Dimensions());
|
|
18
|
+
|
|
13
19
|
export type ContextmenuParams =
|
|
14
20
|
| Snippet
|
|
15
21
|
// TODO maybe this should be generic?
|
|
@@ -475,12 +481,6 @@ const contextmenu_query_params = (
|
|
|
475
481
|
return params;
|
|
476
482
|
};
|
|
477
483
|
|
|
478
|
-
export const contextmenu_context = create_context<() => ContextmenuState>();
|
|
479
|
-
|
|
480
|
-
export const contextmenu_submenu_context = create_context<SubmenuState>();
|
|
481
|
-
|
|
482
|
-
export const contextmenu_dimensions_context = create_context(() => new Dimensions());
|
|
483
|
-
|
|
484
484
|
// Global registry of non-scoped contextmenu roots (only used in DEV)
|
|
485
485
|
const non_scoped_roots: Set<symbol> = new Set();
|
|
486
486
|
|
|
@@ -4,6 +4,8 @@ import {ensure_end, ensure_start} from '@fuzdev/fuz_util/string.js';
|
|
|
4
4
|
|
|
5
5
|
import {create_context} from './context_helpers.js';
|
|
6
6
|
|
|
7
|
+
export const docs_links_context = create_context<DocsLinks>();
|
|
8
|
+
|
|
7
9
|
/**
|
|
8
10
|
* Convert a string to a URL-safe fragment identifier, preserving case.
|
|
9
11
|
* Unlike `slugify` from `@fuzdev/fuz_util/path.js` which lowercases,
|
|
@@ -42,8 +44,6 @@ export const to_docs_path_info = (
|
|
|
42
44
|
return {path, path_is_selected, path_segment};
|
|
43
45
|
};
|
|
44
46
|
|
|
45
|
-
export const docs_links_context = create_context<DocsLinks>();
|
|
46
|
-
|
|
47
47
|
export type DocsLinkTag = 'h2' | 'h3' | 'h4';
|
|
48
48
|
|
|
49
49
|
export interface DocsLinkInfo {
|
|
@@ -5,6 +5,8 @@ import {create_context} from './context_helpers.js';
|
|
|
5
5
|
import {Declaration} from './declaration.svelte.js';
|
|
6
6
|
import {Module} from './module.svelte.js';
|
|
7
7
|
|
|
8
|
+
export const library_context = create_context<Library>();
|
|
9
|
+
|
|
8
10
|
/**
|
|
9
11
|
* Normalizes a URL prefix: ensures leading `/`, strips trailing `/`, returns `''` for falsy and non-string values.
|
|
10
12
|
*/
|
|
@@ -116,8 +118,6 @@ export class Library {
|
|
|
116
118
|
}
|
|
117
119
|
}
|
|
118
120
|
|
|
119
|
-
export const library_context = create_context<Library>();
|
|
120
|
-
|
|
121
121
|
/**
|
|
122
122
|
* Search declarations by query string with multi-term AND logic.
|
|
123
123
|
*/
|
|
@@ -2,24 +2,6 @@ import type {Component} from 'svelte';
|
|
|
2
2
|
|
|
3
3
|
import {create_context} from './context_helpers.js';
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* Component registry for custom Svelte components that can be used in mdz content.
|
|
7
|
-
*
|
|
8
|
-
* For example, registering 'Alert' allows using `<Alert>...</Alert>` in mdz content.
|
|
9
|
-
*
|
|
10
|
-
* The Map values are the Svelte component constructors.
|
|
11
|
-
*/
|
|
12
|
-
export type MdzComponents = Map<string, Component<any, any>>; // TODO support params
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Element registry for HTML elements that can be used in mdz content.
|
|
16
|
-
*
|
|
17
|
-
* For example, registering 'div' allows using `<div>...</div>` in mdz content.
|
|
18
|
-
*
|
|
19
|
-
* The Map values are boolean placeholders for future configuration options.
|
|
20
|
-
*/
|
|
21
|
-
export type MdzElements = Map<string, boolean>;
|
|
22
|
-
|
|
23
5
|
/**
|
|
24
6
|
* Context for providing custom mdz components.
|
|
25
7
|
* Must be set by the application using mdz.
|
|
@@ -41,3 +23,21 @@ export const mdz_elements_context = create_context<MdzElements>();
|
|
|
41
23
|
* When not set, relative paths use raw hrefs (browser resolves them).
|
|
42
24
|
*/
|
|
43
25
|
export const mdz_base_context = create_context<() => string | undefined>();
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Component registry for custom Svelte components that can be used in mdz content.
|
|
29
|
+
*
|
|
30
|
+
* For example, registering 'Alert' allows using `<Alert>...</Alert>` in mdz content.
|
|
31
|
+
*
|
|
32
|
+
* The Map values are the Svelte component constructors.
|
|
33
|
+
*/
|
|
34
|
+
export type MdzComponents = Map<string, Component<any, any>>; // TODO support params
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Element registry for HTML elements that can be used in mdz content.
|
|
38
|
+
*
|
|
39
|
+
* For example, registering 'div' allows using `<div>...</div>` in mdz content.
|
|
40
|
+
*
|
|
41
|
+
* The Map values are boolean placeholders for future configuration options.
|
|
42
|
+
*/
|
|
43
|
+
export type MdzElements = Map<string, boolean>;
|
|
@@ -2,6 +2,8 @@ import type {StyleVariable} from '@fuzdev/fuz_css/variable.js';
|
|
|
2
2
|
|
|
3
3
|
import {create_context} from './context_helpers.js';
|
|
4
4
|
|
|
5
|
+
export const selected_variable_context = create_context(() => new SelectedStyleVariable(null));
|
|
6
|
+
|
|
5
7
|
// TODO maybe change this to a generic wrapper class for any value?
|
|
6
8
|
export class SelectedStyleVariable {
|
|
7
9
|
value: StyleVariable | null = $state.raw()!;
|
|
@@ -10,5 +12,3 @@ export class SelectedStyleVariable {
|
|
|
10
12
|
this.value = initial;
|
|
11
13
|
}
|
|
12
14
|
}
|
|
13
|
-
|
|
14
|
-
export const selected_variable_context = create_context(() => new SelectedStyleVariable(null));
|
package/src/lib/tome.ts
CHANGED
|
@@ -6,6 +6,10 @@ import {ensure_start} from '@fuzdev/fuz_util/string.js';
|
|
|
6
6
|
import {create_context} from './context_helpers.js';
|
|
7
7
|
import {DOCS_PATH_DEFAULT} from './docs_helpers.svelte.js';
|
|
8
8
|
|
|
9
|
+
export const tomes_context = create_context<() => Map<string, Tome>>();
|
|
10
|
+
|
|
11
|
+
export const tome_context = create_context<() => Tome>();
|
|
12
|
+
|
|
9
13
|
export const Tome = z.object({
|
|
10
14
|
/**
|
|
11
15
|
* Stable identifier and URL path segment — must be a URL-safe slug
|
|
@@ -47,13 +51,9 @@ export const tome_to_pathname = (
|
|
|
47
51
|
*/
|
|
48
52
|
export const tome_to_title = (tome: Tome): string => tome.title ?? tome.slug;
|
|
49
53
|
|
|
50
|
-
export const tomes_context = create_context<() => Map<string, Tome>>();
|
|
51
|
-
|
|
52
54
|
export const tome_get_by_slug = (slug: string): Tome => {
|
|
53
55
|
const get_tomes = tomes_context.get();
|
|
54
56
|
const tome = get_tomes().get(slug);
|
|
55
57
|
if (!tome) throw Error(`unable to find tome "${slug}"`);
|
|
56
58
|
return tome;
|
|
57
59
|
};
|
|
58
|
-
|
|
59
|
-
export const tome_context = create_context<() => Tome>();
|