@contember/react-devbar 2.0.0-alpha.4 → 2.0.0-alpha.40

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 (135) hide show
  1. package/api-extractor.json +3 -0
  2. package/dist/development/index.cjs +6 -6
  3. package/dist/development/index.js +6 -6
  4. package/dist/development/{DevErrorManager.cjs → src/DevErrorManager.cjs} +10 -13
  5. package/dist/development/src/DevErrorManager.cjs.map +1 -0
  6. package/dist/development/{DevErrorManager.js → src/DevErrorManager.js} +5 -8
  7. package/dist/development/src/DevErrorManager.js.map +1 -0
  8. package/dist/development/{errorHandling.cjs → src/errorHandling.cjs} +1 -1
  9. package/dist/development/src/errorHandling.cjs.map +1 -0
  10. package/dist/development/{errorHandling.js → src/errorHandling.js} +2 -2
  11. package/dist/development/src/errorHandling.js.map +1 -0
  12. package/dist/development/{hooks → src/hooks}/useParsedStacktrace.cjs +9 -4
  13. package/dist/development/src/hooks/useParsedStacktrace.cjs.map +1 -0
  14. package/dist/{production → development/src}/hooks/useParsedStacktrace.js +6 -1
  15. package/dist/development/src/hooks/useParsedStacktrace.js.map +1 -0
  16. package/dist/development/src/ui/DevBar/DevBar.cjs +191 -0
  17. package/dist/development/src/ui/DevBar/DevBar.cjs.map +1 -0
  18. package/dist/development/src/ui/DevBar/DevBar.js +191 -0
  19. package/dist/development/src/ui/DevBar/DevBar.js.map +1 -0
  20. package/dist/development/{ui → src/ui}/DevError/DevError.cjs +10 -10
  21. package/dist/development/src/ui/DevError/DevError.cjs.map +1 -0
  22. package/dist/development/{ui → src/ui}/DevError/DevError.js +10 -10
  23. package/dist/development/src/ui/DevError/DevError.js.map +1 -0
  24. package/dist/development/{ui → src/ui}/DevError/DevErrorBadge.cjs +2 -2
  25. package/dist/development/src/ui/DevError/DevErrorBadge.cjs.map +1 -0
  26. package/dist/development/{ui → src/ui}/DevError/DevErrorBadge.js +2 -2
  27. package/dist/development/src/ui/DevError/DevErrorBadge.js.map +1 -0
  28. package/dist/development/{ui → src/ui}/DevError/DevErrorInner.cjs +15 -15
  29. package/dist/development/src/ui/DevError/DevErrorInner.cjs.map +1 -0
  30. package/dist/development/{ui → src/ui}/DevError/DevErrorInner.js +15 -15
  31. package/dist/development/src/ui/DevError/DevErrorInner.js.map +1 -0
  32. package/dist/development/{ui → src/ui}/DevError/DevErrorList.cjs +41 -30
  33. package/dist/development/src/ui/DevError/DevErrorList.cjs.map +1 -0
  34. package/dist/development/src/ui/DevError/DevErrorList.js +101 -0
  35. package/dist/development/src/ui/DevError/DevErrorList.js.map +1 -0
  36. package/dist/development/{ui → src/ui}/DevError/StackTrace.cjs +10 -10
  37. package/dist/development/src/ui/DevError/StackTrace.cjs.map +1 -0
  38. package/dist/development/{ui → src/ui}/DevError/StackTrace.js +10 -10
  39. package/dist/development/src/ui/DevError/StackTrace.js.map +1 -0
  40. package/dist/production/index.cjs +6 -6
  41. package/dist/production/index.js +6 -6
  42. package/dist/production/{errorHandling.cjs → src/errorHandling.cjs} +1 -0
  43. package/dist/production/src/errorHandling.cjs.map +1 -0
  44. package/dist/production/{errorHandling.js → src/errorHandling.js} +1 -0
  45. package/dist/production/src/errorHandling.js.map +1 -0
  46. package/dist/production/{hooks → src/hooks}/useParsedStacktrace.cjs +9 -4
  47. package/dist/production/src/hooks/useParsedStacktrace.cjs.map +1 -0
  48. package/dist/{development → production/src}/hooks/useParsedStacktrace.js +6 -1
  49. package/dist/production/src/hooks/useParsedStacktrace.js.map +1 -0
  50. package/dist/production/src/ui/DevBar/DevBar.cjs +123 -0
  51. package/dist/production/src/ui/DevBar/DevBar.cjs.map +1 -0
  52. package/dist/production/src/ui/DevBar/DevBar.js +123 -0
  53. package/dist/production/src/ui/DevBar/DevBar.js.map +1 -0
  54. package/dist/production/src/ui/DevError/DevError.cjs.map +1 -0
  55. package/dist/production/src/ui/DevError/DevError.js.map +1 -0
  56. package/dist/production/src/ui/DevError/DevErrorBadge.cjs.map +1 -0
  57. package/dist/production/src/ui/DevError/DevErrorBadge.js.map +1 -0
  58. package/dist/production/{ui → src/ui}/DevError/DevErrorInner.cjs +1 -1
  59. package/dist/production/src/ui/DevError/DevErrorInner.cjs.map +1 -0
  60. package/dist/production/{ui → src/ui}/DevError/DevErrorInner.js +1 -1
  61. package/dist/production/src/ui/DevError/DevErrorInner.js.map +1 -0
  62. package/dist/production/{ui → src/ui}/DevError/DevErrorList.cjs +11 -4
  63. package/dist/production/src/ui/DevError/DevErrorList.cjs.map +1 -0
  64. package/dist/production/{ui → src/ui}/DevError/DevErrorList.js +11 -4
  65. package/dist/production/src/ui/DevError/DevErrorList.js.map +1 -0
  66. package/dist/production/src/ui/DevError/StackTrace.cjs.map +1 -0
  67. package/dist/production/src/ui/DevError/StackTrace.js.map +1 -0
  68. package/dist/types/hooks/useParsedStacktrace.d.ts +1 -1
  69. package/dist/types/hooks/useParsedStacktrace.d.ts.map +1 -1
  70. package/dist/types/tsconfig.tsbuildinfo +1 -1
  71. package/dist/types/ui/DevBar/DevBar.d.ts +5 -4
  72. package/dist/types/ui/DevBar/DevBar.d.ts.map +1 -1
  73. package/dist/types/ui/DevError/DevError.d.ts.map +1 -1
  74. package/dist/types/ui/DevError/DevErrorList.d.ts.map +1 -1
  75. package/package.json +11 -21
  76. package/src/DevErrorManager.tsx +4 -4
  77. package/src/hooks/useParsedStacktrace.ts +6 -1
  78. package/src/index.css +448 -2
  79. package/src/tsconfig.json +5 -2
  80. package/src/ui/DevBar/DevBar.tsx +76 -101
  81. package/src/ui/DevError/DevError.tsx +0 -1
  82. package/src/ui/DevError/DevErrorInner.tsx +1 -1
  83. package/src/ui/DevError/DevErrorList.tsx +14 -5
  84. package/tsconfig.json +7 -0
  85. package/tsdoc.json +6 -0
  86. package/dist/assets/index.css +0 -377
  87. package/dist/development/DevErrorManager.cjs.map +0 -1
  88. package/dist/development/DevErrorManager.js.map +0 -1
  89. package/dist/development/errorHandling.cjs.map +0 -1
  90. package/dist/development/errorHandling.js.map +0 -1
  91. package/dist/development/hooks/useParsedStacktrace.cjs.map +0 -1
  92. package/dist/development/hooks/useParsedStacktrace.js.map +0 -1
  93. package/dist/development/ui/DevBar/DevBar.cjs +0 -237
  94. package/dist/development/ui/DevBar/DevBar.cjs.map +0 -1
  95. package/dist/development/ui/DevBar/DevBar.js +0 -237
  96. package/dist/development/ui/DevBar/DevBar.js.map +0 -1
  97. package/dist/development/ui/DevError/DevError.cjs.map +0 -1
  98. package/dist/development/ui/DevError/DevError.js.map +0 -1
  99. package/dist/development/ui/DevError/DevErrorBadge.cjs.map +0 -1
  100. package/dist/development/ui/DevError/DevErrorBadge.js.map +0 -1
  101. package/dist/development/ui/DevError/DevErrorInner.cjs.map +0 -1
  102. package/dist/development/ui/DevError/DevErrorInner.js.map +0 -1
  103. package/dist/development/ui/DevError/DevErrorList.cjs.map +0 -1
  104. package/dist/development/ui/DevError/DevErrorList.js +0 -90
  105. package/dist/development/ui/DevError/DevErrorList.js.map +0 -1
  106. package/dist/development/ui/DevError/StackTrace.cjs.map +0 -1
  107. package/dist/development/ui/DevError/StackTrace.js.map +0 -1
  108. package/dist/production/errorHandling.cjs.map +0 -1
  109. package/dist/production/errorHandling.js.map +0 -1
  110. package/dist/production/hooks/useParsedStacktrace.cjs.map +0 -1
  111. package/dist/production/hooks/useParsedStacktrace.js.map +0 -1
  112. package/dist/production/ui/DevBar/DevBar.cjs +0 -161
  113. package/dist/production/ui/DevBar/DevBar.cjs.map +0 -1
  114. package/dist/production/ui/DevBar/DevBar.js +0 -161
  115. package/dist/production/ui/DevBar/DevBar.js.map +0 -1
  116. package/dist/production/ui/DevError/DevError.cjs.map +0 -1
  117. package/dist/production/ui/DevError/DevError.js.map +0 -1
  118. package/dist/production/ui/DevError/DevErrorBadge.cjs.map +0 -1
  119. package/dist/production/ui/DevError/DevErrorBadge.js.map +0 -1
  120. package/dist/production/ui/DevError/DevErrorInner.cjs.map +0 -1
  121. package/dist/production/ui/DevError/DevErrorInner.js.map +0 -1
  122. package/dist/production/ui/DevError/DevErrorList.cjs.map +0 -1
  123. package/dist/production/ui/DevError/DevErrorList.js.map +0 -1
  124. package/dist/production/ui/DevError/StackTrace.cjs.map +0 -1
  125. package/dist/production/ui/DevError/StackTrace.js.map +0 -1
  126. package/src/ui/DevBar/index.css +0 -171
  127. package/src/ui/DevError/DevError.css +0 -191
  128. package/src/ui/DevError/DevErrorBadge.css +0 -16
  129. package/src/ui/DevError/index.css +0 -2
  130. /package/dist/production/{ui → src/ui}/DevError/DevError.cjs +0 -0
  131. /package/dist/production/{ui → src/ui}/DevError/DevError.js +0 -0
  132. /package/dist/production/{ui → src/ui}/DevError/DevErrorBadge.cjs +0 -0
  133. /package/dist/production/{ui → src/ui}/DevError/DevErrorBadge.js +0 -0
  134. /package/dist/production/{ui → src/ui}/DevError/StackTrace.cjs +0 -0
  135. /package/dist/production/{ui → src/ui}/DevError/StackTrace.js +0 -0
@@ -1,90 +0,0 @@
1
- import { jsxDEV } from "react/jsx-dev-runtime";
2
- import { DevErrorInner } from "./DevErrorInner.js";
3
- const className = (cls) => cls ? `cui-devError-${cls}` : "cui-devError";
4
- function DevErrorList({
5
- currentError,
6
- currentErrorIndex,
7
- currentErrorSource,
8
- errorCount,
9
- onClose,
10
- onNext,
11
- onPrevious
12
- }) {
13
- return /* @__PURE__ */ jsxDEV("div", { className: className(), children: /* @__PURE__ */ jsxDEV("div", { className: className("in"), children: [
14
- /* @__PURE__ */ jsxDEV("div", { className: className("bar"), children: [
15
- /* @__PURE__ */ jsxDEV("div", { className: className("errorSource"), children: currentErrorSource }, void 0, false, {
16
- fileName: "/__w/interface/interface/packages/react-devbar/src/ui/DevError/DevErrorList.tsx",
17
- lineNumber: 29,
18
- columnNumber: 6
19
- }, this),
20
- /* @__PURE__ */ jsxDEV("div", { className: className("actions"), children: [
21
- errorCount > 1 ? /* @__PURE__ */ jsxDEV("div", { className: className("switcher"), children: [
22
- /* @__PURE__ */ jsxDEV("p", { className: className("errorCount"), children: [
23
- "Error ",
24
- currentErrorIndex + 1,
25
- " of ",
26
- errorCount
27
- ] }, void 0, true, {
28
- fileName: "/__w/interface/interface/packages/react-devbar/src/ui/DevError/DevErrorList.tsx",
29
- lineNumber: 33,
30
- columnNumber: 9
31
- }, this),
32
- /* @__PURE__ */ jsxDEV("div", { className: className("switcherButtons"), children: [
33
- /* @__PURE__ */ jsxDEV("button", { className: className("switcherButton"), onClick: onPrevious, children: "ᐊ" }, void 0, false, {
34
- fileName: "/__w/interface/interface/packages/react-devbar/src/ui/DevError/DevErrorList.tsx",
35
- lineNumber: 37,
36
- columnNumber: 10
37
- }, this),
38
- /* @__PURE__ */ jsxDEV("button", { className: className("switcherButton"), onClick: onNext, children: "ᐅ" }, void 0, false, {
39
- fileName: "/__w/interface/interface/packages/react-devbar/src/ui/DevError/DevErrorList.tsx",
40
- lineNumber: 40,
41
- columnNumber: 10
42
- }, this)
43
- ] }, void 0, true, {
44
- fileName: "/__w/interface/interface/packages/react-devbar/src/ui/DevError/DevErrorList.tsx",
45
- lineNumber: 36,
46
- columnNumber: 9
47
- }, this)
48
- ] }, void 0, true, {
49
- fileName: "/__w/interface/interface/packages/react-devbar/src/ui/DevError/DevErrorList.tsx",
50
- lineNumber: 32,
51
- columnNumber: 8
52
- }, this) : null,
53
- /* @__PURE__ */ jsxDEV("div", { className: className("close"), children: /* @__PURE__ */ jsxDEV("button", { className: className("closeButton"), onClick: onClose, children: "🗙" }, void 0, false, {
54
- fileName: "/__w/interface/interface/packages/react-devbar/src/ui/DevError/DevErrorList.tsx",
55
- lineNumber: 47,
56
- columnNumber: 8
57
- }, this) }, void 0, false, {
58
- fileName: "/__w/interface/interface/packages/react-devbar/src/ui/DevError/DevErrorList.tsx",
59
- lineNumber: 46,
60
- columnNumber: 7
61
- }, this)
62
- ] }, void 0, true, {
63
- fileName: "/__w/interface/interface/packages/react-devbar/src/ui/DevError/DevErrorList.tsx",
64
- lineNumber: 30,
65
- columnNumber: 6
66
- }, this)
67
- ] }, void 0, true, {
68
- fileName: "/__w/interface/interface/packages/react-devbar/src/ui/DevError/DevErrorList.tsx",
69
- lineNumber: 28,
70
- columnNumber: 5
71
- }, this),
72
- /* @__PURE__ */ jsxDEV(DevErrorInner, { error: currentError }, void 0, false, {
73
- fileName: "/__w/interface/interface/packages/react-devbar/src/ui/DevError/DevErrorList.tsx",
74
- lineNumber: 54,
75
- columnNumber: 5
76
- }, this)
77
- ] }, void 0, true, {
78
- fileName: "/__w/interface/interface/packages/react-devbar/src/ui/DevError/DevErrorList.tsx",
79
- lineNumber: 27,
80
- columnNumber: 4
81
- }, this) }, void 0, false, {
82
- fileName: "/__w/interface/interface/packages/react-devbar/src/ui/DevError/DevErrorList.tsx",
83
- lineNumber: 26,
84
- columnNumber: 3
85
- }, this);
86
- }
87
- export {
88
- DevErrorList
89
- };
90
- //# sourceMappingURL=DevErrorList.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DevErrorList.js","sources":["../../../../src/ui/DevError/DevErrorList.tsx"],"sourcesContent":["import { DevErrorInner } from './DevErrorInner'\nimport { ProcessedError } from './types'\n\nexport interface DevErrorListProps {\n\tcurrentError: ProcessedError\n\tcurrentErrorSource: string\n\tcurrentErrorIndex: number\n\terrorCount: number\n\tonPrevious: () => void\n\tonNext: () => void\n\tonClose: () => void\n}\n\nconst className = (cls?: string | null) => cls ? `cui-devError-${cls}` : 'cui-devError'\n\nexport function DevErrorList({\n\tcurrentError,\n\tcurrentErrorIndex,\n\tcurrentErrorSource,\n\terrorCount,\n\tonClose,\n\tonNext,\n\tonPrevious,\n}: DevErrorListProps) {\n\treturn (\n\t\t<div className={className()}>\n\t\t\t<div className={className('in')}>\n\t\t\t\t<div className={className('bar')}>\n\t\t\t\t\t<div className={className('errorSource')}>{currentErrorSource}</div>\n\t\t\t\t\t<div className={className('actions')}>\n\t\t\t\t\t\t{errorCount > 1 ? (\n\t\t\t\t\t\t\t<div className={className('switcher')}>\n\t\t\t\t\t\t\t\t<p className={className('errorCount')}>\n\t\t\t\t\t\t\t\t\tError {currentErrorIndex + 1} of {errorCount}\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<div className={className('switcherButtons')}>\n\t\t\t\t\t\t\t\t\t<button className={className('switcherButton')} onClick={onPrevious}>\n\t\t\t\t\t\t\t\t\t\tᐊ\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t<button className={className('switcherButton')} onClick={onNext}>\n\t\t\t\t\t\t\t\t\t\tᐅ\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t<div className={className('close')}>\n\t\t\t\t\t\t\t<button className={className('closeButton')} onClick={onClose}>\n\t\t\t\t\t\t\t\t🗙\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<DevErrorInner error={currentError} />\n\t\t\t</div>\n\t\t</div>\n\t)\n}\n"],"names":[],"mappings":";;AAaA,MAAM,YAAY,CAAC,QAAwB,MAAM,gBAAgB,GAAG,KAAK;AAElE,SAAS,aAAa;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAsB;AAEpB,SAAA,uBAAC,OAAI,EAAA,WAAW,UAAU,GACzB,iCAAC,OAAI,EAAA,WAAW,UAAU,IAAI,GAC7B,UAAA;AAAA,IAAA,uBAAC,OAAI,EAAA,WAAW,UAAU,KAAK,GAC9B,UAAA;AAAA,MAAA,uBAAC,OAAI,EAAA,WAAW,UAAU,aAAa,GAAI,UAA3C,mBAAA,GAAA,QAAA,OAAA;AAAA,QAAA,UAAA;AAAA,QAAA,YAAA;AAAA,QAAA,cAAA;AAAA,MAA8D,GAAA,IAAA;AAAA,MAC7D,uBAAA,OAAA,EAAI,WAAW,UAAU,SAAS,GACjC,UAAA;AAAA,QAAA,aAAa,IACZ,uBA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AA,MAAA,KApBD,QAAA,MAAA;AAAA,QAAA,UAAA;AAAA,QAAA,YAAA;AAAA,QAAA,cAAA;AAAA,MAqBA,GAAA,IAAA;AAAA,IAAA,KAvBD,QAAA,MAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAwBA,GAAA,IAAA;AAAA,IAEA,uBAAC,eAAc,EAAA,OAAO,aAAtB,GAAA,QAAA,OAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAoC,GAAA,IAAA;AAAA,EAAA,KA3BrC,QAAA,MAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAA,IA4BA,EA7BD,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EA8BA,GAAA,IAAA;AAEF;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"StackTrace.cjs","sources":["../../../../src/ui/DevError/StackTrace.tsx"],"sourcesContent":["import { ParsedStackFrame, ParsedStackTrace } from './types'\n\n\nconst className = (cls?: string | null) => cls ? `cui-devError-${cls}` : 'cui-devError'\nexport const StackTrace = ({ stackTrace }: { stackTrace: ParsedStackTrace }) => {\n\treturn (\n\t\t<div className={className('stack')}>\n\t\t\t{stackTrace.map((it, index) => (\n\t\t\t\t<StackFrame stackFrame={it} key={index} />\n\t\t\t))}\n\t\t</div>\n\t)\n}\n\nconst StackFrame = ({ stackFrame }: { stackFrame: ParsedStackFrame }) => {\n\tconst line = stackFrame.line\n\n\treturn (\n\t\t<div className={className('stackFrame')}>\n\t\t\t<div className={className('stackFrameHeader')}>\n\t\t\t\t<div className={className('stackFrameSource')}>\n\t\t\t\t\t{stackFrame.filename}:{line}\n\t\t\t\t</div>\n\t\t\t\t{stackFrame.callee && <div className={className('stackFrameCallee')}>{stackFrame.callee}</div>}\n\t\t\t</div>\n\t\t\t{line !== undefined && stackFrame.sourceCodeLines && (\n\t\t\t\t<div className={className('stackFrameCode')}>\n\t\t\t\t\t{stackFrame.sourceCodeLines.map((it, index) => {\n\t\t\t\t\t\tconst lineNumber = index + 1\n\t\t\t\t\t\tif (lineNumber + 5 < line || lineNumber - 3 > line) {\n\t\t\t\t\t\t\treturn null\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={`${className('stackFrameLine')} ${lineNumber === line && 'is-active'}`}\n\t\t\t\t\t\t\t\tkey={lineNumber}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className={className('stackFrameLineNumber')}>{lineNumber}</div>\n\t\t\t\t\t\t\t\t<div className={className('stackFrameLineCode')}>{it}</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t)\n}\n"],"names":["jsxDEV","this"],"mappings":";;;AAGA,MAAM,YAAY,CAAC,QAAwB,MAAM,gBAAgB,GAAG,KAAK;AAClE,MAAM,aAAa,CAAC,EAAE,iBAAmD;AAC/E,SACEA,8BAAA,OAAA,OAAA,EAAI,WAAW,UAAU,OAAO,GAC/B,UAAA,WAAW,IAAI,CAAC,IAAI,UACpBA,8BAAAA,OAAC,YAAW,EAAA,YAAY,MAAS,OAAjC,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAAC,MAAwC,CACxC,EAHF,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAIA,GAAAA,MAAA;AAEF;AAEA,MAAM,aAAa,CAAC,EAAE,iBAAmD;AACxE,QAAM,OAAO,WAAW;AAExB,SACED,8BAAAA,OAAA,OAAA,EAAI,WAAW,UAAU,YAAY,GACrC,UAAA;AAAA,IAAAA,8BAAA,OAAC,OAA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,cAAA;AAAA,YAAqD,GAAAA,MAAA;AAAA,UAAA;AAAA,QAAA;AAAA,QAHhD;AAAA,QAFN;AAAA,QAAA;AAAA,UAAA,UAAA;AAAA,UAAA,YAAA;AAAA,UAAA,cAAA;AAAA,QAAA;AAAA,QAAAA;AAAAA,MAAA;AAAA,IAMA,CAED,EAfF,GAAA,QAAA,OAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAgBA,GAAAA,MAAA;AAAA,EAAA,KAxBF,QAAA,MAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EA0BA,GAAAA,MAAA;AAEF;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"StackTrace.js","sources":["../../../../src/ui/DevError/StackTrace.tsx"],"sourcesContent":["import { ParsedStackFrame, ParsedStackTrace } from './types'\n\n\nconst className = (cls?: string | null) => cls ? `cui-devError-${cls}` : 'cui-devError'\nexport const StackTrace = ({ stackTrace }: { stackTrace: ParsedStackTrace }) => {\n\treturn (\n\t\t<div className={className('stack')}>\n\t\t\t{stackTrace.map((it, index) => (\n\t\t\t\t<StackFrame stackFrame={it} key={index} />\n\t\t\t))}\n\t\t</div>\n\t)\n}\n\nconst StackFrame = ({ stackFrame }: { stackFrame: ParsedStackFrame }) => {\n\tconst line = stackFrame.line\n\n\treturn (\n\t\t<div className={className('stackFrame')}>\n\t\t\t<div className={className('stackFrameHeader')}>\n\t\t\t\t<div className={className('stackFrameSource')}>\n\t\t\t\t\t{stackFrame.filename}:{line}\n\t\t\t\t</div>\n\t\t\t\t{stackFrame.callee && <div className={className('stackFrameCallee')}>{stackFrame.callee}</div>}\n\t\t\t</div>\n\t\t\t{line !== undefined && stackFrame.sourceCodeLines && (\n\t\t\t\t<div className={className('stackFrameCode')}>\n\t\t\t\t\t{stackFrame.sourceCodeLines.map((it, index) => {\n\t\t\t\t\t\tconst lineNumber = index + 1\n\t\t\t\t\t\tif (lineNumber + 5 < line || lineNumber - 3 > line) {\n\t\t\t\t\t\t\treturn null\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={`${className('stackFrameLine')} ${lineNumber === line && 'is-active'}`}\n\t\t\t\t\t\t\t\tkey={lineNumber}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className={className('stackFrameLineNumber')}>{lineNumber}</div>\n\t\t\t\t\t\t\t\t<div className={className('stackFrameLineCode')}>{it}</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t)\n}\n"],"names":["this"],"mappings":";AAGA,MAAM,YAAY,CAAC,QAAwB,MAAM,gBAAgB,GAAG,KAAK;AAClE,MAAM,aAAa,CAAC,EAAE,iBAAmD;AAC/E,SACE,uBAAA,OAAA,EAAI,WAAW,UAAU,OAAO,GAC/B,UAAA,WAAW,IAAI,CAAC,IAAI,UACpB,uBAAC,YAAW,EAAA,YAAY,MAAS,OAAjC,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAAA,MAAwC,CACxC,EAHF,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAIA,GAAAA,MAAA;AAEF;AAEA,MAAM,aAAa,CAAC,EAAE,iBAAmD;AACxE,QAAM,OAAO,WAAW;AAExB,SACE,uBAAA,OAAA,EAAI,WAAW,UAAU,YAAY,GACrC,UAAA;AAAA,IAAA,uBAAC,OAAI,EAAA,WAAW,UAAU,kBAAkB,GAC3C,UAAA;AAAA,MAAA,uBAAC,OAAI,EAAA,WAAW,UAAU,kBAAkB,GAC1C,UAAA;AAAA,QAAW,WAAA;AAAA,QAAS;AAAA,QAAE;AAAA,MAAA,KADxB,QAAA,MAAA;AAAA,QAAA,UAAA;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AAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAgBA,GAAAA,MAAA;AAAA,EAAA,KAxBF,QAAA,MAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EA0BA,GAAAA,MAAA;AAEF;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"errorHandling.cjs","sources":["../../src/errorHandling.tsx"],"sourcesContent":["import * as ReactDOM from 'react-dom'\nimport { Buffer } from 'buffer'\nimport { DevErrorManager, ErrorBus } from './DevErrorManager'\nimport { ReactElement } from 'react'\n\nexport type ErrorReactRenderer = (domElement: Element, reactElement: ReactElement, onRecoverableError: (e: any) => void) => void\n\nconst getErrorContainer = () => {\n\tconst errorElementId = '__contember__dev__error__container__element'\n\tlet errorContainer = document.getElementById(errorElementId)\n\n\tif (errorContainer) {\n\t\t// eslint-disable-next-line react/no-deprecated\n\t\tReactDOM.unmountComponentAtNode(errorContainer)\n\n\t} else {\n\t\terrorContainer = document.createElement('div')\n\t\terrorContainer.id = errorElementId\n\t\tdocument.body.appendChild(errorContainer)\n\t}\n\n\treturn errorContainer\n}\n\nconst devErrorHandler = (renderer: ErrorReactRenderer): TryRun => {\n\tconst errorBus = new ErrorBus()\n\n\t;(window as any).Buffer = Buffer\n\twindow.addEventListener('error', e => {\n\t\tif (e.message.startsWith('ResizeObserver')) {\n\t\t\t// Apparently, this can be ignored: https://stackoverflow.com/questions/49384120/resizeobserver-loop-limit-exceeded\n\t\t\treturn\n\t\t}\n\t\terrorBus.handleError('Unhandled error', e.error)\n\t})\n\n\twindow.addEventListener('unhandledrejection', e => errorBus.handleError('Unhandled promise rejection', e.reason))\n\n\tconst origOnError = console.error\n\tconsole.error = (...args) => {\n\t\torigOnError(...args)\n\t\tfor (const arg of args) {\n\t\t\tif (arg instanceof Error) {\n\t\t\t\terrorBus.handleError('Logged error', arg)\n\t\t\t}\n\t\t}\n\t}\n\trenderer(getErrorContainer(), <DevErrorManager bus={errorBus} />, () => {})\n\n\treturn async cb => {\n\t\ttry {\n\t\t\tawait cb(e => errorBus.handleError('Recoverable React error', e))\n\t\t} catch (e) {\n\t\t\terrorBus.handleError('Entrypoint crash', e)\n\t\t}\n\t}\n}\n\ntype TryRun = <T>(cb: (onRecoverableError: (e: any) => void) => T | Promise<T>) => void\nconst prodErrorHandler = (renderer: ErrorReactRenderer): TryRun => {\n\tconst renderError = () => {\n\t\trenderer(getErrorContainer(), <h1>Fatal error</h1>, () => {})\n\t}\n\n\twindow.addEventListener('error', renderError)\n\twindow.addEventListener('unhandledrejection', renderError)\n\n\treturn async cb => {\n\t\ttry {\n\t\t\tawait cb(e => {\n\t\t\t\tconsole.warn(e)\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\trenderError()\n\t\t}\n\t}\n}\n\n\nexport const createErrorHandler = (renderer: ErrorReactRenderer) => {\n\tif (import.meta.env.DEV) {\n\t\treturn devErrorHandler(renderer)\n\t} else {\n\t\treturn prodErrorHandler(renderer)\n\t}\n}\n"],"names":["ReactDOM","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAOA,MAAM,oBAAoB,MAAM;AAC/B,QAAM,iBAAiB;AACnB,MAAA,iBAAiB,SAAS,eAAe,cAAc;AAE3D,MAAI,gBAAgB;AAEnBA,wBAAS,uBAAuB,cAAc;AAAA,EAAA,OAExC;AACW,qBAAA,SAAS,cAAc,KAAK;AAC7C,mBAAe,KAAK;AACX,aAAA,KAAK,YAAY,cAAc;AAAA,EACzC;AAEO,SAAA;AACR;AAqCA,MAAM,mBAAmB,CAAC,aAAyC;AAClE,QAAM,cAAc,MAAM;AAChB,aAAA,qBAAsBC,+BAAA,MAAG,EAAA,UAAA,cAAW,CAAA,GAAO,MAAM;AAAA,IAAA,CAAE;AAAA,EAAA;AAGtD,SAAA,iBAAiB,SAAS,WAAW;AACrC,SAAA,iBAAiB,sBAAsB,WAAW;AAEzD,SAAO,OAAM,OAAM;AACd,QAAA;AACG,YAAA,GAAG,CAAK,MAAA;AACb,gBAAQ,KAAK,CAAC;AAAA,MAAA,CACd;AAAA,aACO,GAAG;AACX,cAAQ,MAAM,CAAC;AACH;IACb;AAAA,EAAA;AAEF;AAGa,MAAA,qBAAqB,CAAC,aAAiC;AAG5D;AACN,WAAO,iBAAiB,QAAQ;AAAA,EACjC;AACD;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"errorHandling.js","sources":["../../src/errorHandling.tsx"],"sourcesContent":["import * as ReactDOM from 'react-dom'\nimport { Buffer } from 'buffer'\nimport { DevErrorManager, ErrorBus } from './DevErrorManager'\nimport { ReactElement } from 'react'\n\nexport type ErrorReactRenderer = (domElement: Element, reactElement: ReactElement, onRecoverableError: (e: any) => void) => void\n\nconst getErrorContainer = () => {\n\tconst errorElementId = '__contember__dev__error__container__element'\n\tlet errorContainer = document.getElementById(errorElementId)\n\n\tif (errorContainer) {\n\t\t// eslint-disable-next-line react/no-deprecated\n\t\tReactDOM.unmountComponentAtNode(errorContainer)\n\n\t} else {\n\t\terrorContainer = document.createElement('div')\n\t\terrorContainer.id = errorElementId\n\t\tdocument.body.appendChild(errorContainer)\n\t}\n\n\treturn errorContainer\n}\n\nconst devErrorHandler = (renderer: ErrorReactRenderer): TryRun => {\n\tconst errorBus = new ErrorBus()\n\n\t;(window as any).Buffer = Buffer\n\twindow.addEventListener('error', e => {\n\t\tif (e.message.startsWith('ResizeObserver')) {\n\t\t\t// Apparently, this can be ignored: https://stackoverflow.com/questions/49384120/resizeobserver-loop-limit-exceeded\n\t\t\treturn\n\t\t}\n\t\terrorBus.handleError('Unhandled error', e.error)\n\t})\n\n\twindow.addEventListener('unhandledrejection', e => errorBus.handleError('Unhandled promise rejection', e.reason))\n\n\tconst origOnError = console.error\n\tconsole.error = (...args) => {\n\t\torigOnError(...args)\n\t\tfor (const arg of args) {\n\t\t\tif (arg instanceof Error) {\n\t\t\t\terrorBus.handleError('Logged error', arg)\n\t\t\t}\n\t\t}\n\t}\n\trenderer(getErrorContainer(), <DevErrorManager bus={errorBus} />, () => {})\n\n\treturn async cb => {\n\t\ttry {\n\t\t\tawait cb(e => errorBus.handleError('Recoverable React error', e))\n\t\t} catch (e) {\n\t\t\terrorBus.handleError('Entrypoint crash', e)\n\t\t}\n\t}\n}\n\ntype TryRun = <T>(cb: (onRecoverableError: (e: any) => void) => T | Promise<T>) => void\nconst prodErrorHandler = (renderer: ErrorReactRenderer): TryRun => {\n\tconst renderError = () => {\n\t\trenderer(getErrorContainer(), <h1>Fatal error</h1>, () => {})\n\t}\n\n\twindow.addEventListener('error', renderError)\n\twindow.addEventListener('unhandledrejection', renderError)\n\n\treturn async cb => {\n\t\ttry {\n\t\t\tawait cb(e => {\n\t\t\t\tconsole.warn(e)\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\trenderError()\n\t\t}\n\t}\n}\n\n\nexport const createErrorHandler = (renderer: ErrorReactRenderer) => {\n\tif (import.meta.env.DEV) {\n\t\treturn devErrorHandler(renderer)\n\t} else {\n\t\treturn prodErrorHandler(renderer)\n\t}\n}\n"],"names":[],"mappings":";;AAOA,MAAM,oBAAoB,MAAM;AAC/B,QAAM,iBAAiB;AACnB,MAAA,iBAAiB,SAAS,eAAe,cAAc;AAE3D,MAAI,gBAAgB;AAEnB,aAAS,uBAAuB,cAAc;AAAA,EAAA,OAExC;AACW,qBAAA,SAAS,cAAc,KAAK;AAC7C,mBAAe,KAAK;AACX,aAAA,KAAK,YAAY,cAAc;AAAA,EACzC;AAEO,SAAA;AACR;AAqCA,MAAM,mBAAmB,CAAC,aAAyC;AAClE,QAAM,cAAc,MAAM;AAChB,aAAA,qBAAsB,oBAAA,MAAG,EAAA,UAAA,cAAW,CAAA,GAAO,MAAM;AAAA,IAAA,CAAE;AAAA,EAAA;AAGtD,SAAA,iBAAiB,SAAS,WAAW;AACrC,SAAA,iBAAiB,sBAAsB,WAAW;AAEzD,SAAO,OAAM,OAAM;AACd,QAAA;AACG,YAAA,GAAG,CAAK,MAAA;AACb,gBAAQ,KAAK,CAAC;AAAA,MAAA,CACd;AAAA,aACO,GAAG;AACX,cAAQ,MAAM,CAAC;AACH;IACb;AAAA,EAAA;AAEF;AAGa,MAAA,qBAAqB,CAAC,aAAiC;AAG5D;AACN,WAAO,iBAAiB,QAAQ;AAAA,EACjC;AACD;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useParsedStacktrace.cjs","sources":["../../../src/hooks/useParsedStacktrace.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\nimport { ErrorType, ProcessedError } from '../ui/DevError'\n\nexport const parseStacktrace = async (e: Error) => {\n\tconst StackTracey = (await import('stacktracey')).default\n\treturn (await new StackTracey(e).withSourcesAsync()).items.map(it => ({\n\t\tfilename: it.fileShort,\n\t\tline: it.line,\n\t\tcallee: it.callee,\n\t\tthirdParty: it.thirdParty,\n\t\tsourceCodeLines: it.sourceFile?.lines,\n\t}))\n}\n\nconst createInitialError = (e: ErrorType): ProcessedError => ({\n\terror: e,\n\tcause: e instanceof Error && 'cause' in e && (e as any).cause !== undefined ? createInitialError((e as any).cause) : undefined,\n})\n\nexport const useProcessedError = (e: ErrorType): ProcessedError => {\n\tconst [error, setError] = useState<ProcessedError>(() => createInitialError(e))\n\tuseEffect(() => {\n\t\tsetError(createInitialError(e))\n\t\tif (!(e instanceof Error)) {\n\t\t\treturn\n\t\t}\n\t\tconst createErrorWithStackTrace = async (e: ErrorType): Promise<ProcessedError> => {\n\t\t\treturn {\n\t\t\t\terror: e,\n\t\t\t\tparsedStackStrace: e instanceof Error ? await parseStacktrace(e) : undefined,\n\t\t\t\tcause: e instanceof Error && 'cause' in e && (e as any).cause !== undefined ? await createErrorWithStackTrace((e as any).cause) : undefined,\n\t\t\t}\n\t\t}\n\t\t(async () => {\n\t\t\tsetError(await createErrorWithStackTrace(e))\n\t\t})()\n\t}, [e])\n\n\treturn error\n}\n"],"names":["useState","useEffect","e"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAGa,MAAA,kBAAkB,OAAO,MAAa;AAClD,QAAM,eAAe,MAAM,OAAO,aAAa,GAAG;AAC1C,UAAA,MAAM,IAAI,YAAY,CAAC,EAAE,iBAAiB,GAAG,MAAM,IAAI,CAAO,QAAA;AAAA,IACrE,UAAU,GAAG;AAAA,IACb,MAAM,GAAG;AAAA,IACT,QAAQ,GAAG;AAAA,IACX,YAAY,GAAG;AAAA,IACf,iBAAiB,GAAG,YAAY;AAAA,EAC/B,EAAA;AACH;AAEA,MAAM,qBAAqB,CAAC,OAAkC;AAAA,EAC7D,OAAO;AAAA,EACP,OAAO,aAAa,SAAS,WAAW,KAAM,EAAU,UAAU,SAAY,mBAAoB,EAAU,KAAK,IAAI;AACtH;AAEa,MAAA,oBAAoB,CAAC,MAAiC;AAC5D,QAAA,CAAC,OAAO,QAAQ,IAAIA,eAAyB,MAAM,mBAAmB,CAAC,CAAC;AAC9EC,QAAAA,UAAU,MAAM;AACN,aAAA,mBAAmB,CAAC,CAAC;AAC1B,QAAA,EAAE,aAAa,QAAQ;AAC1B;AAAA,IACD;AACM,UAAA,4BAA4B,OAAOC,OAA0C;AAC3E,aAAA;AAAA,QACN,OAAOA;AAAAA,QACP,mBAAmBA,cAAa,QAAQ,MAAM,gBAAgBA,EAAC,IAAI;AAAA,QACnE,OAAOA,cAAa,SAAS,WAAWA,MAAMA,GAAU,UAAU,SAAY,MAAM,0BAA2BA,GAAU,KAAK,IAAI;AAAA,MAAA;AAAA,IACnI;AAED,KAAC,YAAY;AACH,eAAA,MAAM,0BAA0B,CAAC,CAAC;AAAA,IAAA;EACzC,GACD,CAAC,CAAC,CAAC;AAEC,SAAA;AACR;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useParsedStacktrace.js","sources":["../../../src/hooks/useParsedStacktrace.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\nimport { ErrorType, ProcessedError } from '../ui/DevError'\n\nexport const parseStacktrace = async (e: Error) => {\n\tconst StackTracey = (await import('stacktracey')).default\n\treturn (await new StackTracey(e).withSourcesAsync()).items.map(it => ({\n\t\tfilename: it.fileShort,\n\t\tline: it.line,\n\t\tcallee: it.callee,\n\t\tthirdParty: it.thirdParty,\n\t\tsourceCodeLines: it.sourceFile?.lines,\n\t}))\n}\n\nconst createInitialError = (e: ErrorType): ProcessedError => ({\n\terror: e,\n\tcause: e instanceof Error && 'cause' in e && (e as any).cause !== undefined ? createInitialError((e as any).cause) : undefined,\n})\n\nexport const useProcessedError = (e: ErrorType): ProcessedError => {\n\tconst [error, setError] = useState<ProcessedError>(() => createInitialError(e))\n\tuseEffect(() => {\n\t\tsetError(createInitialError(e))\n\t\tif (!(e instanceof Error)) {\n\t\t\treturn\n\t\t}\n\t\tconst createErrorWithStackTrace = async (e: ErrorType): Promise<ProcessedError> => {\n\t\t\treturn {\n\t\t\t\terror: e,\n\t\t\t\tparsedStackStrace: e instanceof Error ? await parseStacktrace(e) : undefined,\n\t\t\t\tcause: e instanceof Error && 'cause' in e && (e as any).cause !== undefined ? await createErrorWithStackTrace((e as any).cause) : undefined,\n\t\t\t}\n\t\t}\n\t\t(async () => {\n\t\t\tsetError(await createErrorWithStackTrace(e))\n\t\t})()\n\t}, [e])\n\n\treturn error\n}\n"],"names":["e"],"mappings":";AAGa,MAAA,kBAAkB,OAAO,MAAa;AAClD,QAAM,eAAe,MAAM,OAAO,aAAa,GAAG;AAC1C,UAAA,MAAM,IAAI,YAAY,CAAC,EAAE,iBAAiB,GAAG,MAAM,IAAI,CAAO,QAAA;AAAA,IACrE,UAAU,GAAG;AAAA,IACb,MAAM,GAAG;AAAA,IACT,QAAQ,GAAG;AAAA,IACX,YAAY,GAAG;AAAA,IACf,iBAAiB,GAAG,YAAY;AAAA,EAC/B,EAAA;AACH;AAEA,MAAM,qBAAqB,CAAC,OAAkC;AAAA,EAC7D,OAAO;AAAA,EACP,OAAO,aAAa,SAAS,WAAW,KAAM,EAAU,UAAU,SAAY,mBAAoB,EAAU,KAAK,IAAI;AACtH;AAEa,MAAA,oBAAoB,CAAC,MAAiC;AAC5D,QAAA,CAAC,OAAO,QAAQ,IAAI,SAAyB,MAAM,mBAAmB,CAAC,CAAC;AAC9E,YAAU,MAAM;AACN,aAAA,mBAAmB,CAAC,CAAC;AAC1B,QAAA,EAAE,aAAa,QAAQ;AAC1B;AAAA,IACD;AACM,UAAA,4BAA4B,OAAOA,OAA0C;AAC3E,aAAA;AAAA,QACN,OAAOA;AAAAA,QACP,mBAAmBA,cAAa,QAAQ,MAAM,gBAAgBA,EAAC,IAAI;AAAA,QACnE,OAAOA,cAAa,SAAS,WAAWA,MAAMA,GAAU,UAAU,SAAY,MAAM,0BAA2BA,GAAU,KAAK,IAAI;AAAA,MAAA;AAAA,IACnI;AAED,KAAC,YAAY;AACH,eAAA,MAAM,0BAA0B,CAAC,CAAC;AAAA,IAAA;EACzC,GACD,CAAC,CAAC,CAAC;AAEC,SAAA;AACR;"}
@@ -1,161 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const jsxRuntime = require("react/jsx-runtime");
4
- const reactUtils = require("@contember/react-utils");
5
- const utilities = require("@contember/utilities");
6
- const react = require("react");
7
- const className = (cls) => cls ? `cui-devBar-${cls}` : "cui-devBar";
8
- const DevBar = ({
9
- breakpoint = 768,
10
- children,
11
- brand
12
- }) => {
13
- const [expanded, setExpanded] = react.useState(true);
14
- const isSmallScreen = reactUtils.useWindowSize().width < breakpoint;
15
- const toggleButtonRef = react.useRef(null);
16
- const handleToggle = reactUtils.useReferentiallyStableCallback(() => {
17
- setExpanded((expanded2) => !expanded2);
18
- });
19
- react.useEffect(() => {
20
- function handleKeyDown(event) {
21
- if (event.code === "KeyJ" && (event.ctrlKey || event.metaKey)) {
22
- event.preventDefault();
23
- event.stopPropagation();
24
- if (expanded) {
25
- setExpanded(false);
26
- toggleButtonRef.current?.blur();
27
- } else {
28
- if (toggleButtonRef.current !== document.activeElement) {
29
- toggleButtonRef.current?.focus();
30
- } else {
31
- toggleButtonRef.current?.blur();
32
- }
33
- }
34
- }
35
- }
36
- document.addEventListener("keydown", handleKeyDown);
37
- return () => document.removeEventListener("keydown", handleKeyDown);
38
- }, [expanded, handleToggle]);
39
- const devBarContentRef = react.useRef(null);
40
- reactUtils.useOnElementClickOutsideCallback(devBarContentRef, () => {
41
- if (expanded) {
42
- setExpanded(false);
43
- toggleButtonRef.current?.blur();
44
- }
45
- });
46
- const id = `dev-bar-panel${reactUtils.useId()}`;
47
- return /* @__PURE__ */ jsxRuntime.jsxs(
48
- "section",
49
- {
50
- "data-transparent": true,
51
- "data-overrides-lucide-icons": true,
52
- "data-expanded": utilities.dataAttribute(expanded),
53
- "data-small-screen": utilities.dataAttribute(isSmallScreen),
54
- className: className(null),
55
- onKeyDown: (event) => {
56
- if (event.code === "Escape") {
57
- event.preventDefault();
58
- event.stopPropagation();
59
- if (expanded) {
60
- setExpanded(false);
61
- } else if (document.activeElement && document.activeElement instanceof HTMLElement) {
62
- document.activeElement.blur();
63
- }
64
- }
65
- },
66
- children: [
67
- /* @__PURE__ */ jsxRuntime.jsx("style", { children: `svg { pointer-events: none }` }),
68
- /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: devBarContentRef, className: className("content"), children: [
69
- /* @__PURE__ */ jsxRuntime.jsxs(
70
- "div",
71
- {
72
- "data-expanded": utilities.dataAttribute(expanded),
73
- id,
74
- role: "dialog",
75
- style: { display: "contents" },
76
- children: [
77
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: className("brand"), children: brand }),
78
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: className("panels"), children })
79
- ]
80
- }
81
- ),
82
- /* @__PURE__ */ jsxRuntime.jsx(
83
- "button",
84
- {
85
- ref: toggleButtonRef,
86
- id: "dev-bar-toggle-button",
87
- "aria-label": "Toggle Contember Developer Toolbar",
88
- "aria-controls": id,
89
- "aria-expanded": expanded,
90
- className: className("close"),
91
- onClick: handleToggle,
92
- tabIndex: 0,
93
- children: expanded ? "🗙" : "ᐸ"
94
- }
95
- )
96
- ] })
97
- ]
98
- }
99
- );
100
- };
101
- const DevPanel = ({ heading, icon, children, preview }) => {
102
- const id = `cui-devBar-panel-${reactUtils.useId()}`;
103
- const [expanded, setExpanded] = react.useState(false);
104
- const mouseEnterTimeStampRef = react.useRef(void 0);
105
- const devPanelRef = react.useRef(null);
106
- reactUtils.useOnElementMouseEnterDelayedCallback(devPanelRef, reactUtils.useReferentiallyStableCallback(({ type }) => {
107
- if (type === "mouseenter") {
108
- mouseEnterTimeStampRef.current = Date.now() + 300;
109
- setExpanded(true);
110
- }
111
- }));
112
- return /* @__PURE__ */ jsxRuntime.jsxs(
113
- "div",
114
- {
115
- ref: devPanelRef,
116
- "data-expanded": utilities.dataAttribute(expanded),
117
- className: className("trigger"),
118
- onMouseLeave: reactUtils.useReferentiallyStableCallback(() => {
119
- setExpanded(false);
120
- }),
121
- onKeyDown: reactUtils.useReferentiallyStableCallback((event) => {
122
- if (expanded && event.code === "Escape") {
123
- event.preventDefault();
124
- event.stopPropagation();
125
- setExpanded(false);
126
- }
127
- }),
128
- children: [
129
- /* @__PURE__ */ jsxRuntime.jsxs(
130
- "button",
131
- {
132
- tabIndex: 0,
133
- "aria-haspopup": "dialog",
134
- "aria-controls": id,
135
- "aria-expanded": expanded,
136
- className: className("trigger-label"),
137
- onClick: reactUtils.useReferentiallyStableCallback(() => {
138
- if (mouseEnterTimeStampRef.current && Date.now() < mouseEnterTimeStampRef.current) {
139
- return;
140
- } else {
141
- setExpanded((expanded2) => !expanded2);
142
- mouseEnterTimeStampRef.current = void 0;
143
- }
144
- }),
145
- children: [
146
- icon,
147
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: className("trigger-label-text"), children: preview ?? heading })
148
- ]
149
- }
150
- ),
151
- expanded && /* @__PURE__ */ jsxRuntime.jsx("div", { tabIndex: 0, id, role: "dialog", className: className("panel"), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: className("panel-content"), children: [
152
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "h4", children: heading }),
153
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: className("panel-body"), children })
154
- ] }) })
155
- ]
156
- }
157
- );
158
- };
159
- exports.DevBar = DevBar;
160
- exports.DevPanel = DevPanel;
161
- //# sourceMappingURL=DevBar.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DevBar.cjs","sources":["../../../../src/ui/DevBar/DevBar.tsx"],"sourcesContent":["import {\n\tuseId,\n\tuseOnElementClickOutsideCallback,\n\tuseOnElementMouseEnterDelayedCallback,\n\tuseReferentiallyStableCallback,\n\tuseWindowSize,\n} from '@contember/react-utils'\nimport { dataAttribute } from '@contember/utilities'\nimport { PropsWithChildren, ReactNode, useEffect, useRef, useState } from 'react'\n\nconst className = (cls: string | null) => cls ? `cui-devBar-${cls}` : 'cui-devBar'\n\nexport const DevBar = ({\n\tbreakpoint = 768,\n\tchildren,\n\tbrand,\n}: PropsWithChildren<{\n\tbrand?: ReactNode;\n\tbreakpoint?: number;\n}>) => {\n\tconst [expanded, setExpanded] = useState(true)\n\tconst isSmallScreen = useWindowSize().width < breakpoint\n\tconst toggleButtonRef = useRef<HTMLButtonElement>(null)\n\n\tconst handleToggle = useReferentiallyStableCallback(() => {\n\t\tsetExpanded(expanded => !expanded)\n\t})\n\n\tuseEffect(() => {\n\t\tfunction handleKeyDown(event: KeyboardEvent) {\n\t\t\tif (event.code === 'KeyJ' && (event.ctrlKey || event.metaKey)) {\n\t\t\t\tevent.preventDefault()\n\t\t\t\tevent.stopPropagation()\n\n\t\t\t\tif (expanded) {\n\t\t\t\t\tsetExpanded(false)\n\t\t\t\t\ttoggleButtonRef.current?.blur()\n\t\t\t\t} else {\n\t\t\t\t\tif (toggleButtonRef.current !== document.activeElement) {\n\t\t\t\t\t\ttoggleButtonRef.current?.focus()\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttoggleButtonRef.current?.blur()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdocument.addEventListener('keydown', handleKeyDown)\n\t\treturn () => document.removeEventListener('keydown', handleKeyDown)\n\t}, [expanded, handleToggle])\n\n\tconst devBarContentRef = useRef<HTMLDivElement>(null)\n\n\tuseOnElementClickOutsideCallback(devBarContentRef, () => {\n\t\tif (expanded) {\n\t\t\tsetExpanded(false)\n\t\t\ttoggleButtonRef.current?.blur()\n\t\t}\n\t})\n\n\tconst id = `dev-bar-panel${useId()}`\n\n\treturn (\n\t\t<section\n\t\t\tdata-transparent\n\t\t\tdata-overrides-lucide-icons\n\t\t\tdata-expanded={dataAttribute(expanded)}\n\t\t\tdata-small-screen={dataAttribute(isSmallScreen)}\n\t\t\tclassName={className(null)}\n\t\t\tonKeyDown={event => {\n\t\t\t\tif (event.code === 'Escape') {\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\tevent.stopPropagation()\n\n\t\t\t\t\tif (expanded) {\n\t\t\t\t\t\tsetExpanded(false)\n\t\t\t\t\t} else if (document.activeElement && document.activeElement instanceof HTMLElement) {\n\t\t\t\t\t\tdocument.activeElement.blur()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t<style>{`svg { pointer-events: none }`}</style>\n\t\t\t<div ref={devBarContentRef} className={className('content')}>\n\t\t\t\t<div\n\t\t\t\t\tdata-expanded={dataAttribute(expanded)}\n\t\t\t\t\tid={id}\n\t\t\t\t\trole=\"dialog\"\n\t\t\t\t\tstyle={{ display: 'contents' }}\n\t\t\t\t>\n\t\t\t\t\t<div className={className('brand')}>\n\t\t\t\t\t\t{brand}\n\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div className={className('panels')}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</div>\n\n\t\t\t\t</div>\n\n\t\t\t\t<button\n\t\t\t\t\tref={toggleButtonRef}\n\t\t\t\t\tid=\"dev-bar-toggle-button\"\n\t\t\t\t\taria-label=\"Toggle Contember Developer Toolbar\"\n\t\t\t\t\taria-controls={id}\n\t\t\t\t\taria-expanded={expanded}\n\t\t\t\t\tclassName={className('close')}\n\t\t\t\t\tonClick={handleToggle}\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t>\n\t\t\t\t\t{expanded ? '🗙' : 'ᐸ'}\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</section>\n\t)\n}\n\nexport const DevPanel = ({ heading, icon, children, preview }: {\n\ticon: ReactNode;\n\theading: ReactNode,\n\tchildren: ReactNode,\n\tpreview?: ReactNode\n}) => {\n\tconst id = `cui-devBar-panel-${useId()}`\n\tconst [expanded, setExpanded] = useState(false)\n\tconst mouseEnterTimeStampRef = useRef<ReturnType<typeof Date.now> | undefined>(undefined)\n\n\tconst devPanelRef = useRef<HTMLDivElement>(null)\n\n\tuseOnElementMouseEnterDelayedCallback(devPanelRef, useReferentiallyStableCallback(({ type }) => {\n\t\tif (type === 'mouseenter') {\n\t\t\tmouseEnterTimeStampRef.current = Date.now() + 300\n\t\t\tsetExpanded(true)\n\t\t}\n\t}))\n\n\treturn (\n\t\t<div\n\t\t\tref={devPanelRef}\n\t\t\tdata-expanded={dataAttribute(expanded)}\n\t\t\tclassName={className('trigger')}\n\t\t\tonMouseLeave={useReferentiallyStableCallback(() => {\n\t\t\t\tsetExpanded(false)\n\t\t\t})}\n\t\t\tonKeyDown={useReferentiallyStableCallback(event => {\n\t\t\t\tif (expanded && event.code === 'Escape') {\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\tsetExpanded(false)\n\t\t\t\t}\n\t\t\t})}\n\t\t>\n\t\t\t<button\n\t\t\t\ttabIndex={0}\n\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\taria-controls={id}\n\t\t\t\taria-expanded={expanded}\n\t\t\t\tclassName={className('trigger-label')}\n\t\t\t\tonClick={useReferentiallyStableCallback(() => {\n\t\t\t\t\tif (mouseEnterTimeStampRef.current && Date.now() < mouseEnterTimeStampRef.current) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetExpanded(expanded => !expanded)\n\t\t\t\t\t\tmouseEnterTimeStampRef.current = undefined\n\t\t\t\t\t}\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{icon}\n\t\t\t\t<span className={className('trigger-label-text')}>{preview ?? heading}</span>\n\t\t\t</button>\n\t\t\t{expanded && (\n\t\t\t\t<div tabIndex={0} id={id} role=\"dialog\" className={className('panel')}>\n\t\t\t\t\t<div className={className('panel-content')}>\n\t\t\t\t\t\t<h2 className=\"h4\">\n\t\t\t\t\t\t\t{heading}\n\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t<div className={className('panel-body')}>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t)\n}\n"],"names":["useState","useWindowSize","useRef","useReferentiallyStableCallback","expanded","useEffect","useOnElementClickOutsideCallback","useId","jsxs","dataAttribute","jsx","useOnElementMouseEnterDelayedCallback"],"mappings":";;;;;;AAUA,MAAM,YAAY,CAAC,QAAuB,MAAM,cAAc,GAAG,KAAK;AAE/D,MAAM,SAAS,CAAC;AAAA,EACtB,aAAa;AAAA,EACb;AAAA,EACA;AACD,MAGO;AACN,QAAM,CAAC,UAAU,WAAW,IAAIA,eAAS,IAAI;AACvC,QAAA,gBAAgBC,WAAAA,gBAAgB,QAAQ;AACxC,QAAA,kBAAkBC,aAA0B,IAAI;AAEhD,QAAA,eAAeC,WAAAA,+BAA+B,MAAM;AAC7C,gBAAA,CAAAC,cAAY,CAACA,SAAQ;AAAA,EAAA,CACjC;AAEDC,QAAAA,UAAU,MAAM;AACf,aAAS,cAAc,OAAsB;AAC5C,UAAI,MAAM,SAAS,WAAW,MAAM,WAAW,MAAM,UAAU;AAC9D,cAAM,eAAe;AACrB,cAAM,gBAAgB;AAEtB,YAAI,UAAU;AACb,sBAAY,KAAK;AACjB,0BAAgB,SAAS;QAAK,OAC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C;AAAA,UAAA;AAAA,YACA,UAAU;AAAA,YACV,iBAAc;AAAA,YACd,iBAAe;AAAA,YACf,iBAAe;AAAA,YACf,WAAW,UAAU,eAAe;AAAA,YACpC,SAASL,0CAA+B,MAAM;AAC7C,kBAAI,uBAAuB,WAAW,KAAK,IAAI,IAAI,uBAAuB,SAAS;AAClF;AAAA,cAAA,OACM;AACM,4BAAA,CAAAC,cAAY,CAACA,SAAQ;AACjC,uCAAuB,UAAU;AAAA,cAClC;AAAA,YAAA,CACA;AAAA,YAEA,UAAA;AAAA,cAAA;AAAA,6CACA,QAAK,EAAA,WAAW,UAAU,oBAAoB,GAAI,qBAAW,SAAQ;AAAA,YAAA;AAAA,UAAA;AAAA,QACvE;AAAA,QACC,YACCM,2BAAAA,IAAA,OAAA,EAAI,UAAU,GAAG,IAAQ,MAAK,UAAS,WAAW,UAAU,OAAO,GACnE,UAAAF,2BAAAA,KAAC,SAAI,WAAW,UAAU,eAAe,GACxC,UAAA;AAAA,UAACE,2BAAA,IAAA,MAAA,EAAG,WAAU,MACZ,UACF,SAAA;AAAA,yCACC,OAAI,EAAA,WAAW,UAAU,YAAY,GACpC,UACF;AAAA,QAAA,EAAA,CACD,EACD,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIJ;;;"}
@@ -1,161 +0,0 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { useWindowSize, useReferentiallyStableCallback, useOnElementClickOutsideCallback, useId, useOnElementMouseEnterDelayedCallback } from "@contember/react-utils";
3
- import { dataAttribute } from "@contember/utilities";
4
- import { useState, useRef, useEffect } from "react";
5
- const className = (cls) => cls ? `cui-devBar-${cls}` : "cui-devBar";
6
- const DevBar = ({
7
- breakpoint = 768,
8
- children,
9
- brand
10
- }) => {
11
- const [expanded, setExpanded] = useState(true);
12
- const isSmallScreen = useWindowSize().width < breakpoint;
13
- const toggleButtonRef = useRef(null);
14
- const handleToggle = useReferentiallyStableCallback(() => {
15
- setExpanded((expanded2) => !expanded2);
16
- });
17
- useEffect(() => {
18
- function handleKeyDown(event) {
19
- if (event.code === "KeyJ" && (event.ctrlKey || event.metaKey)) {
20
- event.preventDefault();
21
- event.stopPropagation();
22
- if (expanded) {
23
- setExpanded(false);
24
- toggleButtonRef.current?.blur();
25
- } else {
26
- if (toggleButtonRef.current !== document.activeElement) {
27
- toggleButtonRef.current?.focus();
28
- } else {
29
- toggleButtonRef.current?.blur();
30
- }
31
- }
32
- }
33
- }
34
- document.addEventListener("keydown", handleKeyDown);
35
- return () => document.removeEventListener("keydown", handleKeyDown);
36
- }, [expanded, handleToggle]);
37
- const devBarContentRef = useRef(null);
38
- useOnElementClickOutsideCallback(devBarContentRef, () => {
39
- if (expanded) {
40
- setExpanded(false);
41
- toggleButtonRef.current?.blur();
42
- }
43
- });
44
- const id = `dev-bar-panel${useId()}`;
45
- return /* @__PURE__ */ jsxs(
46
- "section",
47
- {
48
- "data-transparent": true,
49
- "data-overrides-lucide-icons": true,
50
- "data-expanded": dataAttribute(expanded),
51
- "data-small-screen": dataAttribute(isSmallScreen),
52
- className: className(null),
53
- onKeyDown: (event) => {
54
- if (event.code === "Escape") {
55
- event.preventDefault();
56
- event.stopPropagation();
57
- if (expanded) {
58
- setExpanded(false);
59
- } else if (document.activeElement && document.activeElement instanceof HTMLElement) {
60
- document.activeElement.blur();
61
- }
62
- }
63
- },
64
- children: [
65
- /* @__PURE__ */ jsx("style", { children: `svg { pointer-events: none }` }),
66
- /* @__PURE__ */ jsxs("div", { ref: devBarContentRef, className: className("content"), children: [
67
- /* @__PURE__ */ jsxs(
68
- "div",
69
- {
70
- "data-expanded": dataAttribute(expanded),
71
- id,
72
- role: "dialog",
73
- style: { display: "contents" },
74
- children: [
75
- /* @__PURE__ */ jsx("div", { className: className("brand"), children: brand }),
76
- /* @__PURE__ */ jsx("div", { className: className("panels"), children })
77
- ]
78
- }
79
- ),
80
- /* @__PURE__ */ jsx(
81
- "button",
82
- {
83
- ref: toggleButtonRef,
84
- id: "dev-bar-toggle-button",
85
- "aria-label": "Toggle Contember Developer Toolbar",
86
- "aria-controls": id,
87
- "aria-expanded": expanded,
88
- className: className("close"),
89
- onClick: handleToggle,
90
- tabIndex: 0,
91
- children: expanded ? "🗙" : "ᐸ"
92
- }
93
- )
94
- ] })
95
- ]
96
- }
97
- );
98
- };
99
- const DevPanel = ({ heading, icon, children, preview }) => {
100
- const id = `cui-devBar-panel-${useId()}`;
101
- const [expanded, setExpanded] = useState(false);
102
- const mouseEnterTimeStampRef = useRef(void 0);
103
- const devPanelRef = useRef(null);
104
- useOnElementMouseEnterDelayedCallback(devPanelRef, useReferentiallyStableCallback(({ type }) => {
105
- if (type === "mouseenter") {
106
- mouseEnterTimeStampRef.current = Date.now() + 300;
107
- setExpanded(true);
108
- }
109
- }));
110
- return /* @__PURE__ */ jsxs(
111
- "div",
112
- {
113
- ref: devPanelRef,
114
- "data-expanded": dataAttribute(expanded),
115
- className: className("trigger"),
116
- onMouseLeave: useReferentiallyStableCallback(() => {
117
- setExpanded(false);
118
- }),
119
- onKeyDown: useReferentiallyStableCallback((event) => {
120
- if (expanded && event.code === "Escape") {
121
- event.preventDefault();
122
- event.stopPropagation();
123
- setExpanded(false);
124
- }
125
- }),
126
- children: [
127
- /* @__PURE__ */ jsxs(
128
- "button",
129
- {
130
- tabIndex: 0,
131
- "aria-haspopup": "dialog",
132
- "aria-controls": id,
133
- "aria-expanded": expanded,
134
- className: className("trigger-label"),
135
- onClick: useReferentiallyStableCallback(() => {
136
- if (mouseEnterTimeStampRef.current && Date.now() < mouseEnterTimeStampRef.current) {
137
- return;
138
- } else {
139
- setExpanded((expanded2) => !expanded2);
140
- mouseEnterTimeStampRef.current = void 0;
141
- }
142
- }),
143
- children: [
144
- icon,
145
- /* @__PURE__ */ jsx("span", { className: className("trigger-label-text"), children: preview ?? heading })
146
- ]
147
- }
148
- ),
149
- expanded && /* @__PURE__ */ jsx("div", { tabIndex: 0, id, role: "dialog", className: className("panel"), children: /* @__PURE__ */ jsxs("div", { className: className("panel-content"), children: [
150
- /* @__PURE__ */ jsx("h2", { className: "h4", children: heading }),
151
- /* @__PURE__ */ jsx("div", { className: className("panel-body"), children })
152
- ] }) })
153
- ]
154
- }
155
- );
156
- };
157
- export {
158
- DevBar,
159
- DevPanel
160
- };
161
- //# sourceMappingURL=DevBar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DevBar.js","sources":["../../../../src/ui/DevBar/DevBar.tsx"],"sourcesContent":["import {\n\tuseId,\n\tuseOnElementClickOutsideCallback,\n\tuseOnElementMouseEnterDelayedCallback,\n\tuseReferentiallyStableCallback,\n\tuseWindowSize,\n} from '@contember/react-utils'\nimport { dataAttribute } from '@contember/utilities'\nimport { PropsWithChildren, ReactNode, useEffect, useRef, useState } from 'react'\n\nconst className = (cls: string | null) => cls ? `cui-devBar-${cls}` : 'cui-devBar'\n\nexport const DevBar = ({\n\tbreakpoint = 768,\n\tchildren,\n\tbrand,\n}: PropsWithChildren<{\n\tbrand?: ReactNode;\n\tbreakpoint?: number;\n}>) => {\n\tconst [expanded, setExpanded] = useState(true)\n\tconst isSmallScreen = useWindowSize().width < breakpoint\n\tconst toggleButtonRef = useRef<HTMLButtonElement>(null)\n\n\tconst handleToggle = useReferentiallyStableCallback(() => {\n\t\tsetExpanded(expanded => !expanded)\n\t})\n\n\tuseEffect(() => {\n\t\tfunction handleKeyDown(event: KeyboardEvent) {\n\t\t\tif (event.code === 'KeyJ' && (event.ctrlKey || event.metaKey)) {\n\t\t\t\tevent.preventDefault()\n\t\t\t\tevent.stopPropagation()\n\n\t\t\t\tif (expanded) {\n\t\t\t\t\tsetExpanded(false)\n\t\t\t\t\ttoggleButtonRef.current?.blur()\n\t\t\t\t} else {\n\t\t\t\t\tif (toggleButtonRef.current !== document.activeElement) {\n\t\t\t\t\t\ttoggleButtonRef.current?.focus()\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttoggleButtonRef.current?.blur()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdocument.addEventListener('keydown', handleKeyDown)\n\t\treturn () => document.removeEventListener('keydown', handleKeyDown)\n\t}, [expanded, handleToggle])\n\n\tconst devBarContentRef = useRef<HTMLDivElement>(null)\n\n\tuseOnElementClickOutsideCallback(devBarContentRef, () => {\n\t\tif (expanded) {\n\t\t\tsetExpanded(false)\n\t\t\ttoggleButtonRef.current?.blur()\n\t\t}\n\t})\n\n\tconst id = `dev-bar-panel${useId()}`\n\n\treturn (\n\t\t<section\n\t\t\tdata-transparent\n\t\t\tdata-overrides-lucide-icons\n\t\t\tdata-expanded={dataAttribute(expanded)}\n\t\t\tdata-small-screen={dataAttribute(isSmallScreen)}\n\t\t\tclassName={className(null)}\n\t\t\tonKeyDown={event => {\n\t\t\t\tif (event.code === 'Escape') {\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\tevent.stopPropagation()\n\n\t\t\t\t\tif (expanded) {\n\t\t\t\t\t\tsetExpanded(false)\n\t\t\t\t\t} else if (document.activeElement && document.activeElement instanceof HTMLElement) {\n\t\t\t\t\t\tdocument.activeElement.blur()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t<style>{`svg { pointer-events: none }`}</style>\n\t\t\t<div ref={devBarContentRef} className={className('content')}>\n\t\t\t\t<div\n\t\t\t\t\tdata-expanded={dataAttribute(expanded)}\n\t\t\t\t\tid={id}\n\t\t\t\t\trole=\"dialog\"\n\t\t\t\t\tstyle={{ display: 'contents' }}\n\t\t\t\t>\n\t\t\t\t\t<div className={className('brand')}>\n\t\t\t\t\t\t{brand}\n\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div className={className('panels')}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</div>\n\n\t\t\t\t</div>\n\n\t\t\t\t<button\n\t\t\t\t\tref={toggleButtonRef}\n\t\t\t\t\tid=\"dev-bar-toggle-button\"\n\t\t\t\t\taria-label=\"Toggle Contember Developer Toolbar\"\n\t\t\t\t\taria-controls={id}\n\t\t\t\t\taria-expanded={expanded}\n\t\t\t\t\tclassName={className('close')}\n\t\t\t\t\tonClick={handleToggle}\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t>\n\t\t\t\t\t{expanded ? '🗙' : 'ᐸ'}\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</section>\n\t)\n}\n\nexport const DevPanel = ({ heading, icon, children, preview }: {\n\ticon: ReactNode;\n\theading: ReactNode,\n\tchildren: ReactNode,\n\tpreview?: ReactNode\n}) => {\n\tconst id = `cui-devBar-panel-${useId()}`\n\tconst [expanded, setExpanded] = useState(false)\n\tconst mouseEnterTimeStampRef = useRef<ReturnType<typeof Date.now> | undefined>(undefined)\n\n\tconst devPanelRef = useRef<HTMLDivElement>(null)\n\n\tuseOnElementMouseEnterDelayedCallback(devPanelRef, useReferentiallyStableCallback(({ type }) => {\n\t\tif (type === 'mouseenter') {\n\t\t\tmouseEnterTimeStampRef.current = Date.now() + 300\n\t\t\tsetExpanded(true)\n\t\t}\n\t}))\n\n\treturn (\n\t\t<div\n\t\t\tref={devPanelRef}\n\t\t\tdata-expanded={dataAttribute(expanded)}\n\t\t\tclassName={className('trigger')}\n\t\t\tonMouseLeave={useReferentiallyStableCallback(() => {\n\t\t\t\tsetExpanded(false)\n\t\t\t})}\n\t\t\tonKeyDown={useReferentiallyStableCallback(event => {\n\t\t\t\tif (expanded && event.code === 'Escape') {\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\tsetExpanded(false)\n\t\t\t\t}\n\t\t\t})}\n\t\t>\n\t\t\t<button\n\t\t\t\ttabIndex={0}\n\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\taria-controls={id}\n\t\t\t\taria-expanded={expanded}\n\t\t\t\tclassName={className('trigger-label')}\n\t\t\t\tonClick={useReferentiallyStableCallback(() => {\n\t\t\t\t\tif (mouseEnterTimeStampRef.current && Date.now() < mouseEnterTimeStampRef.current) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetExpanded(expanded => !expanded)\n\t\t\t\t\t\tmouseEnterTimeStampRef.current = undefined\n\t\t\t\t\t}\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{icon}\n\t\t\t\t<span className={className('trigger-label-text')}>{preview ?? heading}</span>\n\t\t\t</button>\n\t\t\t{expanded && (\n\t\t\t\t<div tabIndex={0} id={id} role=\"dialog\" className={className('panel')}>\n\t\t\t\t\t<div className={className('panel-content')}>\n\t\t\t\t\t\t<h2 className=\"h4\">\n\t\t\t\t\t\t\t{heading}\n\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t<div className={className('panel-body')}>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t)\n}\n"],"names":["expanded"],"mappings":";;;;AAUA,MAAM,YAAY,CAAC,QAAuB,MAAM,cAAc,GAAG,KAAK;AAE/D,MAAM,SAAS,CAAC;AAAA,EACtB,aAAa;AAAA,EACb;AAAA,EACA;AACD,MAGO;AACN,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,IAAI;AACvC,QAAA,gBAAgB,gBAAgB,QAAQ;AACxC,QAAA,kBAAkB,OAA0B,IAAI;AAEhD,QAAA,eAAe,+BAA+B,MAAM;AAC7C,gBAAA,CAAAA,cAAY,CAACA,SAAQ;AAAA,EAAA,CACjC;AAED,YAAU,MAAM;AACf,aAAS,cAAc,OAAsB;AAC5C,UAAI,MAAM,SAAS,WAAW,MAAM,WAAW,MAAM,UAAU;AAC9D,cAAM,eAAe;AACrB,cAAM,gBAAgB;AAEtB,YAAI,UAAU;AACb,sBAAY,KAAK;AACjB,0BAAgB,SAAS;QAAK,OACxB;AACF,cAAA,gBAAgB,YAAY,SAAS,eAAe;AACvD,4BAAgB,SAAS;UAAM,OACzB;AACN,4BAAgB,SAAS;UAC1B;AAAA,QACD;AAAA,MACD;AAAA,I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cAAY,CAACA,SAAQ;AACjC,uCAAuB,UAAU;AAAA,cAClC;AAAA,YAAA,CACA;AAAA,YAEA,UAAA;AAAA,cAAA;AAAA,kCACA,QAAK,EAAA,WAAW,UAAU,oBAAoB,GAAI,qBAAW,SAAQ;AAAA,YAAA;AAAA,UAAA;AAAA,QACvE;AAAA,QACC,YACC,oBAAA,OAAA,EAAI,UAAU,GAAG,IAAQ,MAAK,UAAS,WAAW,UAAU,OAAO,GACnE,UAAA,qBAAC,SAAI,WAAW,UAAU,eAAe,GACxC,UAAA;AAAA,UAAC,oBAAA,MAAA,EAAG,WAAU,MACZ,UACF,SAAA;AAAA,8BACC,OAAI,EAAA,WAAW,UAAU,YAAY,GACpC,UACF;AAAA,QAAA,EAAA,CACD,EACD,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIJ;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DevError.cjs","sources":["../../../../src/ui/DevError/DevError.tsx"],"sourcesContent":["import { DevErrorInner, DevErrorInnerProps } from './DevErrorInner'\n\nexport interface DevErrorProps extends DevErrorInnerProps {\n\tsource: string\n}\n\nconst className = (cls?: string | null) => cls ? `cui-devError-${cls}` : 'cui-devError'\n\nexport function DevError(props: DevErrorProps) {\n\n\treturn (\n\t\t<div className={className()}>\n\t\t\t<div className={className('in')}>\n\t\t\t\t<div className={className('bar')}>\n\t\t\t\t\t<div className={className('errorSource')}>{props.source}</div>\n\t\t\t\t</div>\n\t\t\t\t<DevErrorInner error={props.error} />\n\t\t\t</div>\n\t\t</div>\n\t)\n}\n"],"names":["jsx","DevErrorInner"],"mappings":";;;;AAMA,MAAM,YAAY,CAAC,QAAwB,MAAM,gBAAgB,GAAG,KAAK;AAElE,SAAS,SAAS,OAAsB;AAG7C,SAAAA,2BAAA,IAAC,OAAI,EAAA,WAAW,UAAU,GACzB,0CAAC,OAAI,EAAA,WAAW,UAAU,IAAI,GAC7B,UAAA;AAAA,IAAAA,2BAAA,IAAC,OAAI,EAAA,WAAW,UAAU,KAAK,GAC9B,UAAAA,+BAAC,OAAI,EAAA,WAAW,UAAU,aAAa,GAAI,UAAA,MAAM,OAAO,CAAA,GACzD;AAAA,IACCA,2BAAAA,IAAAC,cAAAA,eAAA,EAAc,OAAO,MAAM,MAAO,CAAA;AAAA,EAAA,EACpC,CAAA,EACD,CAAA;AAEF;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DevError.js","sources":["../../../../src/ui/DevError/DevError.tsx"],"sourcesContent":["import { DevErrorInner, DevErrorInnerProps } from './DevErrorInner'\n\nexport interface DevErrorProps extends DevErrorInnerProps {\n\tsource: string\n}\n\nconst className = (cls?: string | null) => cls ? `cui-devError-${cls}` : 'cui-devError'\n\nexport function DevError(props: DevErrorProps) {\n\n\treturn (\n\t\t<div className={className()}>\n\t\t\t<div className={className('in')}>\n\t\t\t\t<div className={className('bar')}>\n\t\t\t\t\t<div className={className('errorSource')}>{props.source}</div>\n\t\t\t\t</div>\n\t\t\t\t<DevErrorInner error={props.error} />\n\t\t\t</div>\n\t\t</div>\n\t)\n}\n"],"names":[],"mappings":";;AAMA,MAAM,YAAY,CAAC,QAAwB,MAAM,gBAAgB,GAAG,KAAK;AAElE,SAAS,SAAS,OAAsB;AAG7C,SAAA,oBAAC,OAAI,EAAA,WAAW,UAAU,GACzB,+BAAC,OAAI,EAAA,WAAW,UAAU,IAAI,GAC7B,UAAA;AAAA,IAAA,oBAAC,OAAI,EAAA,WAAW,UAAU,KAAK,GAC9B,UAAA,oBAAC,OAAI,EAAA,WAAW,UAAU,aAAa,GAAI,UAAA,MAAM,OAAO,CAAA,GACzD;AAAA,IACC,oBAAA,eAAA,EAAc,OAAO,MAAM,MAAO,CAAA;AAAA,EAAA,EACpC,CAAA,EACD,CAAA;AAEF;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DevErrorBadge.cjs","sources":["../../../../src/ui/DevError/DevErrorBadge.tsx"],"sourcesContent":["export interface DevErrorBadgeProps {\n\tonOpen: () => void\n\terrorCount: number\n}\n\n\nconst className = (cls?: string | null) => cls ? `cui-devErrorBadge-${cls}` : 'cui-devErrorBadge'\n\nexport function DevErrorBadge({ errorCount, onOpen }: DevErrorBadgeProps) {\n\treturn (\n\t\t<div className={className()}>\n\t\t\t<a className={className('button')} onClick={onOpen}>\n\t\t\t\t{errorCount} {errorCount > 1 ? 'errors' : 'error'}\n\t\t\t</a>\n\t\t</div>\n\t)\n}\n"],"names":["jsx","jsxs"],"mappings":";;;AAMA,MAAM,YAAY,CAAC,QAAwB,MAAM,qBAAqB,GAAG,KAAK;AAEvE,SAAS,cAAc,EAAE,YAAY,UAA8B;AACzE,SACEA,2BAAAA,IAAA,OAAA,EAAI,WAAW,UAAA,GACf,UAAAC,2BAAA,KAAC,KAAE,EAAA,WAAW,UAAU,QAAQ,GAAG,SAAS,QAC1C,UAAA;AAAA,IAAA;AAAA,IAAW;AAAA,IAAE,aAAa,IAAI,WAAW;AAAA,EAAA,EAC3C,CAAA,EACD,CAAA;AAEF;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DevErrorBadge.js","sources":["../../../../src/ui/DevError/DevErrorBadge.tsx"],"sourcesContent":["export interface DevErrorBadgeProps {\n\tonOpen: () => void\n\terrorCount: number\n}\n\n\nconst className = (cls?: string | null) => cls ? `cui-devErrorBadge-${cls}` : 'cui-devErrorBadge'\n\nexport function DevErrorBadge({ errorCount, onOpen }: DevErrorBadgeProps) {\n\treturn (\n\t\t<div className={className()}>\n\t\t\t<a className={className('button')} onClick={onOpen}>\n\t\t\t\t{errorCount} {errorCount > 1 ? 'errors' : 'error'}\n\t\t\t</a>\n\t\t</div>\n\t)\n}\n"],"names":[],"mappings":";AAMA,MAAM,YAAY,CAAC,QAAwB,MAAM,qBAAqB,GAAG,KAAK;AAEvE,SAAS,cAAc,EAAE,YAAY,UAA8B;AACzE,SACE,oBAAA,OAAA,EAAI,WAAW,UAAA,GACf,UAAA,qBAAC,KAAE,EAAA,WAAW,UAAU,QAAQ,GAAG,SAAS,QAC1C,UAAA;AAAA,IAAA;AAAA,IAAW;AAAA,IAAE,aAAa,IAAI,WAAW;AAAA,EAAA,EAC3C,CAAA,EACD,CAAA;AAEF;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DevErrorInner.cjs","sources":["../../../../src/ui/DevError/DevErrorInner.tsx"],"sourcesContent":["import { StackTrace } from './StackTrace'\nimport type { ProcessedError } from './types'\n\nexport interface DevErrorInnerProps {\n\terror: ProcessedError\n\tlevel?: number\n}\n\n\nconst className = (cls?: string | null) => cls ? `cui-devError-${cls}` : 'cui-devError'\n\nexport function DevErrorInner({ error, level = 1 }: DevErrorInnerProps) {\n\n\tlet errorObject: Error | undefined = error.error instanceof Error ? error.error : undefined\n\n\treturn (\n\t\t<>\n\t\t\t<div className={className('header')}>\n\t\t\t\t{errorObject ? (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<h1 className={className('errorName')}>{errorObject.name}</h1>\n\t\t\t\t\t\t{error.cause && <a href={`#error-${level}`} className={className('causeLink')}>caused by &gt;</a>}\n\t\t\t\t\t\t{errorObject.message && <h2 className={className('errorMessage')}>{errorObject.message}</h2>}\n\t\t\t\t\t\t{'details' in errorObject && <h3 className={className('errorDetails')}>{(errorObject as any).details}</h3>}\n\t\t\t\t\t</>\n\t\t\t\t) : (\n\t\t\t\t\t<h1 className={className('errorName')}>Unknown error</h1>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t{error.parsedStackStrace ? (\n\t\t\t\t<StackTrace stackTrace={error.parsedStackStrace} />\n\t\t\t) : errorObject?.stack ? (\n\t\t\t\t<div className={className('stack')}>\n\t\t\t\t\t<div className={className('stack-dump')}>{errorObject.stack}</div>\n\t\t\t\t</div>\n\t\t\t) : null}\n\t\t\t{error.cause ? (\n\t\t\t\t<>\n\t\t\t\t\t<div className={className('causedBy')} id={`error-${level}`}>\n\t\t\t\t\t\tCaused by\n\t\t\t\t\t</div>\n\t\t\t\t\t<DevErrorInner error={error.cause} level={level + 1} />\n\t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AI,SAAS,KAAK,IAAI,UAE7D,YAAA,CAAA;AAAA,qCACC,eAAc,EAAA,OAAO,MAAM,OAAO,OAAO,QAAQ,GAAG;AAAA,IAAA,EAAA,CACtD,IACG;AAAA,EACL,EAAA,CAAA;AAEF;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DevErrorInner.js","sources":["../../../../src/ui/DevError/DevErrorInner.tsx"],"sourcesContent":["import { StackTrace } from './StackTrace'\nimport type { ProcessedError } from './types'\n\nexport interface DevErrorInnerProps {\n\terror: ProcessedError\n\tlevel?: number\n}\n\n\nconst className = (cls?: string | null) => cls ? `cui-devError-${cls}` : 'cui-devError'\n\nexport function DevErrorInner({ error, level = 1 }: DevErrorInnerProps) {\n\n\tlet errorObject: Error | undefined = error.error instanceof Error ? error.error : undefined\n\n\treturn (\n\t\t<>\n\t\t\t<div className={className('header')}>\n\t\t\t\t{errorObject ? (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<h1 className={className('errorName')}>{errorObject.name}</h1>\n\t\t\t\t\t\t{error.cause && <a href={`#error-${level}`} className={className('causeLink')}>caused by &gt;</a>}\n\t\t\t\t\t\t{errorObject.message && <h2 className={className('errorMessage')}>{errorObject.message}</h2>}\n\t\t\t\t\t\t{'details' in errorObject && <h3 className={className('errorDetails')}>{(errorObject as any).details}</h3>}\n\t\t\t\t\t</>\n\t\t\t\t) : (\n\t\t\t\t\t<h1 className={className('errorName')}>Unknown error</h1>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t{error.parsedStackStrace ? (\n\t\t\t\t<StackTrace stackTrace={error.parsedStackStrace} />\n\t\t\t) : errorObject?.stack ? (\n\t\t\t\t<div className={className('stack')}>\n\t\t\t\t\t<div className={className('stack-dump')}>{errorObject.stack}</div>\n\t\t\t\t</div>\n\t\t\t) : null}\n\t\t\t{error.cause ? (\n\t\t\t\t<>\n\t\t\t\t\t<div className={className('causedBy')} id={`error-${level}`}>\n\t\t\t\t\t\tCaused by\n\t\t\t\t\t</div>\n\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AO,OAAO,QAAQ,GAAG;AAAA,IAAA,EAAA,CACtD,IACG;AAAA,EACL,EAAA,CAAA;AAEF;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DevErrorList.cjs","sources":["../../../../src/ui/DevError/DevErrorList.tsx"],"sourcesContent":["import { DevErrorInner } from './DevErrorInner'\nimport { ProcessedError } from './types'\n\nexport interface DevErrorListProps {\n\tcurrentError: ProcessedError\n\tcurrentErrorSource: string\n\tcurrentErrorIndex: number\n\terrorCount: number\n\tonPrevious: () => void\n\tonNext: () => void\n\tonClose: () => void\n}\n\nconst className = (cls?: string | null) => cls ? `cui-devError-${cls}` : 'cui-devError'\n\nexport function DevErrorList({\n\tcurrentError,\n\tcurrentErrorIndex,\n\tcurrentErrorSource,\n\terrorCount,\n\tonClose,\n\tonNext,\n\tonPrevious,\n}: DevErrorListProps) {\n\treturn (\n\t\t<div className={className()}>\n\t\t\t<div className={className('in')}>\n\t\t\t\t<div className={className('bar')}>\n\t\t\t\t\t<div className={className('errorSource')}>{currentErrorSource}</div>\n\t\t\t\t\t<div className={className('actions')}>\n\t\t\t\t\t\t{errorCount > 1 ? (\n\t\t\t\t\t\t\t<div className={className('switcher')}>\n\t\t\t\t\t\t\t\t<p className={className('errorCount')}>\n\t\t\t\t\t\t\t\t\tError {currentErrorIndex + 1} of {errorCount}\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<div className={className('switcherButtons')}>\n\t\t\t\t\t\t\t\t\t<button className={className('switcherButton')} onClick={onPrevious}>\n\t\t\t\t\t\t\t\t\t\tᐊ\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t<button className={className('switcherButton')} onClick={onNext}>\n\t\t\t\t\t\t\t\t\t\tᐅ\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t<div className={className('close')}>\n\t\t\t\t\t\t\t<button className={className('closeButton')} onClick={onClose}>\n\t\t\t\t\t\t\t\t🗙\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<DevErrorInner error={currentError} />\n\t\t\t</div>\n\t\t</div>\n\t)\n}\n"],"names":["jsx","jsxs","DevErrorInner"],"mappings":";;;;AAaA,MAAM,YAAY,CAAC,QAAwB,MAAM,gBAAgB,GAAG,KAAK;AAElE,SAAS,aAAa;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAsB;AAEpB,SAAAA,2BAAA,IAAC,OAAI,EAAA,WAAW,UAAU,GACzB,0CAAC,OAAI,EAAA,WAAW,UAAU,IAAI,GAC7B,UAAA;AAAA,IAAAC,2BAAA,KAAC,OAAI,EAAA,WAAW,UAAU,KAAK,GAC9B,UAAA;AAAA,MAAAD,+BAAC,OAAI,EAAA,WAAW,UAAU,aAAa,GAAI,UAAmB,oBAAA;AAAA,MAC7DC,2BAAA,KAAA,OAAA,EAAI,WAAW,UAAU,SAAS,GACjC,UAAA;AAAA,QAAA,aAAa,IACZA,2BAAAA,KAAA,OAAA,EAAI,WAAW,UAAU,UAAU,GACnC,UAAA;AAAA,UAAAA,2BAAA,KAAC,KAAE,EAAA,WAAW,UAAU,YAAY,GAAG,UAAA;AAAA,YAAA;AAAA,YAC/B,oBAAoB;AAAA,YAAE;AAAA,YAAK;AAAA,UAAA,GACnC;AAAA,UACCA,2BAAA,KAAA,OAAA,EAAI,WAAW,UAAU,iBAAiB,GAC1C,UAAA;AAAA,YAAAD,2BAAAA,IAAC,YAAO,WAAW,UAAU,gBAAgB,GAAG,SAAS,YAAY,UAErE,KAAA;AAAA,YACAA,2BAAAA,IAAC,YAAO,WAAW,UAAU,gBAAgB,GAAG,SAAS,QAAQ,UAEjE,KAAA;AAAA,UAAA,GACD;AAAA,QAAA,EAAA,CACD,IACG;AAAA,QACHA,+BAAA,OAAA,EAAI,WAAW,UAAU,OAAO,GAChC,UAAAA,2BAAAA,IAAC,UAAO,EAAA,WAAW,UAAU,aAAa,GAAG,SAAS,SAAS,eAE/D,CAAA,GACD;AAAA,MAAA,GACD;AAAA,IAAA,GACD;AAAA,IAEAA,2BAAAA,IAACE,cAAc,eAAA,EAAA,OAAO,aAAc,CAAA;AAAA,EAAA,EACrC,CAAA,EACD,CAAA;AAEF;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DevErrorList.js","sources":["../../../../src/ui/DevError/DevErrorList.tsx"],"sourcesContent":["import { DevErrorInner } from './DevErrorInner'\nimport { ProcessedError } from './types'\n\nexport interface DevErrorListProps {\n\tcurrentError: ProcessedError\n\tcurrentErrorSource: string\n\tcurrentErrorIndex: number\n\terrorCount: number\n\tonPrevious: () => void\n\tonNext: () => void\n\tonClose: () => void\n}\n\nconst className = (cls?: string | null) => cls ? `cui-devError-${cls}` : 'cui-devError'\n\nexport function DevErrorList({\n\tcurrentError,\n\tcurrentErrorIndex,\n\tcurrentErrorSource,\n\terrorCount,\n\tonClose,\n\tonNext,\n\tonPrevious,\n}: DevErrorListProps) {\n\treturn (\n\t\t<div className={className()}>\n\t\t\t<div className={className('in')}>\n\t\t\t\t<div className={className('bar')}>\n\t\t\t\t\t<div className={className('errorSource')}>{currentErrorSource}</div>\n\t\t\t\t\t<div className={className('actions')}>\n\t\t\t\t\t\t{errorCount > 1 ? (\n\t\t\t\t\t\t\t<div className={className('switcher')}>\n\t\t\t\t\t\t\t\t<p className={className('errorCount')}>\n\t\t\t\t\t\t\t\t\tError {currentErrorIndex + 1} of {errorCount}\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<div className={className('switcherButtons')}>\n\t\t\t\t\t\t\t\t\t<button className={className('switcherButton')} onClick={onPrevious}>\n\t\t\t\t\t\t\t\t\t\tᐊ\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t<button className={className('switcherButton')} onClick={onNext}>\n\t\t\t\t\t\t\t\t\t\tᐅ\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t<div className={className('close')}>\n\t\t\t\t\t\t\t<button className={className('closeButton')} onClick={onClose}>\n\t\t\t\t\t\t\t\t🗙\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<DevErrorInner error={currentError} />\n\t\t\t</div>\n\t\t</div>\n\t)\n}\n"],"names":[],"mappings":";;AAaA,MAAM,YAAY,CAAC,QAAwB,MAAM,gBAAgB,GAAG,KAAK;AAElE,SAAS,aAAa;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAsB;AAEpB,SAAA,oBAAC,OAAI,EAAA,WAAW,UAAU,GACzB,+BAAC,OAAI,EAAA,WAAW,UAAU,IAAI,GAC7B,UAAA;AAAA,IAAA,qBAAC,OAAI,EAAA,WAAW,UAAU,KAAK,GAC9B,UAAA;AAAA,MAAA,oBAAC,OAAI,EAAA,WAAW,UAAU,aAAa,GAAI,UAAmB,oBAAA;AAAA,MAC7D,qBAAA,OAAA,EAAI,WAAW,UAAU,SAAS,GACjC,UAAA;AAAA,QAAA,aAAa,IACZ,qBAAA,OAAA,EAAI,WAAW,UAAU,UAAU,GACnC,UAAA;AAAA,UAAA,qBAAC,KAAE,EAAA,WAAW,UAAU,YAAY,GAAG,UAAA;AAAA,YAAA;AAAA,YAC/B,oBAAoB;AAAA,YAAE;AAAA,YAAK;AAAA,UAAA,GACnC;AAAA,UACC,qBAAA,OAAA,EAAI,WAAW,UAAU,iBAAiB,GAC1C,UAAA;AAAA,YAAA,oBAAC,YAAO,WAAW,UAAU,gBAAgB,GAAG,SAAS,YAAY,UAErE,KAAA;AAAA,YACA,oBAAC,YAAO,WAAW,UAAU,gBAAgB,GAAG,SAAS,QAAQ,UAEjE,KAAA;AAAA,UAAA,GACD;AAAA,QAAA,EAAA,CACD,IACG;AAAA,QACH,oBAAA,OAAA,EAAI,WAAW,UAAU,OAAO,GAChC,UAAA,oBAAC,UAAO,EAAA,WAAW,UAAU,aAAa,GAAG,SAAS,SAAS,eAE/D,CAAA,GACD;AAAA,MAAA,GACD;AAAA,IAAA,GACD;AAAA,IAEA,oBAAC,eAAc,EAAA,OAAO,aAAc,CAAA;AAAA,EAAA,EACrC,CAAA,EACD,CAAA;AAEF;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"StackTrace.cjs","sources":["../../../../src/ui/DevError/StackTrace.tsx"],"sourcesContent":["import { ParsedStackFrame, ParsedStackTrace } from './types'\n\n\nconst className = (cls?: string | null) => cls ? `cui-devError-${cls}` : 'cui-devError'\nexport const StackTrace = ({ stackTrace }: { stackTrace: ParsedStackTrace }) => {\n\treturn (\n\t\t<div className={className('stack')}>\n\t\t\t{stackTrace.map((it, index) => (\n\t\t\t\t<StackFrame stackFrame={it} key={index} />\n\t\t\t))}\n\t\t</div>\n\t)\n}\n\nconst StackFrame = ({ stackFrame }: { stackFrame: ParsedStackFrame }) => {\n\tconst line = stackFrame.line\n\n\treturn (\n\t\t<div className={className('stackFrame')}>\n\t\t\t<div className={className('stackFrameHeader')}>\n\t\t\t\t<div className={className('stackFrameSource')}>\n\t\t\t\t\t{stackFrame.filename}:{line}\n\t\t\t\t</div>\n\t\t\t\t{stackFrame.callee && <div className={className('stackFrameCallee')}>{stackFrame.callee}</div>}\n\t\t\t</div>\n\t\t\t{line !== undefined && stackFrame.sourceCodeLines && (\n\t\t\t\t<div className={className('stackFrameCode')}>\n\t\t\t\t\t{stackFrame.sourceCodeLines.map((it, index) => {\n\t\t\t\t\t\tconst lineNumber = index + 1\n\t\t\t\t\t\tif (lineNumber + 5 < line || lineNumber - 3 > line) {\n\t\t\t\t\t\t\treturn null\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={`${className('stackFrameLine')} ${lineNumber === line && 'is-active'}`}\n\t\t\t\t\t\t\t\tkey={lineNumber}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className={className('stackFrameLineNumber')}>{lineNumber}</div>\n\t\t\t\t\t\t\t\t<div className={className('stackFrameLineCode')}>{it}</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t)\n}\n"],"names":["jsx","jsxs"],"mappings":";;;AAGA,MAAM,YAAY,CAAC,QAAwB,MAAM,gBAAgB,GAAG,KAAK;AAClE,MAAM,aAAa,CAAC,EAAE,iBAAmD;AAC/E,wCACE,OAAI,EAAA,WAAW,UAAU,OAAO,GAC/B,UAAW,WAAA,IAAI,CAAC,IAAI,UACnBA,+BAAA,YAAA,EAAW,YAAY,MAAS,KAAO,CACxC,EACF,CAAA;AAEF;AAEA,MAAM,aAAa,CAAC,EAAE,iBAAmD;AACxE,QAAM,OAAO,WAAW;AAExB,SACEC,2BAAAA,KAAA,OAAA,EAAI,WAAW,UAAU,YAAY,GACrC,UAAA;AAAA,IAAAA,2BAAA,KAAC,OAAI,EAAA,WAAW,UAAU,kBAAkB,GAC3C,UAAA;AAAA,MAAAA,2BAAA,KAAC,OAAI,EAAA,WAAW,UAAU,kBAAkB,GAC1C,UAAA;AAAA,QAAW,WAAA;AAAA,QAAS;AAAA,QAAE;AAAA,MAAA,GACxB;AAAA,MACC,WAAW,UAAWD,+BAAA,OAAA,EAAI,WAAW,UAAU,kBAAkB,GAAI,UAAA,WAAW,OAAO,CAAA;AAAA,IAAA,GACzF;AAAA,IACC,SAAS,UAAa,WAAW,kDAChC,OAAI,EAAA,WAAW,UAAU,gBAAgB,GACxC,UAAW,WAAA,gBAAgB,IAAI,CAAC,IAAI,UAAU;AAC9C,YAAM,aAAa,QAAQ;AAC3B,UAAI,aAAa,IAAI,QAAQ,aAAa,IAAI,MAAM;AAC5C,eAAA;AAAA,MACR;AAEC,aAAAC,2BAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACA,WAAW,GAAG,UAAU,gBAAgB,CAAC,IAAI,eAAe,QAAQ,WAAW;AAAA,UAG/E,UAAA;AAAA,YAAAD,+BAAC,OAAI,EAAA,WAAW,UAAU,sBAAsB,GAAI,UAAW,YAAA;AAAA,2CAC9D,OAAI,EAAA,WAAW,UAAU,oBAAoB,GAAI,UAAG,IAAA;AAAA,UAAA;AAAA,QAAA;AAAA,QAHhD;AAAA,MAAA;AAAA,IAMP,CAAA,GACF;AAAA,EAEF,EAAA,CAAA;AAEF;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"StackTrace.js","sources":["../../../../src/ui/DevError/StackTrace.tsx"],"sourcesContent":["import { ParsedStackFrame, ParsedStackTrace } from './types'\n\n\nconst className = (cls?: string | null) => cls ? `cui-devError-${cls}` : 'cui-devError'\nexport const StackTrace = ({ stackTrace }: { stackTrace: ParsedStackTrace }) => {\n\treturn (\n\t\t<div className={className('stack')}>\n\t\t\t{stackTrace.map((it, index) => (\n\t\t\t\t<StackFrame stackFrame={it} key={index} />\n\t\t\t))}\n\t\t</div>\n\t)\n}\n\nconst StackFrame = ({ stackFrame }: { stackFrame: ParsedStackFrame }) => {\n\tconst line = stackFrame.line\n\n\treturn (\n\t\t<div className={className('stackFrame')}>\n\t\t\t<div className={className('stackFrameHeader')}>\n\t\t\t\t<div className={className('stackFrameSource')}>\n\t\t\t\t\t{stackFrame.filename}:{line}\n\t\t\t\t</div>\n\t\t\t\t{stackFrame.callee && <div className={className('stackFrameCallee')}>{stackFrame.callee}</div>}\n\t\t\t</div>\n\t\t\t{line !== undefined && stackFrame.sourceCodeLines && (\n\t\t\t\t<div className={className('stackFrameCode')}>\n\t\t\t\t\t{stackFrame.sourceCodeLines.map((it, index) => {\n\t\t\t\t\t\tconst lineNumber = index + 1\n\t\t\t\t\t\tif (lineNumber + 5 < line || lineNumber - 3 > line) {\n\t\t\t\t\t\t\treturn null\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={`${className('stackFrameLine')} ${lineNumber === line && 'is-active'}`}\n\t\t\t\t\t\t\t\tkey={lineNumber}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className={className('stackFrameLineNumber')}>{lineNumber}</div>\n\t\t\t\t\t\t\t\t<div className={className('stackFrameLineCode')}>{it}</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t)\n}\n"],"names":[],"mappings":";AAGA,MAAM,YAAY,CAAC,QAAwB,MAAM,gBAAgB,GAAG,KAAK;AAClE,MAAM,aAAa,CAAC,EAAE,iBAAmD;AAC/E,6BACE,OAAI,EAAA,WAAW,UAAU,OAAO,GAC/B,UAAW,WAAA,IAAI,CAAC,IAAI,UACnB,oBAAA,YAAA,EAAW,YAAY,MAAS,KAAO,CACxC,EACF,CAAA;AAEF;AAEA,MAAM,aAAa,CAAC,EAAE,iBAAmD;AACxE,QAAM,OAAO,WAAW;AAExB,SACE,qBAAA,OAAA,EAAI,WAAW,UAAU,YAAY,GACrC,UAAA;AAAA,IAAA,qBAAC,OAAI,EAAA,WAAW,UAAU,kBAAkB,GAC3C,UAAA;AAAA,MAAA,qBAAC,OAAI,EAAA,WAAW,UAAU,kBAAkB,GAC1C,UAAA;AAAA,QAAW,WAAA;AAAA,QAAS;AAAA,QAAE;AAAA,MAAA,GACxB;AAAA,MACC,WAAW,UAAW,oBAAA,OAAA,EAAI,WAAW,UAAU,kBAAkB,GAAI,UAAA,WAAW,OAAO,CAAA;AAAA,IAAA,GACzF;AAAA,IACC,SAAS,UAAa,WAAW,uCAChC,OAAI,EAAA,WAAW,UAAU,gBAAgB,GACxC,UA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