@neuralnomads/codenomad-dev 0.20.0-dev-20260908-e5115fe8 → 0.20.0-dev-20260909-855d2ee7

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 (78) hide show
  1. package/dist/server/__tests__/instance-proxy.test.js +14 -0
  2. package/dist/server/__tests__/instance-proxy.test.js.map +1 -1
  3. package/dist/server/http-server.js +1 -1
  4. package/dist/server/http-server.js.map +1 -1
  5. package/package.json +1 -1
  6. package/public/assets/App-Nlt9zV-v.js +43 -0
  7. package/public/assets/App-Nlt9zV-v.js.map +1 -0
  8. package/public/assets/{FilesTab-C8fnWsM4.js → FilesTab-z7UrjcAQ.js} +3 -3
  9. package/public/assets/{FilesTab-C8fnWsM4.js.map → FilesTab-z7UrjcAQ.js.map} +1 -1
  10. package/public/assets/{GitChangesTab-C3rapWwl.js → GitChangesTab-C04bYKhs.js} +3 -3
  11. package/public/assets/{GitChangesTab-C3rapWwl.js.map → GitChangesTab-C04bYKhs.js.map} +1 -1
  12. package/public/assets/{SplitFilePanel-D3S7Zfcc.js → SplitFilePanel-B29MqCuU.js} +2 -2
  13. package/public/assets/{SplitFilePanel-D3S7Zfcc.js.map → SplitFilePanel-B29MqCuU.js.map} +1 -1
  14. package/public/assets/{StatusTab-DHvQ-0to.js → StatusTab-wUKfwnFf.js} +2 -2
  15. package/public/assets/{StatusTab-DHvQ-0to.js.map → StatusTab-wUKfwnFf.js.map} +1 -1
  16. package/public/assets/{align-justify-BIN0BnZw.js → align-justify-glU678D9.js} +2 -2
  17. package/public/assets/{align-justify-BIN0BnZw.js.map → align-justify-glU678D9.js.map} +1 -1
  18. package/public/assets/{bundle-full-BfEvraVO.js → bundle-full-BrsCElYv.js} +2 -2
  19. package/public/assets/{bundle-full-BfEvraVO.js.map → bundle-full-BrsCElYv.js.map} +1 -1
  20. package/public/assets/{client-state-CBKOWfhu.js → client-state-j9Iu7F-E.js} +2 -2
  21. package/public/assets/{client-state-CBKOWfhu.js.map → client-state-j9Iu7F-E.js.map} +1 -1
  22. package/public/assets/{diff-viewer-6oxyPi3-.js → diff-viewer-B0VS1voD.js} +2 -2
  23. package/public/assets/{diff-viewer-6oxyPi3-.js.map → diff-viewer-B0VS1voD.js.map} +1 -1
  24. package/public/assets/{index-BhBg6Tnf.js → index-B6bX3AMT.js} +2 -2
  25. package/public/assets/{index-BhBg6Tnf.js.map → index-B6bX3AMT.js.map} +1 -1
  26. package/public/assets/{index-Dr5L4afe.js → index-BIRLnDWY.js} +2 -2
  27. package/public/assets/{index-Dr5L4afe.js.map → index-BIRLnDWY.js.map} +1 -1
  28. package/public/assets/{index-BeWVYvfJ.js → index-BuScpzpP.js} +2 -2
  29. package/public/assets/{index-BeWVYvfJ.js.map → index-BuScpzpP.js.map} +1 -1
  30. package/public/assets/{index-ef9_CbWU.js → index-BzAEHHap.js} +3 -3
  31. package/public/assets/{index-ef9_CbWU.js.map → index-BzAEHHap.js.map} +1 -1
  32. package/public/assets/index-C-DZt-oz.css +1 -0
  33. package/public/assets/{index-DHNlQHw2.js → index-C9RXVQl9.js} +2 -2
  34. package/public/assets/{index-DHNlQHw2.js.map → index-C9RXVQl9.js.map} +1 -1
  35. package/public/assets/index-ClaHfu-1.js +2 -0
  36. package/public/assets/{index-C9znv1NB.js.map → index-ClaHfu-1.js.map} +1 -1
  37. package/public/assets/{index-B_9dhJTl.js → index-DBx5htn3.js} +2 -2
  38. package/public/assets/{index-B_9dhJTl.js.map → index-DBx5htn3.js.map} +1 -1
  39. package/public/assets/{index-DdklToXY.js → index-DHHMf3u1.js} +2 -2
  40. package/public/assets/{index-DdklToXY.js.map → index-DHHMf3u1.js.map} +1 -1
  41. package/public/assets/{index-BJrZpSe6.js → index-DN4Kstsd.js} +2 -2
  42. package/public/assets/{index-BJrZpSe6.js.map → index-DN4Kstsd.js.map} +1 -1
  43. package/public/assets/{index-CmJg6xjr.js → index-DbMyNDyo.js} +2 -2
  44. package/public/assets/{index-CmJg6xjr.js.map → index-DbMyNDyo.js.map} +1 -1
  45. package/public/assets/{index-CD9b6FoA.js → index-rcsmuqww.js} +2 -2
  46. package/public/assets/{index-CD9b6FoA.js.map → index-rcsmuqww.js.map} +1 -1
  47. package/public/assets/{index-DsmOPul3.js → index-uz2QFRlk.js} +2 -2
  48. package/public/assets/{index-DsmOPul3.js.map → index-uz2QFRlk.js.map} +1 -1
  49. package/public/assets/{loading-CanSHf7z.js → loading-CYiiwb08.js} +2 -2
  50. package/public/assets/{loading-CanSHf7z.js.map → loading-CYiiwb08.js.map} +1 -1
  51. package/public/assets/main-OmXs7qtG.js +48 -0
  52. package/public/assets/main-OmXs7qtG.js.map +1 -0
  53. package/public/assets/{markdown-B04qkFuc.js → markdown-DWvSdCZz.js} +4 -4
  54. package/public/assets/{markdown-B04qkFuc.js.map → markdown-DWvSdCZz.js.map} +1 -1
  55. package/public/assets/{monaco-viewer-BB3_mBkA.js → monaco-viewer-Cc9bWg7I.js} +2 -2
  56. package/public/assets/{monaco-viewer-BB3_mBkA.js.map → monaco-viewer-Cc9bWg7I.js.map} +1 -1
  57. package/public/assets/{startup-state-settings-card-DE11-Je6.js → startup-state-settings-card-2KHpBL8U.js} +2 -2
  58. package/public/assets/{startup-state-settings-card-DE11-Je6.js.map → startup-state-settings-card-2KHpBL8U.js.map} +1 -1
  59. package/public/assets/{terminal-square-W8UL0Uzs.js → terminal-square-lzHuj_of.js} +2 -2
  60. package/public/assets/{terminal-square-W8UL0Uzs.js.map → terminal-square-lzHuj_of.js.map} +1 -1
  61. package/public/assets/tool-call-DjkszeT4.js +60 -0
  62. package/public/assets/tool-call-DjkszeT4.js.map +1 -0
  63. package/public/assets/{unified-picker-CkVc32ly.js → unified-picker-5JmIM6a0.js} +2 -2
  64. package/public/assets/{unified-picker-CkVc32ly.js.map → unified-picker-5JmIM6a0.js.map} +1 -1
  65. package/public/assets/{wrap-text-CR-cuiJP.js → wrap-text-N0Cav2Vp.js} +2 -2
  66. package/public/assets/{wrap-text-CR-cuiJP.js.map → wrap-text-N0Cav2Vp.js.map} +1 -1
  67. package/public/index.html +4 -4
  68. package/public/loading.html +4 -4
  69. package/public/sw.js +1 -1
  70. package/public/sw.js.map +1 -1
  71. package/public/assets/App-DPj4p3An.js +0 -43
  72. package/public/assets/App-DPj4p3An.js.map +0 -1
  73. package/public/assets/index-C9znv1NB.js +0 -2
  74. package/public/assets/index-CT42quXi.css +0 -1
  75. package/public/assets/main-COtTRZe6.js +0 -48
  76. package/public/assets/main-COtTRZe6.js.map +0 -1
  77. package/public/assets/tool-call-irc_6gLg.js +0 -60
  78. package/public/assets/tool-call-irc_6gLg.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"diff-viewer-6oxyPi3-.js","sources":["../../../components/diff-viewer.tsx"],"sourcesContent":["import { createMemo, Show, createEffect } from \"solid-js\"\nimport { DiffView, DiffModeEnum } from \"@git-diff-view/solid\"\nimport \"@git-diff-view/solid/styles/diff-view-pure.css\"\nimport { disableCache } from \"@git-diff-view/core\"\nimport type { DiffHighlighterLang } from \"@git-diff-view/core\"\nimport { ErrorBoundary } from \"solid-js\"\nimport { getLanguageFromPath } from \"../lib/text-render-utils\"\nimport { normalizeDiffText } from \"../lib/diff-utils\"\nimport { setCacheEntry } from \"../lib/global-cache\"\nimport type { CacheEntryParams } from \"../lib/global-cache\"\nimport type { DiffViewMode } from \"../stores/preferences\"\nimport { getLogger } from \"../lib/logger\"\nconst log = getLogger(\"session\")\n\n\ndisableCache()\n\ninterface ToolCallDiffViewerProps {\n diffText: string\n filePath?: string\n theme: \"light\" | \"dark\"\n mode: DiffViewMode\n wrap?: boolean\n onRendered?: () => void\n cachedHtml?: string\n cacheEntryParams?: CacheEntryParams\n}\n\ntype DiffData = {\n oldFile?: { fileName?: string | null; fileLang?: string | null; content?: string | null }\n newFile?: { fileName?: string | null; fileLang?: string | null; content?: string | null }\n hunks: string[]\n}\n\nfunction measureTextWidth(container: HTMLElement, text: string, source: HTMLElement) {\n const computed = window.getComputedStyle(source)\n const probe = document.createElement(\"span\")\n probe.textContent = text || \"\"\n probe.style.position = \"absolute\"\n probe.style.visibility = \"hidden\"\n probe.style.pointerEvents = \"none\"\n probe.style.display = \"inline-block\"\n probe.style.width = \"auto\"\n probe.style.maxWidth = \"none\"\n probe.style.whiteSpace = \"nowrap\"\n probe.style.fontFamily = computed.fontFamily\n probe.style.fontSize = computed.fontSize\n probe.style.fontWeight = computed.fontWeight\n probe.style.fontStyle = computed.fontStyle\n probe.style.letterSpacing = computed.letterSpacing\n probe.style.fontVariant = computed.fontVariant\n probe.style.textTransform = computed.textTransform\n probe.style.lineHeight = computed.lineHeight\n container.appendChild(probe)\n const width = Math.ceil(probe.getBoundingClientRect().width)\n probe.remove()\n return width\n}\n\nfunction computeCompactWidth(\n container: HTMLElement,\n entries: Array<{ text: string; source: HTMLElement }>,\n maxWidthPx = 40,\n) {\n const measuredLabelWidthPx = entries.reduce((max, entry) => {\n return Math.max(max, measureTextWidth(container, entry.text, entry.source))\n }, 0)\n const fallbackTextLength = entries.reduce((max, entry) => Math.max(max, entry.text.length), 1)\n const fallbackWidthPx = Math.round(fallbackTextLength * 7 + 4)\n return Math.max(2, Math.min(maxWidthPx, measuredLabelWidthPx > 0 ? measuredLabelWidthPx + 2 : fallbackWidthPx))\n}\n\nfunction applyCompactUnifiedGutter(container: HTMLElement, wrap: boolean) {\n const tableWrapper = container.querySelector<HTMLElement>(\".unified-diff-table-wrapper\")\n const table = container.querySelector<HTMLTableElement>(\".unified-diff-table\")\n const numberCol = container.querySelector<HTMLTableColElement>(\".unified-diff-table-num-col\")\n const gutterRows = container.querySelectorAll<HTMLElement>(\".diff-line-num\")\n const hunkGutters = container.querySelectorAll<HTMLElement>(\".diff-line-hunk-action, .diff-line-widget-wrapper, .diff-line-extend-wrapper\")\n const entries: Array<{ gutter: HTMLElement; label: HTMLElement; text: string }> = []\n\n if (table) {\n if (wrap) {\n table.classList.add(\"table-fixed\")\n table.style.tableLayout = \"fixed\"\n table.style.width = \"100%\"\n table.style.minWidth = \"100%\"\n } else {\n table.classList.remove(\"table-fixed\")\n table.style.tableLayout = \"auto\"\n table.style.width = \"max-content\"\n table.style.minWidth = \"100%\"\n }\n }\n\n gutterRows.forEach((gutter) => {\n const oldSpan = gutter.querySelector<HTMLElement>(\"[data-line-old-num]\")\n const newSpan = gutter.querySelector<HTMLElement>(\"[data-line-new-num]\")\n const spacer = gutter.querySelector<HTMLElement>(\".shrink-0\")\n const flexWrapper = gutter.querySelector<HTMLElement>(\":scope > .flex\")\n const currentLabel = gutter.querySelector<HTMLElement>(\":scope > .tool-call-diff-compact-line-number\")\n\n const oldText = oldSpan?.textContent?.trim() ?? \"\"\n const newText = newSpan?.textContent?.trim() ?? \"\"\n const hasUsableNew = newText.length > 0 && newText !== \"0\"\n const hasUsableOld = oldText.length > 0 && oldText !== \"0\"\n const visibleText = hasUsableNew ? newText : hasUsableOld ? oldText : newText || oldText\n\n if (flexWrapper) flexWrapper.style.display = \"none\"\n if (spacer) spacer.style.display = \"none\"\n if (oldSpan) { oldSpan.style.display = \"none\"; oldSpan.style.width = \"auto\" }\n if (newSpan) { newSpan.style.display = \"none\"; newSpan.style.width = \"auto\" }\n\n gutter.style.paddingLeft = \"1px\"\n gutter.style.paddingRight = \"1px\"\n gutter.style.textAlign = \"left\"\n\n const label = currentLabel ?? document.createElement(\"span\")\n label.className = \"tool-call-diff-compact-line-number\"\n label.textContent = visibleText\n label.setAttribute(\"aria-hidden\", visibleText ? \"false\" : \"true\")\n if (!currentLabel) gutter.appendChild(label)\n\n entries.push({ gutter, label, text: visibleText })\n })\n\n const gutterWidthPx = computeCompactWidth(container, entries.map((entry) => ({ text: entry.text, source: entry.label })))\n const gutterWidth = `${gutterWidthPx}px`\n const compactAsideWidth = `${Math.max(8, gutterWidthPx - 10)}px`\n\n if (tableWrapper) {\n tableWrapper.style.setProperty(\"--diff-aside-width\", compactAsideWidth)\n tableWrapper.style.setProperty(\"--diff-aside-width--\", compactAsideWidth)\n }\n if (numberCol) {\n numberCol.style.width = gutterWidth\n }\n\n entries.forEach(({ gutter, label }) => {\n gutter.style.width = gutterWidth\n gutter.style.minWidth = gutterWidth\n gutter.style.maxWidth = gutterWidth\n label.style.width = \"auto\"\n label.style.maxWidth = \"none\"\n })\n\n hunkGutters.forEach((gutter) => {\n gutter.style.width = gutterWidth\n gutter.style.minWidth = gutterWidth\n gutter.style.maxWidth = gutterWidth\n gutter.style.paddingLeft = \"0\"\n gutter.style.paddingRight = \"0\"\n })\n}\n\nfunction applyCompactSplitGutter(container: HTMLElement) {\n const oldWrapper = container.querySelector<HTMLElement>(\".old-diff-table-wrapper\")\n const newWrapper = container.querySelector<HTMLElement>(\".new-diff-table-wrapper\")\n const numberCells = Array.from(container.querySelectorAll<HTMLElement>(\".diff-line-old-num, .diff-line-new-num\"))\n const hunkActions = Array.from(container.querySelectorAll<HTMLElement>(\".diff-line-hunk-action, .diff-line-widget-wrapper, .diff-line-extend-wrapper\"))\n const numberSpans = numberCells\n .map((cell) => ({ cell, span: cell.querySelector<HTMLElement>(\"[data-line-num]\") }))\n .filter((entry): entry is { cell: HTMLElement; span: HTMLElement } => Boolean(entry.span))\n\n const gutterWidthPx = computeCompactWidth(\n container,\n numberSpans.map(({ span }) => ({ text: span.textContent?.trim() ?? \"\", source: span })),\n 64,\n )\n const gutterWidth = `${gutterWidthPx}px`\n\n ;[oldWrapper, newWrapper].forEach((wrapper) => {\n if (wrapper) {\n wrapper.style.setProperty(\"--diff-aside-width\", gutterWidth)\n }\n })\n\n numberCells.forEach((cell) => {\n cell.style.width = gutterWidth\n cell.style.minWidth = gutterWidth\n cell.style.maxWidth = gutterWidth\n cell.style.paddingLeft = \"2px\"\n cell.style.paddingRight = \"2px\"\n cell.style.textAlign = \"left\"\n cell.style.whiteSpace = \"nowrap\"\n cell.style.overflowWrap = \"normal\"\n cell.style.wordBreak = \"normal\"\n })\n\n numberSpans.forEach(({ span }) => {\n span.style.whiteSpace = \"nowrap\"\n span.style.overflowWrap = \"normal\"\n span.style.wordBreak = \"normal\"\n })\n\n hunkActions.forEach((cell) => {\n cell.style.width = gutterWidth\n cell.style.minWidth = gutterWidth\n cell.style.maxWidth = gutterWidth\n cell.style.paddingLeft = \"0\"\n cell.style.paddingRight = \"0\"\n })\n}\n\nfunction applyCompactDiffLayout(container: HTMLElement, mode: DiffViewMode, wrap = false) {\n if (mode === \"unified\") {\n applyCompactUnifiedGutter(container, wrap)\n return\n }\n if (mode === \"split\") {\n applyCompactSplitGutter(container)\n }\n}\n\nexport function ToolCallDiffViewer(props: ToolCallDiffViewerProps) {\n const diffData = createMemo<DiffData | null>(() => {\n const normalized = normalizeDiffText(props.diffText)\n if (!normalized) {\n return null\n }\n \n const language = getLanguageFromPath(props.filePath) || \"text\"\n const fileName = props.filePath || \"diff\"\n \n return {\n oldFile: {\n fileName,\n fileLang: (language || \"text\") as DiffHighlighterLang | null,\n },\n newFile: {\n fileName,\n fileLang: (language || \"text\") as DiffHighlighterLang | null,\n },\n hunks: [normalized],\n }\n })\n \n let diffContainerRef: HTMLDivElement | undefined\n let lastCapturedKey: string | undefined\n \n const contextKey = createMemo(() => {\n const data = diffData()\n if (!data) return \"\"\n return `${props.theme}|${props.mode}|${props.wrap ? \"wrap\" : \"nowrap\"}|${props.diffText}`\n })\n \n createEffect(() => {\n const cachedHtml = props.cachedHtml\n if (cachedHtml) {\n if (diffContainerRef) {\n applyCompactDiffLayout(diffContainerRef, props.mode, Boolean(props.wrap))\n }\n // When we are given cached HTML, we rely on the caller's cache\n // and simply notify once rendered.\n props.onRendered?.()\n return\n }\n \n const key = contextKey()\n if (!key) return\n if (!diffContainerRef) return\n if (lastCapturedKey === key) return\n\n requestAnimationFrame(() => {\n if (!diffContainerRef) return\n applyCompactDiffLayout(diffContainerRef, props.mode, Boolean(props.wrap))\n const markup = diffContainerRef.innerHTML\n if (!markup) return\n lastCapturedKey = key\n if (props.cacheEntryParams) {\n setCacheEntry(props.cacheEntryParams, {\n text: props.diffText,\n html: markup,\n theme: props.theme,\n mode: props.mode,\n wrap: props.wrap,\n })\n }\n props.onRendered?.()\n })\n })\n\n\n return (\n <div class=\"tool-call-diff-viewer\">\n <Show\n when={props.cachedHtml}\n fallback={\n <div ref={diffContainerRef}>\n <Show\n when={diffData()}\n fallback={<pre class=\"tool-call-diff-fallback\">{props.diffText}</pre>}\n >\n {(data) => (\n <ErrorBoundary fallback={(error) => {\n log.warn(\"Failed to render diff view\", error)\n return <pre class=\"tool-call-diff-fallback\">{props.diffText}</pre>\n }}>\n <DiffView\n data={data()}\n diffViewMode={props.mode === \"split\" ? DiffModeEnum.Split : DiffModeEnum.Unified}\n diffViewTheme={props.theme}\n diffViewHighlight\n diffViewWrap={Boolean(props.wrap)}\n diffViewFontSize={13}\n />\n </ErrorBoundary>\n )}\n </Show>\n </div>\n }\n >\n <div ref={diffContainerRef} innerHTML={props.cachedHtml} />\n </Show>\n </div>\n )\n}\n"],"names":["log","getLogger","disableCache","measureTextWidth","container","text","source","computed","window","getComputedStyle","probe","document","createElement","textContent","style","position","visibility","pointerEvents","display","width","maxWidth","whiteSpace","fontFamily","fontSize","fontWeight","fontStyle","letterSpacing","fontVariant","textTransform","lineHeight","appendChild","Math","ceil","getBoundingClientRect","remove","computeCompactWidth","entries","maxWidthPx","measuredLabelWidthPx","reduce","max","entry","fallbackTextLength","length","fallbackWidthPx","round","min","applyCompactUnifiedGutter","wrap","tableWrapper","querySelector","table","numberCol","gutterRows","querySelectorAll","hunkGutters","classList","add","tableLayout","minWidth","forEach","gutter","oldSpan","newSpan","spacer","flexWrapper","currentLabel","oldText","trim","newText","hasUsableNew","hasUsableOld","visibleText","paddingLeft","paddingRight","textAlign","label","className","setAttribute","push","gutterWidthPx","map","gutterWidth","compactAsideWidth","setProperty","applyCompactSplitGutter","oldWrapper","newWrapper","numberCells","Array","from","hunkActions","numberSpans","cell","span","filter","Boolean","wrapper","overflowWrap","wordBreak","applyCompactDiffLayout","mode","ToolCallDiffViewer","props","diffData","createMemo","normalized","normalizeDiffText","diffText","language","getLanguageFromPath","filePath","fileName","oldFile","fileLang","newFile","hunks","diffContainerRef","lastCapturedKey","contextKey","theme","createEffect","cachedHtml","onRendered","key","requestAnimationFrame","markup","innerHTML","cacheEntryParams","setCacheEntry","html","_el$","_tmpl$2","_$insert","_$createComponent","Show","when","fallback","_el$3","_tmpl$","_ref$2","_$use","_el$4","_tmpl$3","children","data","ErrorBoundary","error","warn","_el$5","DiffView","diffViewMode","_$memo","DiffModeEnum","Split","Unified","diffViewTheme","diffViewHighlight","diffViewWrap","diffViewFontSize","_el$2","_ref$","_$effect"],"mappings":"6bAYA,MAAMA,EAAMC,EAAU,SAAS,EAG/BC,EAAAA,EAmBA,SAASC,EAAiBC,EAAwBC,EAAcC,EAAqB,CACnF,MAAMC,EAAWC,OAAOC,iBAAiBH,CAAM,EACzCI,EAAQC,SAASC,cAAc,MAAM,EAC3CF,EAAMG,YAAcR,GAAQ,GAC5BK,EAAMI,MAAMC,SAAW,WACvBL,EAAMI,MAAME,WAAa,SACzBN,EAAMI,MAAMG,cAAgB,OAC5BP,EAAMI,MAAMI,QAAU,eACtBR,EAAMI,MAAMK,MAAQ,OACpBT,EAAMI,MAAMM,SAAW,OACvBV,EAAMI,MAAMO,WAAa,SACzBX,EAAMI,MAAMQ,WAAaf,EAASe,WAClCZ,EAAMI,MAAMS,SAAWhB,EAASgB,SAChCb,EAAMI,MAAMU,WAAajB,EAASiB,WAClCd,EAAMI,MAAMW,UAAYlB,EAASkB,UACjCf,EAAMI,MAAMY,cAAgBnB,EAASmB,cACrChB,EAAMI,MAAMa,YAAcpB,EAASoB,YACnCjB,EAAMI,MAAMc,cAAgBrB,EAASqB,cACrClB,EAAMI,MAAMe,WAAatB,EAASsB,WAClCzB,EAAU0B,YAAYpB,CAAK,EAC3B,MAAMS,EAAQY,KAAKC,KAAKtB,EAAMuB,sBAAAA,EAAwBd,KAAK,EAC3DT,OAAAA,EAAMwB,OAAAA,EACCf,CACT,CAEA,SAASgB,EACP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AAIX,EACHY,EAAa,CAACT,SAAWU,IACxBnJ,EAAIoJ,KAAK,6BAA8BD,CAAK,GAC5C,IAAA,CAAA,IAAAE,EAAAN,EAAAA,EAAAV,OAAAA,EAAAgB,EAAA,IAA6C9C,EAAMK,QAAQ,EAAAyC,CAAA,GAAA,GAC5D,IAAAL,UAAA,CAAA,OAAAV,EACEgB,EAAQ,CAAA,IACPL,MAAI,CAAA,OAAEA,EAAAA,CAAM,EAAA,IACZM,cAAY,CAAA,OAAEC,EAAA,IAAAjD,EAAMF,OAAS,OAAO,EAAA,EAAGoD,EAAaC,MAAQD,EAAaE,OAAO,EAAA,IAChFC,eAAa,CAAA,OAAErD,EAAMiB,KAAK,EAC1BqC,kBAAiB,GAAA,IACjBC,cAAY,CAAA,MAAE9D,EAAQO,EAAMvD,IAAK,EACjC+G,iBAAkB,EAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAGzB,CAAA,EAAArB,CAAA,GAAA,CAAA,EAAA,IAAAM,UAAA,CAAA,IAAAgB,EAAArB,EAAAA,EAAAsB,EAKG5C,EAAgB,cAAA4C,GAAA,WAAApB,EAAAoB,EAAAD,CAAA,EAAhB3C,EAAgB2C,EAAAE,MAAAF,EAAAjC,UAAaxB,EAAMmB,UAAU,EAAAsC,CAAA,CAAA,CAAA,CAAA,EAAA7B,CAAA,GAAA,CAI/D"}
1
+ {"version":3,"file":"diff-viewer-B0VS1voD.js","sources":["../../../components/diff-viewer.tsx"],"sourcesContent":["import { createMemo, Show, createEffect } from \"solid-js\"\nimport { DiffView, DiffModeEnum } from \"@git-diff-view/solid\"\nimport \"@git-diff-view/solid/styles/diff-view-pure.css\"\nimport { disableCache } from \"@git-diff-view/core\"\nimport type { DiffHighlighterLang } from \"@git-diff-view/core\"\nimport { ErrorBoundary } from \"solid-js\"\nimport { getLanguageFromPath } from \"../lib/text-render-utils\"\nimport { normalizeDiffText } from \"../lib/diff-utils\"\nimport { setCacheEntry } from \"../lib/global-cache\"\nimport type { CacheEntryParams } from \"../lib/global-cache\"\nimport type { DiffViewMode } from \"../stores/preferences\"\nimport { getLogger } from \"../lib/logger\"\nconst log = getLogger(\"session\")\n\n\ndisableCache()\n\ninterface ToolCallDiffViewerProps {\n diffText: string\n filePath?: string\n theme: \"light\" | \"dark\"\n mode: DiffViewMode\n wrap?: boolean\n onRendered?: () => void\n cachedHtml?: string\n cacheEntryParams?: CacheEntryParams\n}\n\ntype DiffData = {\n oldFile?: { fileName?: string | null; fileLang?: string | null; content?: string | null }\n newFile?: { fileName?: string | null; fileLang?: string | null; content?: string | null }\n hunks: string[]\n}\n\nfunction measureTextWidth(container: HTMLElement, text: string, source: HTMLElement) {\n const computed = window.getComputedStyle(source)\n const probe = document.createElement(\"span\")\n probe.textContent = text || \"\"\n probe.style.position = \"absolute\"\n probe.style.visibility = \"hidden\"\n probe.style.pointerEvents = \"none\"\n probe.style.display = \"inline-block\"\n probe.style.width = \"auto\"\n probe.style.maxWidth = \"none\"\n probe.style.whiteSpace = \"nowrap\"\n probe.style.fontFamily = computed.fontFamily\n probe.style.fontSize = computed.fontSize\n probe.style.fontWeight = computed.fontWeight\n probe.style.fontStyle = computed.fontStyle\n probe.style.letterSpacing = computed.letterSpacing\n probe.style.fontVariant = computed.fontVariant\n probe.style.textTransform = computed.textTransform\n probe.style.lineHeight = computed.lineHeight\n container.appendChild(probe)\n const width = Math.ceil(probe.getBoundingClientRect().width)\n probe.remove()\n return width\n}\n\nfunction computeCompactWidth(\n container: HTMLElement,\n entries: Array<{ text: string; source: HTMLElement }>,\n maxWidthPx = 40,\n) {\n const measuredLabelWidthPx = entries.reduce((max, entry) => {\n return Math.max(max, measureTextWidth(container, entry.text, entry.source))\n }, 0)\n const fallbackTextLength = entries.reduce((max, entry) => Math.max(max, entry.text.length), 1)\n const fallbackWidthPx = Math.round(fallbackTextLength * 7 + 4)\n return Math.max(2, Math.min(maxWidthPx, measuredLabelWidthPx > 0 ? measuredLabelWidthPx + 2 : fallbackWidthPx))\n}\n\nfunction applyCompactUnifiedGutter(container: HTMLElement, wrap: boolean) {\n const tableWrapper = container.querySelector<HTMLElement>(\".unified-diff-table-wrapper\")\n const table = container.querySelector<HTMLTableElement>(\".unified-diff-table\")\n const numberCol = container.querySelector<HTMLTableColElement>(\".unified-diff-table-num-col\")\n const gutterRows = container.querySelectorAll<HTMLElement>(\".diff-line-num\")\n const hunkGutters = container.querySelectorAll<HTMLElement>(\".diff-line-hunk-action, .diff-line-widget-wrapper, .diff-line-extend-wrapper\")\n const entries: Array<{ gutter: HTMLElement; label: HTMLElement; text: string }> = []\n\n if (table) {\n if (wrap) {\n table.classList.add(\"table-fixed\")\n table.style.tableLayout = \"fixed\"\n table.style.width = \"100%\"\n table.style.minWidth = \"100%\"\n } else {\n table.classList.remove(\"table-fixed\")\n table.style.tableLayout = \"auto\"\n table.style.width = \"max-content\"\n table.style.minWidth = \"100%\"\n }\n }\n\n gutterRows.forEach((gutter) => {\n const oldSpan = gutter.querySelector<HTMLElement>(\"[data-line-old-num]\")\n const newSpan = gutter.querySelector<HTMLElement>(\"[data-line-new-num]\")\n const spacer = gutter.querySelector<HTMLElement>(\".shrink-0\")\n const flexWrapper = gutter.querySelector<HTMLElement>(\":scope > .flex\")\n const currentLabel = gutter.querySelector<HTMLElement>(\":scope > .tool-call-diff-compact-line-number\")\n\n const oldText = oldSpan?.textContent?.trim() ?? \"\"\n const newText = newSpan?.textContent?.trim() ?? \"\"\n const hasUsableNew = newText.length > 0 && newText !== \"0\"\n const hasUsableOld = oldText.length > 0 && oldText !== \"0\"\n const visibleText = hasUsableNew ? newText : hasUsableOld ? oldText : newText || oldText\n\n if (flexWrapper) flexWrapper.style.display = \"none\"\n if (spacer) spacer.style.display = \"none\"\n if (oldSpan) { oldSpan.style.display = \"none\"; oldSpan.style.width = \"auto\" }\n if (newSpan) { newSpan.style.display = \"none\"; newSpan.style.width = \"auto\" }\n\n gutter.style.paddingLeft = \"1px\"\n gutter.style.paddingRight = \"1px\"\n gutter.style.textAlign = \"left\"\n\n const label = currentLabel ?? document.createElement(\"span\")\n label.className = \"tool-call-diff-compact-line-number\"\n label.textContent = visibleText\n label.setAttribute(\"aria-hidden\", visibleText ? \"false\" : \"true\")\n if (!currentLabel) gutter.appendChild(label)\n\n entries.push({ gutter, label, text: visibleText })\n })\n\n const gutterWidthPx = computeCompactWidth(container, entries.map((entry) => ({ text: entry.text, source: entry.label })))\n const gutterWidth = `${gutterWidthPx}px`\n const compactAsideWidth = `${Math.max(8, gutterWidthPx - 10)}px`\n\n if (tableWrapper) {\n tableWrapper.style.setProperty(\"--diff-aside-width\", compactAsideWidth)\n tableWrapper.style.setProperty(\"--diff-aside-width--\", compactAsideWidth)\n }\n if (numberCol) {\n numberCol.style.width = gutterWidth\n }\n\n entries.forEach(({ gutter, label }) => {\n gutter.style.width = gutterWidth\n gutter.style.minWidth = gutterWidth\n gutter.style.maxWidth = gutterWidth\n label.style.width = \"auto\"\n label.style.maxWidth = \"none\"\n })\n\n hunkGutters.forEach((gutter) => {\n gutter.style.width = gutterWidth\n gutter.style.minWidth = gutterWidth\n gutter.style.maxWidth = gutterWidth\n gutter.style.paddingLeft = \"0\"\n gutter.style.paddingRight = \"0\"\n })\n}\n\nfunction applyCompactSplitGutter(container: HTMLElement) {\n const oldWrapper = container.querySelector<HTMLElement>(\".old-diff-table-wrapper\")\n const newWrapper = container.querySelector<HTMLElement>(\".new-diff-table-wrapper\")\n const numberCells = Array.from(container.querySelectorAll<HTMLElement>(\".diff-line-old-num, .diff-line-new-num\"))\n const hunkActions = Array.from(container.querySelectorAll<HTMLElement>(\".diff-line-hunk-action, .diff-line-widget-wrapper, .diff-line-extend-wrapper\"))\n const numberSpans = numberCells\n .map((cell) => ({ cell, span: cell.querySelector<HTMLElement>(\"[data-line-num]\") }))\n .filter((entry): entry is { cell: HTMLElement; span: HTMLElement } => Boolean(entry.span))\n\n const gutterWidthPx = computeCompactWidth(\n container,\n numberSpans.map(({ span }) => ({ text: span.textContent?.trim() ?? \"\", source: span })),\n 64,\n )\n const gutterWidth = `${gutterWidthPx}px`\n\n ;[oldWrapper, newWrapper].forEach((wrapper) => {\n if (wrapper) {\n wrapper.style.setProperty(\"--diff-aside-width\", gutterWidth)\n }\n })\n\n numberCells.forEach((cell) => {\n cell.style.width = gutterWidth\n cell.style.minWidth = gutterWidth\n cell.style.maxWidth = gutterWidth\n cell.style.paddingLeft = \"2px\"\n cell.style.paddingRight = \"2px\"\n cell.style.textAlign = \"left\"\n cell.style.whiteSpace = \"nowrap\"\n cell.style.overflowWrap = \"normal\"\n cell.style.wordBreak = \"normal\"\n })\n\n numberSpans.forEach(({ span }) => {\n span.style.whiteSpace = \"nowrap\"\n span.style.overflowWrap = \"normal\"\n span.style.wordBreak = \"normal\"\n })\n\n hunkActions.forEach((cell) => {\n cell.style.width = gutterWidth\n cell.style.minWidth = gutterWidth\n cell.style.maxWidth = gutterWidth\n cell.style.paddingLeft = \"0\"\n cell.style.paddingRight = \"0\"\n })\n}\n\nfunction applyCompactDiffLayout(container: HTMLElement, mode: DiffViewMode, wrap = false) {\n if (mode === \"unified\") {\n applyCompactUnifiedGutter(container, wrap)\n return\n }\n if (mode === \"split\") {\n applyCompactSplitGutter(container)\n }\n}\n\nexport function ToolCallDiffViewer(props: ToolCallDiffViewerProps) {\n const diffData = createMemo<DiffData | null>(() => {\n const normalized = normalizeDiffText(props.diffText)\n if (!normalized) {\n return null\n }\n \n const language = getLanguageFromPath(props.filePath) || \"text\"\n const fileName = props.filePath || \"diff\"\n \n return {\n oldFile: {\n fileName,\n fileLang: (language || \"text\") as DiffHighlighterLang | null,\n },\n newFile: {\n fileName,\n fileLang: (language || \"text\") as DiffHighlighterLang | null,\n },\n hunks: [normalized],\n }\n })\n \n let diffContainerRef: HTMLDivElement | undefined\n let lastCapturedKey: string | undefined\n \n const contextKey = createMemo(() => {\n const data = diffData()\n if (!data) return \"\"\n return `${props.theme}|${props.mode}|${props.wrap ? \"wrap\" : \"nowrap\"}|${props.diffText}`\n })\n \n createEffect(() => {\n const cachedHtml = props.cachedHtml\n if (cachedHtml) {\n if (diffContainerRef) {\n applyCompactDiffLayout(diffContainerRef, props.mode, Boolean(props.wrap))\n }\n // When we are given cached HTML, we rely on the caller's cache\n // and simply notify once rendered.\n props.onRendered?.()\n return\n }\n \n const key = contextKey()\n if (!key) return\n if (!diffContainerRef) return\n if (lastCapturedKey === key) return\n\n requestAnimationFrame(() => {\n if (!diffContainerRef) return\n applyCompactDiffLayout(diffContainerRef, props.mode, Boolean(props.wrap))\n const markup = diffContainerRef.innerHTML\n if (!markup) return\n lastCapturedKey = key\n if (props.cacheEntryParams) {\n setCacheEntry(props.cacheEntryParams, {\n text: props.diffText,\n html: markup,\n theme: props.theme,\n mode: props.mode,\n wrap: props.wrap,\n })\n }\n props.onRendered?.()\n })\n })\n\n\n return (\n <div class=\"tool-call-diff-viewer\">\n <Show\n when={props.cachedHtml}\n fallback={\n <div ref={diffContainerRef}>\n <Show\n when={diffData()}\n fallback={<pre class=\"tool-call-diff-fallback\">{props.diffText}</pre>}\n >\n {(data) => (\n <ErrorBoundary fallback={(error) => {\n log.warn(\"Failed to render diff view\", error)\n return <pre class=\"tool-call-diff-fallback\">{props.diffText}</pre>\n }}>\n <DiffView\n data={data()}\n diffViewMode={props.mode === \"split\" ? DiffModeEnum.Split : DiffModeEnum.Unified}\n diffViewTheme={props.theme}\n diffViewHighlight\n diffViewWrap={Boolean(props.wrap)}\n diffViewFontSize={13}\n />\n </ErrorBoundary>\n )}\n </Show>\n </div>\n }\n >\n <div ref={diffContainerRef} innerHTML={props.cachedHtml} />\n </Show>\n </div>\n )\n}\n"],"names":["log","getLogger","disableCache","measureTextWidth","container","text","source","computed","window","getComputedStyle","probe","document","createElement","textContent","style","position","visibility","pointerEvents","display","width","maxWidth","whiteSpace","fontFamily","fontSize","fontWeight","fontStyle","letterSpacing","fontVariant","textTransform","lineHeight","appendChild","Math","ceil","getBoundingClientRect","remove","computeCompactWidth","entries","maxWidthPx","measuredLabelWidthPx","reduce","max","entry","fallbackTextLength","length","fallbackWidthPx","round","min","applyCompactUnifiedGutter","wrap","tableWrapper","querySelector","table","numberCol","gutterRows","querySelectorAll","hunkGutters","classList","add","tableLayout","minWidth","forEach","gutter","oldSpan","newSpan","spacer","flexWrapper","currentLabel","oldText","trim","newText","hasUsableNew","hasUsableOld","visibleText","paddingLeft","paddingRight","textAlign","label","className","setAttribute","push","gutterWidthPx","map","gutterWidth","compactAsideWidth","setProperty","applyCompactSplitGutter","oldWrapper","newWrapper","numberCells","Array","from","hunkActions","numberSpans","cell","span","filter","Boolean","wrapper","overflowWrap","wordBreak","applyCompactDiffLayout","mode","ToolCallDiffViewer","props","diffData","createMemo","normalized","normalizeDiffText","diffText","language","getLanguageFromPath","filePath","fileName","oldFile","fileLang","newFile","hunks","diffContainerRef","lastCapturedKey","contextKey","theme","createEffect","cachedHtml","onRendered","key","requestAnimationFrame","markup","innerHTML","cacheEntryParams","setCacheEntry","html","_el$","_tmpl$2","_$insert","_$createComponent","Show","when","fallback","_el$3","_tmpl$","_ref$2","_$use","_el$4","_tmpl$3","children","data","ErrorBoundary","error","warn","_el$5","DiffView","diffViewMode","_$memo","DiffModeEnum","Split","Unified","diffViewTheme","diffViewHighlight","diffViewWrap","diffViewFontSize","_el$2","_ref$","_$effect"],"mappings":"6bAYA,MAAMA,EAAMC,EAAU,SAAS,EAG/BC,EAAAA,EAmBA,SAASC,EAAiBC,EAAwBC,EAAcC,EAAqB,CACnF,MAAMC,EAAWC,OAAOC,iBAAiBH,CAAM,EACzCI,EAAQC,SAASC,cAAc,MAAM,EAC3CF,EAAMG,YAAcR,GAAQ,GAC5BK,EAAMI,MAAMC,SAAW,WACvBL,EAAMI,MAAME,WAAa,SACzBN,EAAMI,MAAMG,cAAgB,OAC5BP,EAAMI,MAAMI,QAAU,eACtBR,EAAMI,MAAMK,MAAQ,OACpBT,EAAMI,MAAMM,SAAW,OACvBV,EAAMI,MAAMO,WAAa,SACzBX,EAAMI,MAAMQ,WAAaf,EAAS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AA,EAAA7B,CAAA,GAAA,CAI/D"}
@@ -1,2 +1,2 @@
1
- import{i,q as f}from"./index-ef9_CbWU.js";import"./git-diff-vendor-ChbWBukG.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./monaco-viewer-BB3_mBkA.js";var o;(function(n){n.Year="year",n.Month="month",n.TwoWeeks="twoWeeks",n.Week="week",n.Day="day",n.Hour="hour",n.Minute="minute",n.Second="second"})(o||(o={}));class g{static at(t,e=!1,a=!1){return{at:{date:t,repeating:e,allowWhileIdle:a},interval:void 0,every:void 0}}static interval(t,e=!1){return{at:void 0,interval:{interval:t,allowWhileIdle:e},every:void 0}}static every(t,e,a=!1){return{at:void 0,interval:void 0,every:{interval:t,count:e,allowWhileIdle:a}}}}var c;(function(n){n[n.None=0]="None",n[n.Min=1]="Min",n[n.Low=2]="Low",n[n.Default=3]="Default",n[n.High=4]="High"})(c||(c={}));var r;(function(n){n[n.Secret=-1]="Secret",n[n.Private=0]="Private",n[n.Public=1]="Public"})(r||(r={}));async function v(){return window.Notification.permission!=="default"?await Promise.resolve(window.Notification.permission==="granted"):await i("plugin:notification|is_permission_granted")}async function p(){return await window.Notification.requestPermission()}function y(n){typeof n=="string"?new window.Notification(n):new window.Notification(n.title,n)}async function m(n){await i("plugin:notification|register_action_types",{types:n})}async function P(){return await i("plugin:notification|get_pending")}async function _(n){await i("plugin:notification|cancel",{notifications:n})}async function N(){await i("plugin:notification|cancel")}async function h(){return await i("plugin:notification|get_active")}async function A(n){await i("plugin:notification|remove_active",{notifications:n})}async function k(){await i("plugin:notification|remove_active")}async function M(n){await i("plugin:notification|create_channel",{...n})}async function q(n){await i("plugin:notification|delete_channel",{id:n})}async function C(){return await i("plugin:notification|listChannels")}async function D(n){return await f("notification","notification",n)}async function H(n){return await f("notification","actionPerformed",n)}export{c as Importance,g as Schedule,o as ScheduleEvery,r as Visibility,h as active,_ as cancel,N as cancelAll,C as channels,M as createChannel,v as isPermissionGranted,H as onAction,D as onNotificationReceived,P as pending,m as registerActionTypes,A as removeActive,k as removeAllActive,q as removeChannel,p as requestPermission,y as sendNotification};
2
- //# sourceMappingURL=index-BhBg6Tnf.js.map
1
+ import{i,q as f}from"./index-BzAEHHap.js";import"./git-diff-vendor-ChbWBukG.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./monaco-viewer-Cc9bWg7I.js";var o;(function(n){n.Year="year",n.Month="month",n.TwoWeeks="twoWeeks",n.Week="week",n.Day="day",n.Hour="hour",n.Minute="minute",n.Second="second"})(o||(o={}));class g{static at(t,e=!1,a=!1){return{at:{date:t,repeating:e,allowWhileIdle:a},interval:void 0,every:void 0}}static interval(t,e=!1){return{at:void 0,interval:{interval:t,allowWhileIdle:e},every:void 0}}static every(t,e,a=!1){return{at:void 0,interval:void 0,every:{interval:t,count:e,allowWhileIdle:a}}}}var c;(function(n){n[n.None=0]="None",n[n.Min=1]="Min",n[n.Low=2]="Low",n[n.Default=3]="Default",n[n.High=4]="High"})(c||(c={}));var r;(function(n){n[n.Secret=-1]="Secret",n[n.Private=0]="Private",n[n.Public=1]="Public"})(r||(r={}));async function v(){return window.Notification.permission!=="default"?await Promise.resolve(window.Notification.permission==="granted"):await i("plugin:notification|is_permission_granted")}async function p(){return await window.Notification.requestPermission()}function y(n){typeof n=="string"?new window.Notification(n):new window.Notification(n.title,n)}async function m(n){await i("plugin:notification|register_action_types",{types:n})}async function P(){return await i("plugin:notification|get_pending")}async function _(n){await i("plugin:notification|cancel",{notifications:n})}async function N(){await i("plugin:notification|cancel")}async function h(){return await i("plugin:notification|get_active")}async function A(n){await i("plugin:notification|remove_active",{notifications:n})}async function k(){await i("plugin:notification|remove_active")}async function M(n){await i("plugin:notification|create_channel",{...n})}async function q(n){await i("plugin:notification|delete_channel",{id:n})}async function C(){return await i("plugin:notification|listChannels")}async function D(n){return await f("notification","notification",n)}async function H(n){return await f("notification","actionPerformed",n)}export{c as Importance,g as Schedule,o as ScheduleEvery,r as Visibility,h as active,_ as cancel,N as cancelAll,C as channels,M as createChannel,v as isPermissionGranted,H as onAction,D as onNotificationReceived,P as pending,m as registerActionTypes,A as removeActive,k as removeAllActive,q as removeChannel,p as requestPermission,y as sendNotification};
2
+ //# sourceMappingURL=index-B6bX3AMT.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-BhBg6Tnf.js","sources":["../../../../../../node_modules/@tauri-apps/plugin-notification/dist-js/index.js"],"sourcesContent":["import { invoke, addPluginListener } from '@tauri-apps/api/core';\n\n// Copyright 2019-2023 Tauri Programme within The Commons Conservancy\n// SPDX-License-Identifier: Apache-2.0\n// SPDX-License-Identifier: MIT\n/**\n * Send toast notifications (brief auto-expiring OS window element) to your user.\n * Can also be used with the Notification Web API.\n *\n * @module\n */\nvar ScheduleEvery;\n(function (ScheduleEvery) {\n ScheduleEvery[\"Year\"] = \"year\";\n ScheduleEvery[\"Month\"] = \"month\";\n ScheduleEvery[\"TwoWeeks\"] = \"twoWeeks\";\n ScheduleEvery[\"Week\"] = \"week\";\n ScheduleEvery[\"Day\"] = \"day\";\n ScheduleEvery[\"Hour\"] = \"hour\";\n ScheduleEvery[\"Minute\"] = \"minute\";\n /**\n * Not supported on iOS.\n */\n ScheduleEvery[\"Second\"] = \"second\";\n})(ScheduleEvery || (ScheduleEvery = {}));\nclass Schedule {\n static at(date, repeating = false, allowWhileIdle = false) {\n return {\n at: { date, repeating, allowWhileIdle },\n interval: undefined,\n every: undefined\n };\n }\n static interval(interval, allowWhileIdle = false) {\n return {\n at: undefined,\n interval: { interval, allowWhileIdle },\n every: undefined\n };\n }\n static every(kind, count, allowWhileIdle = false) {\n return {\n at: undefined,\n interval: undefined,\n every: { interval: kind, count, allowWhileIdle }\n };\n }\n}\nvar Importance;\n(function (Importance) {\n Importance[Importance[\"None\"] = 0] = \"None\";\n Importance[Importance[\"Min\"] = 1] = \"Min\";\n Importance[Importance[\"Low\"] = 2] = \"Low\";\n Importance[Importance[\"Default\"] = 3] = \"Default\";\n Importance[Importance[\"High\"] = 4] = \"High\";\n})(Importance || (Importance = {}));\nvar Visibility;\n(function (Visibility) {\n Visibility[Visibility[\"Secret\"] = -1] = \"Secret\";\n Visibility[Visibility[\"Private\"] = 0] = \"Private\";\n Visibility[Visibility[\"Public\"] = 1] = \"Public\";\n})(Visibility || (Visibility = {}));\n/**\n * Checks if the permission to send notifications is granted.\n * @example\n * ```typescript\n * import { isPermissionGranted } from '@tauri-apps/plugin-notification';\n * const permissionGranted = await isPermissionGranted();\n * ```\n *\n * @since 2.0.0\n */\nasync function isPermissionGranted() {\n if (window.Notification.permission !== 'default') {\n return await Promise.resolve(window.Notification.permission === 'granted');\n }\n return await invoke('plugin:notification|is_permission_granted');\n}\n/**\n * Requests the permission to send notifications.\n * @example\n * ```typescript\n * import { isPermissionGranted, requestPermission } from '@tauri-apps/plugin-notification';\n * let permissionGranted = await isPermissionGranted();\n * if (!permissionGranted) {\n * const permission = await requestPermission();\n * permissionGranted = permission === 'granted';\n * }\n * ```\n *\n * @returns A promise resolving to whether the user granted the permission or not.\n *\n * @since 2.0.0\n */\nasync function requestPermission() {\n return await window.Notification.requestPermission();\n}\n/**\n * Sends a notification to the user.\n * @example\n * ```typescript\n * import { isPermissionGranted, requestPermission, sendNotification } from '@tauri-apps/plugin-notification';\n * let permissionGranted = await isPermissionGranted();\n * if (!permissionGranted) {\n * const permission = await requestPermission();\n * permissionGranted = permission === 'granted';\n * }\n * if (permissionGranted) {\n * sendNotification('Tauri is awesome!');\n * sendNotification({ title: 'TAURI', body: 'Tauri is awesome!' });\n * }\n * ```\n *\n * @since 2.0.0\n */\nfunction sendNotification(options) {\n if (typeof options === 'string') {\n new window.Notification(options);\n }\n else {\n new window.Notification(options.title, options);\n }\n}\n/**\n * Register actions that are performed when the user clicks on the notification.\n *\n * @example\n * ```typescript\n * import { registerActionTypes } from '@tauri-apps/plugin-notification';\n * await registerActionTypes([{\n * id: 'tauri',\n * actions: [{\n * id: 'my-action',\n * title: 'Settings'\n * }]\n * }])\n * ```\n *\n * @returns A promise indicating the success or failure of the operation.\n *\n * @since 2.0.0\n */\nasync function registerActionTypes(types) {\n await invoke('plugin:notification|register_action_types', { types });\n}\n/**\n * Retrieves the list of pending notifications.\n *\n * @example\n * ```typescript\n * import { pending } from '@tauri-apps/plugin-notification';\n * const pendingNotifications = await pending();\n * ```\n *\n * @returns A promise resolving to the list of pending notifications.\n *\n * @since 2.0.0\n */\nasync function pending() {\n return await invoke('plugin:notification|get_pending');\n}\n/**\n * Cancels the pending notifications with the given list of identifiers.\n *\n * @example\n * ```typescript\n * import { cancel } from '@tauri-apps/plugin-notification';\n * await cancel([-34234, 23432, 4311]);\n * ```\n *\n * @returns A promise indicating the success or failure of the operation.\n *\n * @since 2.0.0\n */\nasync function cancel(notifications) {\n await invoke('plugin:notification|cancel', { notifications });\n}\n/**\n * Cancels all pending notifications.\n *\n * @example\n * ```typescript\n * import { cancelAll } from '@tauri-apps/plugin-notification';\n * await cancelAll();\n * ```\n *\n * @returns A promise indicating the success or failure of the operation.\n *\n * @since 2.0.0\n */\nasync function cancelAll() {\n await invoke('plugin:notification|cancel');\n}\n/**\n * Retrieves the list of active notifications.\n *\n * @example\n * ```typescript\n * import { active } from '@tauri-apps/plugin-notification';\n * const activeNotifications = await active();\n * ```\n *\n * @returns A promise resolving to the list of active notifications.\n *\n * @since 2.0.0\n */\nasync function active() {\n return await invoke('plugin:notification|get_active');\n}\n/**\n * Removes the active notifications with the given list of identifiers.\n *\n * @example\n * ```typescript\n * import { cancel } from '@tauri-apps/plugin-notification';\n * await cancel([-34234, 23432, 4311])\n * ```\n *\n * @returns A promise indicating the success or failure of the operation.\n *\n * @since 2.0.0\n */\nasync function removeActive(notifications) {\n await invoke('plugin:notification|remove_active', { notifications });\n}\n/**\n * Removes all active notifications.\n *\n * @example\n * ```typescript\n * import { removeAllActive } from '@tauri-apps/plugin-notification';\n * await removeAllActive()\n * ```\n *\n * @returns A promise indicating the success or failure of the operation.\n *\n * @since 2.0.0\n */\nasync function removeAllActive() {\n await invoke('plugin:notification|remove_active');\n}\n/**\n * Creates a notification channel.\n *\n * @example\n * ```typescript\n * import { createChannel, Importance, Visibility } from '@tauri-apps/plugin-notification';\n * await createChannel({\n * id: 'new-messages',\n * name: 'New Messages',\n * lights: true,\n * vibration: true,\n * importance: Importance.Default,\n * visibility: Visibility.Private\n * });\n * ```\n *\n * @returns A promise indicating the success or failure of the operation.\n *\n * @since 2.0.0\n */\nasync function createChannel(channel) {\n await invoke('plugin:notification|create_channel', { ...channel });\n}\n/**\n * Removes the channel with the given identifier.\n *\n * @example\n * ```typescript\n * import { removeChannel } from '@tauri-apps/plugin-notification';\n * await removeChannel();\n * ```\n *\n * @returns A promise indicating the success or failure of the operation.\n *\n * @since 2.0.0\n */\nasync function removeChannel(id) {\n await invoke('plugin:notification|delete_channel', { id });\n}\n/**\n * Retrieves the list of notification channels.\n *\n * @example\n * ```typescript\n * import { channels } from '@tauri-apps/plugin-notification';\n * const notificationChannels = await channels();\n * ```\n *\n * @returns A promise resolving to the list of notification channels.\n *\n * @since 2.0.0\n */\nasync function channels() {\n return await invoke('plugin:notification|listChannels');\n}\nasync function onNotificationReceived(cb) {\n return await addPluginListener('notification', 'notification', cb);\n}\nasync function onAction(cb) {\n return await addPluginListener('notification', 'actionPerformed', cb);\n}\n\nexport { Importance, Schedule, ScheduleEvery, Visibility, active, cancel, cancelAll, channels, createChannel, isPermissionGranted, onAction, onNotificationReceived, pending, registerActionTypes, removeActive, removeAllActive, removeChannel, requestPermission, sendNotification };\n"],"names":["ScheduleEvery","Schedule","date","repeating","allowWhileIdle","interval","kind","count","Importance","Visibility","isPermissionGranted","invoke","requestPermission","sendNotification","options","registerActionTypes","types","pending","cancel","notifications","cancelAll","active","removeActive","removeAllActive","createChannel","channel","removeChannel","id","channels","onNotificationReceived","cb","addPluginListener","onAction"],"mappings":"kMAWG,IAACA,GACH,SAAUA,EAAe,CACtBA,EAAc,KAAU,OACxBA,EAAc,M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/B,OAAO,MAAM,OAAO,aAAa,kBAAiB,CACtD,CAmBA,SAASC,EAAiBC,EAAS,CAC3B,OAAOA,GAAY,SACnB,IAAI,OAAO,aAAaA,CAAO,EAG/B,IAAI,OAAO,aAAaA,EAAQ,MAAOA,CAAO,CAEtD,CAoBA,eAAeC,EAAoBC,EAAO,CACtC,MAAML,EAAO,4CAA6C,CAAE,MAAAK,EAAO,CACvE,CAcA,eAAeC,GAAU,CACrB,OAAO,MAAMN,EAAO,iCAAiC,CACzD,CAcA,eAAeO,EAAOC,EAAe,CACjC,MAAMR,EAAO,6BAA8B,CAAE,cAAAQ,EAAe,CAChE,CAcA,eAAeC,GAAY,CACvB,MAAMT,EAAO,4BAA4B,CAC7C,CAcA,eAAeU,GAAS,CACpB,OAAO,MAAMV,EAAO,gCAAgC,CACxD,CAcA,eAAeW,EAAaH,EAAe,CACvC,MAAMR,EAAO,oCAAqC,CAAE,cAAAQ,EAAe,CACvE,CAcA,eAAeI,GAAkB,CAC7B,MAAMZ,EAAO,mCAAmC,CACpD,CAqBA,eAAea,EAAcC,EAAS,CAClC,MAAMd,EAAO,qCAAsC,CAAE,GAAGc,CAAO,CAAE,CACrE,CAcA,eAAeC,EAAcC,EAAI,CAC7B,MAAMhB,EAAO,qCAAsC,CAAE,GAAAgB,EAAI,CAC7D,CAcA,eAAeC,GAAW,CACtB,OAAO,MAAMjB,EAAO,kCAAkC,CAC1D,CACA,eAAekB,EAAuBC,EAAI,CACtC,OAAO,MAAMC,EAAkB,eAAgB,eAAgBD,CAAE,CACrE,CACA,eAAeE,EAASF,EAAI,CACxB,OAAO,MAAMC,EAAkB,eAAgB,kBAAmBD,CAAE,CACxE","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index-B6bX3AMT.js","sources":["../../../../../../node_modules/@tauri-apps/plugin-notification/dist-js/index.js"],"sourcesContent":["import { invoke, addPluginListener } from '@tauri-apps/api/core';\n\n// Copyright 2019-2023 Tauri Programme within The Commons Conservancy\n// SPDX-License-Identifier: Apache-2.0\n// SPDX-License-Identifier: MIT\n/**\n * Send toast notifications (brief auto-expiring OS window element) to your user.\n * Can also be used with the Notification Web API.\n *\n * @module\n */\nvar ScheduleEvery;\n(function (ScheduleEvery) {\n ScheduleEvery[\"Year\"] = \"year\";\n ScheduleEvery[\"Month\"] = \"month\";\n ScheduleEvery[\"TwoWeeks\"] = \"twoWeeks\";\n ScheduleEvery[\"Week\"] = \"week\";\n ScheduleEvery[\"Day\"] = \"day\";\n ScheduleEvery[\"Hour\"] = \"hour\";\n ScheduleEvery[\"Minute\"] = \"minute\";\n /**\n * Not supported on iOS.\n */\n ScheduleEvery[\"Second\"] = \"second\";\n})(ScheduleEvery || (ScheduleEvery = {}));\nclass Schedule {\n static at(date, repeating = false, allowWhileIdle = false) {\n return {\n at: { date, repeating, allowWhileIdle },\n interval: undefined,\n every: undefined\n };\n }\n static interval(interval, allowWhileIdle = false) {\n return {\n at: undefined,\n interval: { interval, allowWhileIdle },\n every: undefined\n };\n }\n static every(kind, count, allowWhileIdle = false) {\n return {\n at: undefined,\n interval: undefined,\n every: { interval: kind, count, allowWhileIdle }\n };\n }\n}\nvar Importance;\n(function (Importance) {\n Importance[Importance[\"None\"] = 0] = \"None\";\n Importance[Importance[\"Min\"] = 1] = \"Min\";\n Importance[Importance[\"Low\"] = 2] = \"Low\";\n Importance[Importance[\"Default\"] = 3] = \"Default\";\n Importance[Importance[\"High\"] = 4] = \"High\";\n})(Importance || (Importance = {}));\nvar Visibility;\n(function (Visibility) {\n Visibility[Visibility[\"Secret\"] = -1] = \"Secret\";\n Visibility[Visibility[\"Private\"] = 0] = \"Private\";\n Visibility[Visibility[\"Public\"] = 1] = \"Public\";\n})(Visibility || (Visibility = {}));\n/**\n * Checks if the permission to send notifications is granted.\n * @example\n * ```typescript\n * import { isPermissionGranted } from '@tauri-apps/plugin-notification';\n * const permissionGranted = await isPermissionGranted();\n * ```\n *\n * @since 2.0.0\n */\nasync function isPermissionGranted() {\n if (window.Notification.permission !== 'default') {\n return await Promise.resolve(window.Notification.permission === 'granted');\n }\n return await invoke('plugin:notification|is_permission_granted');\n}\n/**\n * Requests the permission to send notifications.\n * @example\n * ```typescript\n * import { isPermissionGranted, requestPermission } from '@tauri-apps/plugin-notification';\n * let permissionGranted = await isPermissionGranted();\n * if (!permissionGranted) {\n * const permission = await requestPermission();\n * permissionGranted = permission === 'granted';\n * }\n * ```\n *\n * @returns A promise resolving to whether the user granted the permission or not.\n *\n * @since 2.0.0\n */\nasync function requestPermission() {\n return await window.Notification.requestPermission();\n}\n/**\n * Sends a notification to the user.\n * @example\n * ```typescript\n * import { isPermissionGranted, requestPermission, sendNotification } from '@tauri-apps/plugin-notification';\n * let permissionGranted = await isPermissionGranted();\n * if (!permissionGranted) {\n * const permission = await requestPermission();\n * permissionGranted = permission === 'granted';\n * }\n * if (permissionGranted) {\n * sendNotification('Tauri is awesome!');\n * sendNotification({ title: 'TAURI', body: 'Tauri is awesome!' });\n * }\n * ```\n *\n * @since 2.0.0\n */\nfunction sendNotification(options) {\n if (typeof options === 'string') {\n new window.Notification(options);\n }\n else {\n new window.Notification(options.title, options);\n }\n}\n/**\n * Register actions that are performed when the user clicks on the notification.\n *\n * @example\n * ```typescript\n * import { registerActionTypes } from '@tauri-apps/plugin-notification';\n * await registerActionTypes([{\n * id: 'tauri',\n * actions: [{\n * id: 'my-action',\n * title: 'Settings'\n * }]\n * }])\n * ```\n *\n * @returns A promise indicating the success or failure of the operation.\n *\n * @since 2.0.0\n */\nasync function registerActionTypes(types) {\n await invoke('plugin:notification|register_action_types', { types });\n}\n/**\n * Retrieves the list of pending notifications.\n *\n * @example\n * ```typescript\n * import { pending } from '@tauri-apps/plugin-notification';\n * const pendingNotifications = await pending();\n * ```\n *\n * @returns A promise resolving to the list of pending notifications.\n *\n * @since 2.0.0\n */\nasync function pending() {\n return await invoke('plugin:notification|get_pending');\n}\n/**\n * Cancels the pending notifications with the given list of identifiers.\n *\n * @example\n * ```typescript\n * import { cancel } from '@tauri-apps/plugin-notification';\n * await cancel([-34234, 23432, 4311]);\n * ```\n *\n * @returns A promise indicating the success or failure of the operation.\n *\n * @since 2.0.0\n */\nasync function cancel(notifications) {\n await invoke('plugin:notification|cancel', { notifications });\n}\n/**\n * Cancels all pending notifications.\n *\n * @example\n * ```typescript\n * import { cancelAll } from '@tauri-apps/plugin-notification';\n * await cancelAll();\n * ```\n *\n * @returns A promise indicating the success or failure of the operation.\n *\n * @since 2.0.0\n */\nasync function cancelAll() {\n await invoke('plugin:notification|cancel');\n}\n/**\n * Retrieves the list of active notifications.\n *\n * @example\n * ```typescript\n * import { active } from '@tauri-apps/plugin-notification';\n * const activeNotifications = await active();\n * ```\n *\n * @returns A promise resolving to the list of active notifications.\n *\n * @since 2.0.0\n */\nasync function active() {\n return await invoke('plugin:notification|get_active');\n}\n/**\n * Removes the active notifications with the given list of identifiers.\n *\n * @example\n * ```typescript\n * import { cancel } from '@tauri-apps/plugin-notification';\n * await cancel([-34234, 23432, 4311])\n * ```\n *\n * @returns A promise indicating the success or failure of the operation.\n *\n * @since 2.0.0\n */\nasync function removeActive(notifications) {\n await invoke('plugin:notification|remove_active', { notifications });\n}\n/**\n * Removes all active notifications.\n *\n * @example\n * ```typescript\n * import { removeAllActive } from '@tauri-apps/plugin-notification';\n * await removeAllActive()\n * ```\n *\n * @returns A promise indicating the success or failure of the operation.\n *\n * @since 2.0.0\n */\nasync function removeAllActive() {\n await invoke('plugin:notification|remove_active');\n}\n/**\n * Creates a notification channel.\n *\n * @example\n * ```typescript\n * import { createChannel, Importance, Visibility } from '@tauri-apps/plugin-notification';\n * await createChannel({\n * id: 'new-messages',\n * name: 'New Messages',\n * lights: true,\n * vibration: true,\n * importance: Importance.Default,\n * visibility: Visibility.Private\n * });\n * ```\n *\n * @returns A promise indicating the success or failure of the operation.\n *\n * @since 2.0.0\n */\nasync function createChannel(channel) {\n await invoke('plugin:notification|create_channel', { ...channel });\n}\n/**\n * Removes the channel with the given identifier.\n *\n * @example\n * ```typescript\n * import { removeChannel } from '@tauri-apps/plugin-notification';\n * await removeChannel();\n * ```\n *\n * @returns A promise indicating the success or failure of the operation.\n *\n * @since 2.0.0\n */\nasync function removeChannel(id) {\n await invoke('plugin:notification|delete_channel', { id });\n}\n/**\n * Retrieves the list of notification channels.\n *\n * @example\n * ```typescript\n * import { channels } from '@tauri-apps/plugin-notification';\n * const notificationChannels = await channels();\n * ```\n *\n * @returns A promise resolving to the list of notification channels.\n *\n * @since 2.0.0\n */\nasync function channels() {\n return await invoke('plugin:notification|listChannels');\n}\nasync function onNotificationReceived(cb) {\n return await addPluginListener('notification', 'notification', cb);\n}\nasync function onAction(cb) {\n return await addPluginListener('notification', 'actionPerformed', cb);\n}\n\nexport { Importance, Schedule, ScheduleEvery, Visibility, active, cancel, cancelAll, channels, createChannel, isPermissionGranted, onAction, onNotificationReceived, pending, registerActionTypes, removeActive, removeAllActive, removeChannel, requestPermission, sendNotification };\n"],"names":["ScheduleEvery","Schedule","date","repeating","allowWhileIdle","interval","kind","count","Importance","Visibility","isPermissionGranted","invoke","requestPermission","sendNotification","options","registerActionTypes","types","pending","cancel","notifications","cancelAll","active","removeActive","removeAllActive","createChannel","channel","removeChannel","id","channels","onNotificationReceived","cb","addPluginListener","onAction"],"mappings":"kMAWG,IAACA,GACH,SAAUA,EAAe,CACtBA,EAAc,KAAU,OACxBA,EAAc,MAAW,QACzBA,EAAc,SAAc,WAC5BA,EAAc,KAAU,OACxBA,EAAc,IAAS,MACvBA,EAAc,KAAU,OACxBA,EAAc,OAAY,SAI1BA,EAAc,OAAY,QAC9B,GAAGA,IAAkBA,EAAgB,CAAA,EAAG,EACxC,MAAMC,CAAS,CACX,OAAO,GAAGC,EAAMC,EAAY,GAAOC,EAAiB,GAAO,CACvD,MAAO,CACH,GAAI,CAAE,KAAAF,EAAM,UAAAC,EAAW,eAAAC,CAAc,EACrC,SAAU,OACV,MAAO,MACnB,CACI,CACA,OAAO,SAASC,EAAUD,EAAiB,GAAO,CAC9C,MA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