@fuzdev/fuz_ui 0.185.0 → 0.185.2

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.
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Svelte 5 attachment that focuses an element on mount.
3
+ *
4
+ * @module
5
+ */
6
+ import type { Attachment } from 'svelte/attachments';
7
+ /**
8
+ * Creates an attachment that focuses the element on mount.
9
+ * Use this instead of the HTML `autofocus` attribute for elements
10
+ * that mount dynamically from reactive conditionals like `{#if}`.
11
+ * @param options - focus options forwarded to `element.focus()`; defaults to `{focusVisible: true}` to show focus indicators on programmatic focus
12
+ */
13
+ export declare const autofocus: (options?: FocusOptions) => Attachment<HTMLElement | SVGElement>;
14
+ //# sourceMappingURL=autofocus.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"autofocus.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/autofocus.svelte.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,oBAAoB,CAAC;AAEnD;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GACpB,UAAU,YAAY,KAAG,UAAU,CAAC,WAAW,GAAG,UAAU,CAI5D,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Svelte 5 attachment that focuses an element on mount.
3
+ *
4
+ * @module
5
+ */
6
+ /**
7
+ * Creates an attachment that focuses the element on mount.
8
+ * Use this instead of the HTML `autofocus` attribute for elements
9
+ * that mount dynamically from reactive conditionals like `{#if}`.
10
+ * @param options - focus options forwarded to `element.focus()`; defaults to `{focusVisible: true}` to show focus indicators on programmatic focus
11
+ */
12
+ export const autofocus = (options) => (el) => {
13
+ // focusVisible missing from TS lib.dom.d.ts as of 5.9
14
+ el.focus({ focusVisible: true, ...options });
15
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"declaration.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/declaration.sv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names":[],"mappings":"AAAA,OAAO,EACN,KAAK,eAAe,EAGpB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAC;AAK/C;;GAEG;AACH,qBAAa,WAAW;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAiB;IACxC,QAAQ,CAAC,gBAAgB,EAAE,eAAe,CAAiB;IAE3D,OAAO,wCAAiC;IAExC;;OAEG;IACH,WAAW,SAA8B;IAEzC,IAAI,SAAwC;IAC5C,IAAI,4FAAwC;IAE5C;;OAEG;IACH,UAAU,qBAQR;IAEF;;OAEG;IACH,OAAO,SAAoF;IAE3F;;OAEG;IACH,gBAAgB,SAMd;IAEF;;OAEG;IACH,YAAY,qBAIV;IAEF;;OAEG;IACH,YAAY,SAAiE;IAE7E,cAAc,qBAAkD;IAChE,WAAW,qBAA+C;IAC1D,kBAAkB,qBAAsD;IACxE,UAAU;;;;;;;oBAA8C;IACxD,KAAK;;;;;;;;;;;;;;;;;oBAAyC;IAC9C,WAAW,qBAA+C;IAC1D,kBAAkB,qBAAsD;IACxE,cAAc;;;;;oBAAkD;IAChE,OAAO,uBAA2C;IAClD,UAAU,uBAA8C;IACxD,MAAM;;;;oBAA0C;IAChD,KAAK,qBAAyC;IAC9C,QAAQ,uBAA4C;IACpD,QAAQ,uBAA4C;IACpD,OAAO,EAAE,KAAK,CAAC,eAAe,CAAC,GAAG,SAAS,CAEzC;IACF,UAAU,EAAE,KAAK,CAAC,eAAe,CAAC,GAAG,SAAS,CAE5C;IAEF,YAAY,UAA2D;IACvE,aAAa,UAAuC;IACpD,iBAAiB,UAAgC;IACjD,cAAc,UAA+D;IAC7E,SAAS,UAAqD;IAC9D,YAAY,UAAuE;gBAEvE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,eAAe;CAI7D"}
@@ -1,5 +1,6 @@
1
1
  import { declaration_generate_import, declaration_get_display_name, } from '@fuzdev/fuz_util/source_json.js';
2
2
  import { url_github_file } from './package_helpers.js';
3
+ /* eslint-disable @typescript-eslint/no-deprecated */
3
4
  /**
4
5
  * Rich runtime representation of an exported declaration.
5
6
  */
@@ -140,7 +140,7 @@ export const ts_analyze_module_exports = (source_file, checker, options, ctx) =>
140
140
  const decl = {
141
141
  name: export_symbol.name,
142
142
  kind,
143
- alias_of: { module: original_module, name: original_name },
143
+ alias_of: { module: original_module, name: original_name, kind },
144
144
  };
145
145
  // Renamed re-exports aren't nodocs - they're new declarations pointing to the original
146
146
  declarations.push({ declaration: decl, nodocs: false });
@@ -30,7 +30,8 @@
30
30
  * ## Behavioral notes
31
31
  *
32
32
  * Due to TS Compiler API limitations:
33
- * - Preserves dash separator in `@param` descriptions: `@param x desc` `"- desc"`
33
+ * - `@param` and `@mutates` descriptions have leading `- ` stripped for visual consistency
34
+ * (TSDoc spec uses `@param name - description` but the separator is aesthetic)
34
35
  * - `@throws` tags have `{Type}` stripped by TS API; fallback regex extracts first word as error type
35
36
  * - TS API strips URL protocols from `@see` tag text; we use `getText()` to preserve original format including `{@link}` syntax
36
37
  *
@@ -1 +1 @@
1
- {"version":3,"file":"tsdoc_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/tsdoc_helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,MAAM,CAAC,EAAE,KAAK,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,WA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jB,mCAAmC;IACnC,MAAM,CAAC,EAAE,KAAK,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAC,CAAC,CAAC;IACrD,oCAAoC;IACpC,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzB,6CAA6C;IAC7C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,qCAAqC;IACrC,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzB,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxB,iEAAiE;IACjE,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,WAAW,GACvB,MAAM,EAAE,CAAC,IAAI,EACb,aAAa,EAAE,CAAC,UAAU,KACxB,kBAAkB,GAAG,SAyFvB,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,GACtC,aAAa,eAAe,EAC5B,OAAO,kBAAkB,GAAG,SAAS,KACnC,IAmBF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,GAAI,cAAc,MAAM,KAAG,MAAM,GAAG,SAUnE,CAAC"}
@@ -30,7 +30,8 @@
30
30
  * ## Behavioral notes
31
31
  *
32
32
  * Due to TS Compiler API limitations:
33
- * - Preserves dash separator in `@param` descriptions: `@param x desc` `"- desc"`
33
+ * - `@param` and `@mutates` descriptions have leading `- ` stripped for visual consistency
34
+ * (TSDoc spec uses `@param name - description` but the separator is aesthetic)
34
35
  * - `@throws` tags have `{Type}` stripped by TS API; fallback regex extracts first word as error type
35
36
  * - TS API strips URL protocols from `@see` tag text; we use `getText()` to preserve original format including `{@link}` syntax
36
37
  *
@@ -88,7 +89,7 @@ export const tsdoc_parse = (node, source_file) => {
88
89
  // Extract parameter name and description
89
90
  const param_name = ts.isIdentifier(tag.name) ? tag.name.text : tag.name.getText();
90
91
  if (param_name && tag_text) {
91
- params.set(param_name, tag_text.trim());
92
+ params.set(param_name, tag_text.trim().replace(/^-\s+/, ''));
92
93
  }
93
94
  }
94
95
  else if (tag_name === 'returns' && tag_text) {
@@ -127,7 +128,7 @@ export const tsdoc_parse = (node, source_file) => {
127
128
  since = tag_text.trim();
128
129
  }
129
130
  else if (tag_name === 'mutates' && tag_text) {
130
- mutates.push(tag_text.trim());
131
+ mutates.push(tag_text.trim().replace(/^-\s+/, ''));
131
132
  }
132
133
  else if (tag_name === 'nodocs') {
133
134
  nodocs = true;
@@ -16,8 +16,9 @@
16
16
  * - `{@link identifier}` → `` `identifier` `` (code formatting)
17
17
  * - Bare URLs → returned as-is
18
18
  * - Bare identifiers → wrapped in backticks
19
+ * - `identifier description text` → `` `identifier` description text `` (first token is the reference)
19
20
  *
20
- * @param content Raw `@see` tag content in TSDoc format
21
+ * @param content - raw `@see` tag content in TSDoc format
21
22
  * @returns mdz-formatted string ready for `Mdz` component
22
23
  *
23
24
  * @example
@@ -30,6 +31,9 @@
30
31
  *
31
32
  * tsdoc_see_to_mdz('https://example.com')
32
33
  * // → 'https://example.com'
34
+ *
35
+ * tsdoc_see_to_mdz('library_gen.ts for Gro-specific integration')
36
+ * // → '`library_gen.ts` for Gro-specific integration'
33
37
  * ```
34
38
  */
35
39
  export declare const tsdoc_see_to_mdz: (content: string) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"tsdoc_mdz.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/tsdoc_mdz.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,gBAAgB,GAAI,SAAS,MAAM,KAAG,MAqBlD,CAAC"}
1
+ {"version":3,"file":"tsdoc_mdz.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/tsdoc_mdz.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,gBAAgB,GAAI,SAAS,MAAM,KAAG,MA6BlD,CAAC"}
package/dist/tsdoc_mdz.js CHANGED
@@ -19,8 +19,9 @@ const format_reference = (ref) => (mdz_is_url(ref) ? ref : `\`${ref}\``);
19
19
  * - `{@link identifier}` → `` `identifier` `` (code formatting)
20
20
  * - Bare URLs → returned as-is
21
21
  * - Bare identifiers → wrapped in backticks
22
+ * - `identifier description text` → `` `identifier` description text `` (first token is the reference)
22
23
  *
23
- * @param content Raw `@see` tag content in TSDoc format
24
+ * @param content - raw `@see` tag content in TSDoc format
24
25
  * @returns mdz-formatted string ready for `Mdz` component
25
26
  *
26
27
  * @example
@@ -33,6 +34,9 @@ const format_reference = (ref) => (mdz_is_url(ref) ? ref : `\`${ref}\``);
33
34
  *
34
35
  * tsdoc_see_to_mdz('https://example.com')
35
36
  * // → 'https://example.com'
37
+ *
38
+ * tsdoc_see_to_mdz('library_gen.ts for Gro-specific integration')
39
+ * // → '`library_gen.ts` for Gro-specific integration'
36
40
  * ```
37
41
  */
38
42
  export const tsdoc_see_to_mdz = (content) => {
@@ -52,5 +56,12 @@ export const tsdoc_see_to_mdz = (content) => {
52
56
  }
53
57
  return format_reference(inner);
54
58
  }
55
- return format_reference(trimmed);
59
+ // Split at first whitespace: first token is the reference, rest is description
60
+ const space_index = trimmed.indexOf(' ');
61
+ if (space_index === -1) {
62
+ return format_reference(trimmed);
63
+ }
64
+ const reference = trimmed.slice(0, space_index);
65
+ const description = trimmed.slice(space_index); // preserve leading space
66
+ return format_reference(reference) + description;
56
67
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fuzdev/fuz_ui",
3
- "version": "0.185.0",
3
+ "version": "0.185.2",
4
4
  "description": "Svelte UI library",
5
5
  "motto": "friendly user zystem",
6
6
  "glyph": "🧶",
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Svelte 5 attachment that focuses an element on mount.
3
+ *
4
+ * @module
5
+ */
6
+
7
+ import type {Attachment} from 'svelte/attachments';
8
+
9
+ /**
10
+ * Creates an attachment that focuses the element on mount.
11
+ * Use this instead of the HTML `autofocus` attribute for elements
12
+ * that mount dynamically from reactive conditionals like `{#if}`.
13
+ * @param options - focus options forwarded to `element.focus()`; defaults to `{focusVisible: true}` to show focus indicators on programmatic focus
14
+ */
15
+ export const autofocus =
16
+ (options?: FocusOptions): Attachment<HTMLElement | SVGElement> =>
17
+ (el) => {
18
+ // focusVisible missing from TS lib.dom.d.ts as of 5.9
19
+ el.focus({focusVisible: true, ...options} as FocusOptions);
20
+ };
@@ -7,6 +7,8 @@ import {
7
7
  import type {Module} from './module.svelte.js';
8
8
  import {url_github_file} from './package_helpers.js';
9
9
 
10
+ /* eslint-disable @typescript-eslint/no-deprecated */
11
+
10
12
  /**
11
13
  * Rich runtime representation of an exported declaration.
12
14
  */
@@ -228,7 +228,7 @@ export const ts_analyze_module_exports = (
228
228
  const decl: DeclarationJson = {
229
229
  name: export_symbol.name,
230
230
  kind,
231
- alias_of: {module: original_module, name: original_name},
231
+ alias_of: {module: original_module, name: original_name, kind},
232
232
  };
233
233
  // Renamed re-exports aren't nodocs - they're new declarations pointing to the original
234
234
  declarations.push({declaration: decl, nodocs: false});
@@ -30,7 +30,8 @@
30
30
  * ## Behavioral notes
31
31
  *
32
32
  * Due to TS Compiler API limitations:
33
- * - Preserves dash separator in `@param` descriptions: `@param x desc` `"- desc"`
33
+ * - `@param` and `@mutates` descriptions have leading `- ` stripped for visual consistency
34
+ * (TSDoc spec uses `@param name - description` but the separator is aesthetic)
34
35
  * - `@throws` tags have `{Type}` stripped by TS API; fallback regex extracts first word as error type
35
36
  * - TS API strips URL protocols from `@see` tag text; we use `getText()` to preserve original format including `{@link}` syntax
36
37
  *
@@ -125,7 +126,7 @@ export const tsdoc_parse = (
125
126
  // Extract parameter name and description
126
127
  const param_name = ts.isIdentifier(tag.name) ? tag.name.text : tag.name.getText();
127
128
  if (param_name && tag_text) {
128
- params.set(param_name, tag_text.trim());
129
+ params.set(param_name, tag_text.trim().replace(/^-\s+/, ''));
129
130
  }
130
131
  } else if (tag_name === 'returns' && tag_text) {
131
132
  returns = tag_text.trim();
@@ -157,7 +158,7 @@ export const tsdoc_parse = (
157
158
  } else if (tag_name === 'since' && tag_text) {
158
159
  since = tag_text.trim();
159
160
  } else if (tag_name === 'mutates' && tag_text) {
160
- mutates.push(tag_text.trim());
161
+ mutates.push(tag_text.trim().replace(/^-\s+/, ''));
161
162
  } else if (tag_name === 'nodocs') {
162
163
  nodocs = true;
163
164
  }
@@ -22,8 +22,9 @@ const format_reference = (ref: string): string => (mdz_is_url(ref) ? ref : `\`${
22
22
  * - `{@link identifier}` → `` `identifier` `` (code formatting)
23
23
  * - Bare URLs → returned as-is
24
24
  * - Bare identifiers → wrapped in backticks
25
+ * - `identifier description text` → `` `identifier` description text `` (first token is the reference)
25
26
  *
26
- * @param content Raw `@see` tag content in TSDoc format
27
+ * @param content - raw `@see` tag content in TSDoc format
27
28
  * @returns mdz-formatted string ready for `Mdz` component
28
29
  *
29
30
  * @example
@@ -36,6 +37,9 @@ const format_reference = (ref: string): string => (mdz_is_url(ref) ? ref : `\`${
36
37
  *
37
38
  * tsdoc_see_to_mdz('https://example.com')
38
39
  * // → 'https://example.com'
40
+ *
41
+ * tsdoc_see_to_mdz('library_gen.ts for Gro-specific integration')
42
+ * // → '`library_gen.ts` for Gro-specific integration'
39
43
  * ```
40
44
  */
41
45
  export const tsdoc_see_to_mdz = (content: string): string => {
@@ -58,5 +62,13 @@ export const tsdoc_see_to_mdz = (content: string): string => {
58
62
  return format_reference(inner);
59
63
  }
60
64
 
61
- return format_reference(trimmed);
65
+ // Split at first whitespace: first token is the reference, rest is description
66
+ const space_index = trimmed.indexOf(' ');
67
+ if (space_index === -1) {
68
+ return format_reference(trimmed);
69
+ }
70
+
71
+ const reference = trimmed.slice(0, space_index);
72
+ const description = trimmed.slice(space_index); // preserve leading space
73
+ return format_reference(reference) + description;
62
74
  };