@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.
- package/dist/src/polly-ui/Collapsible.d.ts +3 -1
- package/dist/src/polly-ui/Dropdown.d.ts +3 -1
- package/dist/src/polly-ui/FileInput.d.ts +25 -0
- package/dist/src/polly-ui/Html.d.ts +21 -0
- package/dist/src/polly-ui/Layout.d.ts +2 -1
- package/dist/src/polly-ui/Link.d.ts +25 -0
- package/dist/src/polly-ui/Output.d.ts +26 -0
- package/dist/src/polly-ui/Surface.d.ts +20 -3
- package/dist/src/polly-ui/Text.d.ts +2 -0
- package/dist/src/polly-ui/index.css +102 -1
- package/dist/src/polly-ui/index.d.ts +4 -0
- package/dist/src/polly-ui/index.js +168 -42
- package/dist/src/polly-ui/index.js.map +13 -9
- package/dist/src/polly-ui/internal/passthrough.d.ts +8 -4
- package/dist/src/polly-ui/markdown.d.ts +4 -0
- package/dist/src/polly-ui/markdown.js +3 -1
- package/dist/src/polly-ui/markdown.js.map +3 -3
- package/dist/src/polly-ui/styles.css +111 -1
- package/package.json +1 -1
|
@@ -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-*`
|
|
22
|
-
* can be spread onto a primitive's root element. `undefined`
|
|
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=
|
|
2477
|
+
//# debugId=FA2D57B12BC8108164756E2164756E21
|