@mcpview/components 0.0.0-stage → 0.11.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.
Files changed (155) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +593 -2
  3. package/esm/_dnt.polyfills.d.ts +12 -0
  4. package/esm/_dnt.polyfills.d.ts.map +1 -0
  5. package/esm/_dnt.polyfills.js +15 -0
  6. package/esm/fonts.d.ts +13 -0
  7. package/esm/fonts.d.ts.map +1 -0
  8. package/esm/fonts.js +12 -0
  9. package/esm/layout.d.ts +14 -0
  10. package/esm/layout.d.ts.map +1 -0
  11. package/esm/layout.js +13 -0
  12. package/esm/mod.d.ts +19 -0
  13. package/esm/mod.d.ts.map +1 -0
  14. package/esm/mod.js +14 -0
  15. package/esm/package.json +3 -0
  16. package/esm/preact-components.d.ts +22 -0
  17. package/esm/preact-components.d.ts.map +1 -0
  18. package/esm/preact-components.js +20 -0
  19. package/esm/preact.d.ts +10 -0
  20. package/esm/preact.d.ts.map +1 -0
  21. package/esm/preact.js +9 -0
  22. package/esm/src/component-primitives.d.ts +41 -0
  23. package/esm/src/component-primitives.d.ts.map +1 -0
  24. package/esm/src/component-primitives.js +121 -0
  25. package/esm/src/components.d.ts +50 -0
  26. package/esm/src/components.d.ts.map +1 -0
  27. package/esm/src/components.js +283 -0
  28. package/esm/src/font-families.d.ts +16 -0
  29. package/esm/src/font-families.d.ts.map +1 -0
  30. package/esm/src/font-families.js +11 -0
  31. package/esm/src/fonts-data.d.ts +2 -0
  32. package/esm/src/fonts-data.d.ts.map +1 -0
  33. package/esm/src/fonts-data.js +42 -0
  34. package/esm/src/fonts.d.ts +12 -0
  35. package/esm/src/fonts.d.ts.map +1 -0
  36. package/esm/src/fonts.js +19 -0
  37. package/esm/src/i18n.d.ts +44 -0
  38. package/esm/src/i18n.d.ts.map +1 -0
  39. package/esm/src/i18n.js +98 -0
  40. package/esm/src/layout/hooks.d.ts +60 -0
  41. package/esm/src/layout/hooks.d.ts.map +1 -0
  42. package/esm/src/layout/hooks.js +121 -0
  43. package/esm/src/layout/mod.d.ts +6 -0
  44. package/esm/src/layout/mod.d.ts.map +1 -0
  45. package/esm/src/layout/mod.js +3 -0
  46. package/esm/src/layout/viewer-layout.d.ts +82 -0
  47. package/esm/src/layout/viewer-layout.d.ts.map +1 -0
  48. package/esm/src/layout/viewer-layout.js +74 -0
  49. package/esm/src/preact/components.d.ts +215 -0
  50. package/esm/src/preact/components.d.ts.map +1 -0
  51. package/esm/src/preact/components.js +176 -0
  52. package/esm/src/preact/focused-view.d.ts +42 -0
  53. package/esm/src/preact/focused-view.d.ts.map +1 -0
  54. package/esm/src/preact/focused-view.js +20 -0
  55. package/esm/src/preact/mod.d.ts +6 -0
  56. package/esm/src/preact/mod.d.ts.map +1 -0
  57. package/esm/src/preact/mod.js +3 -0
  58. package/esm/src/preact/plots.d.ts +130 -0
  59. package/esm/src/preact/plots.d.ts.map +1 -0
  60. package/esm/src/preact/plots.js +166 -0
  61. package/esm/src/preact/semantic-element.d.ts +103 -0
  62. package/esm/src/preact/semantic-element.d.ts.map +1 -0
  63. package/esm/src/preact/semantic-element.js +103 -0
  64. package/esm/src/preact/structural.d.ts +178 -0
  65. package/esm/src/preact/structural.d.ts.map +1 -0
  66. package/esm/src/preact/structural.js +147 -0
  67. package/esm/src/preact/surface.d.ts +37 -0
  68. package/esm/src/preact/surface.d.ts.map +1 -0
  69. package/esm/src/preact/surface.js +47 -0
  70. package/esm/src/surface-app.d.ts +188 -0
  71. package/esm/src/surface-app.d.ts.map +1 -0
  72. package/esm/src/surface-app.js +374 -0
  73. package/esm/src/theme.d.ts +65 -0
  74. package/esm/src/theme.d.ts.map +1 -0
  75. package/esm/src/theme.js +1964 -0
  76. package/esm/surface.d.ts +12 -0
  77. package/esm/surface.d.ts.map +1 -0
  78. package/esm/surface.js +10 -0
  79. package/package.json +68 -4
  80. package/script/_dnt.polyfills.d.ts +12 -0
  81. package/script/_dnt.polyfills.d.ts.map +1 -0
  82. package/script/_dnt.polyfills.js +16 -0
  83. package/script/fonts.d.ts +13 -0
  84. package/script/fonts.d.ts.map +1 -0
  85. package/script/fonts.js +19 -0
  86. package/script/layout.d.ts +14 -0
  87. package/script/layout.d.ts.map +1 -0
  88. package/script/layout.js +29 -0
  89. package/script/mod.d.ts +19 -0
  90. package/script/mod.d.ts.map +1 -0
  91. package/script/mod.js +40 -0
  92. package/script/package.json +3 -0
  93. package/script/preact-components.d.ts +22 -0
  94. package/script/preact-components.d.ts.map +1 -0
  95. package/script/preact-components.js +68 -0
  96. package/script/preact.d.ts +10 -0
  97. package/script/preact.d.ts.map +1 -0
  98. package/script/preact.js +25 -0
  99. package/script/src/component-primitives.d.ts +41 -0
  100. package/script/src/component-primitives.d.ts.map +1 -0
  101. package/script/src/component-primitives.js +127 -0
  102. package/script/src/components.d.ts +50 -0
  103. package/script/src/components.d.ts.map +1 -0
  104. package/script/src/components.js +297 -0
  105. package/script/src/font-families.d.ts +16 -0
  106. package/script/src/font-families.d.ts.map +1 -0
  107. package/script/src/font-families.js +14 -0
  108. package/script/src/fonts-data.d.ts +2 -0
  109. package/script/src/fonts-data.d.ts.map +1 -0
  110. package/script/src/fonts-data.js +45 -0
  111. package/script/src/fonts.d.ts +12 -0
  112. package/script/src/fonts.d.ts.map +1 -0
  113. package/script/src/fonts.js +24 -0
  114. package/script/src/i18n.d.ts +44 -0
  115. package/script/src/i18n.d.ts.map +1 -0
  116. package/script/src/i18n.js +102 -0
  117. package/script/src/layout/hooks.d.ts +60 -0
  118. package/script/src/layout/hooks.d.ts.map +1 -0
  119. package/script/src/layout/hooks.js +126 -0
  120. package/script/src/layout/mod.d.ts +6 -0
  121. package/script/src/layout/mod.d.ts.map +1 -0
  122. package/script/src/layout/mod.js +17 -0
  123. package/script/src/layout/viewer-layout.d.ts +82 -0
  124. package/script/src/layout/viewer-layout.d.ts.map +1 -0
  125. package/script/src/layout/viewer-layout.js +83 -0
  126. package/script/src/preact/components.d.ts +215 -0
  127. package/script/src/preact/components.d.ts.map +1 -0
  128. package/script/src/preact/components.js +199 -0
  129. package/script/src/preact/focused-view.d.ts +42 -0
  130. package/script/src/preact/focused-view.d.ts.map +1 -0
  131. package/script/src/preact/focused-view.js +24 -0
  132. package/script/src/preact/mod.d.ts +6 -0
  133. package/script/src/preact/mod.d.ts.map +1 -0
  134. package/script/src/preact/mod.js +55 -0
  135. package/script/src/preact/plots.d.ts +130 -0
  136. package/script/src/preact/plots.d.ts.map +1 -0
  137. package/script/src/preact/plots.js +171 -0
  138. package/script/src/preact/semantic-element.d.ts +103 -0
  139. package/script/src/preact/semantic-element.d.ts.map +1 -0
  140. package/script/src/preact/semantic-element.js +115 -0
  141. package/script/src/preact/structural.d.ts +178 -0
  142. package/script/src/preact/structural.d.ts.map +1 -0
  143. package/script/src/preact/structural.js +158 -0
  144. package/script/src/preact/surface.d.ts +37 -0
  145. package/script/src/preact/surface.d.ts.map +1 -0
  146. package/script/src/preact/surface.js +53 -0
  147. package/script/src/surface-app.d.ts +188 -0
  148. package/script/src/surface-app.d.ts.map +1 -0
  149. package/script/src/surface-app.js +379 -0
  150. package/script/src/theme.d.ts +65 -0
  151. package/script/src/theme.d.ts.map +1 -0
  152. package/script/src/theme.js +1968 -0
  153. package/script/surface.d.ts +12 -0
  154. package/script/surface.d.ts.map +1 -0
  155. package/script/surface.js +15 -0
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Preact hooks over the layout decision. They measure the DOM and query the
3
+ * browser, but they take the host context as a parameter: nothing here
4
+ * imports `@mcpview/view` or the MCP Apps runtime.
5
+ */
6
+ import type { RefObject } from "preact";
7
+ import { type LayoutHostHints, type ViewerBoundsStyle, type ViewerLayout } from "./viewer-layout.js";
8
+ /**
9
+ * The observed width of one container, to choose a layout.
10
+ *
11
+ * The container is measured, not the window: a `matchMedia` on the window
12
+ * would call a 380px panel opened in a full-screen browser "wide". The width
13
+ * is `null` until measured, so a caller can tell an unmeasured root from a
14
+ * real width; the decision reads an unknown width as wide — the usual case —
15
+ * rather than flashing the narrow treatment on every first paint.
16
+ *
17
+ * Measurement runs in `useLayoutEffect` so the content box is known before
18
+ * the browser paints. A `useEffect` + ResizeObserver only would paint `wide`
19
+ * for one frame (`isNarrow(null)` is false) and then the real treatment. The
20
+ * content box matches `contentRect` (clientWidth minus paddings); a
21
+ * border-box `getBoundingClientRect` is 2px too wide on a 1px-border shell
22
+ * and would flash the other way when the observer corrected it.
23
+ */
24
+ export declare function useContainerWidth<T extends HTMLElement>(): [RefObject<T>, number | null];
25
+ /**
26
+ * Whether the browser reports a coarse pointer — a finger or a stylus.
27
+ *
28
+ * Browser fallback only: `matchMedia` describes the device showing the
29
+ * window, not the context the host gives the iframe. The host's
30
+ * `deviceCapabilities` win whenever they are declared (see `useViewerLayout`).
31
+ *
32
+ * The initial value is read synchronously so the first paint already has the
33
+ * right treatment: a `useState(false)` that is corrected in `useEffect` would
34
+ * first paint `panel` (stacked rows) and then `mobile` (touch table) — two
35
+ * structures, not two densities of the same table.
36
+ */
37
+ export declare function useCoarsePointer(): boolean;
38
+ export interface UseViewerLayoutOptions {
39
+ /**
40
+ * An explicit treatment: `null` detects. When omitted the page query string
41
+ * is consulted (`?layout=mobile`) so a treatment can be reviewed without the
42
+ * matching device; pass `null` to ignore the URL.
43
+ */
44
+ readonly forced?: ViewerLayout | null;
45
+ }
46
+ export interface ViewerLayoutState<T extends HTMLElement> {
47
+ /** Attach to the element whose width is the layout's; the shell is the container. */
48
+ readonly ref: RefObject<T>;
49
+ /** The width judged: the host's declared width, else the measured one, else `null`. */
50
+ readonly width: number | null;
51
+ readonly layout: ViewerLayout;
52
+ /** Inline style bounding the root on the host's declared height, if any. */
53
+ readonly boundsStyle: ViewerBoundsStyle | undefined;
54
+ }
55
+ /**
56
+ * One layout decision for one viewer root: the host's word first, the
57
+ * browser's measure as fallback, an explicit override on top.
58
+ */
59
+ export declare function useViewerLayout<T extends HTMLElement>(hints: LayoutHostHints | undefined, options?: UseViewerLayoutOptions): ViewerLayoutState<T>;
60
+ //# sourceMappingURL=hooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/src/layout/hooks.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC,OAAO,EAEL,KAAK,eAAe,EAIpB,KAAK,iBAAiB,EAEtB,KAAK,YAAY,EAClB,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,WAAW,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC,CAsBxF;AAgCD;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAa1C;AAED,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;CACvC;AAED,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,WAAW;IACtD,qFAAqF;IACrF,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;IAC3B,uFAAuF;IACvF,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,4EAA4E;IAC5E,QAAQ,CAAC,WAAW,EAAE,iBAAiB,GAAG,SAAS,CAAC;CACrD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,WAAW,EACnD,KAAK,EAAE,eAAe,GAAG,SAAS,EAClC,OAAO,GAAE,sBAA2B,GACnC,iBAAiB,CAAC,CAAC,CAAC,CAetB"}
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+ /**
3
+ * Preact hooks over the layout decision. They measure the DOM and query the
4
+ * browser, but they take the host context as a parameter: nothing here
5
+ * imports `@mcpview/view` or the MCP Apps runtime.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.useContainerWidth = useContainerWidth;
9
+ exports.useCoarsePointer = useCoarsePointer;
10
+ exports.useViewerLayout = useViewerLayout;
11
+ const hooks_1 = require("preact/hooks");
12
+ const viewer_layout_js_1 = require("./viewer-layout.js");
13
+ /**
14
+ * The observed width of one container, to choose a layout.
15
+ *
16
+ * The container is measured, not the window: a `matchMedia` on the window
17
+ * would call a 380px panel opened in a full-screen browser "wide". The width
18
+ * is `null` until measured, so a caller can tell an unmeasured root from a
19
+ * real width; the decision reads an unknown width as wide — the usual case —
20
+ * rather than flashing the narrow treatment on every first paint.
21
+ *
22
+ * Measurement runs in `useLayoutEffect` so the content box is known before
23
+ * the browser paints. A `useEffect` + ResizeObserver only would paint `wide`
24
+ * for one frame (`isNarrow(null)` is false) and then the real treatment. The
25
+ * content box matches `contentRect` (clientWidth minus paddings); a
26
+ * border-box `getBoundingClientRect` is 2px too wide on a 1px-border shell
27
+ * and would flash the other way when the observer corrected it.
28
+ */
29
+ function useContainerWidth() {
30
+ const ref = (0, hooks_1.useRef)(null);
31
+ const [width, setWidth] = (0, hooks_1.useState)(null);
32
+ (0, hooks_1.useLayoutEffect)(() => {
33
+ const element = ref.current;
34
+ if (!element)
35
+ return;
36
+ const measured = contentWidth(element);
37
+ // Unmeasurable: keep `null`. Do not invent 0 — that is narrow and flashes `panel`.
38
+ if (measured !== null)
39
+ setWidth(measured);
40
+ if (typeof ResizeObserver === "undefined")
41
+ return;
42
+ const observer = new ResizeObserver((entries) => {
43
+ const entry = entries[0];
44
+ if (entry)
45
+ setWidth(entry.contentRect.width);
46
+ });
47
+ observer.observe(element);
48
+ return () => observer.disconnect();
49
+ }, []);
50
+ return [ref, width];
51
+ }
52
+ /**
53
+ * Content width, in the same box as `contentRect` (clientWidth minus paddings).
54
+ *
55
+ * A missing `clientWidth` is not a 0-wide box: linkedom reports `undefined`
56
+ * and a dummy 0×0 rect. Returning 0 would make `isNarrow` true and flash
57
+ * `panel` on the first paint — the flash `null` exists to avoid. Leave that
58
+ * unmeasured (caller skips `setWidth`). A numeric `clientWidth` counts; fall
59
+ * back to `getBoundingClientRect().width` only when `clientWidth` is not a
60
+ * number and the rect is a real (non-zero) layout.
61
+ */
62
+ function contentWidth(element) {
63
+ const client = element.clientWidth;
64
+ let box;
65
+ if (typeof client === "number") {
66
+ box = client;
67
+ }
68
+ else {
69
+ const rectWidth = element.getBoundingClientRect?.()?.width;
70
+ if (typeof rectWidth !== "number" || rectWidth === 0)
71
+ return null;
72
+ box = rectWidth;
73
+ }
74
+ if (typeof getComputedStyle !== "function")
75
+ return box;
76
+ const style = getComputedStyle(element);
77
+ return box - (parseFloat(style.paddingLeft) || 0) - (parseFloat(style.paddingRight) || 0);
78
+ }
79
+ function readCoarsePointer() {
80
+ return typeof matchMedia === "function" && matchMedia("(pointer: coarse)").matches;
81
+ }
82
+ /**
83
+ * Whether the browser reports a coarse pointer — a finger or a stylus.
84
+ *
85
+ * Browser fallback only: `matchMedia` describes the device showing the
86
+ * window, not the context the host gives the iframe. The host's
87
+ * `deviceCapabilities` win whenever they are declared (see `useViewerLayout`).
88
+ *
89
+ * The initial value is read synchronously so the first paint already has the
90
+ * right treatment: a `useState(false)` that is corrected in `useEffect` would
91
+ * first paint `panel` (stacked rows) and then `mobile` (touch table) — two
92
+ * structures, not two densities of the same table.
93
+ */
94
+ function useCoarsePointer() {
95
+ const [coarse, setCoarse] = (0, hooks_1.useState)(readCoarsePointer);
96
+ (0, hooks_1.useEffect)(() => {
97
+ if (typeof matchMedia !== "function")
98
+ return;
99
+ const query = matchMedia("(pointer: coarse)");
100
+ const onChange = (event) => setCoarse(event.matches);
101
+ // A hybrid device switches when the user moves from trackpad to screen.
102
+ query.addEventListener("change", onChange);
103
+ return () => query.removeEventListener("change", onChange);
104
+ }, []);
105
+ return coarse;
106
+ }
107
+ /**
108
+ * One layout decision for one viewer root: the host's word first, the
109
+ * browser's measure as fallback, an explicit override on top.
110
+ */
111
+ function useViewerLayout(hints, options = {}) {
112
+ const [ref, measured] = useContainerWidth();
113
+ const coarse = useCoarsePointer();
114
+ const forced = options.forced !== undefined
115
+ ? options.forced
116
+ : typeof location === "undefined"
117
+ ? null
118
+ : (0, viewer_layout_js_1.layoutFromSearch)(location.search);
119
+ const width = (0, viewer_layout_js_1.layoutWidth)(hints, measured);
120
+ const layout = (0, viewer_layout_js_1.resolveViewerLayout)({
121
+ width,
122
+ touch: (0, viewer_layout_js_1.touchInput)(hints, coarse),
123
+ forced,
124
+ });
125
+ return { ref, width, layout, boundsStyle: (0, viewer_layout_js_1.viewerBoundsStyle)(hints?.containerDimensions) };
126
+ }
@@ -0,0 +1,6 @@
1
+ /** Responsive viewer layout for `@mcpview/components` Apps. */
2
+ export { isNarrow, layoutFromSearch, layoutWidth, NARROW_BREAKPOINT, resolveViewerLayout, touchInput, VIEWER_LAYOUTS, viewerBoundsStyle, } from "./viewer-layout.js";
3
+ export type { LayoutContainerDimensions, LayoutHostHints, ViewerBoundsStyle, ViewerLayout, ViewerLayoutInputs, } from "./viewer-layout.js";
4
+ export { useCoarsePointer, useContainerWidth, useViewerLayout } from "./hooks.js";
5
+ export type { UseViewerLayoutOptions, ViewerLayoutState } from "./hooks.js";
6
+ //# sourceMappingURL=mod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/src/layout/mod.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAE/D,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACV,cAAc,EACd,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,yBAAyB,EACzB,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClF,YAAY,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ /** Responsive viewer layout for `@mcpview/components` Apps. */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.useViewerLayout = exports.useContainerWidth = exports.useCoarsePointer = exports.viewerBoundsStyle = exports.VIEWER_LAYOUTS = exports.touchInput = exports.resolveViewerLayout = exports.NARROW_BREAKPOINT = exports.layoutWidth = exports.layoutFromSearch = exports.isNarrow = void 0;
5
+ var viewer_layout_js_1 = require("./viewer-layout.js");
6
+ Object.defineProperty(exports, "isNarrow", { enumerable: true, get: function () { return viewer_layout_js_1.isNarrow; } });
7
+ Object.defineProperty(exports, "layoutFromSearch", { enumerable: true, get: function () { return viewer_layout_js_1.layoutFromSearch; } });
8
+ Object.defineProperty(exports, "layoutWidth", { enumerable: true, get: function () { return viewer_layout_js_1.layoutWidth; } });
9
+ Object.defineProperty(exports, "NARROW_BREAKPOINT", { enumerable: true, get: function () { return viewer_layout_js_1.NARROW_BREAKPOINT; } });
10
+ Object.defineProperty(exports, "resolveViewerLayout", { enumerable: true, get: function () { return viewer_layout_js_1.resolveViewerLayout; } });
11
+ Object.defineProperty(exports, "touchInput", { enumerable: true, get: function () { return viewer_layout_js_1.touchInput; } });
12
+ Object.defineProperty(exports, "VIEWER_LAYOUTS", { enumerable: true, get: function () { return viewer_layout_js_1.VIEWER_LAYOUTS; } });
13
+ Object.defineProperty(exports, "viewerBoundsStyle", { enumerable: true, get: function () { return viewer_layout_js_1.viewerBoundsStyle; } });
14
+ var hooks_js_1 = require("./hooks.js");
15
+ Object.defineProperty(exports, "useCoarsePointer", { enumerable: true, get: function () { return hooks_js_1.useCoarsePointer; } });
16
+ Object.defineProperty(exports, "useContainerWidth", { enumerable: true, get: function () { return hooks_js_1.useContainerWidth; } });
17
+ Object.defineProperty(exports, "useViewerLayout", { enumerable: true, get: function () { return hooks_js_1.useViewerLayout; } });
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Responsive layout decision for one MCP App viewer, without Preact or the
3
+ * MCP Apps runtime: every input is a value the caller already holds.
4
+ *
5
+ * A viewer renders inside a host iframe whose width says nothing about the
6
+ * screen, so the decision starts from the width the host grants (or the
7
+ * measured container), never from `matchMedia` on the window. Three
8
+ * treatments exist and they are not a scale of widths: a 380px desktop side
9
+ * panel stacks its rows, a 390px phone keeps its table with 40px touch rows.
10
+ * What separates the two narrow treatments is the pointer, not the space.
11
+ */
12
+ /** `wide` keeps every column; `panel` stacks rows; `mobile` keeps a compact touch table. */
13
+ export type ViewerLayout = "wide" | "panel" | "mobile";
14
+ export declare const VIEWER_LAYOUTS: readonly ViewerLayout[];
15
+ /** Below this container width the wide treatment gives way to a narrow one. */
16
+ export declare const NARROW_BREAKPOINT = 480;
17
+ /**
18
+ * The host-context fields the layout decision reads. Structurally a subset of
19
+ * the MCP Apps `McpUiHostContext`, so `ctx.hostContext` is passed as is; a
20
+ * viewer with its own host-context store passes that store's value instead.
21
+ */
22
+ export interface LayoutHostHints {
23
+ readonly deviceCapabilities?: {
24
+ readonly touch?: boolean;
25
+ readonly hover?: boolean;
26
+ };
27
+ readonly containerDimensions?: LayoutContainerDimensions;
28
+ }
29
+ /** Dimensions a host may announce; each one is optional and only trusted when positive. */
30
+ export interface LayoutContainerDimensions {
31
+ readonly width?: number;
32
+ readonly maxWidth?: number;
33
+ readonly height?: number;
34
+ readonly maxHeight?: number;
35
+ }
36
+ /** The inputs of one layout decision. */
37
+ export interface ViewerLayoutInputs {
38
+ /** The width to judge: `null` while nothing has been measured yet. */
39
+ readonly width: number | null;
40
+ /** Whether the viewer is driven by a finger rather than a fine pointer. */
41
+ readonly touch: boolean;
42
+ /** An explicit override (`?layout=`, a host declaration); `null` or `undefined` to detect. */
43
+ readonly forced?: ViewerLayout | null;
44
+ }
45
+ /** True once a width is known and it is under the breakpoint. */
46
+ export declare function isNarrow(width: number | null): boolean;
47
+ /** `?layout=mobile` in a query string, for reviewing a treatment without the matching device. */
48
+ export declare function layoutFromSearch(search: string): ViewerLayout | null;
49
+ /**
50
+ * The width to judge: what the host grants, else what was measured.
51
+ *
52
+ * A declared width describes the room actually given, where a
53
+ * `ResizeObserver` only measures what the iframe happened to take.
54
+ */
55
+ export declare function layoutWidth(hints: LayoutHostHints | undefined, measured: number | null): number | null;
56
+ /**
57
+ * Whether a finger drives the viewer, by the host's word or the browser's.
58
+ *
59
+ * `touch` alone is not enough: a laptop with a touch screen driven by a mouse
60
+ * declares `touch: true, hover: true` and is no phone. Only a finger without
61
+ * hover justifies 40px targets. When the host says nothing, the browser's
62
+ * coarse-pointer query decides.
63
+ */
64
+ export declare function touchInput(hints: LayoutHostHints | undefined, browserCoarsePointer: boolean): boolean;
65
+ /**
66
+ * The treatment for these inputs. A tablet under a finger but with room keeps
67
+ * the wide layout: room is what mobile lacks; the finger only chooses between
68
+ * the two narrow treatments.
69
+ */
70
+ export declare function resolveViewerLayout(inputs: ViewerLayoutInputs): ViewerLayout;
71
+ /** The inline style that bounds a viewer root on the host's declared height. */
72
+ export type ViewerBoundsStyle = {
73
+ readonly height: string;
74
+ } | {
75
+ readonly maxHeight: string;
76
+ };
77
+ /**
78
+ * Bound the root on the host's real container instead of `100vh`. Without a
79
+ * declared height the viewer stays intrinsic and lets the host auto-resize.
80
+ */
81
+ export declare function viewerBoundsStyle(dimensions: LayoutContainerDimensions | undefined): ViewerBoundsStyle | undefined;
82
+ //# sourceMappingURL=viewer-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viewer-layout.d.ts","sourceRoot":"","sources":["../../../src/src/layout/viewer-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,4FAA4F;AAC5F,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEvD,eAAO,MAAM,cAAc,EAAE,SAAS,YAAY,EAA+C,CAAC;AAElG,+E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CAMT;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,kBAAkB,GAAG,YAAY,CAI5E;AAED,gFAAgF;AAChF,MAAM,MAAM,iBAAiB,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7F;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,yBAAyB,GAAG,SAAS,GAChD,iBAAiB,GAAG,SAAS,CAK/B"}
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ /**
3
+ * Responsive layout decision for one MCP App viewer, without Preact or the
4
+ * MCP Apps runtime: every input is a value the caller already holds.
5
+ *
6
+ * A viewer renders inside a host iframe whose width says nothing about the
7
+ * screen, so the decision starts from the width the host grants (or the
8
+ * measured container), never from `matchMedia` on the window. Three
9
+ * treatments exist and they are not a scale of widths: a 380px desktop side
10
+ * panel stacks its rows, a 390px phone keeps its table with 40px touch rows.
11
+ * What separates the two narrow treatments is the pointer, not the space.
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.NARROW_BREAKPOINT = exports.VIEWER_LAYOUTS = void 0;
15
+ exports.isNarrow = isNarrow;
16
+ exports.layoutFromSearch = layoutFromSearch;
17
+ exports.layoutWidth = layoutWidth;
18
+ exports.touchInput = touchInput;
19
+ exports.resolveViewerLayout = resolveViewerLayout;
20
+ exports.viewerBoundsStyle = viewerBoundsStyle;
21
+ exports.VIEWER_LAYOUTS = Object.freeze(["wide", "panel", "mobile"]);
22
+ /** Below this container width the wide treatment gives way to a narrow one. */
23
+ exports.NARROW_BREAKPOINT = 480;
24
+ /** True once a width is known and it is under the breakpoint. */
25
+ function isNarrow(width) {
26
+ return width !== null && width < exports.NARROW_BREAKPOINT;
27
+ }
28
+ /** `?layout=mobile` in a query string, for reviewing a treatment without the matching device. */
29
+ function layoutFromSearch(search) {
30
+ const value = new URLSearchParams(search).get("layout");
31
+ return exports.VIEWER_LAYOUTS.includes(value) ? value : null;
32
+ }
33
+ /**
34
+ * The width to judge: what the host grants, else what was measured.
35
+ *
36
+ * A declared width describes the room actually given, where a
37
+ * `ResizeObserver` only measures what the iframe happened to take.
38
+ */
39
+ function layoutWidth(hints, measured) {
40
+ return positive(hints?.containerDimensions?.width) ??
41
+ positive(hints?.containerDimensions?.maxWidth) ?? measured;
42
+ }
43
+ /**
44
+ * Whether a finger drives the viewer, by the host's word or the browser's.
45
+ *
46
+ * `touch` alone is not enough: a laptop with a touch screen driven by a mouse
47
+ * declares `touch: true, hover: true` and is no phone. Only a finger without
48
+ * hover justifies 40px targets. When the host says nothing, the browser's
49
+ * coarse-pointer query decides.
50
+ */
51
+ function touchInput(hints, browserCoarsePointer) {
52
+ const capabilities = hints?.deviceCapabilities;
53
+ if (capabilities?.touch !== undefined) {
54
+ return capabilities.touch && capabilities.hover !== true;
55
+ }
56
+ return browserCoarsePointer;
57
+ }
58
+ /**
59
+ * The treatment for these inputs. A tablet under a finger but with room keeps
60
+ * the wide layout: room is what mobile lacks; the finger only chooses between
61
+ * the two narrow treatments.
62
+ */
63
+ function resolveViewerLayout(inputs) {
64
+ if (inputs.forced)
65
+ return inputs.forced;
66
+ if (!isNarrow(inputs.width))
67
+ return "wide";
68
+ return inputs.touch ? "mobile" : "panel";
69
+ }
70
+ /**
71
+ * Bound the root on the host's real container instead of `100vh`. Without a
72
+ * declared height the viewer stays intrinsic and lets the host auto-resize.
73
+ */
74
+ function viewerBoundsStyle(dimensions) {
75
+ const height = positive(dimensions?.height);
76
+ if (height !== undefined)
77
+ return { height: `${height}px` };
78
+ const maxHeight = positive(dimensions?.maxHeight);
79
+ return maxHeight !== undefined ? { maxHeight: `${maxHeight}px` } : undefined;
80
+ }
81
+ function positive(value) {
82
+ return typeof value === "number" && Number.isFinite(value) && value > 0 ? value : undefined;
83
+ }
@@ -0,0 +1,215 @@
1
+ /** @jsxImportSource preact */
2
+ /** Shared Preact presentation primitives for composable MCP Apps. */
3
+ import type { ComponentChildren, JSX } from "preact";
4
+ export type PresentationTone = "neutral" | "info" | "success" | "warning" | "danger";
5
+ export interface StackProps {
6
+ readonly gap?: "xs" | "sm" | "md" | "lg";
7
+ readonly className?: string;
8
+ readonly children?: ComponentChildren;
9
+ }
10
+ /** Simple vertical composition primitive; it carries no domain semantics. */
11
+ export declare function Stack({ gap, className, children }: StackProps): JSX.Element;
12
+ export interface RowProps {
13
+ readonly label?: string;
14
+ readonly responsive?: boolean;
15
+ readonly className?: string;
16
+ readonly children?: ComponentChildren;
17
+ }
18
+ /** Horizontal fact or control row; its contents and meaning remain caller-owned. */
19
+ export declare function Row({ label, responsive, className, children, }: RowProps): JSX.Element;
20
+ export interface CardProps {
21
+ readonly title?: ComponentChildren;
22
+ readonly eyebrow?: ComponentChildren;
23
+ readonly actions?: ComponentChildren;
24
+ readonly className?: string;
25
+ readonly children?: ComponentChildren;
26
+ }
27
+ /** The canonical MCP component container. */
28
+ export declare function Card({ title, eyebrow, actions, className, children, }: CardProps): JSX.Element;
29
+ export interface BadgeProps {
30
+ readonly tone?: PresentationTone;
31
+ readonly children?: ComponentChildren;
32
+ readonly className?: string;
33
+ }
34
+ export interface BadgeGroupProps {
35
+ readonly label: string;
36
+ readonly className?: string;
37
+ readonly children?: ComponentChildren;
38
+ }
39
+ /** Accessible wrapping group for compact status and classification badges. */
40
+ export declare function BadgeGroup({ label, className, children, }: BadgeGroupProps): JSX.Element;
41
+ /** Compact status or classification label. */
42
+ export declare function Badge({ tone, children, className }: BadgeProps): JSX.Element;
43
+ export interface MetricItem {
44
+ readonly id: string;
45
+ readonly label: ComponentChildren;
46
+ readonly value: ComponentChildren;
47
+ readonly unit?: ComponentChildren;
48
+ readonly detail?: ComponentChildren;
49
+ readonly tone?: PresentationTone;
50
+ }
51
+ export interface MetricGridProps {
52
+ readonly items: readonly MetricItem[];
53
+ readonly className?: string;
54
+ }
55
+ export interface MetricProps extends Omit<MetricItem, "id"> {
56
+ readonly id?: string;
57
+ readonly className?: string;
58
+ }
59
+ /** One unit-bearing reading. Callers remain responsible for the value and its tone. */
60
+ export declare function Metric({ id, label, value, unit, detail, tone, className, }: MetricProps): JSX.Element;
61
+ /** Responsive, container-aware metrics with stable semantic slots. */
62
+ export declare function MetricGrid({ items, className }: MetricGridProps): JSX.Element;
63
+ export interface KeyValueItem {
64
+ readonly id: string;
65
+ readonly label: ComponentChildren;
66
+ readonly value: ComponentChildren;
67
+ }
68
+ /**
69
+ * `inspector` (default): mono key, value flush right, hairline between rows.
70
+ * `facts`: one aligned label column, each value read right after its label.
71
+ */
72
+ export type KeyValueLayout = "inspector" | "facts";
73
+ export interface KeyValueListProps {
74
+ readonly items: readonly KeyValueItem[];
75
+ readonly layout?: KeyValueLayout;
76
+ readonly className?: string;
77
+ }
78
+ /** Provenance and identity facts with safe wrapping for hashes and URIs. */
79
+ export declare function KeyValueList({ items, layout, className, }: KeyValueListProps): JSX.Element;
80
+ export interface DataTableColumn<TRow> {
81
+ readonly id: string;
82
+ readonly label: ComponentChildren;
83
+ readonly align?: "left" | "right";
84
+ readonly render: (row: TRow) => ComponentChildren;
85
+ }
86
+ export interface DataTableProps<TRow> {
87
+ readonly label: string;
88
+ readonly rows: readonly TRow[];
89
+ readonly columns: readonly DataTableColumn<TRow>[];
90
+ readonly rowKey: (row: TRow) => string | number;
91
+ readonly selected?: (row: TRow) => boolean;
92
+ readonly onSelect?: (row: TRow) => void;
93
+ readonly emptyLabel?: string;
94
+ readonly className?: string;
95
+ }
96
+ /** Accessible compact table; selection behavior is opt-in and keyboard-safe. */
97
+ export declare function DataTable<TRow>({ label, rows, columns, rowKey, selected, onSelect, emptyLabel, className, }: DataTableProps<TRow>): JSX.Element;
98
+ export interface ButtonProps {
99
+ readonly type?: "button" | "submit" | "reset";
100
+ readonly pressed?: boolean;
101
+ readonly disabled?: boolean;
102
+ readonly title?: string;
103
+ readonly className?: string;
104
+ readonly onClick?: JSX.MouseEventHandler<HTMLButtonElement>;
105
+ readonly children?: ComponentChildren;
106
+ }
107
+ /** Small dashboard-safe action, never a product-wide navigation control. */
108
+ export declare function Button({ type, pressed, disabled, title, className, onClick, children, }: ButtonProps): JSX.Element;
109
+ export interface ToolbarProps {
110
+ readonly label: string;
111
+ readonly className?: string;
112
+ readonly children?: ComponentChildren;
113
+ }
114
+ export interface TextInputProps {
115
+ readonly label: string;
116
+ readonly value: string;
117
+ readonly placeholder?: string;
118
+ readonly type?: "text" | "search";
119
+ readonly disabled?: boolean;
120
+ readonly className?: string;
121
+ readonly onValueInput?: (value: string) => void;
122
+ }
123
+ /** Compact controlled text input with a mandatory accessible label. */
124
+ export declare function TextInput({ label, value, placeholder, type, disabled, className, onValueInput, }: TextInputProps): JSX.Element;
125
+ export interface CodeBlockProps {
126
+ readonly label?: string;
127
+ readonly className?: string;
128
+ readonly children?: ComponentChildren;
129
+ }
130
+ /** Bounded preformatted content for expressions, source excerpts, and exact text. */
131
+ export declare function CodeBlock({ label, className, children }: CodeBlockProps): JSX.Element;
132
+ export interface InlineCodeProps {
133
+ readonly title?: string;
134
+ readonly className?: string;
135
+ readonly children?: ComponentChildren;
136
+ }
137
+ /** Inline exact text with safe wrapping for fingerprints, identifiers, and URIs. */
138
+ export declare function InlineCode({ title, className, children, }: InlineCodeProps): JSX.Element;
139
+ export declare function Toolbar({ label, className, children, }: ToolbarProps): JSX.Element;
140
+ export interface EmptyStateProps {
141
+ readonly children?: ComponentChildren;
142
+ readonly className?: string;
143
+ }
144
+ export declare function EmptyState({ children, className, }: EmptyStateProps): JSX.Element;
145
+ export interface SkeletonProps {
146
+ /** Accessible description of what is still loading. */
147
+ readonly label: string;
148
+ /** Placeholder lines drawn inside the frame. Defaults to three. */
149
+ readonly lines?: number;
150
+ readonly className?: string;
151
+ }
152
+ /**
153
+ * Frame-first loading placeholder: the structure of a recorded view appears
154
+ * before its values, so nothing shifts once the values arrive.
155
+ */
156
+ export declare function Skeleton({ label, lines, className }: SkeletonProps): JSX.Element;
157
+ export interface MessageProps {
158
+ readonly tone?: PresentationTone;
159
+ readonly children?: ComponentChildren;
160
+ readonly className?: string;
161
+ }
162
+ /** Compact inline notice that keeps surrounding values visible. */
163
+ export declare function Message({ tone, children, className, }: MessageProps): JSX.Element;
164
+ export interface NoticeGroupProps {
165
+ /** Accessible name and visible heading for the group. */
166
+ readonly label: string;
167
+ /** Caller-formatted notices. Nothing is rendered when there are none. */
168
+ readonly items: readonly ComponentChildren[];
169
+ readonly tone?: PresentationTone;
170
+ /** Caller-formatted statement about entries that were left out. */
171
+ readonly omittedLabel?: ComponentChildren;
172
+ readonly className?: string;
173
+ }
174
+ /**
175
+ * Short notices gathered under one severity heading.
176
+ *
177
+ * Renders nothing when there is nothing to say, so a caller never has to guard
178
+ * the call site. Truncation is stated by the caller: the group displays the
179
+ * notices it was handed and never counts what it was not.
180
+ */
181
+ export declare function NoticeGroup({ label, items, tone, omittedLabel, className, }: NoticeGroupProps): JSX.Element | null;
182
+ export interface StatusMessageMount {
183
+ readonly title?: ComponentChildren;
184
+ readonly tone?: PresentationTone;
185
+ readonly busy?: boolean;
186
+ readonly className?: string;
187
+ /** Existing host to render into. Without one a detached `div` is created. */
188
+ readonly container?: HTMLElement;
189
+ }
190
+ /**
191
+ * Render a `StateMessage` into a real DOM node and hand that node back.
192
+ *
193
+ * `defineView` returns a native element, so every viewer built on it has to
194
+ * bridge Preact to the DOM itself. Hand-written bridges drift — the tone, the
195
+ * alert role and the class stop matching between surfaces of the same product.
196
+ * This is that bridge, so one status looks like every other status.
197
+ */
198
+ export declare function renderStatusMessage(detail: ComponentChildren, options?: StatusMessageMount): HTMLElement;
199
+ export interface CrossSelectionProps {
200
+ readonly label: ComponentChildren;
201
+ readonly value: ComponentChildren;
202
+ readonly status?: ComponentChildren;
203
+ readonly className?: string;
204
+ }
205
+ /** Read-only projection of a selection coordinated by an owning host. */
206
+ export declare function CrossSelection({ label, value, status, className, }: CrossSelectionProps): JSX.Element;
207
+ export interface StateMessageProps {
208
+ readonly title?: ComponentChildren;
209
+ readonly tone?: PresentationTone;
210
+ readonly busy?: boolean;
211
+ readonly children?: ComponentChildren;
212
+ readonly className?: string;
213
+ }
214
+ export declare function StateMessage({ title, tone, busy, children, className, }: StateMessageProps): JSX.Element;
215
+ //# sourceMappingURL=components.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/src/preact/components.tsx"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,qEAAqE;AAGrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAErD,MAAM,MAAM,gBAAgB,GACxB,SAAS,GACT,MAAM,GACN,SAAS,GACT,SAAS,GACT,QAAQ,CAAC;AAEb,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACzC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CACvC;AAED,6EAA6E;AAC7E,wBAAgB,KAAK,CAAC,EAAE,GAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,CAMlF;AAED,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CACvC;AAED,oFAAoF;AACpF,wBAAgB,GAAG,CAAC,EAClB,KAAK,EACL,UAAkB,EAClB,SAAS,EACT,QAAQ,GACT,EAAE,QAAQ,GAAG,GAAG,CAAC,OAAO,CAcxB;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ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