@zaly/tui 0.0.4 → 0.0.6

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 (156) hide show
  1. package/dist/actions-CnVzKVID.d.mts +41 -0
  2. package/dist/actions-CnVzKVID.d.mts.map +1 -0
  3. package/dist/actions-DEIKF2ts.mjs +48 -0
  4. package/dist/actions-DEIKF2ts.mjs.map +1 -0
  5. package/dist/{box-DyaByEiG.mjs → box-DepqUtuo.mjs} +2 -2
  6. package/dist/{box-DyaByEiG.mjs.map → box-DepqUtuo.mjs.map} +1 -1
  7. package/dist/{builder-D49ECBEf.mjs → builder-DTz5mppV.mjs} +2 -2
  8. package/dist/{builder-D49ECBEf.mjs.map → builder-DTz5mppV.mjs.map} +1 -1
  9. package/dist/{callbacks-CNjGNxVw.mjs → callbacks-DcMBGQEO.mjs} +2 -2
  10. package/dist/{callbacks-CNjGNxVw.mjs.map → callbacks-DcMBGQEO.mjs.map} +1 -1
  11. package/dist/{client-D6C_uczF.mjs → client-BBdtbLp4.mjs} +5 -10
  12. package/dist/client-BBdtbLp4.mjs.map +1 -0
  13. package/dist/client-cIckDgAj.mjs +2 -0
  14. package/dist/clipboard-l_TWxxTf.mjs +404 -0
  15. package/dist/clipboard-l_TWxxTf.mjs.map +1 -0
  16. package/dist/clipboard.mjs +1 -403
  17. package/dist/ctx-Bt4VlRPg.mjs +2 -0
  18. package/dist/ctx-DjJ1zSbs.mjs +43 -0
  19. package/dist/ctx-DjJ1zSbs.mjs.map +1 -0
  20. package/dist/divider-cclEAdPx.mjs +9 -0
  21. package/dist/divider-cclEAdPx.mjs.map +1 -0
  22. package/dist/files-Aw3iWpXD.d.mts +29 -0
  23. package/dist/files-Aw3iWpXD.d.mts.map +1 -0
  24. package/dist/files-BvThQpOf.mjs +42 -0
  25. package/dist/files-BvThQpOf.mjs.map +1 -0
  26. package/dist/github-Cy2hfWJ7.mjs +137 -0
  27. package/dist/github-Cy2hfWJ7.mjs.map +1 -0
  28. package/dist/github-DS00VoOj.d.mts +64 -0
  29. package/dist/github-DS00VoOj.d.mts.map +1 -0
  30. package/dist/image-BTxDPPiT.d.mts +37 -0
  31. package/dist/image-BTxDPPiT.d.mts.map +1 -0
  32. package/dist/index.mjs +6 -202
  33. package/dist/index.mjs.map +1 -1
  34. package/dist/input-CRBuTrsL.mjs +497 -0
  35. package/dist/input-CRBuTrsL.mjs.map +1 -0
  36. package/dist/{inspect-D1d9t-ni.mjs → inspect-DE5goDzB.mjs} +2 -2
  37. package/dist/{inspect-D1d9t-ni.mjs.map → inspect-DE5goDzB.mjs.map} +1 -1
  38. package/dist/log-Djvrxqk0.mjs +130 -0
  39. package/dist/log-Djvrxqk0.mjs.map +1 -0
  40. package/dist/logger-DDrt03So.mjs +71 -0
  41. package/dist/logger-DDrt03So.mjs.map +1 -0
  42. package/dist/markdown-CTlPe5ks.mjs +124 -0
  43. package/dist/markdown-CTlPe5ks.mjs.map +1 -0
  44. package/dist/markdown.mjs +1 -1
  45. package/dist/overlay-9xNgsuuy.mjs +18 -0
  46. package/dist/overlay-9xNgsuuy.mjs.map +1 -0
  47. package/dist/{picker-ndVVt6qF.mjs → picker-cH-rc7-X.mjs} +5 -5
  48. package/dist/{picker-ndVVt6qF.mjs.map → picker-cH-rc7-X.mjs.map} +1 -1
  49. package/dist/queries-B_lOwEiE.mjs +200 -0
  50. package/dist/queries-B_lOwEiE.mjs.map +1 -0
  51. package/dist/{registry-U654j61Y.mjs → registry-w_w7gZr_.mjs} +3 -5
  52. package/dist/registry-w_w7gZr_.mjs.map +1 -0
  53. package/dist/render-F8pVXN7h.mjs +33 -0
  54. package/dist/render-F8pVXN7h.mjs.map +1 -0
  55. package/dist/renderer-Dgj_qEOA.mjs +2 -0
  56. package/dist/{renderer-CdLCkJB-.mjs → renderer-qSMVeNSV.mjs} +3 -5
  57. package/dist/{renderer-CdLCkJB-.mjs.map → renderer-qSMVeNSV.mjs.map} +1 -1
  58. package/dist/{renderer-CxL4xbkl.mjs → renderer-uMeDzF9B.mjs} +8 -7
  59. package/dist/{renderer-CxL4xbkl.mjs.map → renderer-uMeDzF9B.mjs.map} +1 -1
  60. package/dist/select-m7NE6Rwa.mjs +195 -0
  61. package/dist/select-m7NE6Rwa.mjs.map +1 -0
  62. package/dist/services/logger.mjs +1 -70
  63. package/dist/services/notifier.mjs +2 -2
  64. package/dist/services/picker.d.mts +1 -1
  65. package/dist/services/picker.mjs +6 -6
  66. package/dist/services/prompt.d.mts +1 -1
  67. package/dist/services/prompt.mjs +5 -5
  68. package/dist/shiki/server.d.mts +1 -0
  69. package/dist/shiki/server.mjs +129 -0
  70. package/dist/shiki/server.mjs.map +1 -0
  71. package/dist/{shiki-BrjVUkeh.mjs → shiki-B5NwIiot.mjs} +5 -10
  72. package/dist/shiki-B5NwIiot.mjs.map +1 -0
  73. package/dist/shiki-BK-v9CtF.mjs +12 -0
  74. package/dist/shiki-BK-v9CtF.mjs.map +1 -0
  75. package/dist/show-DR2x1YFc.mjs +85 -0
  76. package/dist/show-DR2x1YFc.mjs.map +1 -0
  77. package/dist/style.mjs +2 -2
  78. package/dist/text-9lwQeqYr.d.mts +33 -0
  79. package/dist/text-9lwQeqYr.d.mts.map +1 -0
  80. package/dist/text-DILrol9j.mjs +32 -0
  81. package/dist/text-DILrol9j.mjs.map +1 -0
  82. package/dist/text-q26V6_Sc.mjs +111 -0
  83. package/dist/text-q26V6_Sc.mjs.map +1 -0
  84. package/dist/text.d.mts +2 -33
  85. package/dist/text.mjs +1 -110
  86. package/dist/{theme.config-CU3B50HN.mjs → theme.config-BptYUq4K.mjs} +4 -4
  87. package/dist/{theme.config-CU3B50HN.mjs.map → theme.config-BptYUq4K.mjs.map} +1 -1
  88. package/dist/themes.mjs +1 -1
  89. package/dist/tree-Bo1afYhe.mjs +73 -0
  90. package/dist/tree-Bo1afYhe.mjs.map +1 -0
  91. package/dist/widget-BkMwhY2p.mjs +40 -0
  92. package/dist/widget-BkMwhY2p.mjs.map +1 -0
  93. package/dist/widget-M7jD8Rgg.d.mts +49 -0
  94. package/dist/widget-M7jD8Rgg.d.mts.map +1 -0
  95. package/dist/widgets/autocomplete.mjs +2 -2
  96. package/dist/widgets/box.mjs +1 -1
  97. package/dist/widgets/code.mjs +7 -7
  98. package/dist/widgets/completions/actions.d.mts +2 -41
  99. package/dist/widgets/completions/actions.mjs +1 -47
  100. package/dist/widgets/completions/files.d.mts +2 -29
  101. package/dist/widgets/completions/files.mjs +1 -41
  102. package/dist/widgets/completions/github.d.mts +2 -64
  103. package/dist/widgets/completions/github.mjs +1 -136
  104. package/dist/widgets/completions/index.d.mts +3 -3
  105. package/dist/widgets/completions/index.mjs +3 -3
  106. package/dist/widgets/diff.d.mts +1 -1
  107. package/dist/widgets/diff.mjs +3 -3
  108. package/dist/widgets/divider.mjs +1 -8
  109. package/dist/widgets/image.d.mts +2 -37
  110. package/dist/widgets/image.mjs +1 -1
  111. package/dist/widgets/input.mjs +1 -496
  112. package/dist/widgets/log.mjs +1 -129
  113. package/dist/widgets/markdown.d.mts +2 -2
  114. package/dist/widgets/markdown.mjs +1 -123
  115. package/dist/widgets/overlay.mjs +1 -17
  116. package/dist/widgets/picker.mjs +1 -1
  117. package/dist/widgets/select.mjs +1 -194
  118. package/dist/widgets/show.mjs +1 -84
  119. package/dist/widgets/text.mjs +1 -31
  120. package/dist/widgets/tree.mjs +1 -72
  121. package/dist/widgets/widget.d.mts +2 -49
  122. package/dist/widgets/widget.mjs +1 -39
  123. package/dist/worker-BvRm4OsW.mjs +2 -0
  124. package/dist/worker-T6SdPzUH.mjs +52 -0
  125. package/dist/worker-T6SdPzUH.mjs.map +1 -0
  126. package/package.json +7 -3
  127. package/dist/client-D6C_uczF.mjs.map +0 -1
  128. package/dist/clipboard.mjs.map +0 -1
  129. package/dist/registry-U654j61Y.mjs.map +0 -1
  130. package/dist/render-DxVLqqB9.mjs +0 -74
  131. package/dist/render-DxVLqqB9.mjs.map +0 -1
  132. package/dist/rolldown-runtime-D7D4PA-g.mjs +0 -13
  133. package/dist/services/logger.mjs.map +0 -1
  134. package/dist/shiki-BrjVUkeh.mjs.map +0 -1
  135. package/dist/text.d.mts.map +0 -1
  136. package/dist/text.mjs.map +0 -1
  137. package/dist/widgets/completions/actions.d.mts.map +0 -1
  138. package/dist/widgets/completions/actions.mjs.map +0 -1
  139. package/dist/widgets/completions/files.d.mts.map +0 -1
  140. package/dist/widgets/completions/files.mjs.map +0 -1
  141. package/dist/widgets/completions/github.d.mts.map +0 -1
  142. package/dist/widgets/completions/github.mjs.map +0 -1
  143. package/dist/widgets/divider.mjs.map +0 -1
  144. package/dist/widgets/image.d.mts.map +0 -1
  145. package/dist/widgets/input.mjs.map +0 -1
  146. package/dist/widgets/log.mjs.map +0 -1
  147. package/dist/widgets/markdown.mjs.map +0 -1
  148. package/dist/widgets/overlay.mjs.map +0 -1
  149. package/dist/widgets/select.mjs.map +0 -1
  150. package/dist/widgets/show.mjs.map +0 -1
  151. package/dist/widgets/text.mjs.map +0 -1
  152. package/dist/widgets/tree.mjs.map +0 -1
  153. package/dist/widgets/widget.d.mts.map +0 -1
  154. package/dist/widgets/widget.mjs.map +0 -1
  155. package/dist/worker-DjHuQSbY.mjs +0 -27
  156. package/dist/worker-DjHuQSbY.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"theme.config-CU3B50HN.mjs","names":["__typia_transform__assertGuard._assertGuard","__typia_transform__accessExpressionAsString._accessExpressionAsString"],"sources":["../../../node_modules/.bun/typia@13.0.2+e154a6929a67600d/node_modules/typia/lib/TypeGuardError.mjs","../../../node_modules/.bun/typia@13.0.2+e154a6929a67600d/node_modules/typia/lib/internal/_assertGuard.mjs","../../../node_modules/.bun/typia@13.0.2+e154a6929a67600d/node_modules/typia/lib/internal/_accessExpressionAsString.mjs","../src/schemas/gen/theme.config.ts"],"sourcesContent":["//#region src/TypeGuardError.ts\n/**\n* Error thrown when type assertion fails.\n*\n* Thrown by {@link assert}, {@link assertGuard}, and other assert-family\n* functions when input doesn't match expected type `T`. Contains detailed\n* information about the first assertion failure:\n*\n* - `method`: Which typia function threw (e.g., `\"typia.assert\"`)\n* - `path`: Property path where error occurred (e.g., `\"input.user.age\"`)\n* - `expected`: Expected type string (e.g., `\"number & ExclusiveMinimum<19>\"`)\n* - `value`: Actual value that failed validation\n*\n* @template T Expected type (for type safety)\n*/\nvar TypeGuardError = class extends Error {\n\t/**\n\t* Creates a new TypeGuardError instance.\n\t*\n\t* @param props Error properties\n\t*/\n\tconstructor(props) {\n\t\tsuper(props.message || `Error on ${props.method}(): invalid type${props.path ? ` on ${props.path}` : \"\"}, expect to be ${props.expected}`);\n\t\tconst proto = new.target.prototype;\n\t\tif (Object.setPrototypeOf) Object.setPrototypeOf(this, proto);\n\t\telse this.__proto__ = proto;\n\t\tthis.name = \"TypeGuardError\";\n\t\tthis.method = props.method;\n\t\tthis.path = props.path;\n\t\tthis.expected = props.expected;\n\t\tthis.value = props.value;\n\t\tif (props.description || props.value === void 0) this.description = props.description ?? [\n\t\t\t\"The value at this path is `undefined`.\",\n\t\t\t\"\",\n\t\t\t`Please fill the \\`${props.expected}\\` typed value next time.`\n\t\t].join(\"\\n\");\n\t}\n};\n//#endregion\nexport { TypeGuardError };\n\n//# sourceMappingURL=TypeGuardError.mjs.map","import { TypeGuardError } from \"../TypeGuardError.mjs\";\n//#region src/internal/_assertGuard.ts\nconst _assertGuard = (exceptionable, props, factory) => {\n\tif (exceptionable === true) if (factory) throw factory(props);\n\telse throw new TypeGuardError(props);\n\treturn false;\n};\n//#endregion\nexport { _assertGuard };\n\n//# sourceMappingURL=_assertGuard.mjs.map","//#region src/internal/_accessExpressionAsString.ts\nconst _accessExpressionAsString = (str) => variable(str) ? `.${str}` : `[${JSON.stringify(str)}]`;\nconst variable = (str) => reserved(str) === false && /^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(str);\nconst reserved = (str) => RESERVED.has(str);\nconst RESERVED = /* @__PURE__ */ new Set([\n\t\"break\",\n\t\"case\",\n\t\"catch\",\n\t\"class\",\n\t\"const\",\n\t\"continue\",\n\t\"debugger\",\n\t\"default\",\n\t\"delete\",\n\t\"do\",\n\t\"else\",\n\t\"enum\",\n\t\"export\",\n\t\"extends\",\n\t\"false\",\n\t\"finally\",\n\t\"for\",\n\t\"function\",\n\t\"if\",\n\t\"import\",\n\t\"in\",\n\t\"instanceof\",\n\t\"new\",\n\t\"null\",\n\t\"return\",\n\t\"super\",\n\t\"switch\",\n\t\"this\",\n\t\"throw\",\n\t\"true\",\n\t\"try\",\n\t\"typeof\",\n\t\"var\",\n\t\"void\",\n\t\"while\",\n\t\"with\"\n]);\n//#endregion\nexport { _accessExpressionAsString };\n\n//# sourceMappingURL=_accessExpressionAsString.mjs.map","import * as __typia_transform__assertGuard from \"typia/lib/internal/_assertGuard\";\nimport * as __typia_transform__accessExpressionAsString from \"typia/lib/internal/_accessExpressionAsString\";\nimport type { ShikiTheme } from \"../../shiki/types.ts\";\nimport type { AnsiColorName, BrightAnsiColorName, Color, HexColor, Style, ThemeKey, } from \"../../style/types.ts\";\nimport type { Theme } from \"../../themes/types.ts\";\ntype UserStyle = Omit<Style, \"fg\" | \"bg\" | \"style\"> & {\n fg?: string;\n bg?: string;\n};\ntype UserTheme = {\n $schema?: string;\n shiki?: ShikiTheme;\n id: string;\n name?: string;\n} & Record<string, string | UserStyle>;\ntype ColorKeys<T> = {\n [K in keyof T]-?: [\n T[K]\n ] extends [\n Color\n ] ? K : never;\n}[keyof T];\nconst toBaseColor = (() => { const _iv1 = new Set([\"red\", \"black\", \"green\", \"yellow\", \"blue\", \"magenta\", \"cyan\", \"white\", \"gray\", \"grey\", \"brightRed\", \"brightBlack\", \"brightGreen\", \"brightYellow\", \"brightBlue\", \"brightMagenta\", \"brightCyan\", \"brightWhite\", \"brightGray\", \"brightGrey\", \"id\", \"name\", \"shiki\", \"primary\", \"accent\", \"text\", \"muted\", \"quiet\", \"comment\", \"title\", \"delim\", \"subtle\", \"ui\", \"overlay\", \"highlight\", \"divider\", \"selection\", \"gutter\", \"prompt\", \"border\", \"borderTitle\", \"code\", \"codeTitle\", \"success\", \"info\", \"warn\", \"error\", \"syntaxBoolean\", \"syntaxBracket\", \"syntaxConstant\", \"syntaxDelimiter\", \"syntaxField\", \"syntaxFunction\", \"syntaxNumber\", \"syntaxSpecial\", \"syntaxString\", \"mdBold\", \"mdCode\", \"mdCodeBlock\", \"mdCodeBlockTitle\", \"mdHeading1\", \"mdHeading2\", \"mdHeading3\", \"mdHeading4\", \"mdHeading5\", \"mdHeading6\", \"mdHeading\", \"mdHr\", \"mdItalic\", \"mdLink\", \"mdListBullet\", \"mdListChecked\", \"mdListUnchecked\", \"mdQuote\", \"mdStrikethrough\", \"mdTable\", \"mdTableHeader\", \"optionName\", \"optionDesc\", \"optionActive\", \"diffAdd\", \"diffContext\", \"diffDel\", \"diffLine\", \"diffTitle\", \"inherit\"]); const _av2 = new Set([\"red\", \"black\", \"green\", \"yellow\", \"blue\", \"magenta\", \"cyan\", \"white\", \"gray\", \"grey\", \"brightRed\", \"brightBlack\", \"brightGreen\", \"brightYellow\", \"brightBlue\", \"brightMagenta\", \"brightCyan\", \"brightWhite\", \"brightGray\", \"brightGrey\", \"id\", \"name\", \"shiki\", \"primary\", \"accent\", \"text\", \"muted\", \"quiet\", \"comment\", \"title\", \"delim\", \"subtle\", \"ui\", \"overlay\", \"highlight\", \"divider\", \"selection\", \"gutter\", \"prompt\", \"border\", \"borderTitle\", \"code\", \"codeTitle\", \"success\", \"info\", \"warn\", \"error\", \"syntaxBoolean\", \"syntaxBracket\", \"syntaxConstant\", \"syntaxDelimiter\", \"syntaxField\", \"syntaxFunction\", \"syntaxNumber\", \"syntaxSpecial\", \"syntaxString\", \"mdBold\", \"mdCode\", \"mdCodeBlock\", \"mdCodeBlockTitle\", \"mdHeading1\", \"mdHeading2\", \"mdHeading3\", \"mdHeading4\", \"mdHeading5\", \"mdHeading6\", \"mdHeading\", \"mdHr\", \"mdItalic\", \"mdLink\", \"mdListBullet\", \"mdListChecked\", \"mdListUnchecked\", \"mdQuote\", \"mdStrikethrough\", \"mdTable\", \"mdTableHeader\", \"optionName\", \"optionDesc\", \"optionActive\", \"diffAdd\", \"diffContext\", \"diffDel\", \"diffLine\", \"diffTitle\", \"inherit\"]); const __is = (input: any): input is HexColor | AnsiColorName | BrightAnsiColorName | ThemeKey | \"inherit\" => null !== input && undefined !== input && (true === _iv1.has(input) || \"string\" === typeof input && RegExp(/^#(.*)/).test(input)); let _errorFactory: any; return (input: any, errorFactory?: (p: import(\"typia\").TypeGuardError.IProps) => Error): HexColor | AnsiColorName | BrightAnsiColorName | ThemeKey | \"inherit\" => {\n if (false === __is(input)) {\n _errorFactory = errorFactory;\n ((input: any, _path: string, _exceptionable: boolean = true) => (null !== input || __typia_transform__assertGuard._assertGuard(true, {\n method: \"typia.createAssert\",\n path: _path + \"\",\n expected: \"(\\\"accent\\\" | \\\"black\\\" | \\\"blue\\\" | \\\"border\\\" | \\\"borderTitle\\\" | \\\"brightBlack\\\" | \\\"brightBlue\\\" | \\\"brightCyan\\\" | \\\"brightGray\\\" | \\\"brightGreen\\\" | \\\"brightGrey\\\" | \\\"brightMagenta\\\" | \\\"brightRed\\\" | \\\"brightWhite\\\" | \\\"brightYellow\\\" | \\\"code\\\" | \\\"codeTitle\\\" | \\\"comment\\\" | \\\"cyan\\\" | \\\"delim\\\" | \\\"diffAdd\\\" | \\\"diffContext\\\" | \\\"diffDel\\\" | \\\"diffLine\\\" | \\\"diffTitle\\\" | \\\"divider\\\" | \\\"error\\\" | \\\"gray\\\" | \\\"green\\\" | \\\"grey\\\" | \\\"gutter\\\" | \\\"highlight\\\" | \\\"id\\\" | \\\"info\\\" | \\\"inherit\\\" | \\\"magenta\\\" | \\\"mdBold\\\" | \\\"mdCode\\\" | \\\"mdCodeBlock\\\" | \\\"mdCodeBlockTitle\\\" | \\\"mdHeading\\\" | \\\"mdHeading1\\\" | \\\"mdHeading2\\\" | \\\"mdHeading3\\\" | \\\"mdHeading4\\\" | \\\"mdHeading5\\\" | \\\"mdHeading6\\\" | \\\"mdHr\\\" | \\\"mdItalic\\\" | \\\"mdLink\\\" | \\\"mdListBullet\\\" | \\\"mdListChecked\\\" | \\\"mdListUnchecked\\\" | \\\"mdQuote\\\" | \\\"mdStrikethrough\\\" | \\\"mdTable\\\" | \\\"mdTableHeader\\\" | \\\"muted\\\" | \\\"name\\\" | \\\"optionActive\\\" | \\\"optionDesc\\\" | \\\"optionName\\\" | \\\"overlay\\\" | \\\"primary\\\" | \\\"prompt\\\" | \\\"quiet\\\" | \\\"red\\\" | \\\"selection\\\" | \\\"shiki\\\" | \\\"subtle\\\" | \\\"success\\\" | \\\"syntaxBoolean\\\" | \\\"syntaxBracket\\\" | \\\"syntaxConstant\\\" | \\\"syntaxDelimiter\\\" | \\\"syntaxField\\\" | \\\"syntaxFunction\\\" | \\\"syntaxNumber\\\" | \\\"syntaxSpecial\\\" | \\\"syntaxString\\\" | \\\"text\\\" | \\\"title\\\" | \\\"ui\\\" | \\\"warn\\\" | \\\"white\\\" | \\\"yellow\\\" | `#${string}`)\",\n value: input\n }, _errorFactory)) && (undefined !== input || __typia_transform__assertGuard._assertGuard(true, {\n method: \"typia.createAssert\",\n path: _path + \"\",\n expected: \"(\\\"accent\\\" | \\\"black\\\" | \\\"blue\\\" | \\\"border\\\" | \\\"borderTitle\\\" | \\\"brightBlack\\\" | \\\"brightBlue\\\" | \\\"brightCyan\\\" | \\\"brightGray\\\" | \\\"brightGreen\\\" | \\\"brightGrey\\\" | \\\"brightMagenta\\\" | \\\"brightRed\\\" | \\\"brightWhite\\\" | \\\"brightYellow\\\" | \\\"code\\\" | \\\"codeTitle\\\" | \\\"comment\\\" | \\\"cyan\\\" | \\\"delim\\\" | \\\"diffAdd\\\" | \\\"diffContext\\\" | \\\"diffDel\\\" | \\\"diffLine\\\" | \\\"diffTitle\\\" | \\\"divider\\\" | \\\"error\\\" | \\\"gray\\\" | \\\"green\\\" | \\\"grey\\\" | \\\"gutter\\\" | \\\"highlight\\\" | \\\"id\\\" | \\\"info\\\" | \\\"inherit\\\" | \\\"magenta\\\" | \\\"mdBold\\\" | \\\"mdCode\\\" | \\\"mdCodeBlock\\\" | \\\"mdCodeBlockTitle\\\" | \\\"mdHeading\\\" | \\\"mdHeading1\\\" | \\\"mdHeading2\\\" | \\\"mdHeading3\\\" | \\\"mdHeading4\\\" | \\\"mdHeading5\\\" | \\\"mdHeading6\\\" | \\\"mdHr\\\" | \\\"mdItalic\\\" | \\\"mdLink\\\" | \\\"mdListBullet\\\" | \\\"mdListChecked\\\" | \\\"mdListUnchecked\\\" | \\\"mdQuote\\\" | \\\"mdStrikethrough\\\" | \\\"mdTable\\\" | \\\"mdTableHeader\\\" | \\\"muted\\\" | \\\"name\\\" | \\\"optionActive\\\" | \\\"optionDesc\\\" | \\\"optionName\\\" | \\\"overlay\\\" | \\\"primary\\\" | \\\"prompt\\\" | \\\"quiet\\\" | \\\"red\\\" | \\\"selection\\\" | \\\"shiki\\\" | \\\"subtle\\\" | \\\"success\\\" | \\\"syntaxBoolean\\\" | \\\"syntaxBracket\\\" | \\\"syntaxConstant\\\" | \\\"syntaxDelimiter\\\" | \\\"syntaxField\\\" | \\\"syntaxFunction\\\" | \\\"syntaxNumber\\\" | \\\"syntaxSpecial\\\" | \\\"syntaxString\\\" | \\\"text\\\" | \\\"title\\\" | \\\"ui\\\" | \\\"warn\\\" | \\\"white\\\" | \\\"yellow\\\" | `#${string}`)\",\n value: input\n }, _errorFactory)) && (true === _av2.has(input) || \"string\" === typeof input && RegExp(/^#(.*)/).test(input) || __typia_transform__assertGuard._assertGuard(true, {\n method: \"typia.createAssert\",\n path: _path + \"\",\n expected: \"(\\\"accent\\\" | \\\"black\\\" | \\\"blue\\\" | \\\"border\\\" | \\\"borderTitle\\\" | \\\"brightBlack\\\" | \\\"brightBlue\\\" | \\\"brightCyan\\\" | \\\"brightGray\\\" | \\\"brightGreen\\\" | \\\"brightGrey\\\" | \\\"brightMagenta\\\" | \\\"brightRed\\\" | \\\"brightWhite\\\" | \\\"brightYellow\\\" | \\\"code\\\" | \\\"codeTitle\\\" | \\\"comment\\\" | \\\"cyan\\\" | \\\"delim\\\" | \\\"diffAdd\\\" | \\\"diffContext\\\" | \\\"diffDel\\\" | \\\"diffLine\\\" | \\\"diffTitle\\\" | \\\"divider\\\" | \\\"error\\\" | \\\"gray\\\" | \\\"green\\\" | \\\"grey\\\" | \\\"gutter\\\" | \\\"highlight\\\" | \\\"id\\\" | \\\"info\\\" | \\\"inherit\\\" | \\\"magenta\\\" | \\\"mdBold\\\" | \\\"mdCode\\\" | \\\"mdCodeBlock\\\" | \\\"mdCodeBlockTitle\\\" | \\\"mdHeading\\\" | \\\"mdHeading1\\\" | \\\"mdHeading2\\\" | \\\"mdHeading3\\\" | \\\"mdHeading4\\\" | \\\"mdHeading5\\\" | \\\"mdHeading6\\\" | \\\"mdHr\\\" | \\\"mdItalic\\\" | \\\"mdLink\\\" | \\\"mdListBullet\\\" | \\\"mdListChecked\\\" | \\\"mdListUnchecked\\\" | \\\"mdQuote\\\" | \\\"mdStrikethrough\\\" | \\\"mdTable\\\" | \\\"mdTableHeader\\\" | \\\"muted\\\" | \\\"name\\\" | \\\"optionActive\\\" | \\\"optionDesc\\\" | \\\"optionName\\\" | \\\"overlay\\\" | \\\"primary\\\" | \\\"prompt\\\" | \\\"quiet\\\" | \\\"red\\\" | \\\"selection\\\" | \\\"shiki\\\" | \\\"subtle\\\" | \\\"success\\\" | \\\"syntaxBoolean\\\" | \\\"syntaxBracket\\\" | \\\"syntaxConstant\\\" | \\\"syntaxDelimiter\\\" | \\\"syntaxField\\\" | \\\"syntaxFunction\\\" | \\\"syntaxNumber\\\" | \\\"syntaxSpecial\\\" | \\\"syntaxString\\\" | \\\"text\\\" | \\\"title\\\" | \\\"ui\\\" | \\\"warn\\\" | \\\"white\\\" | \\\"yellow\\\" | `#${string}`)\",\n value: input\n }, _errorFactory)))(input, \"$input\", true);\n }\n return input;\n}; })();\nconst toLightnessColor = (() => { const _iv1 = new Set([\"id\", \"name\", \"shiki\", \"primary\", \"accent\", \"text\", \"muted\", \"quiet\", \"comment\", \"title\", \"delim\", \"subtle\", \"ui\", \"overlay\", \"highlight\", \"divider\", \"selection\", \"gutter\", \"prompt\", \"border\", \"borderTitle\", \"code\", \"codeTitle\", \"success\", \"info\", \"warn\", \"error\", \"syntaxBoolean\", \"syntaxBracket\", \"syntaxConstant\", \"syntaxDelimiter\", \"syntaxField\", \"syntaxFunction\", \"syntaxNumber\", \"syntaxSpecial\", \"syntaxString\", \"mdBold\", \"mdCode\", \"mdCodeBlock\", \"mdCodeBlockTitle\", \"mdHeading1\", \"mdHeading2\", \"mdHeading3\", \"mdHeading4\", \"mdHeading5\", \"mdHeading6\", \"mdHeading\", \"mdHr\", \"mdItalic\", \"mdLink\", \"mdListBullet\", \"mdListChecked\", \"mdListUnchecked\", \"mdQuote\", \"mdStrikethrough\", \"mdTable\", \"mdTableHeader\", \"optionName\", \"optionDesc\", \"optionActive\", \"diffAdd\", \"diffContext\", \"diffDel\", \"diffLine\", \"diffTitle\"]); const _av2 = new Set([\"id\", \"name\", \"shiki\", \"primary\", \"accent\", \"text\", \"muted\", \"quiet\", \"comment\", \"title\", \"delim\", \"subtle\", \"ui\", \"overlay\", \"highlight\", \"divider\", \"selection\", \"gutter\", \"prompt\", \"border\", \"borderTitle\", \"code\", \"codeTitle\", \"success\", \"info\", \"warn\", \"error\", \"syntaxBoolean\", \"syntaxBracket\", \"syntaxConstant\", \"syntaxDelimiter\", \"syntaxField\", \"syntaxFunction\", \"syntaxNumber\", \"syntaxSpecial\", \"syntaxString\", \"mdBold\", \"mdCode\", \"mdCodeBlock\", \"mdCodeBlockTitle\", \"mdHeading1\", \"mdHeading2\", \"mdHeading3\", \"mdHeading4\", \"mdHeading5\", \"mdHeading6\", \"mdHeading\", \"mdHr\", \"mdItalic\", \"mdLink\", \"mdListBullet\", \"mdListChecked\", \"mdListUnchecked\", \"mdQuote\", \"mdStrikethrough\", \"mdTable\", \"mdTableHeader\", \"optionName\", \"optionDesc\", \"optionActive\", \"diffAdd\", \"diffContext\", \"diffDel\", \"diffLine\", \"diffTitle\"]); const __is = (input: any): input is HexColor | ThemeKey => null !== input && undefined !== input && (true === _iv1.has(input) || \"string\" === typeof input && RegExp(/^#(.*)/).test(input)); let _errorFactory: any; return (input: any, errorFactory?: (p: import(\"typia\").TypeGuardError.IProps) => Error): HexColor | ThemeKey => {\n if (false === __is(input)) {\n _errorFactory = errorFactory;\n ((input: any, _path: string, _exceptionable: boolean = true) => (null !== input || __typia_transform__assertGuard._assertGuard(true, {\n method: \"typia.createAssert\",\n path: _path + \"\",\n expected: \"(\\\"accent\\\" | \\\"border\\\" | \\\"borderTitle\\\" | \\\"code\\\" | \\\"codeTitle\\\" | \\\"comment\\\" | \\\"delim\\\" | \\\"diffAdd\\\" | \\\"diffContext\\\" | \\\"diffDel\\\" | \\\"diffLine\\\" | \\\"diffTitle\\\" | \\\"divider\\\" | \\\"error\\\" | \\\"gutter\\\" | \\\"highlight\\\" | \\\"id\\\" | \\\"info\\\" | \\\"mdBold\\\" | \\\"mdCode\\\" | \\\"mdCodeBlock\\\" | \\\"mdCodeBlockTitle\\\" | \\\"mdHeading\\\" | \\\"mdHeading1\\\" | \\\"mdHeading2\\\" | \\\"mdHeading3\\\" | \\\"mdHeading4\\\" | \\\"mdHeading5\\\" | \\\"mdHeading6\\\" | \\\"mdHr\\\" | \\\"mdItalic\\\" | \\\"mdLink\\\" | \\\"mdListBullet\\\" | \\\"mdListChecked\\\" | \\\"mdListUnchecked\\\" | \\\"mdQuote\\\" | \\\"mdStrikethrough\\\" | \\\"mdTable\\\" | \\\"mdTableHeader\\\" | \\\"muted\\\" | \\\"name\\\" | \\\"optionActive\\\" | \\\"optionDesc\\\" | \\\"optionName\\\" | \\\"overlay\\\" | \\\"primary\\\" | \\\"prompt\\\" | \\\"quiet\\\" | \\\"selection\\\" | \\\"shiki\\\" | \\\"subtle\\\" | \\\"success\\\" | \\\"syntaxBoolean\\\" | \\\"syntaxBracket\\\" | \\\"syntaxConstant\\\" | \\\"syntaxDelimiter\\\" | \\\"syntaxField\\\" | \\\"syntaxFunction\\\" | \\\"syntaxNumber\\\" | \\\"syntaxSpecial\\\" | \\\"syntaxString\\\" | \\\"text\\\" | \\\"title\\\" | \\\"ui\\\" | \\\"warn\\\" | `#${string}`)\",\n value: input\n }, _errorFactory)) && (undefined !== input || __typia_transform__assertGuard._assertGuard(true, {\n method: \"typia.createAssert\",\n path: _path + \"\",\n expected: \"(\\\"accent\\\" | \\\"border\\\" | \\\"borderTitle\\\" | \\\"code\\\" | \\\"codeTitle\\\" | \\\"comment\\\" | \\\"delim\\\" | \\\"diffAdd\\\" | \\\"diffContext\\\" | \\\"diffDel\\\" | \\\"diffLine\\\" | \\\"diffTitle\\\" | \\\"divider\\\" | \\\"error\\\" | \\\"gutter\\\" | \\\"highlight\\\" | \\\"id\\\" | \\\"info\\\" | \\\"mdBold\\\" | \\\"mdCode\\\" | \\\"mdCodeBlock\\\" | \\\"mdCodeBlockTitle\\\" | \\\"mdHeading\\\" | \\\"mdHeading1\\\" | \\\"mdHeading2\\\" | \\\"mdHeading3\\\" | \\\"mdHeading4\\\" | \\\"mdHeading5\\\" | \\\"mdHeading6\\\" | \\\"mdHr\\\" | \\\"mdItalic\\\" | \\\"mdLink\\\" | \\\"mdListBullet\\\" | \\\"mdListChecked\\\" | \\\"mdListUnchecked\\\" | \\\"mdQuote\\\" | \\\"mdStrikethrough\\\" | \\\"mdTable\\\" | \\\"mdTableHeader\\\" | \\\"muted\\\" | \\\"name\\\" | \\\"optionActive\\\" | \\\"optionDesc\\\" | \\\"optionName\\\" | \\\"overlay\\\" | \\\"primary\\\" | \\\"prompt\\\" | \\\"quiet\\\" | \\\"selection\\\" | \\\"shiki\\\" | \\\"subtle\\\" | \\\"success\\\" | \\\"syntaxBoolean\\\" | \\\"syntaxBracket\\\" | \\\"syntaxConstant\\\" | \\\"syntaxDelimiter\\\" | \\\"syntaxField\\\" | \\\"syntaxFunction\\\" | \\\"syntaxNumber\\\" | \\\"syntaxSpecial\\\" | \\\"syntaxString\\\" | \\\"text\\\" | \\\"title\\\" | \\\"ui\\\" | \\\"warn\\\" | `#${string}`)\",\n value: input\n }, _errorFactory)) && (true === _av2.has(input) || \"string\" === typeof input && RegExp(/^#(.*)/).test(input) || __typia_transform__assertGuard._assertGuard(true, {\n method: \"typia.createAssert\",\n path: _path + \"\",\n expected: \"(\\\"accent\\\" | \\\"border\\\" | \\\"borderTitle\\\" | \\\"code\\\" | \\\"codeTitle\\\" | \\\"comment\\\" | \\\"delim\\\" | \\\"diffAdd\\\" | \\\"diffContext\\\" | \\\"diffDel\\\" | \\\"diffLine\\\" | \\\"diffTitle\\\" | \\\"divider\\\" | \\\"error\\\" | \\\"gutter\\\" | \\\"highlight\\\" | \\\"id\\\" | \\\"info\\\" | \\\"mdBold\\\" | \\\"mdCode\\\" | \\\"mdCodeBlock\\\" | \\\"mdCodeBlockTitle\\\" | \\\"mdHeading\\\" | \\\"mdHeading1\\\" | \\\"mdHeading2\\\" | \\\"mdHeading3\\\" | \\\"mdHeading4\\\" | \\\"mdHeading5\\\" | \\\"mdHeading6\\\" | \\\"mdHr\\\" | \\\"mdItalic\\\" | \\\"mdLink\\\" | \\\"mdListBullet\\\" | \\\"mdListChecked\\\" | \\\"mdListUnchecked\\\" | \\\"mdQuote\\\" | \\\"mdStrikethrough\\\" | \\\"mdTable\\\" | \\\"mdTableHeader\\\" | \\\"muted\\\" | \\\"name\\\" | \\\"optionActive\\\" | \\\"optionDesc\\\" | \\\"optionName\\\" | \\\"overlay\\\" | \\\"primary\\\" | \\\"prompt\\\" | \\\"quiet\\\" | \\\"selection\\\" | \\\"shiki\\\" | \\\"subtle\\\" | \\\"success\\\" | \\\"syntaxBoolean\\\" | \\\"syntaxBracket\\\" | \\\"syntaxConstant\\\" | \\\"syntaxDelimiter\\\" | \\\"syntaxField\\\" | \\\"syntaxFunction\\\" | \\\"syntaxNumber\\\" | \\\"syntaxSpecial\\\" | \\\"syntaxString\\\" | \\\"text\\\" | \\\"title\\\" | \\\"ui\\\" | \\\"warn\\\" | `#${string}`)\",\n value: input\n }, _errorFactory)))(input, \"$input\", true);\n }\n return input;\n}; })();\nconst toStyle = (() => { const _io0 = (input: any): boolean => (undefined === input.bold || \"boolean\" === typeof input.bold) && (undefined === input.dim || \"boolean\" === typeof input.dim) && (undefined === input.italic || \"boolean\" === typeof input.italic) && (undefined === input.underline || \"boolean\" === typeof input.underline) && (undefined === input.inverse || \"boolean\" === typeof input.inverse) && (undefined === input.strikethrough || \"boolean\" === typeof input.strikethrough) && (undefined === input.fg || \"string\" === typeof input.fg) && (undefined === input.bg || \"string\" === typeof input.bg); const _ao0 = (input: any, _path: string, _exceptionable: boolean = true): boolean => (undefined === input.bold || \"boolean\" === typeof input.bold || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssert\",\n path: _path + \".bold\",\n expected: \"(boolean | undefined)\",\n value: input.bold\n}, _errorFactory)) && (undefined === input.dim || \"boolean\" === typeof input.dim || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssert\",\n path: _path + \".dim\",\n expected: \"(boolean | undefined)\",\n value: input.dim\n}, _errorFactory)) && (undefined === input.italic || \"boolean\" === typeof input.italic || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssert\",\n path: _path + \".italic\",\n expected: \"(boolean | undefined)\",\n value: input.italic\n}, _errorFactory)) && (undefined === input.underline || \"boolean\" === typeof input.underline || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssert\",\n path: _path + \".underline\",\n expected: \"(boolean | undefined)\",\n value: input.underline\n}, _errorFactory)) && (undefined === input.inverse || \"boolean\" === typeof input.inverse || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssert\",\n path: _path + \".inverse\",\n expected: \"(boolean | undefined)\",\n value: input.inverse\n}, _errorFactory)) && (undefined === input.strikethrough || \"boolean\" === typeof input.strikethrough || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssert\",\n path: _path + \".strikethrough\",\n expected: \"(boolean | undefined)\",\n value: input.strikethrough\n}, _errorFactory)) && (undefined === input.fg || \"string\" === typeof input.fg || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssert\",\n path: _path + \".fg\",\n expected: \"(string | undefined)\",\n value: input.fg\n}, _errorFactory)) && (undefined === input.bg || \"string\" === typeof input.bg || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssert\",\n path: _path + \".bg\",\n expected: \"(string | undefined)\",\n value: input.bg\n}, _errorFactory)); const __is = (input: any): input is UserStyle => \"object\" === typeof input && null !== input && false === Array.isArray(input) && _io0(input); let _errorFactory: any; return (input: any, errorFactory?: (p: import(\"typia\").TypeGuardError.IProps) => Error): UserStyle => {\n if (false === __is(input)) {\n _errorFactory = errorFactory;\n ((input: any, _path: string, _exceptionable: boolean = true) => (\"object\" === typeof input && null !== input && false === Array.isArray(input) || __typia_transform__assertGuard._assertGuard(true, {\n method: \"typia.createAssert\",\n path: _path + \"\",\n expected: \"UserStyle\",\n value: input\n }, _errorFactory)) && _ao0(input, _path + \"\", true) || __typia_transform__assertGuard._assertGuard(true, {\n method: \"typia.createAssert\",\n path: _path + \"\",\n expected: \"UserStyle\",\n value: input\n }, _errorFactory))(input, \"$input\", true);\n }\n return input;\n}; })();\nconst isColorKey = (() => { return (input: any): input is ColorKeys<Theme> => \"primary\" === input || \"accent\" === input || \"text\" === input || \"success\" === input || \"info\" === input || \"warn\" === input || \"error\" === input; })();\nfunction toColor(value: unknown) {\n if (typeof value !== \"string\")\n return toBaseColor(value); // will throw\n const color = value.replace(/[+-]\\d+/, \"\");\n if (value.match(/[+-]\\d+/))\n toLightnessColor(color);\n return toBaseColor(color);\n}\nconst validator = (() => { const _iv1 = new Set([\"andromeeda\", \"aurora-x\", \"ayu-dark\", \"ayu-light\", \"ayu-mirage\", \"catppuccin-frappe\", \"catppuccin-latte\", \"catppuccin-macchiato\", \"catppuccin-mocha\", \"dark-plus\", \"dracula\", \"dracula-soft\", \"everforest-dark\", \"everforest-light\", \"github-dark\", \"github-dark-default\", \"github-dark-dimmed\", \"github-dark-high-contrast\", \"github-light\", \"github-light-default\", \"github-light-high-contrast\", \"gruvbox-dark-hard\", \"gruvbox-dark-medium\", \"gruvbox-dark-soft\", \"gruvbox-light-hard\", \"gruvbox-light-medium\", \"gruvbox-light-soft\", \"horizon\", \"horizon-bright\", \"houston\", \"kanagawa-dragon\", \"kanagawa-lotus\", \"kanagawa-wave\", \"laserwave\", \"light-plus\", \"material-theme\", \"material-theme-darker\", \"material-theme-lighter\", \"material-theme-ocean\", \"material-theme-palenight\", \"min-dark\", \"min-light\", \"monokai\", \"night-owl\", \"night-owl-light\", \"nord\", \"one-dark-pro\", \"one-light\", \"plastic\", \"poimandres\", \"red\", \"rose-pine\", \"rose-pine-dawn\", \"rose-pine-moon\", \"slack-dark\", \"slack-ochin\", \"snazzy-light\", \"solarized-dark\", \"solarized-light\", \"synthwave-84\", \"tokyo-night\", \"vesper\", \"vitesse-black\", \"vitesse-dark\", \"vitesse-light\"]); const _av2 = new Set([\"andromeeda\", \"aurora-x\", \"ayu-dark\", \"ayu-light\", \"ayu-mirage\", \"catppuccin-frappe\", \"catppuccin-latte\", \"catppuccin-macchiato\", \"catppuccin-mocha\", \"dark-plus\", \"dracula\", \"dracula-soft\", \"everforest-dark\", \"everforest-light\", \"github-dark\", \"github-dark-default\", \"github-dark-dimmed\", \"github-dark-high-contrast\", \"github-light\", \"github-light-default\", \"github-light-high-contrast\", \"gruvbox-dark-hard\", \"gruvbox-dark-medium\", \"gruvbox-dark-soft\", \"gruvbox-light-hard\", \"gruvbox-light-medium\", \"gruvbox-light-soft\", \"horizon\", \"horizon-bright\", \"houston\", \"kanagawa-dragon\", \"kanagawa-lotus\", \"kanagawa-wave\", \"laserwave\", \"light-plus\", \"material-theme\", \"material-theme-darker\", \"material-theme-lighter\", \"material-theme-ocean\", \"material-theme-palenight\", \"min-dark\", \"min-light\", \"monokai\", \"night-owl\", \"night-owl-light\", \"nord\", \"one-dark-pro\", \"one-light\", \"plastic\", \"poimandres\", \"red\", \"rose-pine\", \"rose-pine-dawn\", \"rose-pine-moon\", \"slack-dark\", \"slack-ochin\", \"snazzy-light\", \"solarized-dark\", \"solarized-light\", \"synthwave-84\", \"tokyo-night\", \"vesper\", \"vitesse-black\", \"vitesse-dark\", \"vitesse-light\"]); const _io0 = (input: any, _exceptionable: boolean = true): boolean => (undefined === input.$schema || \"string\" === typeof input.$schema) && (undefined === input.shiki || true === _iv1.has(input.shiki)) && (undefined === input.id || \"string\" === typeof input.id) && (undefined === input.name || \"string\" === typeof input.name) && Object.keys(input).every((key: any) => {\n if ([\"$schema\", \"shiki\", \"id\", \"name\"].some((prop: any) => key === prop))\n return true;\n const value = input[key];\n if (undefined === value)\n return true;\n return null !== value && (undefined === value || \"string\" === typeof value || \"object\" === typeof value && null !== value && false === Array.isArray(value) && _io1(value, true && _exceptionable));\n}); const _io1 = (input: any, _exceptionable: boolean = true): boolean => (undefined === input.bold || \"boolean\" === typeof input.bold) && (undefined === input.dim || \"boolean\" === typeof input.dim) && (undefined === input.italic || \"boolean\" === typeof input.italic) && (undefined === input.underline || \"boolean\" === typeof input.underline) && (undefined === input.inverse || \"boolean\" === typeof input.inverse) && (undefined === input.strikethrough || \"boolean\" === typeof input.strikethrough) && (undefined === input.fg || \"string\" === typeof input.fg) && (undefined === input.bg || \"string\" === typeof input.bg) && (0 === Object.keys(input).length || Object.keys(input).every((key: any) => {\n if ([\"bold\", \"dim\", \"italic\", \"underline\", \"inverse\", \"strikethrough\", \"fg\", \"bg\"].some((prop: any) => key === prop))\n return true;\n const value = input[key];\n if (undefined === value)\n return true;\n return false;\n})); const _ao0 = (input: any, _path: string, _exceptionable: boolean = true): boolean => (undefined === input.$schema || \"string\" === typeof input.$schema || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + \".$schema\",\n expected: \"(string | undefined)\",\n value: input.$schema\n}, _errorFactory)) && (undefined === input.shiki || true === _av2.has(input.shiki) || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + \".shiki\",\n expected: \"(\\\"andromeeda\\\" | \\\"aurora-x\\\" | \\\"ayu-dark\\\" | \\\"ayu-light\\\" | \\\"ayu-mirage\\\" | \\\"catppuccin-frappe\\\" | \\\"catppuccin-latte\\\" | \\\"catppuccin-macchiato\\\" | \\\"catppuccin-mocha\\\" | \\\"dark-plus\\\" | \\\"dracula\\\" | \\\"dracula-soft\\\" | \\\"everforest-dark\\\" | \\\"everforest-light\\\" | \\\"github-dark\\\" | \\\"github-dark-default\\\" | \\\"github-dark-dimmed\\\" | \\\"github-dark-high-contrast\\\" | \\\"github-light\\\" | \\\"github-light-default\\\" | \\\"github-light-high-contrast\\\" | \\\"gruvbox-dark-hard\\\" | \\\"gruvbox-dark-medium\\\" | \\\"gruvbox-dark-soft\\\" | \\\"gruvbox-light-hard\\\" | \\\"gruvbox-light-medium\\\" | \\\"gruvbox-light-soft\\\" | \\\"horizon\\\" | \\\"horizon-bright\\\" | \\\"houston\\\" | \\\"kanagawa-dragon\\\" | \\\"kanagawa-lotus\\\" | \\\"kanagawa-wave\\\" | \\\"laserwave\\\" | \\\"light-plus\\\" | \\\"material-theme\\\" | \\\"material-theme-darker\\\" | \\\"material-theme-lighter\\\" | \\\"material-theme-ocean\\\" | \\\"material-theme-palenight\\\" | \\\"min-dark\\\" | \\\"min-light\\\" | \\\"monokai\\\" | \\\"night-owl\\\" | \\\"night-owl-light\\\" | \\\"nord\\\" | \\\"one-dark-pro\\\" | \\\"one-light\\\" | \\\"plastic\\\" | \\\"poimandres\\\" | \\\"red\\\" | \\\"rose-pine\\\" | \\\"rose-pine-dawn\\\" | \\\"rose-pine-moon\\\" | \\\"slack-dark\\\" | \\\"slack-ochin\\\" | \\\"snazzy-light\\\" | \\\"solarized-dark\\\" | \\\"solarized-light\\\" | \\\"synthwave-84\\\" | \\\"tokyo-night\\\" | \\\"vesper\\\" | \\\"vitesse-black\\\" | \\\"vitesse-dark\\\" | \\\"vitesse-light\\\" | undefined)\",\n value: input.shiki\n}, _errorFactory)) && (undefined === input.id || \"string\" === typeof input.id || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + \".id\",\n expected: \"(string | undefined)\",\n value: input.id\n}, _errorFactory)) && (undefined === input.name || \"string\" === typeof input.name || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + \".name\",\n expected: \"(string | undefined)\",\n value: input.name\n}, _errorFactory)) && (false === _exceptionable || Object.keys(input).every((key: any) => {\n if ([\"$schema\", \"shiki\", \"id\", \"name\"].some((prop: any) => key === prop))\n return true;\n const value = input[key];\n if (undefined === value)\n return true;\n return (null !== value || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),\n expected: \"(UserStyle | string | undefined)\",\n value: value\n }, _errorFactory)) && (undefined === value || \"string\" === typeof value || (\"object\" === typeof value && null !== value && false === Array.isArray(value) || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),\n expected: \"(UserStyle | string | undefined)\",\n value: value\n }, _errorFactory)) && _ao1(value, _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key), true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),\n expected: \"(UserStyle | string | undefined)\",\n value: value\n }, _errorFactory));\n})); const _ao1 = (input: any, _path: string, _exceptionable: boolean = true): boolean => (undefined === input.bold || \"boolean\" === typeof input.bold || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + \".bold\",\n expected: \"(boolean | undefined)\",\n value: input.bold\n}, _errorFactory)) && (undefined === input.dim || \"boolean\" === typeof input.dim || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + \".dim\",\n expected: \"(boolean | undefined)\",\n value: input.dim\n}, _errorFactory)) && (undefined === input.italic || \"boolean\" === typeof input.italic || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + \".italic\",\n expected: \"(boolean | undefined)\",\n value: input.italic\n}, _errorFactory)) && (undefined === input.underline || \"boolean\" === typeof input.underline || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + \".underline\",\n expected: \"(boolean | undefined)\",\n value: input.underline\n}, _errorFactory)) && (undefined === input.inverse || \"boolean\" === typeof input.inverse || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + \".inverse\",\n expected: \"(boolean | undefined)\",\n value: input.inverse\n}, _errorFactory)) && (undefined === input.strikethrough || \"boolean\" === typeof input.strikethrough || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + \".strikethrough\",\n expected: \"(boolean | undefined)\",\n value: input.strikethrough\n}, _errorFactory)) && (undefined === input.fg || \"string\" === typeof input.fg || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + \".fg\",\n expected: \"(string | undefined)\",\n value: input.fg\n}, _errorFactory)) && (undefined === input.bg || \"string\" === typeof input.bg || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + \".bg\",\n expected: \"(string | undefined)\",\n value: input.bg\n}, _errorFactory)) && (0 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).every((key: any) => {\n if ([\"bold\", \"dim\", \"italic\", \"underline\", \"inverse\", \"strikethrough\", \"fg\", \"bg\"].some((prop: any) => key === prop))\n return true;\n const value = input[key];\n if (undefined === value)\n return true;\n return __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),\n expected: \"undefined\",\n value: value\n }, _errorFactory);\n}))); const __is = (input: any, _exceptionable: boolean = true): input is Partial<UserTheme> => \"object\" === typeof input && null !== input && false === Array.isArray(input) && _io0(input, true); let _errorFactory: any; return (input: any, errorFactory?: (p: import(\"typia\").TypeGuardError.IProps) => Error): Partial<UserTheme> => {\n if (false === __is(input)) {\n _errorFactory = errorFactory;\n ((input: any, _path: string, _exceptionable: boolean = true) => (\"object\" === typeof input && null !== input && false === Array.isArray(input) || __typia_transform__assertGuard._assertGuard(true, {\n method: \"typia.createAssertEquals\",\n path: _path + \"\",\n expected: \"Partial<UserTheme>\",\n value: input\n }, _errorFactory)) && _ao0(input, _path + \"\", true) || __typia_transform__assertGuard._assertGuard(true, {\n method: \"typia.createAssertEquals\",\n path: _path + \"\",\n expected: \"Partial<UserTheme>\",\n value: input\n }, _errorFactory))(input, \"$input\", true);\n }\n return input;\n}; })();\nconst skipSlots = new Set([\"$schema\", \"shiki\", \"id\", \"name\"]);\nexport function validateTheme(input: unknown): Partial<UserTheme> {\n const out = validator(input);\n for (const [slot, value] of Object.entries(out)) {\n if (skipSlots.has(slot) || value === undefined)\n continue;\n if (typeof value === \"string\" && toColor(value))\n continue;\n if (isColorKey(slot))\n toColor(value);\n const style = toStyle(value);\n if (style.fg !== undefined)\n toColor(style.fg);\n if (style.bg !== undefined)\n toColor(style.bg);\n }\n return out as unknown as Partial<Theme> & {\n $schema?: string;\n };\n}\n"],"x_google_ignoreList":[0,1,2],"mappings":";;;;;;;;;;;;;;;AAeA,IAAI,iBAAiB,cAAc,MAAM;;;;;;CAMxC,YAAY,OAAO;EAClB,MAAM,MAAM,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EAAE;CACxB;CACA,OAAO;AAGX"}
1
+ {"version":3,"file":"theme.config-BptYUq4K.mjs","names":["__typia_transform__assertGuard._assertGuard","__typia_transform__accessExpressionAsString._accessExpressionAsString"],"sources":["../../../node_modules/.bun/typia@13.0.2+696fb5033f112e6a/node_modules/typia/lib/TypeGuardError.mjs","../../../node_modules/.bun/typia@13.0.2+696fb5033f112e6a/node_modules/typia/lib/internal/_assertGuard.mjs","../../../node_modules/.bun/typia@13.0.2+696fb5033f112e6a/node_modules/typia/lib/internal/_accessExpressionAsString.mjs","../src/schemas/gen/theme.config.ts"],"sourcesContent":["//#region src/TypeGuardError.ts\n/**\n* Error thrown when type assertion fails.\n*\n* Thrown by {@link assert}, {@link assertGuard}, and other assert-family\n* functions when input doesn't match expected type `T`. Contains detailed\n* information about the first assertion failure:\n*\n* - `method`: Which typia function threw (e.g., `\"typia.assert\"`)\n* - `path`: Property path where error occurred (e.g., `\"input.user.age\"`)\n* - `expected`: Expected type string (e.g., `\"number & ExclusiveMinimum<19>\"`)\n* - `value`: Actual value that failed validation\n*\n* @template T Expected type (for type safety)\n*/\nvar TypeGuardError = class extends Error {\n\t/**\n\t* Creates a new TypeGuardError instance.\n\t*\n\t* @param props Error properties\n\t*/\n\tconstructor(props) {\n\t\tsuper(props.message || `Error on ${props.method}(): invalid type${props.path ? ` on ${props.path}` : \"\"}, expect to be ${props.expected}`);\n\t\tconst proto = new.target.prototype;\n\t\tif (Object.setPrototypeOf) Object.setPrototypeOf(this, proto);\n\t\telse this.__proto__ = proto;\n\t\tthis.name = \"TypeGuardError\";\n\t\tthis.method = props.method;\n\t\tthis.path = props.path;\n\t\tthis.expected = props.expected;\n\t\tthis.value = props.value;\n\t\tif (props.description || props.value === void 0) this.description = props.description ?? [\n\t\t\t\"The value at this path is `undefined`.\",\n\t\t\t\"\",\n\t\t\t`Please fill the \\`${props.expected}\\` typed value next time.`\n\t\t].join(\"\\n\");\n\t}\n};\n//#endregion\nexport { TypeGuardError };\n\n//# sourceMappingURL=TypeGuardError.mjs.map","import { TypeGuardError } from \"../TypeGuardError.mjs\";\n//#region src/internal/_assertGuard.ts\nconst _assertGuard = (exceptionable, props, factory) => {\n\tif (exceptionable === true) if (factory) throw factory(props);\n\telse throw new TypeGuardError(props);\n\treturn false;\n};\n//#endregion\nexport { _assertGuard };\n\n//# sourceMappingURL=_assertGuard.mjs.map","//#region src/internal/_accessExpressionAsString.ts\nconst _accessExpressionAsString = (str) => variable(str) ? `.${str}` : `[${JSON.stringify(str)}]`;\nconst variable = (str) => reserved(str) === false && /^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(str);\nconst reserved = (str) => RESERVED.has(str);\nconst RESERVED = /* @__PURE__ */ new Set([\n\t\"break\",\n\t\"case\",\n\t\"catch\",\n\t\"class\",\n\t\"const\",\n\t\"continue\",\n\t\"debugger\",\n\t\"default\",\n\t\"delete\",\n\t\"do\",\n\t\"else\",\n\t\"enum\",\n\t\"export\",\n\t\"extends\",\n\t\"false\",\n\t\"finally\",\n\t\"for\",\n\t\"function\",\n\t\"if\",\n\t\"import\",\n\t\"in\",\n\t\"instanceof\",\n\t\"new\",\n\t\"null\",\n\t\"return\",\n\t\"super\",\n\t\"switch\",\n\t\"this\",\n\t\"throw\",\n\t\"true\",\n\t\"try\",\n\t\"typeof\",\n\t\"var\",\n\t\"void\",\n\t\"while\",\n\t\"with\"\n]);\n//#endregion\nexport { _accessExpressionAsString };\n\n//# sourceMappingURL=_accessExpressionAsString.mjs.map","import * as __typia_transform__assertGuard from \"typia/lib/internal/_assertGuard\";\nimport * as __typia_transform__accessExpressionAsString from \"typia/lib/internal/_accessExpressionAsString\";\nimport type { ShikiTheme } from \"../../shiki/types.ts\";\nimport type { AnsiColorName, BrightAnsiColorName, Color, HexColor, Style, ThemeKey, } from \"../../style/types.ts\";\nimport type { Theme } from \"../../themes/types.ts\";\ntype UserStyle = Omit<Style, \"fg\" | \"bg\" | \"style\"> & {\n fg?: string;\n bg?: string;\n};\ntype UserTheme = {\n $schema?: string;\n shiki?: ShikiTheme;\n id: string;\n name?: string;\n} & Record<string, string | UserStyle>;\ntype ColorKeys<T> = {\n [K in keyof T]-?: [\n T[K]\n ] extends [\n Color\n ] ? K : never;\n}[keyof T];\nconst toBaseColor = (() => { const _iv1 = new Set([\"red\", \"black\", \"green\", \"yellow\", \"blue\", \"magenta\", \"cyan\", \"white\", \"gray\", \"grey\", \"brightRed\", \"brightBlack\", \"brightGreen\", \"brightYellow\", \"brightBlue\", \"brightMagenta\", \"brightCyan\", \"brightWhite\", \"brightGray\", \"brightGrey\", \"id\", \"name\", \"shiki\", \"primary\", \"accent\", \"text\", \"muted\", \"quiet\", \"comment\", \"title\", \"delim\", \"subtle\", \"ui\", \"overlay\", \"highlight\", \"divider\", \"selection\", \"gutter\", \"prompt\", \"border\", \"borderTitle\", \"code\", \"codeTitle\", \"success\", \"info\", \"warn\", \"error\", \"syntaxBoolean\", \"syntaxBracket\", \"syntaxConstant\", \"syntaxDelimiter\", \"syntaxField\", \"syntaxFunction\", \"syntaxNumber\", \"syntaxSpecial\", \"syntaxString\", \"mdBold\", \"mdCode\", \"mdCodeBlock\", \"mdCodeBlockTitle\", \"mdHeading1\", \"mdHeading2\", \"mdHeading3\", \"mdHeading4\", \"mdHeading5\", \"mdHeading6\", \"mdHeading\", \"mdHr\", \"mdItalic\", \"mdLink\", \"mdListBullet\", \"mdListChecked\", \"mdListUnchecked\", \"mdQuote\", \"mdStrikethrough\", \"mdTable\", \"mdTableHeader\", \"optionName\", \"optionDesc\", \"optionActive\", \"diffAdd\", \"diffContext\", \"diffDel\", \"diffLine\", \"diffTitle\", \"inherit\"]); const _av2 = new Set([\"red\", \"black\", \"green\", \"yellow\", \"blue\", \"magenta\", \"cyan\", \"white\", \"gray\", \"grey\", \"brightRed\", \"brightBlack\", \"brightGreen\", \"brightYellow\", \"brightBlue\", \"brightMagenta\", \"brightCyan\", \"brightWhite\", \"brightGray\", \"brightGrey\", \"id\", \"name\", \"shiki\", \"primary\", \"accent\", \"text\", \"muted\", \"quiet\", \"comment\", \"title\", \"delim\", \"subtle\", \"ui\", \"overlay\", \"highlight\", \"divider\", \"selection\", \"gutter\", \"prompt\", \"border\", \"borderTitle\", \"code\", \"codeTitle\", \"success\", \"info\", \"warn\", \"error\", \"syntaxBoolean\", \"syntaxBracket\", \"syntaxConstant\", \"syntaxDelimiter\", \"syntaxField\", \"syntaxFunction\", \"syntaxNumber\", \"syntaxSpecial\", \"syntaxString\", \"mdBold\", \"mdCode\", \"mdCodeBlock\", \"mdCodeBlockTitle\", \"mdHeading1\", \"mdHeading2\", \"mdHeading3\", \"mdHeading4\", \"mdHeading5\", \"mdHeading6\", \"mdHeading\", \"mdHr\", \"mdItalic\", \"mdLink\", \"mdListBullet\", \"mdListChecked\", \"mdListUnchecked\", \"mdQuote\", \"mdStrikethrough\", \"mdTable\", \"mdTableHeader\", \"optionName\", \"optionDesc\", \"optionActive\", \"diffAdd\", \"diffContext\", \"diffDel\", \"diffLine\", \"diffTitle\", \"inherit\"]); const __is = (input: any): input is HexColor | AnsiColorName | BrightAnsiColorName | ThemeKey | \"inherit\" => null !== input && undefined !== input && (true === _iv1.has(input) || \"string\" === typeof input && RegExp(/^#(.*)/).test(input)); let _errorFactory: any; return (input: any, errorFactory?: (p: import(\"typia\").TypeGuardError.IProps) => Error): HexColor | AnsiColorName | BrightAnsiColorName | ThemeKey | \"inherit\" => {\n if (false === __is(input)) {\n _errorFactory = errorFactory;\n ((input: any, _path: string, _exceptionable: boolean = true) => (null !== input || __typia_transform__assertGuard._assertGuard(true, {\n method: \"typia.createAssert\",\n path: _path + \"\",\n expected: \"(\\\"accent\\\" | \\\"black\\\" | \\\"blue\\\" | \\\"border\\\" | \\\"borderTitle\\\" | \\\"brightBlack\\\" | \\\"brightBlue\\\" | \\\"brightCyan\\\" | \\\"brightGray\\\" | \\\"brightGreen\\\" | \\\"brightGrey\\\" | \\\"brightMagenta\\\" | \\\"brightRed\\\" | \\\"brightWhite\\\" | \\\"brightYellow\\\" | \\\"code\\\" | \\\"codeTitle\\\" | \\\"comment\\\" | \\\"cyan\\\" | \\\"delim\\\" | \\\"diffAdd\\\" | \\\"diffContext\\\" | \\\"diffDel\\\" | \\\"diffLine\\\" | \\\"diffTitle\\\" | \\\"divider\\\" | \\\"error\\\" | \\\"gray\\\" | \\\"green\\\" | \\\"grey\\\" | \\\"gutter\\\" | \\\"highlight\\\" | \\\"id\\\" | \\\"info\\\" | \\\"inherit\\\" | \\\"magenta\\\" | \\\"mdBold\\\" | \\\"mdCode\\\" | \\\"mdCodeBlock\\\" | \\\"mdCodeBlockTitle\\\" | \\\"mdHeading\\\" | \\\"mdHeading1\\\" | \\\"mdHeading2\\\" | \\\"mdHeading3\\\" | \\\"mdHeading4\\\" | \\\"mdHeading5\\\" | \\\"mdHeading6\\\" | \\\"mdHr\\\" | \\\"mdItalic\\\" | \\\"mdLink\\\" | \\\"mdListBullet\\\" | \\\"mdListChecked\\\" | \\\"mdListUnchecked\\\" | \\\"mdQuote\\\" | \\\"mdStrikethrough\\\" | \\\"mdTable\\\" | \\\"mdTableHeader\\\" | \\\"muted\\\" | \\\"name\\\" | \\\"optionActive\\\" | \\\"optionDesc\\\" | \\\"optionName\\\" | \\\"overlay\\\" | \\\"primary\\\" | \\\"prompt\\\" | \\\"quiet\\\" | \\\"red\\\" | \\\"selection\\\" | \\\"shiki\\\" | \\\"subtle\\\" | \\\"success\\\" | \\\"syntaxBoolean\\\" | \\\"syntaxBracket\\\" | \\\"syntaxConstant\\\" | \\\"syntaxDelimiter\\\" | \\\"syntaxField\\\" | \\\"syntaxFunction\\\" | \\\"syntaxNumber\\\" | \\\"syntaxSpecial\\\" | \\\"syntaxString\\\" | \\\"text\\\" | \\\"title\\\" | \\\"ui\\\" | \\\"warn\\\" | \\\"white\\\" | \\\"yellow\\\" | `#${string}`)\",\n value: input\n }, _errorFactory)) && (undefined !== input || __typia_transform__assertGuard._assertGuard(true, {\n method: \"typia.createAssert\",\n path: _path + \"\",\n expected: \"(\\\"accent\\\" | \\\"black\\\" | \\\"blue\\\" | \\\"border\\\" | \\\"borderTitle\\\" | \\\"brightBlack\\\" | \\\"brightBlue\\\" | \\\"brightCyan\\\" | \\\"brightGray\\\" | \\\"brightGreen\\\" | \\\"brightGrey\\\" | \\\"brightMagenta\\\" | \\\"brightRed\\\" | \\\"brightWhite\\\" | \\\"brightYellow\\\" | \\\"code\\\" | \\\"codeTitle\\\" | \\\"comment\\\" | \\\"cyan\\\" | \\\"delim\\\" | \\\"diffAdd\\\" | \\\"diffContext\\\" | \\\"diffDel\\\" | \\\"diffLine\\\" | \\\"diffTitle\\\" | \\\"divider\\\" | \\\"error\\\" | \\\"gray\\\" | \\\"green\\\" | \\\"grey\\\" | \\\"gutter\\\" | \\\"highlight\\\" | \\\"id\\\" | \\\"info\\\" | \\\"inherit\\\" | \\\"magenta\\\" | \\\"mdBold\\\" | \\\"mdCode\\\" | \\\"mdCodeBlock\\\" | \\\"mdCodeBlockTitle\\\" | \\\"mdHeading\\\" | \\\"mdHeading1\\\" | \\\"mdHeading2\\\" | \\\"mdHeading3\\\" | \\\"mdHeading4\\\" | \\\"mdHeading5\\\" | \\\"mdHeading6\\\" | \\\"mdHr\\\" | \\\"mdItalic\\\" | \\\"mdLink\\\" | \\\"mdListBullet\\\" | \\\"mdListChecked\\\" | \\\"mdListUnchecked\\\" | \\\"mdQuote\\\" | \\\"mdStrikethrough\\\" | \\\"mdTable\\\" | \\\"mdTableHeader\\\" | \\\"muted\\\" | \\\"name\\\" | \\\"optionActive\\\" | \\\"optionDesc\\\" | \\\"optionName\\\" | \\\"overlay\\\" | \\\"primary\\\" | \\\"prompt\\\" | \\\"quiet\\\" | \\\"red\\\" | \\\"selection\\\" | \\\"shiki\\\" | \\\"subtle\\\" | \\\"success\\\" | \\\"syntaxBoolean\\\" | \\\"syntaxBracket\\\" | \\\"syntaxConstant\\\" | \\\"syntaxDelimiter\\\" | \\\"syntaxField\\\" | \\\"syntaxFunction\\\" | \\\"syntaxNumber\\\" | \\\"syntaxSpecial\\\" | \\\"syntaxString\\\" | \\\"text\\\" | \\\"title\\\" | \\\"ui\\\" | \\\"warn\\\" | \\\"white\\\" | \\\"yellow\\\" | `#${string}`)\",\n value: input\n }, _errorFactory)) && (true === _av2.has(input) || \"string\" === typeof input && RegExp(/^#(.*)/).test(input) || __typia_transform__assertGuard._assertGuard(true, {\n method: \"typia.createAssert\",\n path: _path + \"\",\n expected: \"(\\\"accent\\\" | \\\"black\\\" | \\\"blue\\\" | \\\"border\\\" | \\\"borderTitle\\\" | \\\"brightBlack\\\" | \\\"brightBlue\\\" | \\\"brightCyan\\\" | \\\"brightGray\\\" | \\\"brightGreen\\\" | \\\"brightGrey\\\" | \\\"brightMagenta\\\" | \\\"brightRed\\\" | \\\"brightWhite\\\" | \\\"brightYellow\\\" | \\\"code\\\" | \\\"codeTitle\\\" | \\\"comment\\\" | \\\"cyan\\\" | \\\"delim\\\" | \\\"diffAdd\\\" | \\\"diffContext\\\" | \\\"diffDel\\\" | \\\"diffLine\\\" | \\\"diffTitle\\\" | \\\"divider\\\" | \\\"error\\\" | \\\"gray\\\" | \\\"green\\\" | \\\"grey\\\" | \\\"gutter\\\" | \\\"highlight\\\" | \\\"id\\\" | \\\"info\\\" | \\\"inherit\\\" | \\\"magenta\\\" | \\\"mdBold\\\" | \\\"mdCode\\\" | \\\"mdCodeBlock\\\" | \\\"mdCodeBlockTitle\\\" | \\\"mdHeading\\\" | \\\"mdHeading1\\\" | \\\"mdHeading2\\\" | \\\"mdHeading3\\\" | \\\"mdHeading4\\\" | \\\"mdHeading5\\\" | \\\"mdHeading6\\\" | \\\"mdHr\\\" | \\\"mdItalic\\\" | \\\"mdLink\\\" | \\\"mdListBullet\\\" | \\\"mdListChecked\\\" | \\\"mdListUnchecked\\\" | \\\"mdQuote\\\" | \\\"mdStrikethrough\\\" | \\\"mdTable\\\" | \\\"mdTableHeader\\\" | \\\"muted\\\" | \\\"name\\\" | \\\"optionActive\\\" | \\\"optionDesc\\\" | \\\"optionName\\\" | \\\"overlay\\\" | \\\"primary\\\" | \\\"prompt\\\" | \\\"quiet\\\" | \\\"red\\\" | \\\"selection\\\" | \\\"shiki\\\" | \\\"subtle\\\" | \\\"success\\\" | \\\"syntaxBoolean\\\" | \\\"syntaxBracket\\\" | \\\"syntaxConstant\\\" | \\\"syntaxDelimiter\\\" | \\\"syntaxField\\\" | \\\"syntaxFunction\\\" | \\\"syntaxNumber\\\" | \\\"syntaxSpecial\\\" | \\\"syntaxString\\\" | \\\"text\\\" | \\\"title\\\" | \\\"ui\\\" | \\\"warn\\\" | \\\"white\\\" | \\\"yellow\\\" | `#${string}`)\",\n value: input\n }, _errorFactory)))(input, \"$input\", true);\n }\n return input;\n}; })();\nconst toLightnessColor = (() => { const _iv1 = new Set([\"id\", \"name\", \"shiki\", \"primary\", \"accent\", \"text\", \"muted\", \"quiet\", \"comment\", \"title\", \"delim\", \"subtle\", \"ui\", \"overlay\", \"highlight\", \"divider\", \"selection\", \"gutter\", \"prompt\", \"border\", \"borderTitle\", \"code\", \"codeTitle\", \"success\", \"info\", \"warn\", \"error\", \"syntaxBoolean\", \"syntaxBracket\", \"syntaxConstant\", \"syntaxDelimiter\", \"syntaxField\", \"syntaxFunction\", \"syntaxNumber\", \"syntaxSpecial\", \"syntaxString\", \"mdBold\", \"mdCode\", \"mdCodeBlock\", \"mdCodeBlockTitle\", \"mdHeading1\", \"mdHeading2\", \"mdHeading3\", \"mdHeading4\", \"mdHeading5\", \"mdHeading6\", \"mdHeading\", \"mdHr\", \"mdItalic\", \"mdLink\", \"mdListBullet\", \"mdListChecked\", \"mdListUnchecked\", \"mdQuote\", \"mdStrikethrough\", \"mdTable\", \"mdTableHeader\", \"optionName\", \"optionDesc\", \"optionActive\", \"diffAdd\", \"diffContext\", \"diffDel\", \"diffLine\", \"diffTitle\"]); const _av2 = new Set([\"id\", \"name\", \"shiki\", \"primary\", \"accent\", \"text\", \"muted\", \"quiet\", \"comment\", \"title\", \"delim\", \"subtle\", \"ui\", \"overlay\", \"highlight\", \"divider\", \"selection\", \"gutter\", \"prompt\", \"border\", \"borderTitle\", \"code\", \"codeTitle\", \"success\", \"info\", \"warn\", \"error\", \"syntaxBoolean\", \"syntaxBracket\", \"syntaxConstant\", \"syntaxDelimiter\", \"syntaxField\", \"syntaxFunction\", \"syntaxNumber\", \"syntaxSpecial\", \"syntaxString\", \"mdBold\", \"mdCode\", \"mdCodeBlock\", \"mdCodeBlockTitle\", \"mdHeading1\", \"mdHeading2\", \"mdHeading3\", \"mdHeading4\", \"mdHeading5\", \"mdHeading6\", \"mdHeading\", \"mdHr\", \"mdItalic\", \"mdLink\", \"mdListBullet\", \"mdListChecked\", \"mdListUnchecked\", \"mdQuote\", \"mdStrikethrough\", \"mdTable\", \"mdTableHeader\", \"optionName\", \"optionDesc\", \"optionActive\", \"diffAdd\", \"diffContext\", \"diffDel\", \"diffLine\", \"diffTitle\"]); const __is = (input: any): input is HexColor | ThemeKey => null !== input && undefined !== input && (true === _iv1.has(input) || \"string\" === typeof input && RegExp(/^#(.*)/).test(input)); let _errorFactory: any; return (input: any, errorFactory?: (p: import(\"typia\").TypeGuardError.IProps) => Error): HexColor | ThemeKey => {\n if (false === __is(input)) {\n _errorFactory = errorFactory;\n ((input: any, _path: string, _exceptionable: boolean = true) => (null !== input || __typia_transform__assertGuard._assertGuard(true, {\n method: \"typia.createAssert\",\n path: _path + \"\",\n expected: \"(\\\"accent\\\" | \\\"border\\\" | \\\"borderTitle\\\" | \\\"code\\\" | \\\"codeTitle\\\" | \\\"comment\\\" | \\\"delim\\\" | \\\"diffAdd\\\" | \\\"diffContext\\\" | \\\"diffDel\\\" | \\\"diffLine\\\" | \\\"diffTitle\\\" | \\\"divider\\\" | \\\"error\\\" | \\\"gutter\\\" | \\\"highlight\\\" | \\\"id\\\" | \\\"info\\\" | \\\"mdBold\\\" | \\\"mdCode\\\" | \\\"mdCodeBlock\\\" | \\\"mdCodeBlockTitle\\\" | \\\"mdHeading\\\" | \\\"mdHeading1\\\" | \\\"mdHeading2\\\" | \\\"mdHeading3\\\" | \\\"mdHeading4\\\" | \\\"mdHeading5\\\" | \\\"mdHeading6\\\" | \\\"mdHr\\\" | \\\"mdItalic\\\" | \\\"mdLink\\\" | \\\"mdListBullet\\\" | \\\"mdListChecked\\\" | \\\"mdListUnchecked\\\" | \\\"mdQuote\\\" | \\\"mdStrikethrough\\\" | \\\"mdTable\\\" | \\\"mdTableHeader\\\" | \\\"muted\\\" | \\\"name\\\" | \\\"optionActive\\\" | \\\"optionDesc\\\" | \\\"optionName\\\" | \\\"overlay\\\" | \\\"primary\\\" | \\\"prompt\\\" | \\\"quiet\\\" | \\\"selection\\\" | \\\"shiki\\\" | \\\"subtle\\\" | \\\"success\\\" | \\\"syntaxBoolean\\\" | \\\"syntaxBracket\\\" | \\\"syntaxConstant\\\" | \\\"syntaxDelimiter\\\" | \\\"syntaxField\\\" | \\\"syntaxFunction\\\" | \\\"syntaxNumber\\\" | \\\"syntaxSpecial\\\" | \\\"syntaxString\\\" | \\\"text\\\" | \\\"title\\\" | \\\"ui\\\" | \\\"warn\\\" | `#${string}`)\",\n value: input\n }, _errorFactory)) && (undefined !== input || __typia_transform__assertGuard._assertGuard(true, {\n method: \"typia.createAssert\",\n path: _path + \"\",\n expected: \"(\\\"accent\\\" | \\\"border\\\" | \\\"borderTitle\\\" | \\\"code\\\" | \\\"codeTitle\\\" | \\\"comment\\\" | \\\"delim\\\" | \\\"diffAdd\\\" | \\\"diffContext\\\" | \\\"diffDel\\\" | \\\"diffLine\\\" | \\\"diffTitle\\\" | \\\"divider\\\" | \\\"error\\\" | \\\"gutter\\\" | \\\"highlight\\\" | \\\"id\\\" | \\\"info\\\" | \\\"mdBold\\\" | \\\"mdCode\\\" | \\\"mdCodeBlock\\\" | \\\"mdCodeBlockTitle\\\" | \\\"mdHeading\\\" | \\\"mdHeading1\\\" | \\\"mdHeading2\\\" | \\\"mdHeading3\\\" | \\\"mdHeading4\\\" | \\\"mdHeading5\\\" | \\\"mdHeading6\\\" | \\\"mdHr\\\" | \\\"mdItalic\\\" | \\\"mdLink\\\" | \\\"mdListBullet\\\" | \\\"mdListChecked\\\" | \\\"mdListUnchecked\\\" | \\\"mdQuote\\\" | \\\"mdStrikethrough\\\" | \\\"mdTable\\\" | \\\"mdTableHeader\\\" | \\\"muted\\\" | \\\"name\\\" | \\\"optionActive\\\" | \\\"optionDesc\\\" | \\\"optionName\\\" | \\\"overlay\\\" | \\\"primary\\\" | \\\"prompt\\\" | \\\"quiet\\\" | \\\"selection\\\" | \\\"shiki\\\" | \\\"subtle\\\" | \\\"success\\\" | \\\"syntaxBoolean\\\" | \\\"syntaxBracket\\\" | \\\"syntaxConstant\\\" | \\\"syntaxDelimiter\\\" | \\\"syntaxField\\\" | \\\"syntaxFunction\\\" | \\\"syntaxNumber\\\" | \\\"syntaxSpecial\\\" | \\\"syntaxString\\\" | \\\"text\\\" | \\\"title\\\" | \\\"ui\\\" | \\\"warn\\\" | `#${string}`)\",\n value: input\n }, _errorFactory)) && (true === _av2.has(input) || \"string\" === typeof input && RegExp(/^#(.*)/).test(input) || __typia_transform__assertGuard._assertGuard(true, {\n method: \"typia.createAssert\",\n path: _path + \"\",\n expected: \"(\\\"accent\\\" | \\\"border\\\" | \\\"borderTitle\\\" | \\\"code\\\" | \\\"codeTitle\\\" | \\\"comment\\\" | \\\"delim\\\" | \\\"diffAdd\\\" | \\\"diffContext\\\" | \\\"diffDel\\\" | \\\"diffLine\\\" | \\\"diffTitle\\\" | \\\"divider\\\" | \\\"error\\\" | \\\"gutter\\\" | \\\"highlight\\\" | \\\"id\\\" | \\\"info\\\" | \\\"mdBold\\\" | \\\"mdCode\\\" | \\\"mdCodeBlock\\\" | \\\"mdCodeBlockTitle\\\" | \\\"mdHeading\\\" | \\\"mdHeading1\\\" | \\\"mdHeading2\\\" | \\\"mdHeading3\\\" | \\\"mdHeading4\\\" | \\\"mdHeading5\\\" | \\\"mdHeading6\\\" | \\\"mdHr\\\" | \\\"mdItalic\\\" | \\\"mdLink\\\" | \\\"mdListBullet\\\" | \\\"mdListChecked\\\" | \\\"mdListUnchecked\\\" | \\\"mdQuote\\\" | \\\"mdStrikethrough\\\" | \\\"mdTable\\\" | \\\"mdTableHeader\\\" | \\\"muted\\\" | \\\"name\\\" | \\\"optionActive\\\" | \\\"optionDesc\\\" | \\\"optionName\\\" | \\\"overlay\\\" | \\\"primary\\\" | \\\"prompt\\\" | \\\"quiet\\\" | \\\"selection\\\" | \\\"shiki\\\" | \\\"subtle\\\" | \\\"success\\\" | \\\"syntaxBoolean\\\" | \\\"syntaxBracket\\\" | \\\"syntaxConstant\\\" | \\\"syntaxDelimiter\\\" | \\\"syntaxField\\\" | \\\"syntaxFunction\\\" | \\\"syntaxNumber\\\" | \\\"syntaxSpecial\\\" | \\\"syntaxString\\\" | \\\"text\\\" | \\\"title\\\" | \\\"ui\\\" | \\\"warn\\\" | `#${string}`)\",\n value: input\n }, _errorFactory)))(input, \"$input\", true);\n }\n return input;\n}; })();\nconst toStyle = (() => { const _io0 = (input: any): boolean => (undefined === input.bold || \"boolean\" === typeof input.bold) && (undefined === input.dim || \"boolean\" === typeof input.dim) && (undefined === input.italic || \"boolean\" === typeof input.italic) && (undefined === input.underline || \"boolean\" === typeof input.underline) && (undefined === input.inverse || \"boolean\" === typeof input.inverse) && (undefined === input.strikethrough || \"boolean\" === typeof input.strikethrough) && (undefined === input.fg || \"string\" === typeof input.fg) && (undefined === input.bg || \"string\" === typeof input.bg); const _ao0 = (input: any, _path: string, _exceptionable: boolean = true): boolean => (undefined === input.bold || \"boolean\" === typeof input.bold || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssert\",\n path: _path + \".bold\",\n expected: \"(boolean | undefined)\",\n value: input.bold\n}, _errorFactory)) && (undefined === input.dim || \"boolean\" === typeof input.dim || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssert\",\n path: _path + \".dim\",\n expected: \"(boolean | undefined)\",\n value: input.dim\n}, _errorFactory)) && (undefined === input.italic || \"boolean\" === typeof input.italic || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssert\",\n path: _path + \".italic\",\n expected: \"(boolean | undefined)\",\n value: input.italic\n}, _errorFactory)) && (undefined === input.underline || \"boolean\" === typeof input.underline || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssert\",\n path: _path + \".underline\",\n expected: \"(boolean | undefined)\",\n value: input.underline\n}, _errorFactory)) && (undefined === input.inverse || \"boolean\" === typeof input.inverse || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssert\",\n path: _path + \".inverse\",\n expected: \"(boolean | undefined)\",\n value: input.inverse\n}, _errorFactory)) && (undefined === input.strikethrough || \"boolean\" === typeof input.strikethrough || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssert\",\n path: _path + \".strikethrough\",\n expected: \"(boolean | undefined)\",\n value: input.strikethrough\n}, _errorFactory)) && (undefined === input.fg || \"string\" === typeof input.fg || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssert\",\n path: _path + \".fg\",\n expected: \"(string | undefined)\",\n value: input.fg\n}, _errorFactory)) && (undefined === input.bg || \"string\" === typeof input.bg || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssert\",\n path: _path + \".bg\",\n expected: \"(string | undefined)\",\n value: input.bg\n}, _errorFactory)); const __is = (input: any): input is UserStyle => \"object\" === typeof input && null !== input && false === Array.isArray(input) && _io0(input); let _errorFactory: any; return (input: any, errorFactory?: (p: import(\"typia\").TypeGuardError.IProps) => Error): UserStyle => {\n if (false === __is(input)) {\n _errorFactory = errorFactory;\n ((input: any, _path: string, _exceptionable: boolean = true) => (\"object\" === typeof input && null !== input && false === Array.isArray(input) || __typia_transform__assertGuard._assertGuard(true, {\n method: \"typia.createAssert\",\n path: _path + \"\",\n expected: \"UserStyle\",\n value: input\n }, _errorFactory)) && _ao0(input, _path + \"\", true) || __typia_transform__assertGuard._assertGuard(true, {\n method: \"typia.createAssert\",\n path: _path + \"\",\n expected: \"UserStyle\",\n value: input\n }, _errorFactory))(input, \"$input\", true);\n }\n return input;\n}; })();\nconst isColorKey = (() => { return (input: any): input is ColorKeys<Theme> => \"primary\" === input || \"accent\" === input || \"text\" === input || \"success\" === input || \"info\" === input || \"warn\" === input || \"error\" === input; })();\nfunction toColor(value: unknown) {\n if (typeof value !== \"string\")\n return toBaseColor(value); // will throw\n const color = value.replace(/[+-]\\d+/, \"\");\n if (value.match(/[+-]\\d+/))\n toLightnessColor(color);\n return toBaseColor(color);\n}\nconst validator = (() => { const _iv1 = new Set([\"andromeeda\", \"aurora-x\", \"ayu-dark\", \"ayu-light\", \"ayu-mirage\", \"catppuccin-frappe\", \"catppuccin-latte\", \"catppuccin-macchiato\", \"catppuccin-mocha\", \"dark-plus\", \"dracula\", \"dracula-soft\", \"everforest-dark\", \"everforest-light\", \"github-dark\", \"github-dark-default\", \"github-dark-dimmed\", \"github-dark-high-contrast\", \"github-light\", \"github-light-default\", \"github-light-high-contrast\", \"gruvbox-dark-hard\", \"gruvbox-dark-medium\", \"gruvbox-dark-soft\", \"gruvbox-light-hard\", \"gruvbox-light-medium\", \"gruvbox-light-soft\", \"horizon\", \"horizon-bright\", \"houston\", \"kanagawa-dragon\", \"kanagawa-lotus\", \"kanagawa-wave\", \"laserwave\", \"light-plus\", \"material-theme\", \"material-theme-darker\", \"material-theme-lighter\", \"material-theme-ocean\", \"material-theme-palenight\", \"min-dark\", \"min-light\", \"monokai\", \"night-owl\", \"night-owl-light\", \"nord\", \"one-dark-pro\", \"one-light\", \"plastic\", \"poimandres\", \"red\", \"rose-pine\", \"rose-pine-dawn\", \"rose-pine-moon\", \"slack-dark\", \"slack-ochin\", \"snazzy-light\", \"solarized-dark\", \"solarized-light\", \"synthwave-84\", \"tokyo-night\", \"vesper\", \"vitesse-black\", \"vitesse-dark\", \"vitesse-light\"]); const _av2 = new Set([\"andromeeda\", \"aurora-x\", \"ayu-dark\", \"ayu-light\", \"ayu-mirage\", \"catppuccin-frappe\", \"catppuccin-latte\", \"catppuccin-macchiato\", \"catppuccin-mocha\", \"dark-plus\", \"dracula\", \"dracula-soft\", \"everforest-dark\", \"everforest-light\", \"github-dark\", \"github-dark-default\", \"github-dark-dimmed\", \"github-dark-high-contrast\", \"github-light\", \"github-light-default\", \"github-light-high-contrast\", \"gruvbox-dark-hard\", \"gruvbox-dark-medium\", \"gruvbox-dark-soft\", \"gruvbox-light-hard\", \"gruvbox-light-medium\", \"gruvbox-light-soft\", \"horizon\", \"horizon-bright\", \"houston\", \"kanagawa-dragon\", \"kanagawa-lotus\", \"kanagawa-wave\", \"laserwave\", \"light-plus\", \"material-theme\", \"material-theme-darker\", \"material-theme-lighter\", \"material-theme-ocean\", \"material-theme-palenight\", \"min-dark\", \"min-light\", \"monokai\", \"night-owl\", \"night-owl-light\", \"nord\", \"one-dark-pro\", \"one-light\", \"plastic\", \"poimandres\", \"red\", \"rose-pine\", \"rose-pine-dawn\", \"rose-pine-moon\", \"slack-dark\", \"slack-ochin\", \"snazzy-light\", \"solarized-dark\", \"solarized-light\", \"synthwave-84\", \"tokyo-night\", \"vesper\", \"vitesse-black\", \"vitesse-dark\", \"vitesse-light\"]); const _io0 = (input: any, _exceptionable: boolean = true): boolean => (undefined === input.$schema || \"string\" === typeof input.$schema) && (undefined === input.shiki || true === _iv1.has(input.shiki)) && (undefined === input.id || \"string\" === typeof input.id) && (undefined === input.name || \"string\" === typeof input.name) && Object.keys(input).every((key: any) => {\n if ([\"$schema\", \"shiki\", \"id\", \"name\"].some((prop: any) => key === prop))\n return true;\n const value = input[key];\n if (undefined === value)\n return true;\n return null !== value && (undefined === value || \"string\" === typeof value || \"object\" === typeof value && null !== value && false === Array.isArray(value) && _io1(value, true && _exceptionable));\n}); const _io1 = (input: any, _exceptionable: boolean = true): boolean => (undefined === input.bold || \"boolean\" === typeof input.bold) && (undefined === input.dim || \"boolean\" === typeof input.dim) && (undefined === input.italic || \"boolean\" === typeof input.italic) && (undefined === input.underline || \"boolean\" === typeof input.underline) && (undefined === input.inverse || \"boolean\" === typeof input.inverse) && (undefined === input.strikethrough || \"boolean\" === typeof input.strikethrough) && (undefined === input.fg || \"string\" === typeof input.fg) && (undefined === input.bg || \"string\" === typeof input.bg) && (0 === Object.keys(input).length || Object.keys(input).every((key: any) => {\n if ([\"bold\", \"dim\", \"italic\", \"underline\", \"inverse\", \"strikethrough\", \"fg\", \"bg\"].some((prop: any) => key === prop))\n return true;\n const value = input[key];\n if (undefined === value)\n return true;\n return false;\n})); const _ao0 = (input: any, _path: string, _exceptionable: boolean = true): boolean => (undefined === input.$schema || \"string\" === typeof input.$schema || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + \".$schema\",\n expected: \"(string | undefined)\",\n value: input.$schema\n}, _errorFactory)) && (undefined === input.shiki || true === _av2.has(input.shiki) || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + \".shiki\",\n expected: \"(\\\"andromeeda\\\" | \\\"aurora-x\\\" | \\\"ayu-dark\\\" | \\\"ayu-light\\\" | \\\"ayu-mirage\\\" | \\\"catppuccin-frappe\\\" | \\\"catppuccin-latte\\\" | \\\"catppuccin-macchiato\\\" | \\\"catppuccin-mocha\\\" | \\\"dark-plus\\\" | \\\"dracula\\\" | \\\"dracula-soft\\\" | \\\"everforest-dark\\\" | \\\"everforest-light\\\" | \\\"github-dark\\\" | \\\"github-dark-default\\\" | \\\"github-dark-dimmed\\\" | \\\"github-dark-high-contrast\\\" | \\\"github-light\\\" | \\\"github-light-default\\\" | \\\"github-light-high-contrast\\\" | \\\"gruvbox-dark-hard\\\" | \\\"gruvbox-dark-medium\\\" | \\\"gruvbox-dark-soft\\\" | \\\"gruvbox-light-hard\\\" | \\\"gruvbox-light-medium\\\" | \\\"gruvbox-light-soft\\\" | \\\"horizon\\\" | \\\"horizon-bright\\\" | \\\"houston\\\" | \\\"kanagawa-dragon\\\" | \\\"kanagawa-lotus\\\" | \\\"kanagawa-wave\\\" | \\\"laserwave\\\" | \\\"light-plus\\\" | \\\"material-theme\\\" | \\\"material-theme-darker\\\" | \\\"material-theme-lighter\\\" | \\\"material-theme-ocean\\\" | \\\"material-theme-palenight\\\" | \\\"min-dark\\\" | \\\"min-light\\\" | \\\"monokai\\\" | \\\"night-owl\\\" | \\\"night-owl-light\\\" | \\\"nord\\\" | \\\"one-dark-pro\\\" | \\\"one-light\\\" | \\\"plastic\\\" | \\\"poimandres\\\" | \\\"red\\\" | \\\"rose-pine\\\" | \\\"rose-pine-dawn\\\" | \\\"rose-pine-moon\\\" | \\\"slack-dark\\\" | \\\"slack-ochin\\\" | \\\"snazzy-light\\\" | \\\"solarized-dark\\\" | \\\"solarized-light\\\" | \\\"synthwave-84\\\" | \\\"tokyo-night\\\" | \\\"vesper\\\" | \\\"vitesse-black\\\" | \\\"vitesse-dark\\\" | \\\"vitesse-light\\\" | undefined)\",\n value: input.shiki\n}, _errorFactory)) && (undefined === input.id || \"string\" === typeof input.id || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + \".id\",\n expected: \"(string | undefined)\",\n value: input.id\n}, _errorFactory)) && (undefined === input.name || \"string\" === typeof input.name || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + \".name\",\n expected: \"(string | undefined)\",\n value: input.name\n}, _errorFactory)) && (false === _exceptionable || Object.keys(input).every((key: any) => {\n if ([\"$schema\", \"shiki\", \"id\", \"name\"].some((prop: any) => key === prop))\n return true;\n const value = input[key];\n if (undefined === value)\n return true;\n return (null !== value || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),\n expected: \"(UserStyle | string | undefined)\",\n value: value\n }, _errorFactory)) && (undefined === value || \"string\" === typeof value || (\"object\" === typeof value && null !== value && false === Array.isArray(value) || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),\n expected: \"(UserStyle | string | undefined)\",\n value: value\n }, _errorFactory)) && _ao1(value, _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key), true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),\n expected: \"(UserStyle | string | undefined)\",\n value: value\n }, _errorFactory));\n})); const _ao1 = (input: any, _path: string, _exceptionable: boolean = true): boolean => (undefined === input.bold || \"boolean\" === typeof input.bold || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + \".bold\",\n expected: \"(boolean | undefined)\",\n value: input.bold\n}, _errorFactory)) && (undefined === input.dim || \"boolean\" === typeof input.dim || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + \".dim\",\n expected: \"(boolean | undefined)\",\n value: input.dim\n}, _errorFactory)) && (undefined === input.italic || \"boolean\" === typeof input.italic || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + \".italic\",\n expected: \"(boolean | undefined)\",\n value: input.italic\n}, _errorFactory)) && (undefined === input.underline || \"boolean\" === typeof input.underline || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + \".underline\",\n expected: \"(boolean | undefined)\",\n value: input.underline\n}, _errorFactory)) && (undefined === input.inverse || \"boolean\" === typeof input.inverse || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + \".inverse\",\n expected: \"(boolean | undefined)\",\n value: input.inverse\n}, _errorFactory)) && (undefined === input.strikethrough || \"boolean\" === typeof input.strikethrough || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + \".strikethrough\",\n expected: \"(boolean | undefined)\",\n value: input.strikethrough\n}, _errorFactory)) && (undefined === input.fg || \"string\" === typeof input.fg || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + \".fg\",\n expected: \"(string | undefined)\",\n value: input.fg\n}, _errorFactory)) && (undefined === input.bg || \"string\" === typeof input.bg || __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + \".bg\",\n expected: \"(string | undefined)\",\n value: input.bg\n}, _errorFactory)) && (0 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).every((key: any) => {\n if ([\"bold\", \"dim\", \"italic\", \"underline\", \"inverse\", \"strikethrough\", \"fg\", \"bg\"].some((prop: any) => key === prop))\n return true;\n const value = input[key];\n if (undefined === value)\n return true;\n return __typia_transform__assertGuard._assertGuard(_exceptionable, {\n method: \"typia.createAssertEquals\",\n path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),\n expected: \"undefined\",\n value: value\n }, _errorFactory);\n}))); const __is = (input: any, _exceptionable: boolean = true): input is Partial<UserTheme> => \"object\" === typeof input && null !== input && false === Array.isArray(input) && _io0(input, true); let _errorFactory: any; return (input: any, errorFactory?: (p: import(\"typia\").TypeGuardError.IProps) => Error): Partial<UserTheme> => {\n if (false === __is(input)) {\n _errorFactory = errorFactory;\n ((input: any, _path: string, _exceptionable: boolean = true) => (\"object\" === typeof input && null !== input && false === Array.isArray(input) || __typia_transform__assertGuard._assertGuard(true, {\n method: \"typia.createAssertEquals\",\n path: _path + \"\",\n expected: \"Partial<UserTheme>\",\n value: input\n }, _errorFactory)) && _ao0(input, _path + \"\", true) || __typia_transform__assertGuard._assertGuard(true, {\n method: \"typia.createAssertEquals\",\n path: _path + \"\",\n expected: \"Partial<UserTheme>\",\n value: input\n }, _errorFactory))(input, \"$input\", true);\n }\n return input;\n}; })();\nconst skipSlots = new Set([\"$schema\", \"shiki\", \"id\", \"name\"]);\nexport function validateTheme(input: unknown): Partial<UserTheme> {\n const out = validator(input);\n for (const [slot, value] of Object.entries(out)) {\n if (skipSlots.has(slot) || value === undefined)\n continue;\n if (typeof value === \"string\" && toColor(value))\n continue;\n if (isColorKey(slot))\n toColor(value);\n const style = toStyle(value);\n if (style.fg !== undefined)\n toColor(style.fg);\n if (style.bg !== undefined)\n toColor(style.bg);\n }\n return out as unknown as Partial<Theme> & {\n $schema?: string;\n };\n}\n"],"x_google_ignoreList":[0,1,2],"mappings":";;;;;;;;;;;;;;;AAeA,IAAI,iBAAiB,cAAc,MAAM;;;;;;CAMxC,YAAY,OAAO;EAClB,MAAM,MAAM,WAAW,YAAY,MAAM,OAAO,kBAAkB,MAAM,OAAO,OAAO,MAAM,SAAS,GAAG,iBAAiB,MAAM,UAAU;EACzI,MAAM,QAAQ,IAAI,OAAO;EACzB,IAAI,OAAO,gBAAgB,OAAO,eAAe,MAAM,KAAK;OACvD,KAAK,YAAY;EACtB,KAAK,OAAO;EACZ,KAAK,SAAS,MAAM;EACpB,KAAK,OAAO,MAAM;EAClB,KAAK,WAAW,MAAM;EACtB,KAAK,QAAQ,MAAM;EACnB,IAAI,MAAM,eAAe,MAAM,UAAU,KAAK,GAAG,KAAK,cAAc,MAAM,eAAe;GACxF;GACA;GACA,qBAAqB,MAAM,SAAS;EACrC,CAAC,CAAC,KAAK,IAAI;CACZ;AACD;;;ACnCA,MAAM,gBAAgB,eAAe,OAAO,YAAY;CACvD,IAAI,kBAAkB,MAAM,IAAI,SAAS,MAAM,QAAQ,KAAK;MACvD,MAAM,IAAI,eAAe,KAAK;CACnC,OAAO;AACR;;;ACLA,MAAM,6BAA6B,QAAQ,SAAS,GAAG,IAAI,IAAI,QAAQ,IAAI,KAAK,UAAU,GAAG,EAAE;AAC/F,MAAM,YAAY,QAAQ,SAAS,GAAG,MAAM,SAAS,8BAA8B,KAAK,GAAG;AAC3F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M,4BAAY,IAAI,IAAI;CAAC;CAAW;CAAS;CAAM;AAAM,CAAC;AAC5D,SAAgB,cAAc,OAAoC;CAC9D,MAAM,MAAM,UAAU,KAAK;CAC3B,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAQ,GAAG,GAAG;EAC7C,IAAI,UAAU,IAAI,IAAI,KAAK,UAAU,KAAA,GACjC;EACJ,IAAI,OAAO,UAAU,YAAY,QAAQ,KAAK,GAC1C;EACJ,IAAI,WAAW,IAAI,GACf,QAAQ,KAAK;EACjB,MAAM,QAAQ,QAAQ,KAAK;EAC3B,IAAI,MAAM,OAAO,KAAA,GACb,QAAQ,MAAM,EAAE;EACpB,IAAI,MAAM,OAAO,KAAA,GACb,QAAQ,MAAM,EAAE;CACxB;CACA,OAAO;AAGX"}
package/dist/themes.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { n as loadTheme, r as themeRegistry, t as defaultTheme } from "./registry-U654j61Y.mjs";
1
+ import { n as loadTheme, r as themeRegistry, t as defaultTheme } from "./registry-w_w7gZr_.mjs";
2
2
  export { defaultTheme, loadTheme, themeRegistry };
@@ -0,0 +1,73 @@
1
+ import { S as unwrap, h as memo } from "./reactive-f7NpAi69.mjs";
2
+ import { t as widget } from "./widget-BkMwhY2p.mjs";
3
+ import { n as select } from "./select-m7NE6Rwa.mjs";
4
+ import { stringWidth } from "@zaly/shared/ansi";
5
+ //#region src/widgets/tree.ts
6
+ const icons = {
7
+ last: "╰─",
8
+ middle: "├─",
9
+ vertical: "│ "
10
+ };
11
+ var Tree = class {
12
+ root;
13
+ nodes = /* @__PURE__ */ new Map();
14
+ items = [];
15
+ constructor(root) {
16
+ this.root = root;
17
+ this.#build(root, void 0, true);
18
+ }
19
+ #build(item, parent, last) {
20
+ this.nodes.set(item, {
21
+ last,
22
+ parent
23
+ });
24
+ this.items.push(item);
25
+ const children = item.children ?? [];
26
+ for (let c = 0; c < children.length; c++) {
27
+ const child = children[c];
28
+ this.#build(child, item, c === children.length - 1);
29
+ }
30
+ }
31
+ node(item) {
32
+ return this.nodes.get(item);
33
+ }
34
+ };
35
+ const tree = widget((props) => {
36
+ const builder = memo(() => new Tree(unwrap(props.tree)));
37
+ const items = memo(() => props.root === true ? builder().items : builder().items.slice(1));
38
+ const activeFn = typeof props.active === "function" ? props.active : (i) => i === props.active;
39
+ const active = props.active ? items().findIndex((i) => activeFn(i)) : -1;
40
+ const ret = select({
41
+ ...props,
42
+ active: active === -1 ? 0 : active,
43
+ items
44
+ });
45
+ ret.extendRenderer((prev) => (item, ctx) => {
46
+ const t = builder();
47
+ const path = [];
48
+ const s = ctx.style;
49
+ const itemNode = t.node(item);
50
+ let n = t.node(item);
51
+ while (n?.parent) {
52
+ if (props.root !== true && n.parent === props.tree) break;
53
+ let icon = "";
54
+ if (n !== itemNode) icon = n.last ? " " : icons.vertical;
55
+ else icon = n.last ? icons.last : icons.middle;
56
+ path.unshift(icon);
57
+ n = t.node(n.parent);
58
+ }
59
+ const prefix = path.join("");
60
+ const prefixWidth = stringWidth(prefix);
61
+ const text = prev(item, {
62
+ ...ctx,
63
+ prefixWidth,
64
+ width: ctx.width - prefixWidth
65
+ }).replace(/\s/g, " ");
66
+ return `${s.gutter(prefix)}${text}`;
67
+ });
68
+ return Object.assign(ret, { items });
69
+ });
70
+ //#endregion
71
+ export { tree as t };
72
+
73
+ //# sourceMappingURL=tree-Bo1afYhe.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree-Bo1afYhe.mjs","names":["#build"],"sources":["../src/widgets/tree.ts"],"sourcesContent":["import type { Reactive } from \"../core/reactive.ts\"\nimport type { Option, Select, SelectState } from \"./select.ts\"\n\nimport { stringWidth } from \"@zaly/shared/ansi\"\nimport { memo, unwrap } from \"../core/reactive.ts\"\nimport { select } from \"./select.ts\"\nimport { widget } from \"./widget.ts\"\n\nexport type TreeItem<T extends Option = Option> = T & {\n children?: TreeItem<T>[]\n icon?: string\n}\n\nexport type TreeProps<T extends TreeItem = TreeItem> = Omit<SelectState<T>, \"items\" | \"active\"> & {\n tree: Reactive<T>\n /** If true, the root node will be rendered and selectable. Defaults to false. */\n root?: boolean\n active?: T | ((item: T) => boolean)\n}\n\nconst icons = {\n // last: \"└─\",\n last: \"╰─\",\n middle: \"├─\",\n vertical: \"│ \",\n}\n\nexport type TreeNode<T extends TreeItem> = {\n last?: boolean\n parent?: T\n}\n\nclass Tree<T extends TreeItem> {\n nodes = new Map<T, TreeNode<T>>()\n items: T[] = []\n\n constructor(public root: T) {\n this.#build(root, undefined, true)\n }\n\n #build(item: T, parent?: T, last?: boolean) {\n this.nodes.set(item, { last, parent })\n this.items.push(item)\n const children = item.children ?? []\n for (let c = 0; c < children.length; c++) {\n const child = children[c] as T\n this.#build(child, item, c === children.length - 1)\n }\n }\n\n node(item: T) {\n return this.nodes.get(item)\n }\n}\n\nexport const tree = widget(\n <T extends TreeItem>(props: TreeProps<T>): Select<T> & { items: Reactive<T[]> } => {\n const builder = memo(() => new Tree(unwrap(props.tree)))\n const items = memo(() => (props.root === true ? builder().items : builder().items.slice(1)))\n\n const activeFn =\n typeof props.active === \"function\" ? props.active : (i: T) => i === props.active\n const active = props.active ? items().findIndex((i) => activeFn(i)) : -1\n\n const ret = select({ ...props, active: active === -1 ? 0 : active, items })\n\n ret.extendRenderer((prev) => (item, ctx) => {\n const t = builder()\n const path: string[] = []\n const s = ctx.style\n const itemNode = t.node(item)\n let n = t.node(item)\n while (n?.parent) {\n if (props.root !== true && n.parent === props.tree) break\n let icon = \"\"\n if (n !== itemNode) icon = n.last ? \" \" : icons.vertical\n else icon = n.last ? icons.last : icons.middle\n path.unshift(icon)\n n = t.node(n.parent)\n }\n const prefix = path.join(\"\")\n const prefixWidth = stringWidth(prefix)\n const text = prev(item, { ...ctx, prefixWidth, width: ctx.width - prefixWidth }).replace(\n /\\s/g,\n \" \"\n )\n return `${s.gutter(prefix)}${text}`\n })\n\n return Object.assign(ret, { items })\n }\n)\n"],"mappings":";;;;;AAoBA,MAAM,QAAQ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AAG,QAAQ;GAChB,IAAI,MAAM,SAAS,QAAQ,EAAE,WAAW,MAAM,MAAM;GACpD,IAAI,OAAO;GACX,IAAI,MAAM,UAAU,OAAO,EAAE,OAAO,OAAO,MAAM;QAC5C,OAAO,EAAE,OAAO,MAAM,OAAO,MAAM;GACxC,KAAK,QAAQ,IAAI;GACjB,IAAI,EAAE,KAAK,EAAE,MAAM;EACrB;EACA,MAAM,SAAS,KAAK,KAAK,EAAE;EAC3B,MAAM,cAAc,YAAY,MAAM;EACtC,MAAM,OAAO,KAAK,MAAM;GAAE,GAAG;GAAK;GAAa,OAAO,IAAI,QAAQ;EAAY,CAAC,CAAC,CAAC,QAC/E,OACA,GACF;EACA,OAAO,GAAG,EAAE,OAAO,MAAM,IAAI;CAC/B,CAAC;CAED,OAAO,OAAO,OAAO,KAAK,EAAE,MAAM,CAAC;AACrC,CACF"}
@@ -0,0 +1,40 @@
1
+ import { o as createNode } from "./reactive-f7NpAi69.mjs";
2
+ //#region src/widgets/widget.ts
3
+ /**
4
+ * Type helper for declaring widgets — runtime identity, just `return fn`.
5
+ *
6
+ * Three things it earns:
7
+ * 1. Inference at the declaration site: TS infers `S` from the function
8
+ * parameter and enforces it on every call site.
9
+ * 2. A consistent grep target: every component reads as
10
+ * `export const foo = widget((props) => …)`.
11
+ * 3. A future seam for instrumentation, lifecycle wrappers, devtools.
12
+ *
13
+ * The factory body runs **once** at construction. Reactive content lives
14
+ * in leaf thunks (`text(({ style }) => …)`), not by re-running the body
15
+ * — this is the Solid model, not React's. `ctx` is therefore unavailable
16
+ * inside the factory; reach for it inside leaf thunks where it belongs.
17
+ *
18
+ * ```ts
19
+ * const status = widget((props: { level: "ok" | "warn"; msg: string }) =>
20
+ * text(({ style }) => `${style.bold[props.level]("●")} ${style.dim(props.msg)}`),
21
+ * )
22
+ *
23
+ * status({ level: "ok", msg: "all systems nominal" })
24
+ * ```
25
+ */
26
+ /**
27
+ * Call-site args derived from `S`:
28
+ * - If `S` declares `children`, `children` is injected from rest args;
29
+ * state at the call site has `children` omitted, then `...children`.
30
+ * - Otherwise, no rest is allowed.
31
+ * - Either way, the state arg is optional when every field of the
32
+ * resolved state is optional (so bare `widget()` works).
33
+ */
34
+ function widget(fn) {
35
+ return ((...args) => createNode(() => fn(...args)));
36
+ }
37
+ //#endregion
38
+ export { widget as t };
39
+
40
+ //# sourceMappingURL=widget-BkMwhY2p.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget-BkMwhY2p.mjs","names":[],"sources":["../src/widgets/widget.ts"],"sourcesContent":["import type { Node } from \"../core/node.ts\"\n\nimport { createNode } from \"../core/reactive.ts\"\n\nexport type Props = Record<string, unknown>\n\n/**\n * A widget factory: takes some args, returns a `Node`.\n *\n * The default `A = never[]` makes the *bare* `Widget` the universal\n * \"any widget\" type — the `(...args: never[]) => Node` idiom. Every\n * concrete factory (zero-arg, `state + ...children`, single-props) is\n * assignable to it, so it works both as the `widget()` constraint and\n * as a stored value type (`details?: Widget`, invoked zero-arg). Supply\n * `A` explicitly for a precise signature: `Widget<[State<LogState>]>`.\n */\nexport type Widget<A extends unknown[] = never[], N extends Node = Node> = (...args: A) => N\n\n/**\n * Type helper for declaring widgets — runtime identity, just `return fn`.\n *\n * Three things it earns:\n * 1. Inference at the declaration site: TS infers `S` from the function\n * parameter and enforces it on every call site.\n * 2. A consistent grep target: every component reads as\n * `export const foo = widget((props) => …)`.\n * 3. A future seam for instrumentation, lifecycle wrappers, devtools.\n *\n * The factory body runs **once** at construction. Reactive content lives\n * in leaf thunks (`text(({ style }) => …)`), not by re-running the body\n * — this is the Solid model, not React's. `ctx` is therefore unavailable\n * inside the factory; reach for it inside leaf thunks where it belongs.\n *\n * ```ts\n * const status = widget((props: { level: \"ok\" | \"warn\"; msg: string }) =>\n * text(({ style }) => `${style.bold[props.level](\"●\")} ${style.dim(props.msg)}`),\n * )\n *\n * status({ level: \"ok\", msg: \"all systems nominal\" })\n * ```\n */\n/**\n * Call-site args derived from `S`:\n * - If `S` declares `children`, `children` is injected from rest args;\n * state at the call site has `children` omitted, then `...children`.\n * - Otherwise, no rest is allowed.\n * - Either way, the state arg is optional when every field of the\n * resolved state is optional (so bare `widget()` works).\n */\n\nexport function widget<T extends Widget>(fn: T): T {\n return ((...args: Parameters<T>) => createNode(() => fn(...args))) as T\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDA,SAAgB,OAAyB,IAAU;CACjD,SAAS,GAAG,SAAwB,iBAAiB,GAAG,GAAG,IAAI,CAAC;AAClE"}
@@ -0,0 +1,49 @@
1
+ import { p as Node } from "./queries-DH3bj74K.mjs";
2
+ //#region src/widgets/widget.d.ts
3
+ type Props = Record<string, unknown>;
4
+ /**
5
+ * A widget factory: takes some args, returns a `Node`.
6
+ *
7
+ * The default `A = never[]` makes the *bare* `Widget` the universal
8
+ * "any widget" type — the `(...args: never[]) => Node` idiom. Every
9
+ * concrete factory (zero-arg, `state + ...children`, single-props) is
10
+ * assignable to it, so it works both as the `widget()` constraint and
11
+ * as a stored value type (`details?: Widget`, invoked zero-arg). Supply
12
+ * `A` explicitly for a precise signature: `Widget<[State<LogState>]>`.
13
+ */
14
+ type Widget<A extends unknown[] = never[], N extends Node = Node> = (...args: A) => N;
15
+ /**
16
+ * Type helper for declaring widgets — runtime identity, just `return fn`.
17
+ *
18
+ * Three things it earns:
19
+ * 1. Inference at the declaration site: TS infers `S` from the function
20
+ * parameter and enforces it on every call site.
21
+ * 2. A consistent grep target: every component reads as
22
+ * `export const foo = widget((props) => …)`.
23
+ * 3. A future seam for instrumentation, lifecycle wrappers, devtools.
24
+ *
25
+ * The factory body runs **once** at construction. Reactive content lives
26
+ * in leaf thunks (`text(({ style }) => …)`), not by re-running the body
27
+ * — this is the Solid model, not React's. `ctx` is therefore unavailable
28
+ * inside the factory; reach for it inside leaf thunks where it belongs.
29
+ *
30
+ * ```ts
31
+ * const status = widget((props: { level: "ok" | "warn"; msg: string }) =>
32
+ * text(({ style }) => `${style.bold[props.level]("●")} ${style.dim(props.msg)}`),
33
+ * )
34
+ *
35
+ * status({ level: "ok", msg: "all systems nominal" })
36
+ * ```
37
+ */
38
+ /**
39
+ * Call-site args derived from `S`:
40
+ * - If `S` declares `children`, `children` is injected from rest args;
41
+ * state at the call site has `children` omitted, then `...children`.
42
+ * - Otherwise, no rest is allowed.
43
+ * - Either way, the state arg is optional when every field of the
44
+ * resolved state is optional (so bare `widget()` works).
45
+ */
46
+ declare function widget<T extends Widget>(fn: T): T;
47
+ //#endregion
48
+ export { Widget as n, widget as r, Props as t };
49
+ //# sourceMappingURL=widget-M7jD8Rgg.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget-M7jD8Rgg.d.mts","names":[],"sources":["../src/widgets/widget.ts"],"mappings":";;KAIY,QAAQ;;;;;;;;;;;KAYR,OAAO,+BAA+B,UAAU,OAAO,YAAY,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkC3E,OAAO,UAAU,QAAQ,IAAI,IAAI"}
@@ -1,7 +1,7 @@
1
1
  import { S as unwrap, f as effect, h as memo, y as signal } from "../reactive-f7NpAi69.mjs";
2
2
  import { t as Node } from "../node-BZ7f6HzU.mjs";
3
- import { t as picker } from "../picker-ndVVt6qF.mjs";
4
- import { Input } from "./input.mjs";
3
+ import { t as picker } from "../picker-cH-rc7-X.mjs";
4
+ import { t as Input } from "../input-CRBuTrsL.mjs";
5
5
  //#region src/widgets/autocomplete.ts
6
6
  /**
7
7
  * Autocomplete popup bound to an `Input`. Watches the input's value and
@@ -1,2 +1,2 @@
1
- import { n as box, t as Box } from "../box-DyaByEiG.mjs";
1
+ import { n as box, t as Box } from "../box-DepqUtuo.mjs";
2
2
  export { Box, box };
@@ -1,11 +1,11 @@
1
1
  import { S as unwrap, h as memo, r as createAsync, w as useContext } from "../reactive-f7NpAi69.mjs";
2
- import { n as box } from "../box-DyaByEiG.mjs";
3
- import { formatLines } from "../text.mjs";
4
- import { text } from "./text.mjs";
5
- import { t as RenderContext } from "../render-DxVLqqB9.mjs";
6
- import { t as codeToAnsi } from "../shiki-BrjVUkeh.mjs";
7
- import { widget } from "./widget.mjs";
8
- import { show } from "./show.mjs";
2
+ import { n as box } from "../box-DepqUtuo.mjs";
3
+ import { a as formatLines } from "../text-q26V6_Sc.mjs";
4
+ import { n as text } from "../text-DILrol9j.mjs";
5
+ import { t as RenderContext } from "../render-F8pVXN7h.mjs";
6
+ import { t as codeToAnsi } from "../shiki-BK-v9CtF.mjs";
7
+ import { t as widget } from "../widget-BkMwhY2p.mjs";
8
+ import { t as show } from "../show-DR2x1YFc.mjs";
9
9
  import { extname } from "pathe";
10
10
  //#region src/widgets/code.ts
11
11
  /**
@@ -1,41 +1,2 @@
1
- import { Bt as Actions, It as ActionDef } from "../../queries-DH3bj74K.mjs";
2
- import { n as PickerItem } from "../../picker-D8OLb6kZ.mjs";
3
- import { o as CompletionSource } from "../../autocomplete-Dfw-yQDa.mjs";
4
- //#region src/widgets/completions/actions.d.ts
5
- /** Completion item produced by `actionsSource`. Carries the full
6
- * `ActionInfo` plus the action `id` so the source's `accept` can
7
- * dispatch without a secondary lookup. Items match the `MenuItem`
8
- * contract loosely via the overlapping `name`/... shape. */
9
- type ActionCompletionItem = ActionDef & PickerItem & {
10
- id: string;
11
- score: number;
12
- };
13
- interface ActionsSourceOptions {
14
- /** Registry to read from. Usually `renderer.actions`. */
15
- actions: Actions;
16
- /** Trigger regex. Default: `/^\s*\//` (slash at start of line). */
17
- trigger?: RegExp;
18
- /** Keep predicate. Default skips `info.hidden`. Return `false` to
19
- * drop the entry from the completion list. */
20
- filter?: (id: string, info: ActionDef) => boolean;
21
- }
22
- /**
23
- * Completion source backed by the `Actions` registry — typical slash
24
- * command ergonomics. Items are raw `ActionInfo` objects augmented
25
- * with their `id`; `accept` dispatches the action through the registry
26
- * and clears the trigger+query range, so the user's typed `/foo` is
27
- * removed once the action fires (no stale text left in the input).
28
- *
29
- * ```ts
30
- * autocomplete({
31
- * input: "chat-input",
32
- * sources: {
33
- * slash: actionsSource({ actions: renderer.actions }),
34
- * },
35
- * })
36
- * ```
37
- */
38
- declare function actionsSource(opts: ActionsSourceOptions): CompletionSource<ActionCompletionItem>;
39
- //#endregion
40
- export { ActionCompletionItem, ActionsSourceOptions, actionsSource };
41
- //# sourceMappingURL=actions.d.mts.map
1
+ import { n as ActionsSourceOptions, r as actionsSource, t as ActionCompletionItem } from "../../actions-CnVzKVID.mjs";
2
+ export { ActionCompletionItem, ActionsSourceOptions, actionsSource };
@@ -1,48 +1,2 @@
1
- //#region src/widgets/completions/actions.ts
2
- /**
3
- * Completion source backed by the `Actions` registry — typical slash
4
- * command ergonomics. Items are raw `ActionInfo` objects augmented
5
- * with their `id`; `accept` dispatches the action through the registry
6
- * and clears the trigger+query range, so the user's typed `/foo` is
7
- * removed once the action fires (no stale text left in the input).
8
- *
9
- * ```ts
10
- * autocomplete({
11
- * input: "chat-input",
12
- * sources: {
13
- * slash: actionsSource({ actions: renderer.actions }),
14
- * },
15
- * })
16
- * ```
17
- */
18
- function actionsSource(opts) {
19
- const trigger = opts.trigger ?? /^\//;
20
- const filter = opts.filter ?? ((_id, info) => !info.hidden && !!info.cmd);
21
- return {
22
- accept(item) {
23
- opts.actions.dispatch(item.id, { source: "autocomplete" });
24
- },
25
- complete(_query, match) {
26
- const out = [];
27
- for (const info of opts.actions.list()) {
28
- if (!filter(info.id, info)) continue;
29
- const name = info.cmd ?? info.id;
30
- const score = match(name);
31
- if (!score) continue;
32
- out.push({
33
- ...info,
34
- id: info.id,
35
- name,
36
- score,
37
- text: name
38
- });
39
- }
40
- return out;
41
- },
42
- triggers: [trigger]
43
- };
44
- }
45
- //#endregion
1
+ import { t as actionsSource } from "../../actions-DEIKF2ts.mjs";
46
2
  export { actionsSource };
47
-
48
- //# sourceMappingURL=actions.mjs.map