silvery 0.23.0 → 0.23.1

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 (141) hide show
  1. package/dist/{Text-Ci6UCSTL.mjs → Text-4tWKabKH.mjs} +5 -5
  2. package/dist/{Text-Ci6UCSTL.mjs.map → Text-4tWKabKH.mjs.map} +1 -1
  3. package/dist/{ag-q9lRlKlt.mjs → ag-B-7XAHL8.mjs} +9 -9
  4. package/dist/{ag-q9lRlKlt.mjs.map → ag-B-7XAHL8.mjs.map} +1 -1
  5. package/dist/animation-CZ4x2R7C.mjs.map +1 -1
  6. package/dist/{ansi-zmNzgkPB.d.mts → ansi-qYRTDp5m.d.mts} +1 -1
  7. package/dist/{ansi-zmNzgkPB.d.mts.map → ansi-qYRTDp5m.d.mts.map} +1 -1
  8. package/dist/{chain-bridge-CkYcMxlq.mjs → chain-bridge-B7LNJwVF.mjs} +8 -8
  9. package/dist/{chain-bridge-CkYcMxlq.mjs.map → chain-bridge-B7LNJwVF.mjs.map} +1 -1
  10. package/dist/{chunk-BEJ448es.mjs → chunk-hT5z_Zn9.mjs} +1 -1
  11. package/dist/cli-CuNV0hTE.mjs +4 -0
  12. package/dist/devtools-BuTq07Zb.mjs +2 -0
  13. package/dist/{devtools-td2AjFwc.mjs → devtools-akTjVxxX.mjs} +4 -5
  14. package/dist/{devtools-td2AjFwc.mjs.map → devtools-akTjVxxX.mjs.map} +1 -1
  15. package/dist/{easing-C5MrdO7V.d.mts → easing-8OlNopWv.d.mts} +1 -1
  16. package/dist/{easing-C5MrdO7V.d.mts.map → easing-8OlNopWv.d.mts.map} +1 -1
  17. package/dist/{eta-BwYWEjfS.mjs → eta-CPZ45g_P.mjs} +5 -1
  18. package/dist/{eta-BwYWEjfS.mjs.map → eta-CPZ45g_P.mjs.map} +1 -1
  19. package/dist/flexily-zero-adapter-VoBGHG14.mjs.map +1 -1
  20. package/dist/{hit-registry-D_nxOivS.d.mts → hit-registry-DRV2ig-Y.d.mts} +2 -2
  21. package/dist/{hit-registry-D_nxOivS.d.mts.map → hit-registry-DRV2ig-Y.d.mts.map} +1 -1
  22. package/dist/{image-CIF75xMr.mjs → image-o2WpbrD1.mjs} +22 -22
  23. package/dist/image-o2WpbrD1.mjs.map +1 -0
  24. package/dist/{index-377zdPLP.d.mts → index-3vAxA_EQ.d.mts} +1 -1
  25. package/dist/{index-377zdPLP.d.mts.map → index-3vAxA_EQ.d.mts.map} +1 -1
  26. package/dist/{index-BcSr0RAQ.d.mts → index-BKujGENR.d.mts} +6 -6
  27. package/dist/index-BKujGENR.d.mts.map +1 -0
  28. package/dist/{index-DlNmckTq.d.mts → index-C6oOd9eE.d.mts} +2 -2
  29. package/dist/{index-DlNmckTq.d.mts.map → index-C6oOd9eE.d.mts.map} +1 -1
  30. package/dist/{index-DLnpxDAm.d.mts → index-DhYF3m7V.d.mts} +2 -2
  31. package/dist/{index-DLnpxDAm.d.mts.map → index-DhYF3m7V.d.mts.map} +1 -1
  32. package/dist/index.d.mts +9 -9
  33. package/dist/index.mjs +14 -14
  34. package/dist/index.mjs.map +1 -1
  35. package/dist/{layout-engine-BgR58vL0.mjs → layout-engine-BYp49XPD.mjs} +2 -2
  36. package/dist/{layout-engine-BgR58vL0.mjs.map → layout-engine-BYp49XPD.mjs.map} +1 -1
  37. package/dist/{layout-engine-DNjTha8f.mjs → layout-engine-D0dXw5fr.mjs} +1 -1
  38. package/dist/{layout-signals-CGYbHmxy.mjs → layout-signals-uQadGDmO.mjs} +2 -2
  39. package/dist/{layout-signals-CGYbHmxy.mjs.map → layout-signals-uQadGDmO.mjs.map} +1 -1
  40. package/dist/{mouse-events-WQ2h-uqG.mjs → mouse-events-Pg-XKR3T.mjs} +24 -3
  41. package/dist/{mouse-events-WQ2h-uqG.mjs.map → mouse-events-Pg-XKR3T.mjs.map} +1 -1
  42. package/dist/{mouse-events-B2z5tbsL.d.mts → mouse-events-UoUWNIdS.d.mts} +22 -3
  43. package/dist/{mouse-events-B2z5tbsL.d.mts.map → mouse-events-UoUWNIdS.d.mts.map} +1 -1
  44. package/dist/{multi-progress-zCWHEm9P.mjs → multi-progress-Bvd1BYED.mjs} +2 -2
  45. package/dist/{multi-progress-zCWHEm9P.mjs.map → multi-progress-Bvd1BYED.mjs.map} +1 -1
  46. package/dist/{multi-progress-BaEFfHKP.d.mts → multi-progress-DPOCjomS.d.mts} +2 -2
  47. package/dist/{multi-progress-BaEFfHKP.d.mts.map → multi-progress-DPOCjomS.d.mts.map} +1 -1
  48. package/dist/{node-CJ3J_rW-.mjs → node-Cl-kzQcl.mjs} +4 -4
  49. package/dist/node-Cl-kzQcl.mjs.map +1 -0
  50. package/dist/{progress-6vJ7nxUg.mjs → progress-1r6M_ZAP.mjs} +4 -4
  51. package/dist/{progress-6vJ7nxUg.mjs.map → progress-1r6M_ZAP.mjs.map} +1 -1
  52. package/dist/{progress-bar-BlFNsZL8.mjs → progress-bar-DzW1DzNj.mjs} +3 -3
  53. package/dist/{progress-bar-BlFNsZL8.mjs.map → progress-bar-DzW1DzNj.mjs.map} +1 -1
  54. package/dist/{reconciler--_-biN23.mjs → reconciler-lsTL1y8i.mjs} +45 -5
  55. package/dist/{reconciler--_-biN23.mjs.map → reconciler-lsTL1y8i.mjs.map} +1 -1
  56. package/dist/{render-string-DtHZP0cU.mjs → render-string-2ZcV8n3B.mjs} +6 -6
  57. package/dist/{render-string-DtHZP0cU.mjs.map → render-string-2ZcV8n3B.mjs.map} +1 -1
  58. package/dist/{render-string-DaghHpLN.mjs → render-string-BJZqo5Rr.mjs} +1 -1
  59. package/dist/runtime.d.mts +3 -3
  60. package/dist/runtime.mjs +3 -3
  61. package/dist/{schemes-DWQPxXAi.mjs → schemes-C4SUgVea.mjs} +2 -2
  62. package/dist/{schemes-DWQPxXAi.mjs.map → schemes-C4SUgVea.mjs.map} +1 -1
  63. package/dist/{spinner-B50hILqx.mjs → spinner-Ck3SdCpW.mjs} +2 -2
  64. package/dist/{spinner-B50hILqx.mjs.map → spinner-Ck3SdCpW.mjs.map} +1 -1
  65. package/dist/{spinner-DN10UfF0.d.mts → spinner-CpcGtQ9L.d.mts} +2 -2
  66. package/dist/{spinner-DN10UfF0.d.mts.map → spinner-CpcGtQ9L.d.mts.map} +1 -1
  67. package/dist/{src-BqeBFB3X.mjs → src-B6MuVlOK.mjs} +3 -3
  68. package/dist/src-B6MuVlOK.mjs.map +1 -0
  69. package/dist/{src-DbqcSrhy.mjs → src-BZOfzNeo.mjs} +32 -9
  70. package/dist/src-BZOfzNeo.mjs.map +1 -0
  71. package/dist/{src-BXeTHHlL.mjs → src-ChuXo--x.mjs} +25 -23
  72. package/dist/src-ChuXo--x.mjs.map +1 -0
  73. package/dist/{src-BOLdi3WG.mjs → src-DdGaRDi9.mjs} +3 -3
  74. package/dist/{src-BOLdi3WG.mjs.map → src-DdGaRDi9.mjs.map} +1 -1
  75. package/dist/{src-B8lf1kiR.mjs → src-DorsnS70.mjs} +8 -1
  76. package/dist/src-DorsnS70.mjs.map +1 -0
  77. package/dist/{steps-B2kBmFpb.d.mts → steps-DV34gm_Z.d.mts} +1 -1
  78. package/dist/{steps-B2kBmFpb.d.mts.map → steps-DV34gm_Z.d.mts.map} +1 -1
  79. package/dist/svg-NmV9dgB9.mjs.map +1 -1
  80. package/dist/{svg-VUr78l5d.d.mts → svg-wvIEu-RS.d.mts} +1 -1
  81. package/dist/{svg-VUr78l5d.d.mts.map → svg-wvIEu-RS.d.mts.map} +1 -1
  82. package/dist/term.d.mts +3 -3
  83. package/dist/term.mjs +4 -4
  84. package/dist/test.d.mts +3 -3
  85. package/dist/test.mjs +9 -9
  86. package/dist/test.mjs.map +1 -1
  87. package/dist/theme.d.mts +2 -2
  88. package/dist/theme.mjs +3 -3
  89. package/dist/{types-D_E0FbqA.d.mts → types-VyreAPAB.d.mts} +1 -1
  90. package/dist/{types-D_E0FbqA.d.mts.map → types-VyreAPAB.d.mts.map} +1 -1
  91. package/dist/ui/animation.d.mts +2 -2
  92. package/dist/ui/ansi.d.mts +1 -1
  93. package/dist/ui/cli.d.mts +3 -3
  94. package/dist/ui/cli.mjs +4 -4
  95. package/dist/ui/image.d.mts +1 -1
  96. package/dist/ui/image.mjs +1 -1
  97. package/dist/ui/progress.d.mts +4 -4
  98. package/dist/ui/progress.mjs +4 -4
  99. package/dist/ui/react.d.mts +1 -1
  100. package/dist/ui/react.mjs +2 -2
  101. package/dist/ui/react.mjs.map +1 -1
  102. package/dist/ui/recording-chrome-react.d.mts +1 -1
  103. package/dist/ui/recording-chrome-react.mjs +1 -1
  104. package/dist/ui/recording-chrome.d.mts +1 -1
  105. package/dist/ui/utils.mjs +1 -1
  106. package/dist/ui/wrappers.d.mts +2 -2
  107. package/dist/ui/wrappers.mjs +1 -1
  108. package/dist/ui.d.mts +6 -6
  109. package/dist/ui.mjs +6 -6
  110. package/dist/{unicode-CxyxVGmB.mjs → unicode-X43-fdGF.mjs} +3 -3
  111. package/dist/unicode-X43-fdGF.mjs.map +1 -0
  112. package/dist/{useLatest-UOvWy0ZW.d.mts → useLatest-D9p0ZDAC.d.mts} +2 -2
  113. package/dist/{useLatest-UOvWy0ZW.d.mts.map → useLatest-D9p0ZDAC.d.mts.map} +1 -1
  114. package/dist/{useLayout-D5cE8OCI.mjs → useLayout-Cx01rHVI.mjs} +3 -3
  115. package/dist/{useLayout-D5cE8OCI.mjs.map → useLayout-Cx01rHVI.mjs.map} +1 -1
  116. package/dist/{with-text-input-DLoSCBrm.d.mts → with-text-input-CW8MR9Th.d.mts} +3 -3
  117. package/dist/{with-text-input-DLoSCBrm.d.mts.map → with-text-input-CW8MR9Th.d.mts.map} +1 -1
  118. package/dist/{wrap-measurer-registration-IV2HtcCd.d.mts → wrap-measurer-registration-DNBmtFNM.d.mts} +3 -3
  119. package/dist/{wrap-measurer-registration-IV2HtcCd.d.mts.map → wrap-measurer-registration-DNBmtFNM.d.mts.map} +1 -1
  120. package/dist/{wrapper-CD29afOs.mjs → wrapper-DpMauwdI.mjs} +51 -33
  121. package/dist/wrapper-DpMauwdI.mjs.map +1 -0
  122. package/dist/{wrappers-CInBJm44.mjs → wrappers-DHMzvbRo.mjs} +5 -5
  123. package/dist/{wrappers-CInBJm44.mjs.map → wrappers-DHMzvbRo.mjs.map} +1 -1
  124. package/dist/yoga-adapter-B-DCP4Bx.mjs +2 -0
  125. package/dist/{yoga-adapter-9uab5Qn-.mjs → yoga-adapter-CB_7pLyl.mjs} +2 -2
  126. package/dist/{yoga-adapter-9uab5Qn-.mjs.map → yoga-adapter-CB_7pLyl.mjs.map} +1 -1
  127. package/package.json +2 -2
  128. package/dist/backend-DSiSIc-h.mjs +0 -13396
  129. package/dist/backend-DSiSIc-h.mjs.map +0 -1
  130. package/dist/cli-VNqUKlXw.mjs +0 -4
  131. package/dist/devtools-BF4IMumr.mjs +0 -2
  132. package/dist/image-CIF75xMr.mjs.map +0 -1
  133. package/dist/index-BcSr0RAQ.d.mts.map +0 -1
  134. package/dist/node-CJ3J_rW-.mjs.map +0 -1
  135. package/dist/src-B8lf1kiR.mjs.map +0 -1
  136. package/dist/src-BXeTHHlL.mjs.map +0 -1
  137. package/dist/src-BqeBFB3X.mjs.map +0 -1
  138. package/dist/src-DbqcSrhy.mjs.map +0 -1
  139. package/dist/unicode-CxyxVGmB.mjs.map +0 -1
  140. package/dist/wrapper-CD29afOs.mjs.map +0 -1
  141. package/dist/yoga-adapter-yqTl1aXK.mjs +0 -2
@@ -1,7 +1,7 @@
1
- import { r as effect } from "./src-BqeBFB3X.mjs";
2
- import { o as getLayoutSignals, u as observeLayoutSignal } from "./layout-signals-CGYbHmxy.mjs";
3
- import { a as KNOWN_VARIANTS } from "./src-B8lf1kiR.mjs";
4
- import { a as defaultDarkTheme } from "./schemes-DWQPxXAi.mjs";
1
+ import { r as effect } from "./src-B6MuVlOK.mjs";
2
+ import { o as getLayoutSignals, u as observeLayoutSignal } from "./layout-signals-uQadGDmO.mjs";
3
+ import { a as KNOWN_VARIANTS } from "./src-DorsnS70.mjs";
4
+ import { a as defaultDarkTheme } from "./schemes-C4SUgVea.mjs";
5
5
  import { a as NodeContext } from "./context-CEhuD1R_.mjs";
6
6
  import { createContext, forwardRef, useContext, useImperativeHandle, useLayoutEffect, useRef, useState } from "react";
7
7
  import { jsx } from "react/jsx-runtime";
@@ -234,4 +234,4 @@ const Text = forwardRef(function Text(props, ref) {
234
234
  //#endregion
235
235
  export { useTheme as a, ThemeContext as i, Box as n, ActiveSchemeContext as r, Text as t };
236
236
 
237
- //# sourceMappingURL=Text-Ci6UCSTL.mjs.map
237
+ //# sourceMappingURL=Text-4tWKabKH.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Text-Ci6UCSTL.mjs","names":["signalEffect"],"sources":["../packages/ag-react/src/ThemeContext.tsx","../packages/ag-react/src/components/Box.tsx","../packages/ag-react/src/components/Text.tsx"],"sourcesContent":["/**\n * ThemeContext — delivers a Theme to the component tree.\n *\n * Wrap your app (or a subtree) in `<ThemeProvider theme={…}>` to make\n * `$token` color props resolve against that theme. Components call\n * `useTheme()` to read the current theme.\n *\n * @example\n * ```tsx\n * import { ThemeProvider, defaultDarkTheme } from '@silvery/ag-react'\n *\n * <ThemeProvider theme={defaultDarkTheme}>\n * <App />\n * </ThemeProvider>\n * ```\n */\n\nimport { createContext, useContext } from \"react\"\nimport type { Theme, ActiveScheme } from \"@silvery/ansi\"\nimport { defaultDarkTheme } from \"@silvery/theme/schemes\"\n\n// ============================================================================\n// Context\n// ============================================================================\n\n/** @internal Exported for ThemeProvider and Text component — not public API. */\nexport const ThemeContext = createContext<Theme>(defaultDarkTheme)\n\n/**\n * Context that carries scheme detection metadata (name, source, confidence).\n *\n * Separate from ThemeContext because scheme metadata is orthogonal to the\n * theme token bag. Populated by `<ThemeProvider scheme={...}>` when the\n * caller passes detection provenance (e.g. from `runThemed`). Null when\n * no scheme metadata was injected.\n *\n * @internal Exported for ThemeProvider.\n */\nexport const ActiveSchemeContext = createContext<ActiveScheme | null>(null)\n\n// ============================================================================\n// Hook\n// ============================================================================\n\n/**\n * Read the current theme from context.\n *\n * Returns `defaultDarkTheme` when no `ThemeProvider` is present.\n */\nexport function useTheme(): Theme {\n return useContext(ThemeContext)\n}\n","/**\n * Silvery Box Component\n *\n * The primary layout primitive for Silvery. Box is a flexbox container that can hold\n * other Box or Text components. It supports all standard flexbox properties,\n * dimensions, spacing, and borders.\n *\n * Box renders to an 'silvery-box' host element that the reconciler converts to an\n * SilveryNode with an associated Yoga layout node.\n *\n * Box provides NodeContext to its children, enabling useBoxRect/useScrollRect hooks.\n * It also supports forwardRef for imperative access and onLayout for layout callbacks.\n */\n\nimport {\n type ForwardedRef,\n type JSX,\n type ReactNode,\n forwardRef,\n useImperativeHandle,\n useLayoutEffect,\n useRef,\n useState,\n} from \"react\"\nimport { effect as signalEffect } from \"@silvery/signals\"\nimport { NodeContext } from \"../context\"\nimport { getLayoutSignals, observeLayoutSignal } from \"@silvery/ag/layout-signals\"\nimport type { BoxProps as BoxPropsType, AgNode, Rect } from \"@silvery/ag/types\"\n\n// ============================================================================\n// Props\n// ============================================================================\n\nexport interface BoxProps extends BoxPropsType {\n /** Child elements */\n children?: ReactNode\n}\n\n/**\n * Methods exposed via ref on Box component.\n */\nexport interface BoxHandle {\n /** Get the underlying SilveryNode */\n getNode(): AgNode | null\n /** Get the current content-relative layout rect */\n getBoxRect(): Rect | null\n /** Get the current screen-relative layout rect */\n getScrollRect(): Rect | null\n}\n\n// ============================================================================\n// Component\n// ============================================================================\n\n/**\n * Flexbox container component for terminal UIs.\n *\n * Provides NodeContext to children, enabling useBoxRect/useScrollRect hooks.\n * Supports forwardRef for imperative access and onLayout for layout callbacks.\n *\n * @example\n * ```tsx\n * // Basic vertical layout (default)\n * <Box>\n * <Text>Line 1</Text>\n * <Text>Line 2</Text>\n * </Box>\n *\n * // Horizontal layout with spacing\n * <Box flexDirection=\"row\" gap={2}>\n * <Box width={10}><Text>Left</Text></Box>\n * <Box flexGrow={1}><Text>Center</Text></Box>\n * <Box width={10}><Text>Right</Text></Box>\n * </Box>\n *\n * // With border\n * <Box borderStyle=\"single\" borderColor=\"green\" padding={1}>\n * <Text>Boxed content</Text>\n * </Box>\n *\n * // With ref and onLayout\n * const boxRef = useRef<BoxHandle>(null);\n * <Box\n * ref={boxRef}\n * onLayout={(layout) => console.log('Size:', layout.width, layout.height)}\n * >\n * <Text>Content</Text>\n * </Box>\n * ```\n */\nexport const Box = forwardRef(function Box(\n props: BoxProps,\n ref: ForwardedRef<BoxHandle>,\n): JSX.Element {\n const { children, onLayout, ...restProps } = props\n const nodeRef = useRef<AgNode | null>(null)\n const [node, setNode] = useState<AgNode | null>(null)\n\n // Track the last layout we reported to onLayout to avoid duplicate calls\n const lastReportedLayout = useRef<Rect | null>(null)\n\n // After mount, ref points to the SilveryNode. Update state once to provide\n // the node to children via context. Only runs on mount ([] deps).\n useLayoutEffect(() => {\n if (nodeRef.current) {\n setNode(nodeRef.current)\n }\n }, [])\n\n // Wire up onLayout callback - subscribe via layout signals\n useLayoutEffect(() => {\n if (!onLayout || !node) return\n\n const releaseObservation = observeLayoutSignal(node, \"boxRect\")\n const signals = getLayoutSignals(node)\n const onLayoutRef = { current: onLayout }\n onLayoutRef.current = onLayout\n\n const dispose = signalEffect(() => {\n const layout = signals.boxRect()\n if (!layout) return\n\n // Only call onLayout if layout actually changed\n const last = lastReportedLayout.current\n if (\n !last ||\n last.x !== layout.x ||\n last.y !== layout.y ||\n last.width !== layout.width ||\n last.height !== layout.height\n ) {\n lastReportedLayout.current = layout\n onLayoutRef.current(layout)\n }\n })\n\n return () => {\n dispose()\n releaseObservation()\n }\n }, [node, onLayout])\n\n // Expose imperative methods via ref\n useImperativeHandle(\n ref,\n () => ({\n getNode: () => nodeRef.current,\n getBoxRect: () => nodeRef.current?.boxRect ?? null,\n getScrollRect: () => nodeRef.current?.scrollRect ?? null,\n }),\n [],\n )\n\n // Render silvery-box with ref, wrap children in NodeContext\n // The reconciler creates an SilveryNode, ref gives us access to it\n return (\n <silvery-box ref={nodeRef} {...restProps}>\n <NodeContext.Provider value={node}>{children}</NodeContext.Provider>\n </silvery-box>\n )\n})\n","/**\n * Silvery Text Component\n *\n * The primitive for rendering text content in Silvery. Text supports styling\n * (colors, bold, italic, etc.) and text wrapping/truncation modes.\n *\n * Text renders to an 'silvery-text' host element that the reconciler converts\n * to an SilveryNode containing the text content.\n *\n * Supports forwardRef for imperative access to the underlying node.\n */\n\nimport { type ForwardedRef, type JSX, type ReactNode, forwardRef, useContext } from \"react\"\nimport type { AgNode, TextProps as TextPropsType } from \"@silvery/ag/types\"\nimport type { KnownVariant, Theme } from \"@silvery/ansi\"\nimport { KNOWN_VARIANTS } from \"@silvery/ansi\"\nimport { ThemeContext } from \"../ThemeContext\"\n\n// ============================================================================\n// Runtime variant warning — fires once per (theme, variantName) pair.\n// Warns the developer that a variant lookup returned undefined (typo, etc.).\n// Does NOT throw — silent no-op rendering is still the correct behavior.\n// Only fires in development/test (process.env.NODE_ENV !== \"production\").\n// ============================================================================\n\n/** Per-theme set of variant names that have already triggered a warning. */\nconst _warnedVariants = new WeakMap<Theme, Set<string>>()\n\nfunction warnOnce(theme: Theme, variant: string): void {\n if (process.env.NODE_ENV === \"production\") return\n let warned = _warnedVariants.get(theme)\n if (warned === undefined) {\n warned = new Set<string>()\n _warnedVariants.set(theme, warned)\n }\n if (warned.has(variant)) return\n warned.add(variant)\n const known = KNOWN_VARIANTS.join(\", \")\n // eslint-disable-next-line no-console\n console.warn(\n `[silvery] <Text variant=\"${variant}\"> — unknown variant, defaulting to bare. ` +\n `Known: ${known}. ` +\n `Register custom variants via <ThemeProvider tokens={{ variants: { ${variant}: {...} } }}>.`,\n )\n}\n\n// ============================================================================\n// Props\n// ============================================================================\n\nexport interface TextProps extends TextPropsType {\n /** Text content (string, number, or nested Text elements) */\n children?: ReactNode\n /**\n * Typography variant — pulls defaults from `theme.variants[variant]`.\n * Caller props always win over variant values (variant is the *default*).\n *\n * @example\n * ```tsx\n * <Text variant=\"h1\">Title</Text>\n * // → uses theme.variants.h1 as defaults ({ color: \"$fg-accent\", bold: true })\n *\n * <Text variant=\"h1\" color=\"$fg-success\">Done</Text>\n * // → color=\"$fg-success\" wins; bold still comes from variant\n * ```\n */\n variant?: KnownVariant\n}\n\n/**\n * Methods exposed via ref on Text component.\n */\nexport interface TextHandle {\n /** Get the underlying SilveryNode */\n getNode(): AgNode | null\n}\n\n// ============================================================================\n// Component\n// ============================================================================\n\n/**\n * Text rendering component for terminal UIs.\n *\n * Supports forwardRef for imperative access to the underlying node.\n *\n * @example\n * ```tsx\n * // Basic text\n * <Text>Hello, world!</Text>\n *\n * // Colored text\n * <Text color=\"green\">Success!</Text>\n * <Text color=\"#ff6600\">Orange text</Text>\n *\n * // Styled text\n * <Text bold>Important</Text>\n * <Text italic underline>Emphasized</Text>\n *\n * // Combined styles\n * <Text color=\"red\" bold inverse>Alert!</Text>\n *\n * // Nested text with different styles\n * <Text>\n * Normal <Text bold>bold</Text> normal\n * </Text>\n *\n * // Truncation modes\n * <Text wrap=\"truncate\">This long text will be truncated...</Text>\n * <Text wrap=\"truncate-middle\">Long...text</Text>\n *\n * // With ref\n * const textRef = useRef<TextHandle>(null);\n * <Text ref={textRef}>Hello</Text>\n *\n * // With variant — typography presets from theme\n * <Text variant=\"h1\">Page Title</Text>\n * <Text variant=\"body-muted\">Caption text</Text>\n * <Text variant=\"h1\" color=\"$fg-success\">Done</Text> // caller color wins\n * ```\n */\nexport const Text = forwardRef(function Text(\n props: TextProps,\n ref: ForwardedRef<TextHandle>,\n): JSX.Element {\n const { children, variant, ...callerProps } = props\n const theme = useContext(ThemeContext)\n\n // Resolve variant defaults. Variant is the DEFAULT; caller props always win.\n //\n // Merge strategy (three passes):\n // 1. callerProps — base layer: all caller props including undefined values\n // (preserves non-style props like wrap, data-*, etc.)\n // 2. variantDefaults — overwrite only where callerProps was undefined\n // (fills in color/bold/etc when caller didn't specify)\n // 3. definedCallerProps — restore any explicitly provided caller overrides\n // (e.g. color=\"$fg-success\", bold={false} win over variant)\n //\n // Example: `<Text variant=\"h1\">T</Text>` (color not passed → undefined)\n // callerProps = { color: undefined }\n // variantDefaults = { color: \"$fg-accent\", bold: true }\n // definedCallerProps = {} (color=undefined excluded)\n // → { color: \"$fg-accent\", bold: true } ✓\n //\n // Example: `<Text variant=\"h1\" color=\"$fg-success\">T</Text>`\n // callerProps = { color: \"$fg-success\" }\n // variantDefaults = { color: \"$fg-accent\", bold: true }\n // definedCallerProps = { color: \"$fg-success\" }\n // → { color: \"$fg-success\", bold: true } ✓ (caller color wins)\n let styleProps = callerProps\n if (variant != null) {\n const resolved = theme.variants?.[variant]\n if (resolved === undefined) {\n warnOnce(theme, variant)\n }\n const variantDefaults = resolved ?? {}\n const definedCallerProps: Record<string, unknown> = {}\n for (const key of Object.keys(callerProps)) {\n const v = (callerProps as Record<string, unknown>)[key]\n if (v !== undefined) definedCallerProps[key] = v\n }\n styleProps = { ...callerProps, ...variantDefaults, ...definedCallerProps } as typeof callerProps\n }\n\n // For Text, we need to pass the ref through to the host element\n // The reconciler's getPublicInstance will return the SilveryNode\n // We wrap it in a TextHandle for type safety\n return (\n <silvery-text\n ref={(node: AgNode | null) => {\n // Handle both callback refs and RefObjects\n if (typeof ref === \"function\") {\n ref(node ? { getNode: () => node } : null)\n } else if (ref) {\n ref.current = node ? { getNode: () => node } : null\n }\n }}\n {...styleProps}\n >\n {children}\n </silvery-text>\n )\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAa,eAAe,cAAqB,iBAAiB;;;;;;;;;;;AAYlE,MAAa,sBAAsB,cAAmC,KAAK;;;;;;AAW3E,SAAgB,WAAkB;AAChC,QAAO,WAAW,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACwCjC,MAAa,MAAM,WAAW,SAAS,IACrC,OACA,KACa;CACb,MAAM,EAAE,UAAU,UAAU,GAAG,cAAc;CAC7C,MAAM,UAAU,OAAsB,KAAK;CAC3C,MAAM,CAAC,MAAM,WAAW,SAAwB,KAAK;CAGrD,MAAM,qBAAqB,OAAoB,KAAK;AAIpD,uBAAsB;AACpB,MAAI,QAAQ,QACV,SAAQ,QAAQ,QAAQ;IAEzB,EAAE,CAAC;AAGN,uBAAsB;AACpB,MAAI,CAAC,YAAY,CAAC,KAAM;EAExB,MAAM,qBAAqB,oBAAoB,MAAM,UAAU;EAC/D,MAAM,UAAU,iBAAiB,KAAK;EACtC,MAAM,cAAc,EAAE,SAAS,UAAU;AACzC,cAAY,UAAU;EAEtB,MAAM,UAAUA,aAAmB;GACjC,MAAM,SAAS,QAAQ,SAAS;AAChC,OAAI,CAAC,OAAQ;GAGb,MAAM,OAAO,mBAAmB;AAChC,OACE,CAAC,QACD,KAAK,MAAM,OAAO,KAClB,KAAK,MAAM,OAAO,KAClB,KAAK,UAAU,OAAO,SACtB,KAAK,WAAW,OAAO,QACvB;AACA,uBAAmB,UAAU;AAC7B,gBAAY,QAAQ,OAAO;;IAE7B;AAEF,eAAa;AACX,YAAS;AACT,uBAAoB;;IAErB,CAAC,MAAM,SAAS,CAAC;AAGpB,qBACE,YACO;EACL,eAAe,QAAQ;EACvB,kBAAkB,QAAQ,SAAS,WAAW;EAC9C,qBAAqB,QAAQ,SAAS,cAAc;EACrD,GACD,EAAE,CACH;AAID,QACE,oBAAC,eAAD;EAAa,KAAK;EAAS,GAAI;YAC7B,oBAAC,YAAY,UAAb;GAAsB,OAAO;GAAO;GAAgC,CAAA;EACxD,CAAA;EAEhB;;;;;;;;;;;;;;;ACtIF,MAAM,kCAAkB,IAAI,SAA6B;AAEzD,SAAS,SAAS,OAAc,SAAuB;AACrD,KAAI,QAAQ,IAAI,aAAa,aAAc;CAC3C,IAAI,SAAS,gBAAgB,IAAI,MAAM;AACvC,KAAI,WAAW,KAAA,GAAW;AACxB,2BAAS,IAAI,KAAa;AAC1B,kBAAgB,IAAI,OAAO,OAAO;;AAEpC,KAAI,OAAO,IAAI,QAAQ,CAAE;AACzB,QAAO,IAAI,QAAQ;CACnB,MAAM,QAAQ,eAAe,KAAK,KAAK;AAEvC,SAAQ,KACN,4BAA4B,QAAQ,mDACxB,MAAM,sEACqD,QAAQ,gBAChF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8EH,MAAa,OAAO,WAAW,SAAS,KACtC,OACA,KACa;CACb,MAAM,EAAE,UAAU,SAAS,GAAG,gBAAgB;CAC9C,MAAM,QAAQ,WAAW,aAAa;CAuBtC,IAAI,aAAa;AACjB,KAAI,WAAW,MAAM;EACnB,MAAM,WAAW,MAAM,WAAW;AAClC,MAAI,aAAa,KAAA,EACf,UAAS,OAAO,QAAQ;EAE1B,MAAM,kBAAkB,YAAY,EAAE;EACtC,MAAM,qBAA8C,EAAE;AACtD,OAAK,MAAM,OAAO,OAAO,KAAK,YAAY,EAAE;GAC1C,MAAM,IAAK,YAAwC;AACnD,OAAI,MAAM,KAAA,EAAW,oBAAmB,OAAO;;AAEjD,eAAa;GAAE,GAAG;GAAa,GAAG;GAAiB,GAAG;GAAoB;;AAM5E,QACE,oBAAC,gBAAD;EACE,MAAM,SAAwB;AAE5B,OAAI,OAAO,QAAQ,WACjB,KAAI,OAAO,EAAE,eAAe,MAAM,GAAG,KAAK;YACjC,IACT,KAAI,UAAU,OAAO,EAAE,eAAe,MAAM,GAAG;;EAGnD,GAAI;EAEH;EACY,CAAA;EAEjB"}
1
+ {"version":3,"file":"Text-4tWKabKH.mjs","names":["signalEffect"],"sources":["../packages/ag-react/src/ThemeContext.tsx","../packages/ag-react/src/components/Box.tsx","../packages/ag-react/src/components/Text.tsx"],"sourcesContent":["/**\n * ThemeContext — delivers a Theme to the component tree.\n *\n * Wrap your app (or a subtree) in `<ThemeProvider theme={…}>` to make\n * `$token` color props resolve against that theme. Components call\n * `useTheme()` to read the current theme.\n *\n * @example\n * ```tsx\n * import { ThemeProvider, defaultDarkTheme } from '@silvery/ag-react'\n *\n * <ThemeProvider theme={defaultDarkTheme}>\n * <App />\n * </ThemeProvider>\n * ```\n */\n\nimport { createContext, useContext } from \"react\"\nimport type { Theme, ActiveScheme } from \"@silvery/ansi\"\nimport { defaultDarkTheme } from \"@silvery/theme/schemes\"\n\n// ============================================================================\n// Context\n// ============================================================================\n\n/** @internal Exported for ThemeProvider and Text component — not public API. */\nexport const ThemeContext = createContext<Theme>(defaultDarkTheme)\n\n/**\n * Context that carries scheme detection metadata (name, source, confidence).\n *\n * Separate from ThemeContext because scheme metadata is orthogonal to the\n * theme token bag. Populated by `<ThemeProvider scheme={...}>` when the\n * caller passes detection provenance (e.g. from `runThemed`). Null when\n * no scheme metadata was injected.\n *\n * @internal Exported for ThemeProvider.\n */\nexport const ActiveSchemeContext = createContext<ActiveScheme | null>(null)\n\n// ============================================================================\n// Hook\n// ============================================================================\n\n/**\n * Read the current theme from context.\n *\n * Returns `defaultDarkTheme` when no `ThemeProvider` is present.\n */\nexport function useTheme(): Theme {\n return useContext(ThemeContext)\n}\n","/**\n * Silvery Box Component\n *\n * The primary layout primitive for Silvery. Box is a flexbox container that can hold\n * other Box or Text components. It supports all standard flexbox properties,\n * dimensions, spacing, and borders.\n *\n * Box renders to an 'silvery-box' host element that the reconciler converts to an\n * SilveryNode with an associated Yoga layout node.\n *\n * Box provides NodeContext to its children, enabling useBoxRect/useScrollRect hooks.\n * It also supports forwardRef for imperative access and onLayout for layout callbacks.\n */\n\nimport {\n type ForwardedRef,\n type JSX,\n type ReactNode,\n forwardRef,\n useImperativeHandle,\n useLayoutEffect,\n useRef,\n useState,\n} from \"react\"\nimport { effect as signalEffect } from \"@silvery/signals\"\nimport { NodeContext } from \"../context\"\nimport { getLayoutSignals, observeLayoutSignal } from \"@silvery/ag/layout-signals\"\nimport type { BoxProps as BoxPropsType, AgNode, Rect } from \"@silvery/ag/types\"\n\n// ============================================================================\n// Props\n// ============================================================================\n\nexport interface BoxProps extends BoxPropsType {\n /** Child elements */\n children?: ReactNode\n}\n\n/**\n * Methods exposed via ref on Box component.\n */\nexport interface BoxHandle {\n /** Get the underlying SilveryNode */\n getNode(): AgNode | null\n /** Get the current content-relative layout rect */\n getBoxRect(): Rect | null\n /** Get the current screen-relative layout rect */\n getScrollRect(): Rect | null\n}\n\n// ============================================================================\n// Component\n// ============================================================================\n\n/**\n * Flexbox container component for terminal UIs.\n *\n * Provides NodeContext to children, enabling useBoxRect/useScrollRect hooks.\n * Supports forwardRef for imperative access and onLayout for layout callbacks.\n *\n * @example\n * ```tsx\n * // Basic vertical layout (default)\n * <Box>\n * <Text>Line 1</Text>\n * <Text>Line 2</Text>\n * </Box>\n *\n * // Horizontal layout with spacing\n * <Box flexDirection=\"row\" gap={2}>\n * <Box width={10}><Text>Left</Text></Box>\n * <Box flexGrow={1}><Text>Center</Text></Box>\n * <Box width={10}><Text>Right</Text></Box>\n * </Box>\n *\n * // With border\n * <Box borderStyle=\"single\" borderColor=\"green\" padding={1}>\n * <Text>Boxed content</Text>\n * </Box>\n *\n * // With ref and onLayout\n * const boxRef = useRef<BoxHandle>(null);\n * <Box\n * ref={boxRef}\n * onLayout={(layout) => console.log('Size:', layout.width, layout.height)}\n * >\n * <Text>Content</Text>\n * </Box>\n * ```\n */\nexport const Box = forwardRef(function Box(\n props: BoxProps,\n ref: ForwardedRef<BoxHandle>,\n): JSX.Element {\n const { children, onLayout, ...restProps } = props\n const nodeRef = useRef<AgNode | null>(null)\n const [node, setNode] = useState<AgNode | null>(null)\n\n // Track the last layout we reported to onLayout to avoid duplicate calls\n const lastReportedLayout = useRef<Rect | null>(null)\n\n // After mount, ref points to the SilveryNode. Update state once to provide\n // the node to children via context. Only runs on mount ([] deps).\n useLayoutEffect(() => {\n if (nodeRef.current) {\n setNode(nodeRef.current)\n }\n }, [])\n\n // Wire up onLayout callback - subscribe via layout signals\n useLayoutEffect(() => {\n if (!onLayout || !node) return\n\n const releaseObservation = observeLayoutSignal(node, \"boxRect\")\n const signals = getLayoutSignals(node)\n const onLayoutRef = { current: onLayout }\n onLayoutRef.current = onLayout\n\n const dispose = signalEffect(() => {\n const layout = signals.boxRect()\n if (!layout) return\n\n // Only call onLayout if layout actually changed\n const last = lastReportedLayout.current\n if (\n !last ||\n last.x !== layout.x ||\n last.y !== layout.y ||\n last.width !== layout.width ||\n last.height !== layout.height\n ) {\n lastReportedLayout.current = layout\n onLayoutRef.current(layout)\n }\n })\n\n return () => {\n dispose()\n releaseObservation()\n }\n }, [node, onLayout])\n\n // Expose imperative methods via ref\n useImperativeHandle(\n ref,\n () => ({\n getNode: () => nodeRef.current,\n getBoxRect: () => nodeRef.current?.boxRect ?? null,\n getScrollRect: () => nodeRef.current?.scrollRect ?? null,\n }),\n [],\n )\n\n // Render silvery-box with ref, wrap children in NodeContext\n // The reconciler creates an SilveryNode, ref gives us access to it\n return (\n <silvery-box ref={nodeRef} {...restProps}>\n <NodeContext.Provider value={node}>{children}</NodeContext.Provider>\n </silvery-box>\n )\n})\n","/**\n * Silvery Text Component\n *\n * The primitive for rendering text content in Silvery. Text supports styling\n * (colors, bold, italic, etc.) and text wrapping/truncation modes.\n *\n * Text renders to an 'silvery-text' host element that the reconciler converts\n * to an SilveryNode containing the text content.\n *\n * Supports forwardRef for imperative access to the underlying node.\n */\n\nimport { type ForwardedRef, type JSX, type ReactNode, forwardRef, useContext } from \"react\"\nimport type { AgNode, TextProps as TextPropsType } from \"@silvery/ag/types\"\nimport type { KnownVariant, Theme } from \"@silvery/ansi\"\nimport { KNOWN_VARIANTS } from \"@silvery/ansi\"\nimport { ThemeContext } from \"../ThemeContext\"\n\n// ============================================================================\n// Runtime variant warning — fires once per (theme, variantName) pair.\n// Warns the developer that a variant lookup returned undefined (typo, etc.).\n// Does NOT throw — silent no-op rendering is still the correct behavior.\n// Only fires in development/test (process.env.NODE_ENV !== \"production\").\n// ============================================================================\n\n/** Per-theme set of variant names that have already triggered a warning. */\nconst _warnedVariants = new WeakMap<Theme, Set<string>>()\n\nfunction warnOnce(theme: Theme, variant: string): void {\n if (process.env.NODE_ENV === \"production\") return\n let warned = _warnedVariants.get(theme)\n if (warned === undefined) {\n warned = new Set<string>()\n _warnedVariants.set(theme, warned)\n }\n if (warned.has(variant)) return\n warned.add(variant)\n const known = KNOWN_VARIANTS.join(\", \")\n // eslint-disable-next-line no-console\n console.warn(\n `[silvery] <Text variant=\"${variant}\"> — unknown variant, defaulting to bare. ` +\n `Known: ${known}. ` +\n `Register custom variants via <ThemeProvider tokens={{ variants: { ${variant}: {...} } }}>.`,\n )\n}\n\n// ============================================================================\n// Props\n// ============================================================================\n\nexport interface TextProps extends TextPropsType {\n /** Text content (string, number, or nested Text elements) */\n children?: ReactNode\n /**\n * Typography variant — pulls defaults from `theme.variants[variant]`.\n * Caller props always win over variant values (variant is the *default*).\n *\n * @example\n * ```tsx\n * <Text variant=\"h1\">Title</Text>\n * // → uses theme.variants.h1 as defaults ({ color: \"$fg-accent\", bold: true })\n *\n * <Text variant=\"h1\" color=\"$fg-success\">Done</Text>\n * // → color=\"$fg-success\" wins; bold still comes from variant\n * ```\n */\n variant?: KnownVariant\n}\n\n/**\n * Methods exposed via ref on Text component.\n */\nexport interface TextHandle {\n /** Get the underlying SilveryNode */\n getNode(): AgNode | null\n}\n\n// ============================================================================\n// Component\n// ============================================================================\n\n/**\n * Text rendering component for terminal UIs.\n *\n * Supports forwardRef for imperative access to the underlying node.\n *\n * @example\n * ```tsx\n * // Basic text\n * <Text>Hello, world!</Text>\n *\n * // Colored text\n * <Text color=\"green\">Success!</Text>\n * <Text color=\"#ff6600\">Orange text</Text>\n *\n * // Styled text\n * <Text bold>Important</Text>\n * <Text italic underline>Emphasized</Text>\n *\n * // Combined styles\n * <Text color=\"red\" bold inverse>Alert!</Text>\n *\n * // Nested text with different styles\n * <Text>\n * Normal <Text bold>bold</Text> normal\n * </Text>\n *\n * // Truncation modes\n * <Text wrap=\"truncate\">This long text will be truncated...</Text>\n * <Text wrap=\"truncate-middle\">Long...text</Text>\n *\n * // With ref\n * const textRef = useRef<TextHandle>(null);\n * <Text ref={textRef}>Hello</Text>\n *\n * // With variant — typography presets from theme\n * <Text variant=\"h1\">Page Title</Text>\n * <Text variant=\"body-muted\">Caption text</Text>\n * <Text variant=\"h1\" color=\"$fg-success\">Done</Text> // caller color wins\n * ```\n */\nexport const Text = forwardRef(function Text(\n props: TextProps,\n ref: ForwardedRef<TextHandle>,\n): JSX.Element {\n const { children, variant, ...callerProps } = props\n const theme = useContext(ThemeContext)\n\n // Resolve variant defaults. Variant is the DEFAULT; caller props always win.\n //\n // Merge strategy (three passes):\n // 1. callerProps — base layer: all caller props including undefined values\n // (preserves non-style props like wrap, data-*, etc.)\n // 2. variantDefaults — overwrite only where callerProps was undefined\n // (fills in color/bold/etc when caller didn't specify)\n // 3. definedCallerProps — restore any explicitly provided caller overrides\n // (e.g. color=\"$fg-success\", bold={false} win over variant)\n //\n // Example: `<Text variant=\"h1\">T</Text>` (color not passed → undefined)\n // callerProps = { color: undefined }\n // variantDefaults = { color: \"$fg-accent\", bold: true }\n // definedCallerProps = {} (color=undefined excluded)\n // → { color: \"$fg-accent\", bold: true } ✓\n //\n // Example: `<Text variant=\"h1\" color=\"$fg-success\">T</Text>`\n // callerProps = { color: \"$fg-success\" }\n // variantDefaults = { color: \"$fg-accent\", bold: true }\n // definedCallerProps = { color: \"$fg-success\" }\n // → { color: \"$fg-success\", bold: true } ✓ (caller color wins)\n let styleProps = callerProps\n if (variant != null) {\n const resolved = theme.variants?.[variant]\n if (resolved === undefined) {\n warnOnce(theme, variant)\n }\n const variantDefaults = resolved ?? {}\n const definedCallerProps: Record<string, unknown> = {}\n for (const key of Object.keys(callerProps)) {\n const v = (callerProps as Record<string, unknown>)[key]\n if (v !== undefined) definedCallerProps[key] = v\n }\n styleProps = { ...callerProps, ...variantDefaults, ...definedCallerProps } as typeof callerProps\n }\n\n // For Text, we need to pass the ref through to the host element\n // The reconciler's getPublicInstance will return the SilveryNode\n // We wrap it in a TextHandle for type safety\n return (\n <silvery-text\n ref={(node: AgNode | null) => {\n // Handle both callback refs and RefObjects\n if (typeof ref === \"function\") {\n ref(node ? { getNode: () => node } : null)\n } else if (ref) {\n ref.current = node ? { getNode: () => node } : null\n }\n }}\n {...styleProps}\n >\n {children}\n </silvery-text>\n )\n})\n"],"mappings":"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"}
@@ -1,11 +1,11 @@
1
- import { i as signal, n as computed } from "./src-BqeBFB3X.mjs";
2
- import { _ as rectEqual, c as hasObservedLayoutSignal, d as syncDecorationRects, p as syncRectSignals, s as hasLayoutSignals } from "./layout-signals-CGYbHmxy.mjs";
3
- import { Ct as isStrictEnabled, D as runWithMeasurer, E as parseAnsiText, I as wrapText, M as splitGraphemesAnsiAware, O as sliceByWidth, St as isStrictAnyEnabled, Xt as ansi256ToRgb, Yt as TerminalBuffer, _ as isLikelyEmoji, a as displayWidthAnsi, an as isDefaultBg, c as fixSgrAcrossWrappedLines, f as graphemeWidth, in as createTextFrame, j as splitGraphemes, k as sliceByWidthFromEnd, l as getActiveLineHeight, o as ensureEmojiPresentation, p as hasAnsi, qt as DEFAULT_BG, rn as createMutableCell, s as fixOsc8AcrossWrappedLines, t as canBreakAnywhere, v as isSoftBreakPoint, x as isWordBoundary } from "./unicode-CxyxVGmB.mjs";
4
- import { _ as kittyDeleteAllScrimPlacements, g as cupTo, h as buildScrimPixels, m as backdropPlacementId, p as resolveThemeColor, u as monoAttrsForColorString, v as kittyPlaceAt, y as kittyUploadScrimImage } from "./src-B8lf1kiR.mjs";
5
- import { C as isDirty, S as isCurrentEpoch, _ as measureStats, b as getRenderEpoch, h as hasScrollDirty, m as clearDirtyTracking, v as collectPlainText, x as isAnyDirty, y as advanceRenderEpoch } from "./reconciler--_-biN23.mjs";
6
- import { r as getLayoutEngine } from "./layout-engine-BgR58vL0.mjs";
7
- import "./src-BOLdi3WG.mjs";
8
- import { t as ansi16DarkTheme } from "./schemes-DWQPxXAi.mjs";
1
+ import { i as signal, n as computed } from "./src-B6MuVlOK.mjs";
2
+ import { _ as rectEqual, c as hasObservedLayoutSignal, d as syncDecorationRects, p as syncRectSignals, s as hasLayoutSignals } from "./layout-signals-uQadGDmO.mjs";
3
+ import { Ct as isStrictEnabled, D as runWithMeasurer, E as parseAnsiText, I as wrapText, M as splitGraphemesAnsiAware, O as sliceByWidth, St as isStrictAnyEnabled, Xt as ansi256ToRgb, Yt as TerminalBuffer, _ as isLikelyEmoji, a as displayWidthAnsi, an as isDefaultBg, c as fixSgrAcrossWrappedLines, f as graphemeWidth, in as createTextFrame, j as splitGraphemes, k as sliceByWidthFromEnd, l as getActiveLineHeight, o as ensureEmojiPresentation, p as hasAnsi, qt as DEFAULT_BG, rn as createMutableCell, s as fixOsc8AcrossWrappedLines, t as canBreakAnywhere, v as isSoftBreakPoint, x as isWordBoundary } from "./unicode-X43-fdGF.mjs";
4
+ import { _ as kittyDeleteAllScrimPlacements, g as cupTo, h as buildScrimPixels, m as backdropPlacementId, p as resolveThemeColor, u as monoAttrsForColorString, v as kittyPlaceAt, y as kittyUploadScrimImage } from "./src-DorsnS70.mjs";
5
+ import { C as isDirty, S as isCurrentEpoch, _ as measureStats, b as getRenderEpoch, h as hasScrollDirty, m as clearDirtyTracking, v as collectPlainText, x as isAnyDirty, y as advanceRenderEpoch } from "./reconciler-lsTL1y8i.mjs";
6
+ import { r as getLayoutEngine } from "./layout-engine-BYp49XPD.mjs";
7
+ import "./src-DdGaRDi9.mjs";
8
+ import { t as ansi16DarkTheme } from "./schemes-C4SUgVea.mjs";
9
9
  import { createLogger } from "loggily";
10
10
  import { hexToOklch, mixSrgb, oklchToHex, relativeLuminance } from "@silvery/color";
11
11
  import { appendFileSync } from "node:fs";
@@ -8747,4 +8747,4 @@ function createAg(root, options) {
8747
8747
  //#endregion
8748
8748
  export { printPassHistogram as _, setActiveColorLevel as a, INSTRUMENT as c, assertBoundedConvergence as d, beginConvergenceLoop as f, notePassCommit as g, logPass as h, parseColor as i, MAX_CONVERGENCE_PASSES as l, formatPassRingBreakdown as m, createRenderPostState as n, FRESH_LAYOUT_STRICT_SLUG as o, beginPass as p, hexToRgb$1 as r, markLayoutTreeDirty as s, createAg as t, appendHistogramJson as u, recordPassRing as v, resetPassHistogram as y };
8749
8749
 
8750
- //# sourceMappingURL=ag-q9lRlKlt.mjs.map
8750
+ //# sourceMappingURL=ag-B-7XAHL8.mjs.map