@fairfox/polly 0.74.1 → 0.75.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.
@@ -12,14 +12,18 @@
12
12
  * one the primitive sets itself (`data-polly-*`, etc.).
13
13
  */
14
14
  /** Index signatures letting a primitive's props accept arbitrary
15
- * `data-*` and `aria-*` attributes. */
15
+ * `data-*` and `aria-*` attributes, plus the standard `title`
16
+ * attribute — a native tooltip is a DOM hook, not styling, so it
17
+ * rides the same passthrough path (polly#135). */
16
18
  export type PassthroughAttrs = {
17
19
  [dataAttr: `data-${string}`]: string | number | boolean | undefined;
18
20
  [ariaAttr: `aria-${string}`]: string | number | boolean | undefined;
21
+ /** Native tooltip text, forwarded to the rendered root element. */
22
+ title?: string;
19
23
  };
20
24
  /**
21
- * Collect `data-*` and `aria-*` attributes from a props object so they
22
- * can be spread onto a primitive's root element. `undefined` values and
23
- * non-attribute value types (functions, objects) are dropped.
25
+ * Collect `data-*` / `aria-*` / `title` attributes from a props object
26
+ * so they can be spread onto a primitive's root element. `undefined`
27
+ * values and non-attribute value types (functions, objects) are dropped.
24
28
  */
25
29
  export declare function collectPassthrough(props: Record<string, unknown>): Record<string, string | number | boolean>;
@@ -14,6 +14,10 @@
14
14
  *
15
15
  * <ActionInput value={note.body} action="note:update" variant="multi" renderView={renderMarkdown} />
16
16
  * ```
17
+ *
18
+ * The wrapper carries `data-polly-markdown` so styles.css can keep a
19
+ * fenced code block width-bounded — a long command line would
20
+ * otherwise push a narrow viewport sideways (polly#135).
17
21
  */
18
22
  import type { JSX } from "preact";
19
23
  export declare function renderMarkdown(value: string): JSX.Element;
@@ -2465,6 +2465,8 @@ function renderMarkdown(value) {
2465
2465
  const html2 = g.parse(value, { async: false });
2466
2466
  const clean = purify.sanitize(html2);
2467
2467
  return /* @__PURE__ */ jsxDEV("div", {
2468
+ "data-polly-ui": true,
2469
+ "data-polly-markdown": true,
2468
2470
  dangerouslySetInnerHTML: { __html: clean }
2469
2471
  }, undefined, false, undefined, this);
2470
2472
  }
@@ -2472,4 +2474,4 @@ export {
2472
2474
  renderMarkdown
2473
2475
  };
2474
2476
 
2475
- //# debugId=838F31153F2D9D9F64756E2164756E21
2477
+ //# debugId=FA2D57B12BC8108164756E2164756E21