mimo-reasonix 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/package.json +1 -1
- package/node_modules/@alcalzone/ansi-tokenize/LICENSE +21 -0
- package/node_modules/@alcalzone/ansi-tokenize/README.md +278 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/ansiCodes.d.ts +7 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/ansiCodes.js +57 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/ansiCodes.js.map +1 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/consts.d.ts +17 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/consts.js +28 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/consts.js.map +1 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/diff.d.ts +6 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/diff.js +26 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/diff.js.map +1 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/index.d.ts +6 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/index.js +7 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/index.js.map +1 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/reduce.d.ts +5 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/reduce.js +37 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/reduce.js.map +1 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/styledChars.d.ts +6 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/styledChars.js +38 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/styledChars.js.map +1 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/tokenize.d.ts +16 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/tokenize.js +194 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/tokenize.js.map +1 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/undo.d.ts +3 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/undo.js +11 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/undo.js.map +1 -0
- package/node_modules/@alcalzone/ansi-tokenize/package.json +55 -0
- package/node_modules/ansi-regex/index.d.ts +33 -0
- package/node_modules/ansi-regex/index.js +14 -0
- package/node_modules/ansi-regex/license +9 -0
- package/node_modules/ansi-regex/package.json +61 -0
- package/node_modules/ansi-regex/readme.md +66 -0
- package/node_modules/ansi-styles/index.d.ts +236 -0
- package/node_modules/ansi-styles/index.js +223 -0
- package/node_modules/ansi-styles/license +9 -0
- package/node_modules/ansi-styles/package.json +54 -0
- package/node_modules/ansi-styles/readme.md +173 -0
- package/node_modules/auto-bind/index.d.ts +50 -0
- package/node_modules/auto-bind/index.js +41 -0
- package/node_modules/auto-bind/license +9 -0
- package/node_modules/auto-bind/package.json +51 -0
- package/node_modules/auto-bind/react.d.ts +26 -0
- package/node_modules/auto-bind/react.js +28 -0
- package/node_modules/auto-bind/readme.md +92 -0
- package/node_modules/bidi-js/LICENSE.txt +22 -0
- package/node_modules/bidi-js/README.md +133 -0
- package/node_modules/bidi-js/dist/bidi.js +1010 -0
- package/node_modules/bidi-js/dist/bidi.min.js +1 -0
- package/node_modules/bidi-js/dist/bidi.min.mjs +1 -0
- package/node_modules/bidi-js/dist/bidi.mjs +1002 -0
- package/node_modules/bidi-js/package.json +39 -0
- package/node_modules/bidi-js/src/brackets.js +30 -0
- package/node_modules/bidi-js/src/charTypes.js +66 -0
- package/node_modules/bidi-js/src/data/bidiBrackets.data.js +5 -0
- package/node_modules/bidi-js/src/data/bidiCharTypes.data.js +25 -0
- package/node_modules/bidi-js/src/data/bidiMirroring.data.js +2 -0
- package/node_modules/bidi-js/src/embeddingLevels.js +690 -0
- package/node_modules/bidi-js/src/index.js +5 -0
- package/node_modules/bidi-js/src/mirroring.js +48 -0
- package/node_modules/bidi-js/src/reordering.js +99 -0
- package/node_modules/bidi-js/src/util/parseCharacterMap.js +30 -0
- package/node_modules/chalk/license +9 -0
- package/node_modules/chalk/package.json +83 -0
- package/node_modules/chalk/readme.md +297 -0
- package/node_modules/chalk/source/index.d.ts +325 -0
- package/node_modules/chalk/source/index.js +225 -0
- package/node_modules/chalk/source/utilities.js +33 -0
- package/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
- package/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
- package/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
- package/node_modules/chalk/source/vendor/supports-color/browser.js +34 -0
- package/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
- package/node_modules/chalk/source/vendor/supports-color/index.js +190 -0
- package/node_modules/cli-boxes/boxes.json +82 -0
- package/node_modules/cli-boxes/index.d.ts +122 -0
- package/node_modules/cli-boxes/index.js +3 -0
- package/node_modules/cli-boxes/license +9 -0
- package/node_modules/cli-boxes/package.json +49 -0
- package/node_modules/cli-boxes/readme.md +103 -0
- package/node_modules/code-excerpt/dist/index.d.ts +9 -0
- package/node_modules/code-excerpt/dist/index.js +27 -0
- package/node_modules/code-excerpt/license +21 -0
- package/node_modules/code-excerpt/package.json +43 -0
- package/node_modules/code-excerpt/readme.md +65 -0
- package/node_modules/convert-to-spaces/dist/index.d.ts +2 -0
- package/node_modules/convert-to-spaces/dist/index.js +4 -0
- package/node_modules/convert-to-spaces/license +21 -0
- package/node_modules/convert-to-spaces/package.json +40 -0
- package/node_modules/convert-to-spaces/readme.md +39 -0
- package/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
- package/node_modules/emoji-regex/README.md +107 -0
- package/node_modules/emoji-regex/index.d.ts +3 -0
- package/node_modules/emoji-regex/index.js +4 -0
- package/node_modules/emoji-regex/index.mjs +4 -0
- package/node_modules/emoji-regex/package.json +45 -0
- package/node_modules/escape-string-regexp/index.d.ts +18 -0
- package/node_modules/escape-string-regexp/index.js +11 -0
- package/node_modules/escape-string-regexp/license +9 -0
- package/node_modules/escape-string-regexp/package.json +43 -0
- package/node_modules/escape-string-regexp/readme.md +29 -0
- package/node_modules/get-east-asian-width/index.d.ts +60 -0
- package/node_modules/get-east-asian-width/index.js +30 -0
- package/node_modules/get-east-asian-width/license +9 -0
- package/node_modules/get-east-asian-width/lookup-data.js +18 -0
- package/node_modules/get-east-asian-width/lookup.js +135 -0
- package/node_modules/get-east-asian-width/package.json +71 -0
- package/node_modules/get-east-asian-width/readme.md +65 -0
- package/node_modules/get-east-asian-width/utilities.js +24 -0
- package/node_modules/indent-string/index.d.ts +38 -0
- package/node_modules/indent-string/index.js +38 -0
- package/node_modules/indent-string/license +9 -0
- package/node_modules/indent-string/package.json +40 -0
- package/node_modules/indent-string/readme.md +73 -0
- package/node_modules/ink/LICENSE +30 -0
- package/node_modules/ink/package.json +53 -0
- package/node_modules/ink/src/Ansi.tsx +254 -0
- package/node_modules/ink/src/_internal/debug.ts +27 -0
- package/node_modules/ink/src/_internal/earlyInput.ts +7 -0
- package/node_modules/ink/src/_internal/env.ts +38 -0
- package/node_modules/ink/src/_internal/envUtils.ts +13 -0
- package/node_modules/ink/src/_internal/execFileNoThrow.ts +58 -0
- package/node_modules/ink/src/_internal/fullscreen.ts +9 -0
- package/node_modules/ink/src/_internal/intl.ts +13 -0
- package/node_modules/ink/src/_internal/iter-lines.ts +14 -0
- package/node_modules/ink/src/_internal/log.ts +15 -0
- package/node_modules/ink/src/_internal/semver.ts +12 -0
- package/node_modules/ink/src/_internal/sliceAnsi.ts +6 -0
- package/node_modules/ink/src/_internal/state.ts +22 -0
- package/node_modules/ink/src/_internal/yoga-layout.ts +23 -0
- package/node_modules/ink/src/ambient.d.ts +47 -0
- package/node_modules/ink/src/bidi.ts +110 -0
- package/node_modules/ink/src/clearTerminal.ts +53 -0
- package/node_modules/ink/src/colorize.ts +129 -0
- package/node_modules/ink/src/components/AlternateScreen.tsx +49 -0
- package/node_modules/ink/src/components/App.tsx +700 -0
- package/node_modules/ink/src/components/AppContext.ts +17 -0
- package/node_modules/ink/src/components/Box.tsx +105 -0
- package/node_modules/ink/src/components/Button.tsx +96 -0
- package/node_modules/ink/src/components/ClockContext.tsx +94 -0
- package/node_modules/ink/src/components/CursorDeclarationContext.ts +23 -0
- package/node_modules/ink/src/components/ErrorOverview.tsx +116 -0
- package/node_modules/ink/src/components/Link.tsx +27 -0
- package/node_modules/ink/src/components/Newline.tsx +11 -0
- package/node_modules/ink/src/components/NoSelect.tsx +16 -0
- package/node_modules/ink/src/components/RawAnsi.tsx +18 -0
- package/node_modules/ink/src/components/ScrollBox.tsx +209 -0
- package/node_modules/ink/src/components/Spacer.tsx +6 -0
- package/node_modules/ink/src/components/StdinContext.ts +35 -0
- package/node_modules/ink/src/components/TerminalFocusContext.tsx +37 -0
- package/node_modules/ink/src/components/TerminalSizeContext.tsx +9 -0
- package/node_modules/ink/src/components/Text.tsx +85 -0
- package/node_modules/ink/src/components/TextInput.tsx +140 -0
- package/node_modules/ink/src/constants.ts +2 -0
- package/node_modules/ink/src/cursor.ts +6 -0
- package/node_modules/ink/src/devtools.ts +2 -0
- package/node_modules/ink/src/dom.ts +451 -0
- package/node_modules/ink/src/events/click-event.ts +19 -0
- package/node_modules/ink/src/events/dispatcher.ts +185 -0
- package/node_modules/ink/src/events/emitter.ts +37 -0
- package/node_modules/ink/src/events/event-handlers.ts +60 -0
- package/node_modules/ink/src/events/event.ts +12 -0
- package/node_modules/ink/src/events/focus-event.ts +13 -0
- package/node_modules/ink/src/events/input-event.ts +212 -0
- package/node_modules/ink/src/events/keyboard-event.ts +41 -0
- package/node_modules/ink/src/events/paste-event.ts +11 -0
- package/node_modules/ink/src/events/resize-event.ts +13 -0
- package/node_modules/ink/src/events/terminal-event.ts +99 -0
- package/node_modules/ink/src/events/terminal-focus-event.ts +13 -0
- package/node_modules/ink/src/focus.ts +159 -0
- package/node_modules/ink/src/frame.ts +105 -0
- package/node_modules/ink/src/get-max-width.ts +10 -0
- package/node_modules/ink/src/hit-test.ts +107 -0
- package/node_modules/ink/src/hooks/use-animation-frame.ts +33 -0
- package/node_modules/ink/src/hooks/use-app.ts +6 -0
- package/node_modules/ink/src/hooks/use-declared-cursor.ts +59 -0
- package/node_modules/ink/src/hooks/use-input.ts +57 -0
- package/node_modules/ink/src/hooks/use-interval.ts +53 -0
- package/node_modules/ink/src/hooks/use-search-highlight.ts +41 -0
- package/node_modules/ink/src/hooks/use-selection.ts +86 -0
- package/node_modules/ink/src/hooks/use-stdin.ts +6 -0
- package/node_modules/ink/src/hooks/use-tab-status.ts +68 -0
- package/node_modules/ink/src/hooks/use-terminal-focus.ts +8 -0
- package/node_modules/ink/src/hooks/use-terminal-title.ts +21 -0
- package/node_modules/ink/src/hooks/use-terminal-viewport.ts +77 -0
- package/node_modules/ink/src/index.ts +150 -0
- package/node_modules/ink/src/ink.tsx +1499 -0
- package/node_modules/ink/src/instances.ts +5 -0
- package/node_modules/ink/src/layout/engine.ts +10 -0
- package/node_modules/ink/src/layout/geometry.ts +116 -0
- package/node_modules/ink/src/layout/node.ts +178 -0
- package/node_modules/ink/src/layout/yoga.ts +316 -0
- package/node_modules/ink/src/line-width-cache.ts +19 -0
- package/node_modules/ink/src/log-update.ts +777 -0
- package/node_modules/ink/src/measure-element.ts +14 -0
- package/node_modules/ink/src/measure-text.ts +29 -0
- package/node_modules/ink/src/node-cache.ts +58 -0
- package/node_modules/ink/src/optimizer.ts +65 -0
- package/node_modules/ink/src/output.ts +730 -0
- package/node_modules/ink/src/parse-keypress.ts +751 -0
- package/node_modules/ink/src/react-jsx-aug.d.ts +14 -0
- package/node_modules/ink/src/reconciler.ts +508 -0
- package/node_modules/ink/src/render-border.ts +230 -0
- package/node_modules/ink/src/render-node-to-output.ts +1477 -0
- package/node_modules/ink/src/render-to-screen.ts +201 -0
- package/node_modules/ink/src/renderer.ts +183 -0
- package/node_modules/ink/src/root.ts +148 -0
- package/node_modules/ink/src/screen.ts +1301 -0
- package/node_modules/ink/src/searchHighlight.ts +68 -0
- package/node_modules/ink/src/selection.ts +742 -0
- package/node_modules/ink/src/squash-text-nodes.ts +70 -0
- package/node_modules/ink/src/stringWidth.ts +222 -0
- package/node_modules/ink/src/styles.ts +603 -0
- package/node_modules/ink/src/supports-hyperlinks.ts +41 -0
- package/node_modules/ink/src/tabstops.ts +39 -0
- package/node_modules/ink/src/terminal-focus-state.ts +46 -0
- package/node_modules/ink/src/terminal-querier.ts +143 -0
- package/node_modules/ink/src/terminal.ts +220 -0
- package/node_modules/ink/src/termio/ansi.ts +66 -0
- package/node_modules/ink/src/termio/csi.ts +290 -0
- package/node_modules/ink/src/termio/dec.ts +52 -0
- package/node_modules/ink/src/termio/esc.ts +63 -0
- package/node_modules/ink/src/termio/osc.ts +364 -0
- package/node_modules/ink/src/termio/parser.ts +383 -0
- package/node_modules/ink/src/termio/sgr.ts +331 -0
- package/node_modules/ink/src/termio/tokenize.ts +311 -0
- package/node_modules/ink/src/termio/types.ts +225 -0
- package/node_modules/ink/src/termio.ts +20 -0
- package/node_modules/ink/src/useTerminalNotification.ts +124 -0
- package/node_modules/ink/src/warn.ts +10 -0
- package/node_modules/ink/src/widest-line.ts +12 -0
- package/node_modules/ink/src/wrap-text.ts +55 -0
- package/node_modules/ink/src/wrapAnsi.ts +15 -0
- package/node_modules/ink/tsconfig.json +26 -0
- package/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
- package/node_modules/is-fullwidth-code-point/index.js +12 -0
- package/node_modules/is-fullwidth-code-point/license +9 -0
- package/node_modules/is-fullwidth-code-point/package.json +53 -0
- package/node_modules/is-fullwidth-code-point/readme.md +31 -0
- package/node_modules/lodash-es/LICENSE +47 -0
- package/node_modules/lodash-es/README.md +10 -0
- package/node_modules/lodash-es/_DataView.js +7 -0
- package/node_modules/lodash-es/_Hash.js +32 -0
- package/node_modules/lodash-es/_LazyWrapper.js +28 -0
- package/node_modules/lodash-es/_ListCache.js +32 -0
- package/node_modules/lodash-es/_LodashWrapper.js +22 -0
- package/node_modules/lodash-es/_Map.js +7 -0
- package/node_modules/lodash-es/_MapCache.js +32 -0
- package/node_modules/lodash-es/_Promise.js +7 -0
- package/node_modules/lodash-es/_Set.js +7 -0
- package/node_modules/lodash-es/_SetCache.js +27 -0
- package/node_modules/lodash-es/_Stack.js +27 -0
- package/node_modules/lodash-es/_Symbol.js +6 -0
- package/node_modules/lodash-es/_Uint8Array.js +6 -0
- package/node_modules/lodash-es/_WeakMap.js +7 -0
- package/node_modules/lodash-es/_addMapEntry.js +15 -0
- package/node_modules/lodash-es/_addSetEntry.js +15 -0
- package/node_modules/lodash-es/_apply.js +21 -0
- package/node_modules/lodash-es/_arrayAggregator.js +22 -0
- package/node_modules/lodash-es/_arrayEach.js +22 -0
- package/node_modules/lodash-es/_arrayEachRight.js +21 -0
- package/node_modules/lodash-es/_arrayEvery.js +23 -0
- package/node_modules/lodash-es/_arrayFilter.js +25 -0
- package/node_modules/lodash-es/_arrayIncludes.js +17 -0
- package/node_modules/lodash-es/_arrayIncludesWith.js +22 -0
- package/node_modules/lodash-es/_arrayLikeKeys.js +49 -0
- package/node_modules/lodash-es/_arrayMap.js +21 -0
- package/node_modules/lodash-es/_arrayPush.js +20 -0
- package/node_modules/lodash-es/_arrayReduce.js +26 -0
- package/node_modules/lodash-es/_arrayReduceRight.js +24 -0
- package/node_modules/lodash-es/_arraySample.js +15 -0
- package/node_modules/lodash-es/_arraySampleSize.js +17 -0
- package/node_modules/lodash-es/_arrayShuffle.js +15 -0
- package/node_modules/lodash-es/_arraySome.js +23 -0
- package/node_modules/lodash-es/_asciiSize.js +12 -0
- package/node_modules/lodash-es/_asciiToArray.js +12 -0
- package/node_modules/lodash-es/_asciiWords.js +15 -0
- package/node_modules/lodash-es/_assignMergeValue.js +20 -0
- package/node_modules/lodash-es/_assignValue.js +28 -0
- package/node_modules/lodash-es/_assocIndexOf.js +21 -0
- package/node_modules/lodash-es/_baseAggregator.js +21 -0
- package/node_modules/lodash-es/_baseAssign.js +17 -0
- package/node_modules/lodash-es/_baseAssignIn.js +17 -0
- package/node_modules/lodash-es/_baseAssignValue.js +25 -0
- package/node_modules/lodash-es/_baseAt.js +23 -0
- package/node_modules/lodash-es/_baseClamp.js +22 -0
- package/node_modules/lodash-es/_baseClone.js +166 -0
- package/node_modules/lodash-es/_baseConforms.js +18 -0
- package/node_modules/lodash-es/_baseConformsTo.js +27 -0
- package/node_modules/lodash-es/_baseCreate.js +30 -0
- package/node_modules/lodash-es/_baseDelay.js +21 -0
- package/node_modules/lodash-es/_baseDifference.js +67 -0
- package/node_modules/lodash-es/_baseEach.js +14 -0
- package/node_modules/lodash-es/_baseEachRight.js +14 -0
- package/node_modules/lodash-es/_baseEvery.js +21 -0
- package/node_modules/lodash-es/_baseExtremum.js +32 -0
- package/node_modules/lodash-es/_baseFill.js +32 -0
- package/node_modules/lodash-es/_baseFilter.js +21 -0
- package/node_modules/lodash-es/_baseFindIndex.js +24 -0
- package/node_modules/lodash-es/_baseFindKey.js +23 -0
- package/node_modules/lodash-es/_baseFlatten.js +38 -0
- package/node_modules/lodash-es/_baseFor.js +16 -0
- package/node_modules/lodash-es/_baseForOwn.js +16 -0
- package/node_modules/lodash-es/_baseForOwnRight.js +16 -0
- package/node_modules/lodash-es/_baseForRight.js +15 -0
- package/node_modules/lodash-es/_baseFunctions.js +19 -0
- package/node_modules/lodash-es/_baseGet.js +24 -0
- package/node_modules/lodash-es/_baseGetAllKeys.js +20 -0
- package/node_modules/lodash-es/_baseGetTag.js +28 -0
- package/node_modules/lodash-es/_baseGt.js +14 -0
- package/node_modules/lodash-es/_baseHas.js +19 -0
- package/node_modules/lodash-es/_baseHasIn.js +13 -0
- package/node_modules/lodash-es/_baseInRange.js +18 -0
- package/node_modules/lodash-es/_baseIndexOf.js +20 -0
- package/node_modules/lodash-es/_baseIndexOfWith.js +23 -0
- package/node_modules/lodash-es/_baseIntersection.js +74 -0
- package/node_modules/lodash-es/_baseInverter.js +21 -0
- package/node_modules/lodash-es/_baseInvoke.js +24 -0
- package/node_modules/lodash-es/_baseIsArguments.js +18 -0
- package/node_modules/lodash-es/_baseIsArrayBuffer.js +17 -0
- package/node_modules/lodash-es/_baseIsDate.js +18 -0
- package/node_modules/lodash-es/_baseIsEqual.js +28 -0
- package/node_modules/lodash-es/_baseIsEqualDeep.js +83 -0
- package/node_modules/lodash-es/_baseIsMap.js +18 -0
- package/node_modules/lodash-es/_baseIsMatch.js +62 -0
- package/node_modules/lodash-es/_baseIsNaN.js +12 -0
- package/node_modules/lodash-es/_baseIsNative.js +47 -0
- package/node_modules/lodash-es/_baseIsRegExp.js +18 -0
- package/node_modules/lodash-es/_baseIsSet.js +18 -0
- package/node_modules/lodash-es/_baseIsTypedArray.js +60 -0
- package/node_modules/lodash-es/_baseIteratee.js +31 -0
- package/node_modules/lodash-es/_baseKeys.js +30 -0
- package/node_modules/lodash-es/_baseKeysIn.js +33 -0
- package/node_modules/lodash-es/_baseLodash.js +10 -0
- package/node_modules/lodash-es/_baseLt.js +14 -0
- package/node_modules/lodash-es/_baseMap.js +22 -0
- package/node_modules/lodash-es/_baseMatches.js +22 -0
- package/node_modules/lodash-es/_baseMatchesProperty.js +33 -0
- package/node_modules/lodash-es/_baseMean.js +20 -0
- package/node_modules/lodash-es/_baseMerge.js +42 -0
- package/node_modules/lodash-es/_baseMergeDeep.js +94 -0
- package/node_modules/lodash-es/_baseNth.js +20 -0
- package/node_modules/lodash-es/_baseOrderBy.js +49 -0
- package/node_modules/lodash-es/_basePick.js +19 -0
- package/node_modules/lodash-es/_basePickBy.js +30 -0
- package/node_modules/lodash-es/_baseProperty.js +14 -0
- package/node_modules/lodash-es/_basePropertyDeep.js +16 -0
- package/node_modules/lodash-es/_basePropertyOf.js +14 -0
- package/node_modules/lodash-es/_basePullAll.js +51 -0
- package/node_modules/lodash-es/_basePullAt.js +37 -0
- package/node_modules/lodash-es/_baseRandom.js +18 -0
- package/node_modules/lodash-es/_baseRange.js +28 -0
- package/node_modules/lodash-es/_baseReduce.js +23 -0
- package/node_modules/lodash-es/_baseRepeat.js +35 -0
- package/node_modules/lodash-es/_baseRest.js +17 -0
- package/node_modules/lodash-es/_baseSample.js +15 -0
- package/node_modules/lodash-es/_baseSampleSize.js +18 -0
- package/node_modules/lodash-es/_baseSet.js +51 -0
- package/node_modules/lodash-es/_baseSetData.js +17 -0
- package/node_modules/lodash-es/_baseSetToString.js +22 -0
- package/node_modules/lodash-es/_baseShuffle.js +15 -0
- package/node_modules/lodash-es/_baseSlice.js +31 -0
- package/node_modules/lodash-es/_baseSome.js +22 -0
- package/node_modules/lodash-es/_baseSortBy.js +21 -0
- package/node_modules/lodash-es/_baseSortedIndex.js +42 -0
- package/node_modules/lodash-es/_baseSortedIndexBy.js +67 -0
- package/node_modules/lodash-es/_baseSortedUniq.js +30 -0
- package/node_modules/lodash-es/_baseSum.js +24 -0
- package/node_modules/lodash-es/_baseTimes.js +20 -0
- package/node_modules/lodash-es/_baseToNumber.js +24 -0
- package/node_modules/lodash-es/_baseToPairs.js +18 -0
- package/node_modules/lodash-es/_baseToString.js +37 -0
- package/node_modules/lodash-es/_baseTrim.js +19 -0
- package/node_modules/lodash-es/_baseUnary.js +14 -0
- package/node_modules/lodash-es/_baseUniq.js +72 -0
- package/node_modules/lodash-es/_baseUnset.js +52 -0
- package/node_modules/lodash-es/_baseUpdate.js +18 -0
- package/node_modules/lodash-es/_baseValues.js +19 -0
- package/node_modules/lodash-es/_baseWhile.js +26 -0
- package/node_modules/lodash-es/_baseWrapperValue.js +25 -0
- package/node_modules/lodash-es/_baseXor.js +36 -0
- package/node_modules/lodash-es/_baseZipObject.js +23 -0
- package/node_modules/lodash-es/_cacheHas.js +13 -0
- package/node_modules/lodash-es/_castArrayLikeObject.js +14 -0
- package/node_modules/lodash-es/_castFunction.js +14 -0
- package/node_modules/lodash-es/_castPath.js +21 -0
- package/node_modules/lodash-es/_castRest.js +14 -0
- package/node_modules/lodash-es/_castSlice.js +18 -0
- package/node_modules/lodash-es/_charsEndIndex.js +19 -0
- package/node_modules/lodash-es/_charsStartIndex.js +20 -0
- package/node_modules/lodash-es/_cloneArrayBuffer.js +16 -0
- package/node_modules/lodash-es/_cloneBuffer.js +35 -0
- package/node_modules/lodash-es/_cloneDataView.js +16 -0
- package/node_modules/lodash-es/_cloneMap.js +22 -0
- package/node_modules/lodash-es/_cloneRegExp.js +17 -0
- package/node_modules/lodash-es/_cloneSet.js +22 -0
- package/node_modules/lodash-es/_cloneSymbol.js +18 -0
- package/node_modules/lodash-es/_cloneTypedArray.js +16 -0
- package/node_modules/lodash-es/_compareAscending.js +41 -0
- package/node_modules/lodash-es/_compareMultiple.js +44 -0
- package/node_modules/lodash-es/_composeArgs.js +39 -0
- package/node_modules/lodash-es/_composeArgsRight.js +41 -0
- package/node_modules/lodash-es/_copyArray.js +20 -0
- package/node_modules/lodash-es/_copyObject.js +40 -0
- package/node_modules/lodash-es/_copySymbols.js +16 -0
- package/node_modules/lodash-es/_copySymbolsIn.js +16 -0
- package/node_modules/lodash-es/_coreJsData.js +6 -0
- package/node_modules/lodash-es/_countHolders.js +21 -0
- package/node_modules/lodash-es/_createAggregator.js +23 -0
- package/node_modules/lodash-es/_createAssigner.js +37 -0
- package/node_modules/lodash-es/_createBaseEach.js +32 -0
- package/node_modules/lodash-es/_createBaseFor.js +25 -0
- package/node_modules/lodash-es/_createBind.js +28 -0
- package/node_modules/lodash-es/_createCaseFirst.js +33 -0
- package/node_modules/lodash-es/_createCompounder.js +24 -0
- package/node_modules/lodash-es/_createCtor.js +37 -0
- package/node_modules/lodash-es/_createCurry.js +46 -0
- package/node_modules/lodash-es/_createFind.js +25 -0
- package/node_modules/lodash-es/_createFlow.js +78 -0
- package/node_modules/lodash-es/_createHybrid.js +92 -0
- package/node_modules/lodash-es/_createInverter.js +17 -0
- package/node_modules/lodash-es/_createMathOperation.js +38 -0
- package/node_modules/lodash-es/_createOver.js +27 -0
- package/node_modules/lodash-es/_createPadding.js +33 -0
- package/node_modules/lodash-es/_createPartial.js +43 -0
- package/node_modules/lodash-es/_createRange.js +30 -0
- package/node_modules/lodash-es/_createRecurry.js +56 -0
- package/node_modules/lodash-es/_createRelationalOperation.js +20 -0
- package/node_modules/lodash-es/_createRound.js +35 -0
- package/node_modules/lodash-es/_createSet.js +19 -0
- package/node_modules/lodash-es/_createToPairs.js +30 -0
- package/node_modules/lodash-es/_createWrap.js +106 -0
- package/node_modules/lodash-es/_customDefaultsAssignIn.js +29 -0
- package/node_modules/lodash-es/_customDefaultsMerge.js +28 -0
- package/node_modules/lodash-es/_customOmitClone.js +16 -0
- package/node_modules/lodash-es/_deburrLetter.js +71 -0
- package/node_modules/lodash-es/_defineProperty.js +11 -0
- package/node_modules/lodash-es/_equalArrays.js +84 -0
- package/node_modules/lodash-es/_equalByTag.js +112 -0
- package/node_modules/lodash-es/_equalObjects.js +90 -0
- package/node_modules/lodash-es/_escapeHtmlChar.js +21 -0
- package/node_modules/lodash-es/_escapeStringChar.js +22 -0
- package/node_modules/lodash-es/_flatRest.js +16 -0
- package/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/node_modules/lodash-es/_getAllKeys.js +16 -0
- package/node_modules/lodash-es/_getAllKeysIn.js +17 -0
- package/node_modules/lodash-es/_getData.js +15 -0
- package/node_modules/lodash-es/_getFuncName.js +31 -0
- package/node_modules/lodash-es/_getHolder.js +13 -0
- package/node_modules/lodash-es/_getMapData.js +18 -0
- package/node_modules/lodash-es/_getMatchData.js +24 -0
- package/node_modules/lodash-es/_getNative.js +17 -0
- package/node_modules/lodash-es/_getPrototype.js +6 -0
- package/node_modules/lodash-es/_getRawTag.js +46 -0
- package/node_modules/lodash-es/_getSymbols.js +30 -0
- package/node_modules/lodash-es/_getSymbolsIn.js +25 -0
- package/node_modules/lodash-es/_getTag.js +58 -0
- package/node_modules/lodash-es/_getValue.js +13 -0
- package/node_modules/lodash-es/_getView.js +33 -0
- package/node_modules/lodash-es/_getWrapDetails.js +17 -0
- package/node_modules/lodash-es/_hasPath.js +39 -0
- package/node_modules/lodash-es/_hasUnicode.js +26 -0
- package/node_modules/lodash-es/_hasUnicodeWord.js +15 -0
- package/node_modules/lodash-es/_hashClear.js +15 -0
- package/node_modules/lodash-es/_hashDelete.js +17 -0
- package/node_modules/lodash-es/_hashGet.js +30 -0
- package/node_modules/lodash-es/_hashHas.js +23 -0
- package/node_modules/lodash-es/_hashSet.js +23 -0
- package/node_modules/lodash-es/_initCloneArray.js +26 -0
- package/node_modules/lodash-es/_initCloneByTag.js +77 -0
- package/node_modules/lodash-es/_initCloneObject.js +18 -0
- package/node_modules/lodash-es/_insertWrapDetails.js +23 -0
- package/node_modules/lodash-es/_isFlattenable.js +20 -0
- package/node_modules/lodash-es/_isIndex.js +25 -0
- package/node_modules/lodash-es/_isIterateeCall.js +30 -0
- package/node_modules/lodash-es/_isKey.js +29 -0
- package/node_modules/lodash-es/_isKeyable.js +15 -0
- package/node_modules/lodash-es/_isLaziable.js +28 -0
- package/node_modules/lodash-es/_isMaskable.js +14 -0
- package/node_modules/lodash-es/_isMasked.js +20 -0
- package/node_modules/lodash-es/_isPrototype.js +18 -0
- package/node_modules/lodash-es/_isStrictComparable.js +15 -0
- package/node_modules/lodash-es/_iteratorToArray.js +18 -0
- package/node_modules/lodash-es/_lazyClone.js +23 -0
- package/node_modules/lodash-es/_lazyReverse.js +23 -0
- package/node_modules/lodash-es/_lazyValue.js +69 -0
- package/node_modules/lodash-es/_listCacheClear.js +13 -0
- package/node_modules/lodash-es/_listCacheDelete.js +35 -0
- package/node_modules/lodash-es/_listCacheGet.js +19 -0
- package/node_modules/lodash-es/_listCacheHas.js +16 -0
- package/node_modules/lodash-es/_listCacheSet.js +26 -0
- package/node_modules/lodash-es/_mapCacheClear.js +21 -0
- package/node_modules/lodash-es/_mapCacheDelete.js +18 -0
- package/node_modules/lodash-es/_mapCacheGet.js +16 -0
- package/node_modules/lodash-es/_mapCacheHas.js +16 -0
- package/node_modules/lodash-es/_mapCacheSet.js +22 -0
- package/node_modules/lodash-es/_mapToArray.js +18 -0
- package/node_modules/lodash-es/_matchesStrictComparable.js +20 -0
- package/node_modules/lodash-es/_memoizeCapped.js +26 -0
- package/node_modules/lodash-es/_mergeData.js +90 -0
- package/node_modules/lodash-es/_metaMap.js +6 -0
- package/node_modules/lodash-es/_nativeCreate.js +6 -0
- package/node_modules/lodash-es/_nativeKeys.js +6 -0
- package/node_modules/lodash-es/_nativeKeysIn.js +20 -0
- package/node_modules/lodash-es/_nodeUtil.js +30 -0
- package/node_modules/lodash-es/_objectToString.js +22 -0
- package/node_modules/lodash-es/_overArg.js +15 -0
- package/node_modules/lodash-es/_overRest.js +36 -0
- package/node_modules/lodash-es/_parent.js +16 -0
- package/node_modules/lodash-es/_reEscape.js +4 -0
- package/node_modules/lodash-es/_reEvaluate.js +4 -0
- package/node_modules/lodash-es/_reInterpolate.js +4 -0
- package/node_modules/lodash-es/_realNames.js +4 -0
- package/node_modules/lodash-es/_reorder.js +29 -0
- package/node_modules/lodash-es/_replaceHolders.js +29 -0
- package/node_modules/lodash-es/_root.js +9 -0
- package/node_modules/lodash-es/_safeGet.js +21 -0
- package/node_modules/lodash-es/_setCacheAdd.js +19 -0
- package/node_modules/lodash-es/_setCacheHas.js +14 -0
- package/node_modules/lodash-es/_setData.js +20 -0
- package/node_modules/lodash-es/_setToArray.js +18 -0
- package/node_modules/lodash-es/_setToPairs.js +18 -0
- package/node_modules/lodash-es/_setToString.js +14 -0
- package/node_modules/lodash-es/_setWrapToString.js +21 -0
- package/node_modules/lodash-es/_shortOut.js +37 -0
- package/node_modules/lodash-es/_shuffleSelf.js +28 -0
- package/node_modules/lodash-es/_stackClear.js +15 -0
- package/node_modules/lodash-es/_stackDelete.js +18 -0
- package/node_modules/lodash-es/_stackGet.js +14 -0
- package/node_modules/lodash-es/_stackHas.js +14 -0
- package/node_modules/lodash-es/_stackSet.js +34 -0
- package/node_modules/lodash-es/_strictIndexOf.js +23 -0
- package/node_modules/lodash-es/_strictLastIndexOf.js +21 -0
- package/node_modules/lodash-es/_stringSize.js +18 -0
- package/node_modules/lodash-es/_stringToArray.js +18 -0
- package/node_modules/lodash-es/_stringToPath.js +27 -0
- package/node_modules/lodash-es/_toKey.js +21 -0
- package/node_modules/lodash-es/_toSource.js +26 -0
- package/node_modules/lodash-es/_trimmedEndIndex.js +19 -0
- package/node_modules/lodash-es/_unescapeHtmlChar.js +21 -0
- package/node_modules/lodash-es/_unicodeSize.js +44 -0
- package/node_modules/lodash-es/_unicodeToArray.js +40 -0
- package/node_modules/lodash-es/_unicodeWords.js +69 -0
- package/node_modules/lodash-es/_updateWrapDetails.js +46 -0
- package/node_modules/lodash-es/_wrapperClone.js +23 -0
- package/node_modules/lodash-es/add.js +22 -0
- package/node_modules/lodash-es/after.js +42 -0
- package/node_modules/lodash-es/array.default.js +81 -0
- package/node_modules/lodash-es/array.js +66 -0
- package/node_modules/lodash-es/ary.js +29 -0
- package/node_modules/lodash-es/assign.js +58 -0
- package/node_modules/lodash-es/assignIn.js +40 -0
- package/node_modules/lodash-es/assignInWith.js +38 -0
- package/node_modules/lodash-es/assignWith.js +37 -0
- package/node_modules/lodash-es/at.js +23 -0
- package/node_modules/lodash-es/attempt.js +35 -0
- package/node_modules/lodash-es/before.js +40 -0
- package/node_modules/lodash-es/bind.js +57 -0
- package/node_modules/lodash-es/bindAll.js +41 -0
- package/node_modules/lodash-es/bindKey.js +68 -0
- package/node_modules/lodash-es/camelCase.js +29 -0
- package/node_modules/lodash-es/capitalize.js +23 -0
- package/node_modules/lodash-es/castArray.js +44 -0
- package/node_modules/lodash-es/ceil.js +26 -0
- package/node_modules/lodash-es/chain.js +38 -0
- package/node_modules/lodash-es/chunk.js +50 -0
- package/node_modules/lodash-es/clamp.js +39 -0
- package/node_modules/lodash-es/clone.js +36 -0
- package/node_modules/lodash-es/cloneDeep.js +29 -0
- package/node_modules/lodash-es/cloneDeepWith.js +40 -0
- package/node_modules/lodash-es/cloneWith.js +42 -0
- package/node_modules/lodash-es/collection.default.js +37 -0
- package/node_modules/lodash-es/collection.js +29 -0
- package/node_modules/lodash-es/commit.js +33 -0
- package/node_modules/lodash-es/compact.js +31 -0
- package/node_modules/lodash-es/concat.js +43 -0
- package/node_modules/lodash-es/cond.js +60 -0
- package/node_modules/lodash-es/conforms.js +35 -0
- package/node_modules/lodash-es/conformsTo.js +32 -0
- package/node_modules/lodash-es/constant.js +26 -0
- package/node_modules/lodash-es/countBy.js +40 -0
- package/node_modules/lodash-es/create.js +43 -0
- package/node_modules/lodash-es/curry.js +57 -0
- package/node_modules/lodash-es/curryRight.js +54 -0
- package/node_modules/lodash-es/date.default.js +5 -0
- package/node_modules/lodash-es/date.js +2 -0
- package/node_modules/lodash-es/debounce.js +191 -0
- package/node_modules/lodash-es/deburr.js +45 -0
- package/node_modules/lodash-es/defaultTo.js +25 -0
- package/node_modules/lodash-es/defaults.js +64 -0
- package/node_modules/lodash-es/defaultsDeep.js +30 -0
- package/node_modules/lodash-es/defer.js +26 -0
- package/node_modules/lodash-es/delay.js +28 -0
- package/node_modules/lodash-es/difference.js +33 -0
- package/node_modules/lodash-es/differenceBy.js +44 -0
- package/node_modules/lodash-es/differenceWith.js +40 -0
- package/node_modules/lodash-es/divide.js +22 -0
- package/node_modules/lodash-es/drop.js +38 -0
- package/node_modules/lodash-es/dropRight.js +39 -0
- package/node_modules/lodash-es/dropRightWhile.js +45 -0
- package/node_modules/lodash-es/dropWhile.js +45 -0
- package/node_modules/lodash-es/each.js +1 -0
- package/node_modules/lodash-es/eachRight.js +1 -0
- package/node_modules/lodash-es/endsWith.js +43 -0
- package/node_modules/lodash-es/entries.js +1 -0
- package/node_modules/lodash-es/entriesIn.js +1 -0
- package/node_modules/lodash-es/eq.js +37 -0
- package/node_modules/lodash-es/escape.js +43 -0
- package/node_modules/lodash-es/escapeRegExp.js +32 -0
- package/node_modules/lodash-es/every.js +56 -0
- package/node_modules/lodash-es/extend.js +1 -0
- package/node_modules/lodash-es/extendWith.js +1 -0
- package/node_modules/lodash-es/fill.js +45 -0
- package/node_modules/lodash-es/filter.js +52 -0
- package/node_modules/lodash-es/find.js +42 -0
- package/node_modules/lodash-es/findIndex.js +55 -0
- package/node_modules/lodash-es/findKey.js +44 -0
- package/node_modules/lodash-es/findLast.js +25 -0
- package/node_modules/lodash-es/findLastIndex.js +59 -0
- package/node_modules/lodash-es/findLastKey.js +44 -0
- package/node_modules/lodash-es/first.js +1 -0
- package/node_modules/lodash-es/flatMap.js +29 -0
- package/node_modules/lodash-es/flatMapDeep.js +31 -0
- package/node_modules/lodash-es/flatMapDepth.js +31 -0
- package/node_modules/lodash-es/flatten.js +22 -0
- package/node_modules/lodash-es/flattenDeep.js +25 -0
- package/node_modules/lodash-es/flattenDepth.js +33 -0
- package/node_modules/lodash-es/flip.js +28 -0
- package/node_modules/lodash-es/floor.js +26 -0
- package/node_modules/lodash-es/flow.js +27 -0
- package/node_modules/lodash-es/flowRight.js +26 -0
- package/node_modules/lodash-es/forEach.js +41 -0
- package/node_modules/lodash-es/forEachRight.js +31 -0
- package/node_modules/lodash-es/forIn.js +39 -0
- package/node_modules/lodash-es/forInRight.js +37 -0
- package/node_modules/lodash-es/forOwn.js +36 -0
- package/node_modules/lodash-es/forOwnRight.js +34 -0
- package/node_modules/lodash-es/fromPairs.js +30 -0
- package/node_modules/lodash-es/function.default.js +31 -0
- package/node_modules/lodash-es/function.js +24 -0
- package/node_modules/lodash-es/functions.js +31 -0
- package/node_modules/lodash-es/functionsIn.js +31 -0
- package/node_modules/lodash-es/get.js +33 -0
- package/node_modules/lodash-es/groupBy.js +41 -0
- package/node_modules/lodash-es/gt.js +29 -0
- package/node_modules/lodash-es/gte.js +30 -0
- package/node_modules/lodash-es/has.js +35 -0
- package/node_modules/lodash-es/hasIn.js +34 -0
- package/node_modules/lodash-es/head.js +23 -0
- package/node_modules/lodash-es/identity.js +21 -0
- package/node_modules/lodash-es/inRange.js +55 -0
- package/node_modules/lodash-es/includes.js +53 -0
- package/node_modules/lodash-es/indexOf.js +42 -0
- package/node_modules/lodash-es/initial.js +22 -0
- package/node_modules/lodash-es/intersection.js +30 -0
- package/node_modules/lodash-es/intersectionBy.js +45 -0
- package/node_modules/lodash-es/intersectionWith.js +41 -0
- package/node_modules/lodash-es/invert.js +42 -0
- package/node_modules/lodash-es/invertBy.js +56 -0
- package/node_modules/lodash-es/invoke.js +24 -0
- package/node_modules/lodash-es/invokeMap.js +41 -0
- package/node_modules/lodash-es/isArguments.js +36 -0
- package/node_modules/lodash-es/isArray.js +26 -0
- package/node_modules/lodash-es/isArrayBuffer.js +27 -0
- package/node_modules/lodash-es/isArrayLike.js +33 -0
- package/node_modules/lodash-es/isArrayLikeObject.js +33 -0
- package/node_modules/lodash-es/isBoolean.js +29 -0
- package/node_modules/lodash-es/isBuffer.js +38 -0
- package/node_modules/lodash-es/isDate.js +27 -0
- package/node_modules/lodash-es/isElement.js +25 -0
- package/node_modules/lodash-es/isEmpty.js +77 -0
- package/node_modules/lodash-es/isEqual.js +35 -0
- package/node_modules/lodash-es/isEqualWith.js +41 -0
- package/node_modules/lodash-es/isError.js +36 -0
- package/node_modules/lodash-es/isFinite.js +36 -0
- package/node_modules/lodash-es/isFunction.js +37 -0
- package/node_modules/lodash-es/isInteger.js +33 -0
- package/node_modules/lodash-es/isLength.js +35 -0
- package/node_modules/lodash-es/isMap.js +27 -0
- package/node_modules/lodash-es/isMatch.js +36 -0
- package/node_modules/lodash-es/isMatchWith.js +41 -0
- package/node_modules/lodash-es/isNaN.js +38 -0
- package/node_modules/lodash-es/isNative.js +40 -0
- package/node_modules/lodash-es/isNil.js +25 -0
- package/node_modules/lodash-es/isNull.js +22 -0
- package/node_modules/lodash-es/isNumber.js +38 -0
- package/node_modules/lodash-es/isObject.js +31 -0
- package/node_modules/lodash-es/isObjectLike.js +29 -0
- package/node_modules/lodash-es/isPlainObject.js +62 -0
- package/node_modules/lodash-es/isRegExp.js +27 -0
- package/node_modules/lodash-es/isSafeInteger.js +37 -0
- package/node_modules/lodash-es/isSet.js +27 -0
- package/node_modules/lodash-es/isString.js +30 -0
- package/node_modules/lodash-es/isSymbol.js +29 -0
- package/node_modules/lodash-es/isTypedArray.js +27 -0
- package/node_modules/lodash-es/isUndefined.js +22 -0
- package/node_modules/lodash-es/isWeakMap.js +28 -0
- package/node_modules/lodash-es/isWeakSet.js +28 -0
- package/node_modules/lodash-es/iteratee.js +53 -0
- package/node_modules/lodash-es/join.js +26 -0
- package/node_modules/lodash-es/kebabCase.js +28 -0
- package/node_modules/lodash-es/keyBy.js +36 -0
- package/node_modules/lodash-es/keys.js +37 -0
- package/node_modules/lodash-es/keysIn.js +32 -0
- package/node_modules/lodash-es/lang.default.js +71 -0
- package/node_modules/lodash-es/lang.js +57 -0
- package/node_modules/lodash-es/last.js +20 -0
- package/node_modules/lodash-es/lastIndexOf.js +46 -0
- package/node_modules/lodash-es/lodash.default.js +643 -0
- package/node_modules/lodash-es/lodash.js +331 -0
- package/node_modules/lodash-es/lowerCase.js +27 -0
- package/node_modules/lodash-es/lowerFirst.js +22 -0
- package/node_modules/lodash-es/lt.js +29 -0
- package/node_modules/lodash-es/lte.js +30 -0
- package/node_modules/lodash-es/map.js +53 -0
- package/node_modules/lodash-es/mapKeys.js +36 -0
- package/node_modules/lodash-es/mapValues.js +43 -0
- package/node_modules/lodash-es/matches.js +46 -0
- package/node_modules/lodash-es/matchesProperty.js +44 -0
- package/node_modules/lodash-es/math.default.js +21 -0
- package/node_modules/lodash-es/math.js +16 -0
- package/node_modules/lodash-es/max.js +29 -0
- package/node_modules/lodash-es/maxBy.js +34 -0
- package/node_modules/lodash-es/mean.js +22 -0
- package/node_modules/lodash-es/meanBy.js +31 -0
- package/node_modules/lodash-es/memoize.js +73 -0
- package/node_modules/lodash-es/merge.js +39 -0
- package/node_modules/lodash-es/mergeWith.js +39 -0
- package/node_modules/lodash-es/method.js +34 -0
- package/node_modules/lodash-es/methodOf.js +33 -0
- package/node_modules/lodash-es/min.js +29 -0
- package/node_modules/lodash-es/minBy.js +34 -0
- package/node_modules/lodash-es/mixin.js +74 -0
- package/node_modules/lodash-es/multiply.js +22 -0
- package/node_modules/lodash-es/negate.js +40 -0
- package/node_modules/lodash-es/next.js +35 -0
- package/node_modules/lodash-es/noop.js +17 -0
- package/node_modules/lodash-es/now.js +23 -0
- package/node_modules/lodash-es/nth.js +29 -0
- package/node_modules/lodash-es/nthArg.js +32 -0
- package/node_modules/lodash-es/number.default.js +7 -0
- package/node_modules/lodash-es/number.js +4 -0
- package/node_modules/lodash-es/object.default.js +60 -0
- package/node_modules/lodash-es/object.js +48 -0
- package/node_modules/lodash-es/omit.js +57 -0
- package/node_modules/lodash-es/omitBy.js +29 -0
- package/node_modules/lodash-es/once.js +25 -0
- package/node_modules/lodash-es/orderBy.js +47 -0
- package/node_modules/lodash-es/over.js +24 -0
- package/node_modules/lodash-es/overArgs.js +61 -0
- package/node_modules/lodash-es/overEvery.js +34 -0
- package/node_modules/lodash-es/overSome.js +37 -0
- package/node_modules/lodash-es/package.json +23 -0
- package/node_modules/lodash-es/pad.js +49 -0
- package/node_modules/lodash-es/padEnd.js +39 -0
- package/node_modules/lodash-es/padStart.js +39 -0
- package/node_modules/lodash-es/parseInt.js +43 -0
- package/node_modules/lodash-es/partial.js +50 -0
- package/node_modules/lodash-es/partialRight.js +49 -0
- package/node_modules/lodash-es/partition.js +43 -0
- package/node_modules/lodash-es/pick.js +25 -0
- package/node_modules/lodash-es/pickBy.js +37 -0
- package/node_modules/lodash-es/plant.js +48 -0
- package/node_modules/lodash-es/property.js +32 -0
- package/node_modules/lodash-es/propertyOf.js +30 -0
- package/node_modules/lodash-es/pull.js +29 -0
- package/node_modules/lodash-es/pullAll.js +29 -0
- package/node_modules/lodash-es/pullAllBy.js +33 -0
- package/node_modules/lodash-es/pullAllWith.js +32 -0
- package/node_modules/lodash-es/pullAt.js +43 -0
- package/node_modules/lodash-es/random.js +91 -0
- package/node_modules/lodash-es/range.js +46 -0
- package/node_modules/lodash-es/rangeRight.js +41 -0
- package/node_modules/lodash-es/rearg.js +33 -0
- package/node_modules/lodash-es/reduce.js +51 -0
- package/node_modules/lodash-es/reduceRight.js +36 -0
- package/node_modules/lodash-es/reject.js +46 -0
- package/node_modules/lodash-es/remove.js +53 -0
- package/node_modules/lodash-es/repeat.js +37 -0
- package/node_modules/lodash-es/replace.js +29 -0
- package/node_modules/lodash-es/rest.js +40 -0
- package/node_modules/lodash-es/result.js +56 -0
- package/node_modules/lodash-es/reverse.js +34 -0
- package/node_modules/lodash-es/round.js +26 -0
- package/node_modules/lodash-es/sample.js +24 -0
- package/node_modules/lodash-es/sampleSize.js +37 -0
- package/node_modules/lodash-es/seq.default.js +20 -0
- package/node_modules/lodash-es/seq.js +15 -0
- package/node_modules/lodash-es/set.js +35 -0
- package/node_modules/lodash-es/setWith.js +32 -0
- package/node_modules/lodash-es/shuffle.js +25 -0
- package/node_modules/lodash-es/size.js +46 -0
- package/node_modules/lodash-es/slice.js +37 -0
- package/node_modules/lodash-es/snakeCase.js +28 -0
- package/node_modules/lodash-es/some.js +51 -0
- package/node_modules/lodash-es/sortBy.js +48 -0
- package/node_modules/lodash-es/sortedIndex.js +24 -0
- package/node_modules/lodash-es/sortedIndexBy.js +33 -0
- package/node_modules/lodash-es/sortedIndexOf.js +31 -0
- package/node_modules/lodash-es/sortedLastIndex.js +25 -0
- package/node_modules/lodash-es/sortedLastIndexBy.js +33 -0
- package/node_modules/lodash-es/sortedLastIndexOf.js +31 -0
- package/node_modules/lodash-es/sortedUniq.js +24 -0
- package/node_modules/lodash-es/sortedUniqBy.js +26 -0
- package/node_modules/lodash-es/split.js +52 -0
- package/node_modules/lodash-es/spread.js +63 -0
- package/node_modules/lodash-es/startCase.js +29 -0
- package/node_modules/lodash-es/startsWith.js +39 -0
- package/node_modules/lodash-es/string.default.js +41 -0
- package/node_modules/lodash-es/string.js +32 -0
- package/node_modules/lodash-es/stubArray.js +23 -0
- package/node_modules/lodash-es/stubFalse.js +18 -0
- package/node_modules/lodash-es/stubObject.js +23 -0
- package/node_modules/lodash-es/stubString.js +18 -0
- package/node_modules/lodash-es/stubTrue.js +18 -0
- package/node_modules/lodash-es/subtract.js +22 -0
- package/node_modules/lodash-es/sum.js +24 -0
- package/node_modules/lodash-es/sumBy.js +33 -0
- package/node_modules/lodash-es/tail.js +22 -0
- package/node_modules/lodash-es/take.js +37 -0
- package/node_modules/lodash-es/takeRight.js +39 -0
- package/node_modules/lodash-es/takeRightWhile.js +45 -0
- package/node_modules/lodash-es/takeWhile.js +45 -0
- package/node_modules/lodash-es/tap.js +29 -0
- package/node_modules/lodash-es/template.js +284 -0
- package/node_modules/lodash-es/templateSettings.js +71 -0
- package/node_modules/lodash-es/throttle.js +69 -0
- package/node_modules/lodash-es/thru.js +28 -0
- package/node_modules/lodash-es/times.js +51 -0
- package/node_modules/lodash-es/toArray.js +58 -0
- package/node_modules/lodash-es/toFinite.js +42 -0
- package/node_modules/lodash-es/toInteger.js +36 -0
- package/node_modules/lodash-es/toIterator.js +23 -0
- package/node_modules/lodash-es/toJSON.js +1 -0
- package/node_modules/lodash-es/toLength.js +38 -0
- package/node_modules/lodash-es/toLower.js +28 -0
- package/node_modules/lodash-es/toNumber.js +64 -0
- package/node_modules/lodash-es/toPairs.js +30 -0
- package/node_modules/lodash-es/toPairsIn.js +30 -0
- package/node_modules/lodash-es/toPath.js +33 -0
- package/node_modules/lodash-es/toPlainObject.js +32 -0
- package/node_modules/lodash-es/toSafeInteger.js +37 -0
- package/node_modules/lodash-es/toString.js +28 -0
- package/node_modules/lodash-es/toUpper.js +28 -0
- package/node_modules/lodash-es/transform.js +65 -0
- package/node_modules/lodash-es/trim.js +47 -0
- package/node_modules/lodash-es/trimEnd.js +41 -0
- package/node_modules/lodash-es/trimStart.js +43 -0
- package/node_modules/lodash-es/truncate.js +111 -0
- package/node_modules/lodash-es/unary.js +22 -0
- package/node_modules/lodash-es/unescape.js +34 -0
- package/node_modules/lodash-es/union.js +26 -0
- package/node_modules/lodash-es/unionBy.js +39 -0
- package/node_modules/lodash-es/unionWith.js +34 -0
- package/node_modules/lodash-es/uniq.js +25 -0
- package/node_modules/lodash-es/uniqBy.js +31 -0
- package/node_modules/lodash-es/uniqWith.js +28 -0
- package/node_modules/lodash-es/uniqueId.js +28 -0
- package/node_modules/lodash-es/unset.js +34 -0
- package/node_modules/lodash-es/unzip.js +45 -0
- package/node_modules/lodash-es/unzipWith.js +39 -0
- package/node_modules/lodash-es/update.js +35 -0
- package/node_modules/lodash-es/updateWith.js +33 -0
- package/node_modules/lodash-es/upperCase.js +27 -0
- package/node_modules/lodash-es/upperFirst.js +22 -0
- package/node_modules/lodash-es/util.default.js +42 -0
- package/node_modules/lodash-es/util.js +33 -0
- package/node_modules/lodash-es/value.js +1 -0
- package/node_modules/lodash-es/valueOf.js +1 -0
- package/node_modules/lodash-es/values.js +34 -0
- package/node_modules/lodash-es/valuesIn.js +32 -0
- package/node_modules/lodash-es/without.js +31 -0
- package/node_modules/lodash-es/words.js +35 -0
- package/node_modules/lodash-es/wrap.js +30 -0
- package/node_modules/lodash-es/wrapperAt.js +48 -0
- package/node_modules/lodash-es/wrapperChain.js +34 -0
- package/node_modules/lodash-es/wrapperLodash.js +147 -0
- package/node_modules/lodash-es/wrapperReverse.js +44 -0
- package/node_modules/lodash-es/wrapperValue.js +21 -0
- package/node_modules/lodash-es/xor.js +28 -0
- package/node_modules/lodash-es/xorBy.js +39 -0
- package/node_modules/lodash-es/xorWith.js +34 -0
- package/node_modules/lodash-es/zip.js +22 -0
- package/node_modules/lodash-es/zipObject.js +24 -0
- package/node_modules/lodash-es/zipObjectDeep.js +23 -0
- package/node_modules/lodash-es/zipWith.js +32 -0
- package/node_modules/lodash.debounce/LICENSE +47 -0
- package/node_modules/lodash.debounce/README.md +18 -0
- package/node_modules/lodash.debounce/index.js +377 -0
- package/node_modules/lodash.debounce/package.json +17 -0
- package/node_modules/require-from-string/index.js +34 -0
- package/node_modules/require-from-string/license +21 -0
- package/node_modules/require-from-string/package.json +28 -0
- package/node_modules/require-from-string/readme.md +56 -0
- package/node_modules/semver/LICENSE +15 -0
- package/node_modules/semver/README.md +665 -0
- package/node_modules/semver/bin/semver.js +191 -0
- package/node_modules/semver/classes/comparator.js +143 -0
- package/node_modules/semver/classes/index.js +7 -0
- package/node_modules/semver/classes/range.js +557 -0
- package/node_modules/semver/classes/semver.js +333 -0
- package/node_modules/semver/functions/clean.js +8 -0
- package/node_modules/semver/functions/cmp.js +54 -0
- package/node_modules/semver/functions/coerce.js +62 -0
- package/node_modules/semver/functions/compare-build.js +9 -0
- package/node_modules/semver/functions/compare-loose.js +5 -0
- package/node_modules/semver/functions/compare.js +7 -0
- package/node_modules/semver/functions/diff.js +60 -0
- package/node_modules/semver/functions/eq.js +5 -0
- package/node_modules/semver/functions/gt.js +5 -0
- package/node_modules/semver/functions/gte.js +5 -0
- package/node_modules/semver/functions/inc.js +21 -0
- package/node_modules/semver/functions/lt.js +5 -0
- package/node_modules/semver/functions/lte.js +5 -0
- package/node_modules/semver/functions/major.js +5 -0
- package/node_modules/semver/functions/minor.js +5 -0
- package/node_modules/semver/functions/neq.js +5 -0
- package/node_modules/semver/functions/parse.js +18 -0
- package/node_modules/semver/functions/patch.js +5 -0
- package/node_modules/semver/functions/prerelease.js +8 -0
- package/node_modules/semver/functions/rcompare.js +5 -0
- package/node_modules/semver/functions/rsort.js +5 -0
- package/node_modules/semver/functions/satisfies.js +12 -0
- package/node_modules/semver/functions/sort.js +5 -0
- package/node_modules/semver/functions/valid.js +8 -0
- package/node_modules/semver/index.js +91 -0
- package/node_modules/semver/internal/constants.js +37 -0
- package/node_modules/semver/internal/debug.js +11 -0
- package/node_modules/semver/internal/identifiers.js +29 -0
- package/node_modules/semver/internal/lrucache.js +42 -0
- package/node_modules/semver/internal/parse-options.js +17 -0
- package/node_modules/semver/internal/re.js +223 -0
- package/node_modules/semver/package.json +78 -0
- package/node_modules/semver/preload.js +4 -0
- package/node_modules/semver/range.bnf +16 -0
- package/node_modules/semver/ranges/gtr.js +6 -0
- package/node_modules/semver/ranges/intersects.js +9 -0
- package/node_modules/semver/ranges/ltr.js +6 -0
- package/node_modules/semver/ranges/max-satisfying.js +27 -0
- package/node_modules/semver/ranges/min-satisfying.js +26 -0
- package/node_modules/semver/ranges/min-version.js +63 -0
- package/node_modules/semver/ranges/outside.js +82 -0
- package/node_modules/semver/ranges/simplify.js +49 -0
- package/node_modules/semver/ranges/subset.js +249 -0
- package/node_modules/semver/ranges/to-comparators.js +10 -0
- package/node_modules/semver/ranges/valid.js +13 -0
- package/node_modules/signal-exit/LICENSE.txt +16 -0
- package/node_modules/signal-exit/README.md +74 -0
- package/node_modules/signal-exit/dist/cjs/browser.d.ts +12 -0
- package/node_modules/signal-exit/dist/cjs/browser.d.ts.map +1 -0
- package/node_modules/signal-exit/dist/cjs/browser.js +10 -0
- package/node_modules/signal-exit/dist/cjs/browser.js.map +1 -0
- package/node_modules/signal-exit/dist/cjs/index.d.ts +48 -0
- package/node_modules/signal-exit/dist/cjs/index.d.ts.map +1 -0
- package/node_modules/signal-exit/dist/cjs/index.js +279 -0
- package/node_modules/signal-exit/dist/cjs/index.js.map +1 -0
- package/node_modules/signal-exit/dist/cjs/package.json +3 -0
- package/node_modules/signal-exit/dist/cjs/signals.d.ts +29 -0
- package/node_modules/signal-exit/dist/cjs/signals.d.ts.map +1 -0
- package/node_modules/signal-exit/dist/cjs/signals.js +42 -0
- package/node_modules/signal-exit/dist/cjs/signals.js.map +1 -0
- package/node_modules/signal-exit/dist/mjs/browser.d.ts +12 -0
- package/node_modules/signal-exit/dist/mjs/browser.d.ts.map +1 -0
- package/node_modules/signal-exit/dist/mjs/browser.js +4 -0
- package/node_modules/signal-exit/dist/mjs/browser.js.map +1 -0
- package/node_modules/signal-exit/dist/mjs/index.d.ts +48 -0
- package/node_modules/signal-exit/dist/mjs/index.d.ts.map +1 -0
- package/node_modules/signal-exit/dist/mjs/index.js +275 -0
- package/node_modules/signal-exit/dist/mjs/index.js.map +1 -0
- package/node_modules/signal-exit/dist/mjs/package.json +3 -0
- package/node_modules/signal-exit/dist/mjs/signals.d.ts +29 -0
- package/node_modules/signal-exit/dist/mjs/signals.d.ts.map +1 -0
- package/node_modules/signal-exit/dist/mjs/signals.js +39 -0
- package/node_modules/signal-exit/dist/mjs/signals.js.map +1 -0
- package/node_modules/signal-exit/package.json +106 -0
- package/node_modules/slice-ansi/index.d.ts +19 -0
- package/node_modules/slice-ansi/index.js +169 -0
- package/node_modules/slice-ansi/license +10 -0
- package/node_modules/slice-ansi/package.json +58 -0
- package/node_modules/slice-ansi/readme.md +54 -0
- package/node_modules/stack-utils/LICENSE.md +21 -0
- package/node_modules/stack-utils/index.js +344 -0
- package/node_modules/stack-utils/package.json +39 -0
- package/node_modules/stack-utils/readme.md +143 -0
- package/node_modules/string-width/index.d.ts +39 -0
- package/node_modules/string-width/index.js +82 -0
- package/node_modules/string-width/license +9 -0
- package/node_modules/string-width/package.json +64 -0
- package/node_modules/string-width/readme.md +66 -0
- package/node_modules/strip-ansi/index.d.ts +15 -0
- package/node_modules/strip-ansi/index.js +19 -0
- package/node_modules/strip-ansi/license +9 -0
- package/node_modules/strip-ansi/package.json +59 -0
- package/node_modules/strip-ansi/readme.md +37 -0
- package/node_modules/supports-hyperlinks/browser.js +10 -0
- package/node_modules/supports-hyperlinks/index.d.ts +25 -0
- package/node_modules/supports-hyperlinks/index.js +157 -0
- package/node_modules/supports-hyperlinks/license +10 -0
- package/node_modules/supports-hyperlinks/node_modules/has-flag/index.d.ts +39 -0
- package/node_modules/supports-hyperlinks/node_modules/has-flag/index.js +8 -0
- package/node_modules/supports-hyperlinks/node_modules/has-flag/license +9 -0
- package/node_modules/supports-hyperlinks/node_modules/has-flag/package.json +49 -0
- package/node_modules/supports-hyperlinks/node_modules/has-flag/readme.md +74 -0
- package/node_modules/supports-hyperlinks/node_modules/supports-color/browser.d.ts +1 -0
- package/node_modules/supports-hyperlinks/node_modules/supports-color/browser.js +35 -0
- package/node_modules/supports-hyperlinks/node_modules/supports-color/index.d.ts +55 -0
- package/node_modules/supports-hyperlinks/node_modules/supports-color/index.js +202 -0
- package/node_modules/supports-hyperlinks/node_modules/supports-color/license +9 -0
- package/node_modules/supports-hyperlinks/node_modules/supports-color/package.json +64 -0
- package/node_modules/supports-hyperlinks/node_modules/supports-color/readme.md +75 -0
- package/node_modules/supports-hyperlinks/package.json +47 -0
- package/node_modules/supports-hyperlinks/readme.md +39 -0
- package/node_modules/tagged-tag/index.d.ts +3 -0
- package/node_modules/tagged-tag/license +9 -0
- package/node_modules/tagged-tag/package.json +36 -0
- package/node_modules/tagged-tag/readme.md +5 -0
- package/node_modules/type-fest/index.d.ts +221 -0
- package/node_modules/type-fest/license-cc0 +121 -0
- package/node_modules/type-fest/license-mit +9 -0
- package/node_modules/type-fest/package.json +75 -0
- package/node_modules/type-fest/readme.md +1077 -0
- package/node_modules/type-fest/source/absolute.d.ts +52 -0
- package/node_modules/type-fest/source/all-extend.d.ts +119 -0
- package/node_modules/type-fest/source/all-union-fields.d.ts +91 -0
- package/node_modules/type-fest/source/and-all.d.ts +76 -0
- package/node_modules/type-fest/source/and.d.ts +82 -0
- package/node_modules/type-fest/source/array-element.d.ts +46 -0
- package/node_modules/type-fest/source/array-indices.d.ts +25 -0
- package/node_modules/type-fest/source/array-length.d.ts +36 -0
- package/node_modules/type-fest/source/array-reverse.d.ts +84 -0
- package/node_modules/type-fest/source/array-slice.d.ts +132 -0
- package/node_modules/type-fest/source/array-splice.d.ts +104 -0
- package/node_modules/type-fest/source/array-tail.d.ts +70 -0
- package/node_modules/type-fest/source/array-values.d.ts +24 -0
- package/node_modules/type-fest/source/arrayable.d.ts +31 -0
- package/node_modules/type-fest/source/async-return-type.d.ts +28 -0
- package/node_modules/type-fest/source/asyncify.d.ts +25 -0
- package/node_modules/type-fest/source/basic.d.ts +38 -0
- package/node_modules/type-fest/source/camel-case.d.ts +125 -0
- package/node_modules/type-fest/source/camel-cased-properties-deep.d.ts +106 -0
- package/node_modules/type-fest/source/camel-cased-properties.d.ts +49 -0
- package/node_modules/type-fest/source/characters.d.ts +67 -0
- package/node_modules/type-fest/source/conditional-except.d.ts +47 -0
- package/node_modules/type-fest/source/conditional-keys.d.ts +63 -0
- package/node_modules/type-fest/source/conditional-pick-deep.d.ts +122 -0
- package/node_modules/type-fest/source/conditional-pick.d.ts +48 -0
- package/node_modules/type-fest/source/conditional-simplify-deep.d.ts +73 -0
- package/node_modules/type-fest/source/conditional-simplify.d.ts +50 -0
- package/node_modules/type-fest/source/delimiter-case.d.ts +78 -0
- package/node_modules/type-fest/source/delimiter-cased-properties-deep.d.ts +115 -0
- package/node_modules/type-fest/source/delimiter-cased-properties.d.ts +52 -0
- package/node_modules/type-fest/source/distributed-omit.d.ts +96 -0
- package/node_modules/type-fest/source/distributed-pick.d.ts +92 -0
- package/node_modules/type-fest/source/empty-object.d.ts +51 -0
- package/node_modules/type-fest/source/entries.d.ts +64 -0
- package/node_modules/type-fest/source/entry.d.ts +67 -0
- package/node_modules/type-fest/source/exact.d.ts +73 -0
- package/node_modules/type-fest/source/except.d.ts +112 -0
- package/node_modules/type-fest/source/exclude-exactly.d.ts +57 -0
- package/node_modules/type-fest/source/exclude-rest-element.d.ts +40 -0
- package/node_modules/type-fest/source/exclude-strict.d.ts +51 -0
- package/node_modules/type-fest/source/exclusify-union.d.ts +147 -0
- package/node_modules/type-fest/source/extends-strict.d.ts +44 -0
- package/node_modules/type-fest/source/extract-rest-element.d.ts +30 -0
- package/node_modules/type-fest/source/extract-strict.d.ts +51 -0
- package/node_modules/type-fest/source/find-global-type.d.ts +68 -0
- package/node_modules/type-fest/source/fixed-length-array.d.ts +97 -0
- package/node_modules/type-fest/source/get.d.ts +227 -0
- package/node_modules/type-fest/source/global-this.d.ts +24 -0
- package/node_modules/type-fest/source/globals/index.d.ts +3 -0
- package/node_modules/type-fest/source/globals/observable-like.d.ts +78 -0
- package/node_modules/type-fest/source/greater-than-or-equal.d.ts +63 -0
- package/node_modules/type-fest/source/greater-than.d.ts +92 -0
- package/node_modules/type-fest/source/has-optional-keys.d.ts +23 -0
- package/node_modules/type-fest/source/has-readonly-keys.d.ts +23 -0
- package/node_modules/type-fest/source/has-required-keys.d.ts +61 -0
- package/node_modules/type-fest/source/has-writable-keys.d.ts +23 -0
- package/node_modules/type-fest/source/if-any.d.ts +28 -0
- package/node_modules/type-fest/source/if-empty-object.d.ts +30 -0
- package/node_modules/type-fest/source/if-never.d.ts +28 -0
- package/node_modules/type-fest/source/if-null.d.ts +28 -0
- package/node_modules/type-fest/source/if-unknown.d.ts +28 -0
- package/node_modules/type-fest/source/if.d.ts +102 -0
- package/node_modules/type-fest/source/includes.d.ts +24 -0
- package/node_modules/type-fest/source/int-closed-range.d.ts +45 -0
- package/node_modules/type-fest/source/int-range.d.ts +67 -0
- package/node_modules/type-fest/source/internal/array.d.ts +144 -0
- package/node_modules/type-fest/source/internal/characters.d.ts +65 -0
- package/node_modules/type-fest/source/internal/enforce-optional.d.ts +49 -0
- package/node_modules/type-fest/source/internal/index.d.ts +11 -0
- package/node_modules/type-fest/source/internal/keys.d.ts +100 -0
- package/node_modules/type-fest/source/internal/numeric.d.ts +141 -0
- package/node_modules/type-fest/source/internal/object.d.ts +292 -0
- package/node_modules/type-fest/source/internal/string.d.ts +202 -0
- package/node_modules/type-fest/source/internal/tuple.d.ts +79 -0
- package/node_modules/type-fest/source/internal/type.d.ts +165 -0
- package/node_modules/type-fest/source/invariant-of.d.ts +85 -0
- package/node_modules/type-fest/source/is-any.d.ts +31 -0
- package/node_modules/type-fest/source/is-equal.d.ts +41 -0
- package/node_modules/type-fest/source/is-float.d.ts +43 -0
- package/node_modules/type-fest/source/is-integer.d.ts +60 -0
- package/node_modules/type-fest/source/is-literal.d.ts +315 -0
- package/node_modules/type-fest/source/is-lowercase.d.ts +38 -0
- package/node_modules/type-fest/source/is-never.d.ts +56 -0
- package/node_modules/type-fest/source/is-null.d.ts +22 -0
- package/node_modules/type-fest/source/is-nullable.d.ts +30 -0
- package/node_modules/type-fest/source/is-optional-key-of.d.ts +51 -0
- package/node_modules/type-fest/source/is-optional.d.ts +28 -0
- package/node_modules/type-fest/source/is-readonly-key-of.d.ts +55 -0
- package/node_modules/type-fest/source/is-required-key-of.d.ts +51 -0
- package/node_modules/type-fest/source/is-tuple.d.ts +92 -0
- package/node_modules/type-fest/source/is-undefined.d.ts +22 -0
- package/node_modules/type-fest/source/is-union.d.ts +40 -0
- package/node_modules/type-fest/source/is-unknown.d.ts +43 -0
- package/node_modules/type-fest/source/is-uppercase.d.ts +38 -0
- package/node_modules/type-fest/source/is-writable-key-of.d.ts +51 -0
- package/node_modules/type-fest/source/iterable-element.d.ts +66 -0
- package/node_modules/type-fest/source/join.d.ts +79 -0
- package/node_modules/type-fest/source/json-value.d.ts +33 -0
- package/node_modules/type-fest/source/jsonifiable.d.ts +37 -0
- package/node_modules/type-fest/source/jsonify.d.ts +127 -0
- package/node_modules/type-fest/source/kebab-case.d.ts +47 -0
- package/node_modules/type-fest/source/kebab-cased-properties-deep.d.ts +72 -0
- package/node_modules/type-fest/source/kebab-cased-properties.d.ts +46 -0
- package/node_modules/type-fest/source/key-as-string.d.ts +27 -0
- package/node_modules/type-fest/source/keys-of-union.d.ts +44 -0
- package/node_modules/type-fest/source/last-array-element.d.ts +36 -0
- package/node_modules/type-fest/source/less-than-or-equal.d.ts +60 -0
- package/node_modules/type-fest/source/less-than.d.ts +60 -0
- package/node_modules/type-fest/source/literal-to-primitive-deep.d.ts +71 -0
- package/node_modules/type-fest/source/literal-to-primitive.d.ts +38 -0
- package/node_modules/type-fest/source/literal-union.d.ts +39 -0
- package/node_modules/type-fest/source/merge-deep.d.ts +495 -0
- package/node_modules/type-fest/source/merge-exclusive.d.ts +45 -0
- package/node_modules/type-fest/source/merge.d.ts +87 -0
- package/node_modules/type-fest/source/multidimensional-array.d.ts +38 -0
- package/node_modules/type-fest/source/multidimensional-readonly-array.d.ts +38 -0
- package/node_modules/type-fest/source/non-empty-object.d.ts +38 -0
- package/node_modules/type-fest/source/non-empty-string.d.ts +32 -0
- package/node_modules/type-fest/source/non-empty-tuple.d.ts +24 -0
- package/node_modules/type-fest/source/non-nullable-deep.d.ts +102 -0
- package/node_modules/type-fest/source/numeric.d.ts +226 -0
- package/node_modules/type-fest/source/object-merge.d.ts +194 -0
- package/node_modules/type-fest/source/omit-deep.d.ts +153 -0
- package/node_modules/type-fest/source/omit-index-signature.d.ts +98 -0
- package/node_modules/type-fest/source/opaque.d.ts +3 -0
- package/node_modules/type-fest/source/optional-keys-of.d.ts +46 -0
- package/node_modules/type-fest/source/optional.d.ts +31 -0
- package/node_modules/type-fest/source/or-all.d.ts +73 -0
- package/node_modules/type-fest/source/or.d.ts +82 -0
- package/node_modules/type-fest/source/override-properties.d.ts +43 -0
- package/node_modules/type-fest/source/package-json.d.ts +710 -0
- package/node_modules/type-fest/source/partial-deep.d.ts +157 -0
- package/node_modules/type-fest/source/partial-on-undefined-deep.d.ts +81 -0
- package/node_modules/type-fest/source/pascal-case.d.ts +52 -0
- package/node_modules/type-fest/source/pascal-cased-properties-deep.d.ts +79 -0
- package/node_modules/type-fest/source/pascal-cased-properties.d.ts +46 -0
- package/node_modules/type-fest/source/paths.d.ts +241 -0
- package/node_modules/type-fest/source/pick-deep.d.ts +139 -0
- package/node_modules/type-fest/source/pick-index-signature.d.ts +52 -0
- package/node_modules/type-fest/source/primitive.d.ts +15 -0
- package/node_modules/type-fest/source/promisable.d.ts +27 -0
- package/node_modules/type-fest/source/readonly-deep.d.ts +118 -0
- package/node_modules/type-fest/source/readonly-keys-of.d.ts +38 -0
- package/node_modules/type-fest/source/readonly-tuple.d.ts +34 -0
- package/node_modules/type-fest/source/remove-prefix.d.ts +132 -0
- package/node_modules/type-fest/source/replace.d.ts +87 -0
- package/node_modules/type-fest/source/require-all-or-none.d.ts +54 -0
- package/node_modules/type-fest/source/require-at-least-one.d.ts +48 -0
- package/node_modules/type-fest/source/require-exactly-one.d.ts +48 -0
- package/node_modules/type-fest/source/require-one-or-none.d.ts +49 -0
- package/node_modules/type-fest/source/required-deep.d.ts +78 -0
- package/node_modules/type-fest/source/required-keys-of.d.ts +38 -0
- package/node_modules/type-fest/source/schema.d.ts +119 -0
- package/node_modules/type-fest/source/screaming-snake-case.d.ts +31 -0
- package/node_modules/type-fest/source/set-field-type.d.ts +67 -0
- package/node_modules/type-fest/source/set-non-nullable-deep.d.ts +88 -0
- package/node_modules/type-fest/source/set-non-nullable.d.ts +34 -0
- package/node_modules/type-fest/source/set-optional.d.ts +42 -0
- package/node_modules/type-fest/source/set-parameter-type.d.ts +125 -0
- package/node_modules/type-fest/source/set-readonly.d.ts +40 -0
- package/node_modules/type-fest/source/set-required-deep.d.ts +64 -0
- package/node_modules/type-fest/source/set-required.d.ts +75 -0
- package/node_modules/type-fest/source/set-return-type.d.ts +31 -0
- package/node_modules/type-fest/source/shared-union-fields-deep.d.ts +180 -0
- package/node_modules/type-fest/source/shared-union-fields.d.ts +79 -0
- package/node_modules/type-fest/source/simplify-deep.d.ts +117 -0
- package/node_modules/type-fest/source/simplify.d.ts +61 -0
- package/node_modules/type-fest/source/single-key-object.d.ts +28 -0
- package/node_modules/type-fest/source/snake-case.d.ts +48 -0
- package/node_modules/type-fest/source/snake-cased-properties-deep.d.ts +72 -0
- package/node_modules/type-fest/source/snake-cased-properties.d.ts +46 -0
- package/node_modules/type-fest/source/some-extend.d.ts +113 -0
- package/node_modules/type-fest/source/split-on-rest-element.d.ts +106 -0
- package/node_modules/type-fest/source/split.d.ts +90 -0
- package/node_modules/type-fest/source/spread.d.ts +78 -0
- package/node_modules/type-fest/source/string-repeat.d.ts +49 -0
- package/node_modules/type-fest/source/string-slice.d.ts +39 -0
- package/node_modules/type-fest/source/stringified.d.ts +25 -0
- package/node_modules/type-fest/source/structured-cloneable.d.ts +89 -0
- package/node_modules/type-fest/source/subtract.d.ts +87 -0
- package/node_modules/type-fest/source/sum.d.ts +82 -0
- package/node_modules/type-fest/source/tagged-union.d.ts +53 -0
- package/node_modules/type-fest/source/tagged.d.ts +261 -0
- package/node_modules/type-fest/source/trim.d.ts +29 -0
- package/node_modules/type-fest/source/tsconfig-json.d.ts +1356 -0
- package/node_modules/type-fest/source/tuple-of.d.ts +80 -0
- package/node_modules/type-fest/source/tuple-to-object.d.ts +47 -0
- package/node_modules/type-fest/source/tuple-to-union.d.ts +54 -0
- package/node_modules/type-fest/source/typed-array.d.ts +19 -0
- package/node_modules/type-fest/source/undefined-on-partial-deep.d.ts +83 -0
- package/node_modules/type-fest/source/union-length.d.ts +27 -0
- package/node_modules/type-fest/source/union-member.d.ts +65 -0
- package/node_modules/type-fest/source/union-to-intersection.d.ts +35 -0
- package/node_modules/type-fest/source/union-to-tuple.d.ts +49 -0
- package/node_modules/type-fest/source/unknown-array.d.ts +27 -0
- package/node_modules/type-fest/source/unknown-map.d.ts +26 -0
- package/node_modules/type-fest/source/unknown-record.d.ts +33 -0
- package/node_modules/type-fest/source/unknown-set.d.ts +26 -0
- package/node_modules/type-fest/source/unwrap-partial.d.ts +33 -0
- package/node_modules/type-fest/source/value-of.d.ts +24 -0
- package/node_modules/type-fest/source/words.d.ts +148 -0
- package/node_modules/type-fest/source/writable-deep.d.ts +84 -0
- package/node_modules/type-fest/source/writable-keys-of.d.ts +34 -0
- package/node_modules/type-fest/source/writable.d.ts +68 -0
- package/node_modules/type-fest/source/xor.d.ts +83 -0
- package/node_modules/usehooks-ts/LICENSE +22 -0
- package/node_modules/usehooks-ts/README.md +473 -0
- package/node_modules/usehooks-ts/dist/index.cjs +1084 -0
- package/node_modules/usehooks-ts/dist/index.d.cts +953 -0
- package/node_modules/usehooks-ts/dist/index.d.ts +953 -0
- package/node_modules/usehooks-ts/dist/index.js +1046 -0
- package/node_modules/usehooks-ts/package.json +74 -0
- package/node_modules/wrap-ansi/index.d.ts +41 -0
- package/node_modules/wrap-ansi/index.js +222 -0
- package/node_modules/wrap-ansi/license +9 -0
- package/node_modules/wrap-ansi/package.json +69 -0
- package/node_modules/wrap-ansi/readme.md +75 -0
- package/package.json +3 -2
|
@@ -0,0 +1,1301 @@
|
|
|
1
|
+
|
|
2
|
+
import {
|
|
3
|
+
type AnsiCode,
|
|
4
|
+
ansiCodesToString,
|
|
5
|
+
diffAnsiCodes,
|
|
6
|
+
} from '@alcalzone/ansi-tokenize'
|
|
7
|
+
import {
|
|
8
|
+
type Point,
|
|
9
|
+
type Rectangle,
|
|
10
|
+
type Size,
|
|
11
|
+
unionRect,
|
|
12
|
+
} from './layout/geometry.js'
|
|
13
|
+
import { BEL, ESC, SEP } from './termio/ansi.js'
|
|
14
|
+
import * as warn from './warn.js'
|
|
15
|
+
|
|
16
|
+
// --- Shared Pools (interning for memory efficiency) ---
|
|
17
|
+
|
|
18
|
+
// Process-wide pool of every distinct character string we have ever
|
|
19
|
+
// stored in a cell. Because the pool is shared across screens, the
|
|
20
|
+
// integer IDs we put into cells are universally valid: `blitRegion`
|
|
21
|
+
// can copy IDs straight from one screen's `cells` array into
|
|
22
|
+
// another's, and `diffEach` can compare cells by integer ID instead of
|
|
23
|
+
// going back through the string table.
|
|
24
|
+
export class CharPool {
|
|
25
|
+
private strings: string[] = [' ', ''] // Index 0 = space, 1 = empty (spacer)
|
|
26
|
+
private stringMap = new Map<string, number>([
|
|
27
|
+
[' ', 0],
|
|
28
|
+
['', 1],
|
|
29
|
+
])
|
|
30
|
+
private ascii: Int32Array = initCharAscii() // charCode → index, -1 = not interned
|
|
31
|
+
|
|
32
|
+
intern(char: string): number {
|
|
33
|
+
// ASCII fast-path: direct array lookup instead of Map.get
|
|
34
|
+
if (char.length === 1) {
|
|
35
|
+
const code = char.charCodeAt(0)
|
|
36
|
+
if (code < 128) {
|
|
37
|
+
const cached = this.ascii[code]!
|
|
38
|
+
if (cached !== -1) return cached
|
|
39
|
+
const index = this.strings.length
|
|
40
|
+
this.strings.push(char)
|
|
41
|
+
this.ascii[code] = index
|
|
42
|
+
return index
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const existing = this.stringMap.get(char)
|
|
46
|
+
if (existing !== undefined) return existing
|
|
47
|
+
const index = this.strings.length
|
|
48
|
+
this.strings.push(char)
|
|
49
|
+
this.stringMap.set(char, index)
|
|
50
|
+
return index
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
get(index: number): string {
|
|
54
|
+
return this.strings[index] ?? ' '
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Hyperlink string pool shared across all screens.
|
|
59
|
+
// Index 0 = no hyperlink.
|
|
60
|
+
export class HyperlinkPool {
|
|
61
|
+
private strings: string[] = [''] // Index 0 = no hyperlink
|
|
62
|
+
private stringMap = new Map<string, number>()
|
|
63
|
+
|
|
64
|
+
intern(hyperlink: string | undefined): number {
|
|
65
|
+
if (!hyperlink) return 0
|
|
66
|
+
let id = this.stringMap.get(hyperlink)
|
|
67
|
+
if (id === undefined) {
|
|
68
|
+
id = this.strings.length
|
|
69
|
+
this.strings.push(hyperlink)
|
|
70
|
+
this.stringMap.set(hyperlink, id)
|
|
71
|
+
}
|
|
72
|
+
return id
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
get(id: number): string | undefined {
|
|
76
|
+
return id === 0 ? undefined : this.strings[id]
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// SGR 7 (inverse) as a pre-built `AnsiCode`. The `endCode` of `\x1b[27m`
|
|
81
|
+
// is the trigger that sets the `VISIBLE_ON_SPACE` bit on the styleId,
|
|
82
|
+
// so an inverted space cell is never skipped by the "invisible empty
|
|
83
|
+
// cell" optimisation in the renderer — an inverse space is a visible
|
|
84
|
+
// block of background colour.
|
|
85
|
+
const INVERSE_CODE: AnsiCode = {
|
|
86
|
+
type: 'ansi',
|
|
87
|
+
code: '\x1b[7m',
|
|
88
|
+
endCode: '\x1b[27m',
|
|
89
|
+
}
|
|
90
|
+
// Bold (SGR 1) — stacks cleanly, no reflow in monospace. endCode 22
|
|
91
|
+
// also cancels dim (SGR 2); harmless here since we never add dim.
|
|
92
|
+
const BOLD_CODE: AnsiCode = {
|
|
93
|
+
type: 'ansi',
|
|
94
|
+
code: '\x1b[1m',
|
|
95
|
+
endCode: '\x1b[22m',
|
|
96
|
+
}
|
|
97
|
+
// Underline (SGR 4). We carry this alongside yellow + bold because
|
|
98
|
+
// underline is the only marker that survives every colour theme intact.
|
|
99
|
+
// The yellow background we set via inverse can collide with existing
|
|
100
|
+
// background colours (prompt styling, tool chrome, syntax-highlighted
|
|
101
|
+
// backgrounds). When debugging: if you see the underline appear but no
|
|
102
|
+
// yellow tint, the overlay *is* matching — the yellow is just being
|
|
103
|
+
// drowned out by the underlying cell's own colours.
|
|
104
|
+
const UNDERLINE_CODE: AnsiCode = {
|
|
105
|
+
type: 'ansi',
|
|
106
|
+
code: '\x1b[4m',
|
|
107
|
+
endCode: '\x1b[24m',
|
|
108
|
+
}
|
|
109
|
+
// fg→yellow (SGR 33). With inverse already in the stack, the terminal
|
|
110
|
+
// swaps fg↔bg at render — so yellow-fg becomes yellow-BG. Original bg
|
|
111
|
+
// becomes fg (readable on most themes: dark-bg → dark-text on yellow).
|
|
112
|
+
// endCode 39 is 'default fg' — cancels any prior fg color cleanly.
|
|
113
|
+
const YELLOW_FG_CODE: AnsiCode = {
|
|
114
|
+
type: 'ansi',
|
|
115
|
+
code: '\x1b[33m',
|
|
116
|
+
endCode: '\x1b[39m',
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export class StylePool {
|
|
120
|
+
private ids = new Map<string, number>()
|
|
121
|
+
private styles: AnsiCode[][] = []
|
|
122
|
+
private transitionCache = new Map<number, string>()
|
|
123
|
+
readonly none: number
|
|
124
|
+
|
|
125
|
+
constructor() {
|
|
126
|
+
this.none = this.intern([])
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/** Intern a style and return its ID. */
|
|
130
|
+
intern(styles: AnsiCode[]): number {
|
|
131
|
+
const key = styles.length === 0 ? '' : styles.map(s => s.code).join('\0')
|
|
132
|
+
let id = this.ids.get(key)
|
|
133
|
+
if (id === undefined) {
|
|
134
|
+
const rawId = this.styles.length
|
|
135
|
+
this.styles.push(styles.length === 0 ? [] : styles)
|
|
136
|
+
id =
|
|
137
|
+
(rawId << 1) |
|
|
138
|
+
(styles.length > 0 && hasVisibleSpaceEffect(styles) ? 1 : 0)
|
|
139
|
+
this.ids.set(key, id)
|
|
140
|
+
}
|
|
141
|
+
return id
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/** Recover styles from an encoded ID. Strips the bit-0 flag via >>> 1. */
|
|
145
|
+
get(id: number): AnsiCode[] {
|
|
146
|
+
return this.styles[id >>> 1] ?? []
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
transition(fromId: number, toId: number): string {
|
|
150
|
+
if (fromId === toId) return ''
|
|
151
|
+
const key = fromId * 0x100000 + toId
|
|
152
|
+
let str = this.transitionCache.get(key)
|
|
153
|
+
if (str === undefined) {
|
|
154
|
+
str = ansiCodesToString(diffAnsiCodes(this.get(fromId), this.get(toId)))
|
|
155
|
+
this.transitionCache.set(key, str)
|
|
156
|
+
}
|
|
157
|
+
return str
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/** Intern a style that is `base + inverse`. */
|
|
161
|
+
private inverseCache = new Map<number, number>()
|
|
162
|
+
withInverse(baseId: number): number {
|
|
163
|
+
let id = this.inverseCache.get(baseId)
|
|
164
|
+
if (id === undefined) {
|
|
165
|
+
const baseCodes = this.get(baseId)
|
|
166
|
+
// If already inverted, use as-is (avoids SGR 7 stacking)
|
|
167
|
+
const hasInverse = baseCodes.some(c => c.endCode === '\x1b[27m')
|
|
168
|
+
id = hasInverse ? baseId : this.intern([...baseCodes, INVERSE_CODE])
|
|
169
|
+
this.inverseCache.set(baseId, id)
|
|
170
|
+
}
|
|
171
|
+
return id
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/** Inverse + bold + yellow-bg overlay for the *current* search match. */
|
|
175
|
+
private currentMatchCache = new Map<number, number>()
|
|
176
|
+
withCurrentMatch(baseId: number): number {
|
|
177
|
+
let id = this.currentMatchCache.get(baseId)
|
|
178
|
+
if (id === undefined) {
|
|
179
|
+
const baseCodes = this.get(baseId)
|
|
180
|
+
// Strip both fg and bg from the base style before layering the
|
|
181
|
+
// overlay. Reason: when both fg and bg are explicit, the
|
|
182
|
+
// semantics of SGR 7 (inverse) become terminal-dependent. A
|
|
183
|
+
// user-prompt cell with an explicit grey bg becomes
|
|
184
|
+
// "grey-on-yellow" on some terminals and "yellow-on-grey" on
|
|
185
|
+
// others. Filtering them out gives us a consistent
|
|
186
|
+
// yellow-bg + terminal-default-fg everywhere. Bold, dim, italic
|
|
187
|
+
// and the rest are orthogonal — keep them.
|
|
188
|
+
const codes = baseCodes.filter(
|
|
189
|
+
c => c.endCode !== '\x1b[39m' && c.endCode !== '\x1b[49m',
|
|
190
|
+
)
|
|
191
|
+
// fg-yellow FIRST so inverse swaps it to bg. Bold after inverse is
|
|
192
|
+
// fine — SGR 1 is fg-attribute-only, order-independent vs 7.
|
|
193
|
+
codes.push(YELLOW_FG_CODE)
|
|
194
|
+
if (!baseCodes.some(c => c.endCode === '\x1b[27m'))
|
|
195
|
+
codes.push(INVERSE_CODE)
|
|
196
|
+
if (!baseCodes.some(c => c.endCode === '\x1b[22m')) codes.push(BOLD_CODE)
|
|
197
|
+
// Underline as the unambiguous marker — yellow-bg can clash with
|
|
198
|
+
// existing bg styling (user-prompt bg, syntax bg). If you see
|
|
199
|
+
// underline but no yellow on a match, the overlay IS finding it;
|
|
200
|
+
// the yellow is just losing a styling fight.
|
|
201
|
+
if (!baseCodes.some(c => c.endCode === '\x1b[24m'))
|
|
202
|
+
codes.push(UNDERLINE_CODE)
|
|
203
|
+
id = this.intern(codes)
|
|
204
|
+
this.currentMatchCache.set(baseId, id)
|
|
205
|
+
}
|
|
206
|
+
return id
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/** Selection-highlight overlay. */
|
|
210
|
+
private selectionBgCode: AnsiCode | null = null
|
|
211
|
+
private selectionBgCache = new Map<number, number>()
|
|
212
|
+
setSelectionBg(bg: AnsiCode | null): void {
|
|
213
|
+
if (this.selectionBgCode?.code === bg?.code) return
|
|
214
|
+
this.selectionBgCode = bg
|
|
215
|
+
this.selectionBgCache.clear()
|
|
216
|
+
}
|
|
217
|
+
withSelectionBg(baseId: number): number {
|
|
218
|
+
const bg = this.selectionBgCode
|
|
219
|
+
if (bg === null) return this.withInverse(baseId)
|
|
220
|
+
let id = this.selectionBgCache.get(baseId)
|
|
221
|
+
if (id === undefined) {
|
|
222
|
+
// Keep everything except bg (49m) and inverse (27m). Fg, bold, dim,
|
|
223
|
+
// italic, underline, strikethrough all preserved.
|
|
224
|
+
const kept = this.get(baseId).filter(
|
|
225
|
+
c => c.endCode !== '\x1b[49m' && c.endCode !== '\x1b[27m',
|
|
226
|
+
)
|
|
227
|
+
kept.push(bg)
|
|
228
|
+
id = this.intern(kept)
|
|
229
|
+
this.selectionBgCache.set(baseId, id)
|
|
230
|
+
}
|
|
231
|
+
return id
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// endCodes that produce visible effects on space characters
|
|
236
|
+
const VISIBLE_ON_SPACE = new Set([
|
|
237
|
+
'\x1b[49m', // background color
|
|
238
|
+
'\x1b[27m', // inverse
|
|
239
|
+
'\x1b[24m', // underline
|
|
240
|
+
'\x1b[29m', // strikethrough
|
|
241
|
+
'\x1b[55m', // overline
|
|
242
|
+
])
|
|
243
|
+
|
|
244
|
+
function hasVisibleSpaceEffect(styles: AnsiCode[]): boolean {
|
|
245
|
+
for (const style of styles) {
|
|
246
|
+
if (VISIBLE_ON_SPACE.has(style.endCode)) return true
|
|
247
|
+
}
|
|
248
|
+
return false
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// const enum is inlined at compile time - no runtime object, no property access
|
|
252
|
+
export const enum CellWidth {
|
|
253
|
+
// Not a wide character, cell width 1
|
|
254
|
+
Narrow = 0,
|
|
255
|
+
// Wide character, cell width 2. This cell contains the actual character.
|
|
256
|
+
Wide = 1,
|
|
257
|
+
// Spacer occupying the second visual column of a wide character. Do not render.
|
|
258
|
+
SpacerTail = 2,
|
|
259
|
+
// Spacer at the end of a soft-wrapped line indicating that a wide character
|
|
260
|
+
// continues on the next line. Used for preserving wide character semantics
|
|
261
|
+
// across line breaks during soft wrapping.
|
|
262
|
+
SpacerHead = 3,
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export type Hyperlink = string | undefined
|
|
266
|
+
|
|
267
|
+
/** Cell is a view type returned by cellAt(). */
|
|
268
|
+
export type Cell = {
|
|
269
|
+
char: string
|
|
270
|
+
styleId: number
|
|
271
|
+
width: CellWidth
|
|
272
|
+
hyperlink: Hyperlink
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// Pool indices for the two cell payloads we want to compare cheaply.
|
|
276
|
+
// Note these are indices into `CharPool.strings`, not codepoints —
|
|
277
|
+
// `intern(' ')` and `intern('')` always land at 0 and 1 because the
|
|
278
|
+
// pool seeds them first.
|
|
279
|
+
const EMPTY_CHAR_INDEX = 0 // ' ' (space)
|
|
280
|
+
const SPACER_CHAR_INDEX = 1 // '' — used in the tail half of wide cells
|
|
281
|
+
// Unwritten cells decay to `[EMPTY_CHAR_INDEX=0, packWord1(0, 0, 0)=0]`.
|
|
282
|
+
// `StylePool.none` is also 0 (it is the first style interned), so an
|
|
283
|
+
// unwritten cell is bit-identical to an explicitly-cleared one in the
|
|
284
|
+
// packed array. We rely on that: `diffEach` can compare cells as raw
|
|
285
|
+
// integers without normalising for "default style". `isEmptyCellByIndex`
|
|
286
|
+
// checks both packed words against 0 to detect "never visually written".
|
|
287
|
+
|
|
288
|
+
function initCharAscii(): Int32Array {
|
|
289
|
+
const table = new Int32Array(128)
|
|
290
|
+
table.fill(-1)
|
|
291
|
+
table[32] = EMPTY_CHAR_INDEX // ' ' (space)
|
|
292
|
+
return table
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// --- Packed cell layout ---
|
|
296
|
+
// Each cell is 2 consecutive Int32 elements in the cells array:
|
|
297
|
+
// word0 (cells[ci]): charId (full 32 bits)
|
|
298
|
+
// word1 (cells[ci + 1]): styleId[31:17] | hyperlinkId[16:2] | width[1:0]
|
|
299
|
+
const STYLE_SHIFT = 17
|
|
300
|
+
const HYPERLINK_SHIFT = 2
|
|
301
|
+
const HYPERLINK_MASK = 0x7fff // 15 bits
|
|
302
|
+
const WIDTH_MASK = 3 // 2 bits
|
|
303
|
+
|
|
304
|
+
// Pack styleId, hyperlinkId, and width into a single Int32
|
|
305
|
+
function packWord1(
|
|
306
|
+
styleId: number,
|
|
307
|
+
hyperlinkId: number,
|
|
308
|
+
width: number,
|
|
309
|
+
): number {
|
|
310
|
+
return (styleId << STYLE_SHIFT) | (hyperlinkId << HYPERLINK_SHIFT) | width
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
// Unwritten cell as BigInt64 — both words are 0, so the 64-bit value is 0n.
|
|
314
|
+
// Used by BigInt64Array.fill() for bulk clears (resetScreen, clearRegion).
|
|
315
|
+
// Not used for comparison — BigInt element reads cause heap allocation.
|
|
316
|
+
const EMPTY_CELL_VALUE = 0n
|
|
317
|
+
|
|
318
|
+
export type Screen = Size & {
|
|
319
|
+
// Packed cell data — 2 Int32s per cell: [charId, packed(styleId|hyperlinkId|width)]
|
|
320
|
+
// cells and cells64 are views over the same ArrayBuffer.
|
|
321
|
+
cells: Int32Array
|
|
322
|
+
cells64: BigInt64Array // 1 BigInt64 per cell — used for bulk fill in resetScreen/clearRegion
|
|
323
|
+
|
|
324
|
+
// Shared pools — IDs are valid across all screens using the same pools
|
|
325
|
+
charPool: CharPool
|
|
326
|
+
hyperlinkPool: HyperlinkPool
|
|
327
|
+
|
|
328
|
+
// Empty style ID for comparisons
|
|
329
|
+
emptyStyleId: number
|
|
330
|
+
|
|
331
|
+
/** Bounding box of cells that were written to (not blitted) during rendering. */
|
|
332
|
+
damage: Rectangle | undefined
|
|
333
|
+
|
|
334
|
+
noSelect: Uint8Array
|
|
335
|
+
|
|
336
|
+
/** Per-ROW soft-wrap continuation marker. */
|
|
337
|
+
softWrap: Int32Array
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
function isEmptyCellByIndex(screen: Screen, index: number): boolean {
|
|
341
|
+
// An empty/unwritten cell has both words === 0:
|
|
342
|
+
// word0 = EMPTY_CHAR_INDEX (0), word1 = packWord1(emptyStyleId=0, 0, 0) = 0.
|
|
343
|
+
const ci = index << 1
|
|
344
|
+
return screen.cells[ci] === 0 && screen.cells[ci | 1] === 0
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
export function isEmptyCellAt(screen: Screen, x: number, y: number): boolean {
|
|
348
|
+
if (x < 0 || y < 0 || x >= screen.width || y >= screen.height) return true
|
|
349
|
+
return isEmptyCellByIndex(screen, y * screen.width + x)
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/** Check if a Cell (view object) represents an empty cell. */
|
|
353
|
+
export function isCellEmpty(screen: Screen, cell: Cell): boolean {
|
|
354
|
+
// Check if cell looks like an empty cell (space, empty style, narrow, no link).
|
|
355
|
+
// Note: After cellAt mapping, unwritten cells have emptyStyleId, so this
|
|
356
|
+
// returns true for both unwritten AND cleared cells. Use isEmptyCellAt
|
|
357
|
+
// for the internal distinction.
|
|
358
|
+
return (
|
|
359
|
+
cell.char === ' ' &&
|
|
360
|
+
cell.styleId === screen.emptyStyleId &&
|
|
361
|
+
cell.width === CellWidth.Narrow &&
|
|
362
|
+
!cell.hyperlink
|
|
363
|
+
)
|
|
364
|
+
}
|
|
365
|
+
// Intern a hyperlink string and return its ID (0 = no hyperlink)
|
|
366
|
+
function internHyperlink(screen: Screen, hyperlink: Hyperlink): number {
|
|
367
|
+
return screen.hyperlinkPool.intern(hyperlink)
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
// ---
|
|
371
|
+
|
|
372
|
+
export function createScreen(
|
|
373
|
+
width: number,
|
|
374
|
+
height: number,
|
|
375
|
+
styles: StylePool,
|
|
376
|
+
charPool: CharPool,
|
|
377
|
+
hyperlinkPool: HyperlinkPool,
|
|
378
|
+
): Screen {
|
|
379
|
+
// Warn if dimensions are not valid integers (likely bad yoga layout output)
|
|
380
|
+
warn.ifNotInteger(width, 'createScreen width')
|
|
381
|
+
warn.ifNotInteger(height, 'createScreen height')
|
|
382
|
+
|
|
383
|
+
// Ensure width and height are valid integers to prevent crashes
|
|
384
|
+
if (!Number.isInteger(width) || width < 0) {
|
|
385
|
+
width = Math.max(0, Math.floor(width) || 0)
|
|
386
|
+
}
|
|
387
|
+
if (!Number.isInteger(height) || height < 0) {
|
|
388
|
+
height = Math.max(0, Math.floor(height) || 0)
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
const size = width * height
|
|
392
|
+
|
|
393
|
+
// Allocate one buffer, two views: Int32Array for per-word access,
|
|
394
|
+
// BigInt64Array for bulk fill in resetScreen/clearRegion.
|
|
395
|
+
// ArrayBuffer is zero-filled, which is exactly the empty cell value:
|
|
396
|
+
// [EMPTY_CHAR_INDEX=0, packWord1(emptyStyleId=0,0,0)=0].
|
|
397
|
+
const buf = new ArrayBuffer(size << 3) // 8 bytes per cell
|
|
398
|
+
const cells = new Int32Array(buf)
|
|
399
|
+
const cells64 = new BigInt64Array(buf)
|
|
400
|
+
|
|
401
|
+
return {
|
|
402
|
+
width,
|
|
403
|
+
height,
|
|
404
|
+
cells,
|
|
405
|
+
cells64,
|
|
406
|
+
charPool,
|
|
407
|
+
hyperlinkPool,
|
|
408
|
+
emptyStyleId: styles.none,
|
|
409
|
+
damage: undefined,
|
|
410
|
+
noSelect: new Uint8Array(size),
|
|
411
|
+
softWrap: new Int32Array(height),
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/** Reset an existing screen for reuse, avoiding allocation of new typed arrays. */
|
|
416
|
+
export function resetScreen(
|
|
417
|
+
screen: Screen,
|
|
418
|
+
width: number,
|
|
419
|
+
height: number,
|
|
420
|
+
): void {
|
|
421
|
+
// Warn if dimensions are not valid integers
|
|
422
|
+
warn.ifNotInteger(width, 'resetScreen width')
|
|
423
|
+
warn.ifNotInteger(height, 'resetScreen height')
|
|
424
|
+
|
|
425
|
+
// Ensure width and height are valid integers to prevent crashes
|
|
426
|
+
if (!Number.isInteger(width) || width < 0) {
|
|
427
|
+
width = Math.max(0, Math.floor(width) || 0)
|
|
428
|
+
}
|
|
429
|
+
if (!Number.isInteger(height) || height < 0) {
|
|
430
|
+
height = Math.max(0, Math.floor(height) || 0)
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
const size = width * height
|
|
434
|
+
|
|
435
|
+
// Resize if needed (only grow, to avoid reallocations)
|
|
436
|
+
if (screen.cells64.length < size) {
|
|
437
|
+
const buf = new ArrayBuffer(size << 3)
|
|
438
|
+
screen.cells = new Int32Array(buf)
|
|
439
|
+
screen.cells64 = new BigInt64Array(buf)
|
|
440
|
+
screen.noSelect = new Uint8Array(size)
|
|
441
|
+
}
|
|
442
|
+
if (screen.softWrap.length < height) {
|
|
443
|
+
screen.softWrap = new Int32Array(height)
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
// Reset all cells — single fill call, no loop
|
|
447
|
+
screen.cells64.fill(EMPTY_CELL_VALUE, 0, size)
|
|
448
|
+
screen.noSelect.fill(0, 0, size)
|
|
449
|
+
screen.softWrap.fill(0, 0, height)
|
|
450
|
+
|
|
451
|
+
// Update dimensions
|
|
452
|
+
screen.width = width
|
|
453
|
+
screen.height = height
|
|
454
|
+
|
|
455
|
+
// Shared pools accumulate — no clearing needed. Unique char/hyperlink sets are bounded.
|
|
456
|
+
|
|
457
|
+
// Clear damage tracking
|
|
458
|
+
screen.damage = undefined
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
/** Re-intern a screen's char and hyperlink IDs into new pools. */
|
|
462
|
+
export function migrateScreenPools(
|
|
463
|
+
screen: Screen,
|
|
464
|
+
charPool: CharPool,
|
|
465
|
+
hyperlinkPool: HyperlinkPool,
|
|
466
|
+
): void {
|
|
467
|
+
const oldCharPool = screen.charPool
|
|
468
|
+
const oldHyperlinkPool = screen.hyperlinkPool
|
|
469
|
+
if (oldCharPool === charPool && oldHyperlinkPool === hyperlinkPool) return
|
|
470
|
+
|
|
471
|
+
const size = screen.width * screen.height
|
|
472
|
+
const cells = screen.cells
|
|
473
|
+
|
|
474
|
+
// Re-intern chars and hyperlinks in a single pass, stride by 2
|
|
475
|
+
for (let ci = 0; ci < size << 1; ci += 2) {
|
|
476
|
+
// Re-intern charId (word0)
|
|
477
|
+
const oldCharId = cells[ci]!
|
|
478
|
+
cells[ci] = charPool.intern(oldCharPool.get(oldCharId))
|
|
479
|
+
|
|
480
|
+
// Re-intern hyperlinkId (packed in word1)
|
|
481
|
+
const word1 = cells[ci + 1]!
|
|
482
|
+
const oldHyperlinkId = (word1 >>> HYPERLINK_SHIFT) & HYPERLINK_MASK
|
|
483
|
+
if (oldHyperlinkId !== 0) {
|
|
484
|
+
const oldStr = oldHyperlinkPool.get(oldHyperlinkId)
|
|
485
|
+
const newHyperlinkId = hyperlinkPool.intern(oldStr)
|
|
486
|
+
// Repack word1 with new hyperlinkId, preserving styleId and width
|
|
487
|
+
const styleId = word1 >>> STYLE_SHIFT
|
|
488
|
+
const width = word1 & WIDTH_MASK
|
|
489
|
+
cells[ci + 1] = packWord1(styleId, newHyperlinkId, width)
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
screen.charPool = charPool
|
|
494
|
+
screen.hyperlinkPool = hyperlinkPool
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
/** Get a Cell view at the given position. */
|
|
498
|
+
export function cellAt(screen: Screen, x: number, y: number): Cell | undefined {
|
|
499
|
+
if (x < 0 || y < 0 || x >= screen.width || y >= screen.height)
|
|
500
|
+
return undefined
|
|
501
|
+
return cellAtIndex(screen, y * screen.width + x)
|
|
502
|
+
}
|
|
503
|
+
/** Get a Cell view by pre-computed array index. */
|
|
504
|
+
export function cellAtIndex(screen: Screen, index: number): Cell {
|
|
505
|
+
const ci = index << 1
|
|
506
|
+
const word1 = screen.cells[ci + 1]!
|
|
507
|
+
const hid = (word1 >>> HYPERLINK_SHIFT) & HYPERLINK_MASK
|
|
508
|
+
return {
|
|
509
|
+
// Unwritten cells have charIndex=0 (EMPTY_CHAR_INDEX); charPool.get(0) returns ' '
|
|
510
|
+
char: screen.charPool.get(screen.cells[ci]!),
|
|
511
|
+
styleId: word1 >>> STYLE_SHIFT,
|
|
512
|
+
width: word1 & WIDTH_MASK,
|
|
513
|
+
hyperlink: hid === 0 ? undefined : screen.hyperlinkPool.get(hid),
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
/** Get a Cell at the given index, or undefined if it has no visible content. */
|
|
518
|
+
export function visibleCellAtIndex(
|
|
519
|
+
cells: Int32Array,
|
|
520
|
+
charPool: CharPool,
|
|
521
|
+
hyperlinkPool: HyperlinkPool,
|
|
522
|
+
index: number,
|
|
523
|
+
lastRenderedStyleId: number,
|
|
524
|
+
): Cell | undefined {
|
|
525
|
+
const ci = index << 1
|
|
526
|
+
const charId = cells[ci]!
|
|
527
|
+
if (charId === 1) return undefined // spacer
|
|
528
|
+
const word1 = cells[ci + 1]!
|
|
529
|
+
// For spaces: 0x3fffc masks bits 2-17 (hyperlinkId + styleId visibility
|
|
530
|
+
// bit). If zero, the space has no hyperlink and at most a fg-only style.
|
|
531
|
+
// Then word1 >>> STYLE_SHIFT is the foreground style — skip if it's zero
|
|
532
|
+
// (truly invisible) or matches the last rendered style on this line.
|
|
533
|
+
if (charId === 0 && (word1 & 0x3fffc) === 0) {
|
|
534
|
+
const fgStyle = word1 >>> STYLE_SHIFT
|
|
535
|
+
if (fgStyle === 0 || fgStyle === lastRenderedStyleId) return undefined
|
|
536
|
+
}
|
|
537
|
+
const hid = (word1 >>> HYPERLINK_SHIFT) & HYPERLINK_MASK
|
|
538
|
+
return {
|
|
539
|
+
char: charPool.get(charId),
|
|
540
|
+
styleId: word1 >>> STYLE_SHIFT,
|
|
541
|
+
width: word1 & WIDTH_MASK,
|
|
542
|
+
hyperlink: hid === 0 ? undefined : hyperlinkPool.get(hid),
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
/** Write cell data into an existing Cell object to avoid allocation. */
|
|
547
|
+
function cellAtCI(screen: Screen, ci: number, out: Cell): void {
|
|
548
|
+
const w1 = ci | 1
|
|
549
|
+
const word1 = screen.cells[w1]!
|
|
550
|
+
out.char = screen.charPool.get(screen.cells[ci]!)
|
|
551
|
+
out.styleId = word1 >>> STYLE_SHIFT
|
|
552
|
+
out.width = word1 & WIDTH_MASK
|
|
553
|
+
const hid = (word1 >>> HYPERLINK_SHIFT) & HYPERLINK_MASK
|
|
554
|
+
out.hyperlink = hid === 0 ? undefined : screen.hyperlinkPool.get(hid)
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
export function charInCellAt(
|
|
558
|
+
screen: Screen,
|
|
559
|
+
x: number,
|
|
560
|
+
y: number,
|
|
561
|
+
): string | undefined {
|
|
562
|
+
if (x < 0 || y < 0 || x >= screen.width || y >= screen.height)
|
|
563
|
+
return undefined
|
|
564
|
+
const ci = (y * screen.width + x) << 1
|
|
565
|
+
return screen.charPool.get(screen.cells[ci]!)
|
|
566
|
+
}
|
|
567
|
+
/** Set a cell, optionally creating a spacer for wide characters. */
|
|
568
|
+
export function setCellAt(
|
|
569
|
+
screen: Screen,
|
|
570
|
+
x: number,
|
|
571
|
+
y: number,
|
|
572
|
+
cell: Cell,
|
|
573
|
+
): void {
|
|
574
|
+
if (x < 0 || y < 0 || x >= screen.width || y >= screen.height) return
|
|
575
|
+
const ci = (y * screen.width + x) << 1
|
|
576
|
+
const cells = screen.cells
|
|
577
|
+
|
|
578
|
+
// When a Wide char is overwritten by a Narrow char, its SpacerTail remains
|
|
579
|
+
// as a ghost cell that the diff/render pipeline skips, causing stale content
|
|
580
|
+
// to leak through from previous frames.
|
|
581
|
+
const prevWidth = cells[ci + 1]! & WIDTH_MASK
|
|
582
|
+
if (prevWidth === CellWidth.Wide && cell.width !== CellWidth.Wide) {
|
|
583
|
+
const spacerX = x + 1
|
|
584
|
+
if (spacerX < screen.width) {
|
|
585
|
+
const spacerCI = ci + 2
|
|
586
|
+
if ((cells[spacerCI + 1]! & WIDTH_MASK) === CellWidth.SpacerTail) {
|
|
587
|
+
cells[spacerCI] = EMPTY_CHAR_INDEX
|
|
588
|
+
cells[spacerCI + 1] = packWord1(
|
|
589
|
+
screen.emptyStyleId,
|
|
590
|
+
0,
|
|
591
|
+
CellWidth.Narrow,
|
|
592
|
+
)
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
// Track cleared Wide position for damage expansion below
|
|
597
|
+
let clearedWideX = -1
|
|
598
|
+
if (
|
|
599
|
+
prevWidth === CellWidth.SpacerTail &&
|
|
600
|
+
cell.width !== CellWidth.SpacerTail
|
|
601
|
+
) {
|
|
602
|
+
// Overwriting a SpacerTail: clear the orphaned Wide char at (x-1).
|
|
603
|
+
// Keeping the wide character with Narrow width would cause the terminal
|
|
604
|
+
// to still render it with width 2, desyncing the cursor model.
|
|
605
|
+
if (x > 0) {
|
|
606
|
+
const wideCI = ci - 2
|
|
607
|
+
if ((cells[wideCI + 1]! & WIDTH_MASK) === CellWidth.Wide) {
|
|
608
|
+
cells[wideCI] = EMPTY_CHAR_INDEX
|
|
609
|
+
cells[wideCI + 1] = packWord1(screen.emptyStyleId, 0, CellWidth.Narrow)
|
|
610
|
+
clearedWideX = x - 1
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
// Pack cell data into cells array
|
|
616
|
+
cells[ci] = internCharString(screen, cell.char)
|
|
617
|
+
cells[ci + 1] = packWord1(
|
|
618
|
+
cell.styleId,
|
|
619
|
+
internHyperlink(screen, cell.hyperlink),
|
|
620
|
+
cell.width,
|
|
621
|
+
)
|
|
622
|
+
|
|
623
|
+
// Track damage - expand bounds in place instead of allocating new objects
|
|
624
|
+
// Include the main cell position and any cleared orphan cells
|
|
625
|
+
const minX = clearedWideX >= 0 ? Math.min(x, clearedWideX) : x
|
|
626
|
+
const damage = screen.damage
|
|
627
|
+
if (damage) {
|
|
628
|
+
const right = damage.x + damage.width
|
|
629
|
+
const bottom = damage.y + damage.height
|
|
630
|
+
if (minX < damage.x) {
|
|
631
|
+
damage.width += damage.x - minX
|
|
632
|
+
damage.x = minX
|
|
633
|
+
} else if (x >= right) {
|
|
634
|
+
damage.width = x - damage.x + 1
|
|
635
|
+
}
|
|
636
|
+
if (y < damage.y) {
|
|
637
|
+
damage.height += damage.y - y
|
|
638
|
+
damage.y = y
|
|
639
|
+
} else if (y >= bottom) {
|
|
640
|
+
damage.height = y - damage.y + 1
|
|
641
|
+
}
|
|
642
|
+
} else {
|
|
643
|
+
screen.damage = { x: minX, y, width: x - minX + 1, height: 1 }
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
// If this is a wide character, create a spacer in the next column
|
|
647
|
+
if (cell.width === CellWidth.Wide) {
|
|
648
|
+
const spacerX = x + 1
|
|
649
|
+
if (spacerX < screen.width) {
|
|
650
|
+
const spacerCI = ci + 2
|
|
651
|
+
// If the cell we're overwriting with our SpacerTail is itself Wide,
|
|
652
|
+
// clear ITS SpacerTail at x+2 too. Otherwise the orphan SpacerTail
|
|
653
|
+
// makes diffEach report it as `added` and log-update's skip-spacer
|
|
654
|
+
// rule prevents clearing whatever prev content was at that column.
|
|
655
|
+
// Scenario: [a, 💻, spacer] → [本, spacer, ORPHAN spacer] when
|
|
656
|
+
// yoga squishes a💻 to height 0 and 本 renders at the same y.
|
|
657
|
+
if ((cells[spacerCI + 1]! & WIDTH_MASK) === CellWidth.Wide) {
|
|
658
|
+
const orphanCI = spacerCI + 2
|
|
659
|
+
if (
|
|
660
|
+
spacerX + 1 < screen.width &&
|
|
661
|
+
(cells[orphanCI + 1]! & WIDTH_MASK) === CellWidth.SpacerTail
|
|
662
|
+
) {
|
|
663
|
+
cells[orphanCI] = EMPTY_CHAR_INDEX
|
|
664
|
+
cells[orphanCI + 1] = packWord1(
|
|
665
|
+
screen.emptyStyleId,
|
|
666
|
+
0,
|
|
667
|
+
CellWidth.Narrow,
|
|
668
|
+
)
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
cells[spacerCI] = SPACER_CHAR_INDEX
|
|
672
|
+
cells[spacerCI + 1] = packWord1(
|
|
673
|
+
screen.emptyStyleId,
|
|
674
|
+
0,
|
|
675
|
+
CellWidth.SpacerTail,
|
|
676
|
+
)
|
|
677
|
+
|
|
678
|
+
// Expand damage to include SpacerTail so diff() scans it
|
|
679
|
+
const d = screen.damage
|
|
680
|
+
if (d && spacerX >= d.x + d.width) {
|
|
681
|
+
d.width = spacerX - d.x + 1
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
export function setCellStyleId(
|
|
688
|
+
screen: Screen,
|
|
689
|
+
x: number,
|
|
690
|
+
y: number,
|
|
691
|
+
styleId: number,
|
|
692
|
+
): void {
|
|
693
|
+
if (x < 0 || y < 0 || x >= screen.width || y >= screen.height) return
|
|
694
|
+
const ci = (y * screen.width + x) << 1
|
|
695
|
+
const cells = screen.cells
|
|
696
|
+
const word1 = cells[ci + 1]!
|
|
697
|
+
const width = word1 & WIDTH_MASK
|
|
698
|
+
// Skip spacer cells — inverse on the head cell visually covers both columns
|
|
699
|
+
if (width === CellWidth.SpacerTail || width === CellWidth.SpacerHead) return
|
|
700
|
+
const hid = (word1 >>> HYPERLINK_SHIFT) & HYPERLINK_MASK
|
|
701
|
+
cells[ci + 1] = packWord1(styleId, hid, width)
|
|
702
|
+
// Expand damage so diffEach scans this cell
|
|
703
|
+
const d = screen.damage
|
|
704
|
+
if (d) {
|
|
705
|
+
screen.damage = unionRect(d, { x, y, width: 1, height: 1 })
|
|
706
|
+
} else {
|
|
707
|
+
screen.damage = { x, y, width: 1, height: 1 }
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
/** Intern a character string via the screen's shared CharPool. */
|
|
712
|
+
function internCharString(screen: Screen, char: string): number {
|
|
713
|
+
return screen.charPool.intern(char)
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
/** Bulk-copy a rectangular region from src to dst using TypedArray.set(). */
|
|
717
|
+
export function blitRegion(
|
|
718
|
+
dst: Screen,
|
|
719
|
+
src: Screen,
|
|
720
|
+
regionX: number,
|
|
721
|
+
regionY: number,
|
|
722
|
+
maxX: number,
|
|
723
|
+
maxY: number,
|
|
724
|
+
): void {
|
|
725
|
+
regionX = Math.max(0, regionX)
|
|
726
|
+
regionY = Math.max(0, regionY)
|
|
727
|
+
if (regionX >= maxX || regionY >= maxY) return
|
|
728
|
+
|
|
729
|
+
const rowLen = maxX - regionX
|
|
730
|
+
const srcStride = src.width << 1
|
|
731
|
+
const dstStride = dst.width << 1
|
|
732
|
+
const rowBytes = rowLen << 1 // 2 Int32s per cell
|
|
733
|
+
const srcCells = src.cells
|
|
734
|
+
const dstCells = dst.cells
|
|
735
|
+
const srcNoSel = src.noSelect
|
|
736
|
+
const dstNoSel = dst.noSelect
|
|
737
|
+
|
|
738
|
+
// softWrap is per-row — copy the row range regardless of stride/width.
|
|
739
|
+
// Partial-width blits still carry the row's wrap provenance since the
|
|
740
|
+
// blitted content (a cached ink-text node) is what set the bit.
|
|
741
|
+
dst.softWrap.set(src.softWrap.subarray(regionY, maxY), regionY)
|
|
742
|
+
|
|
743
|
+
// Fast path: contiguous memory when copying full-width rows at same stride
|
|
744
|
+
if (regionX === 0 && maxX === src.width && src.width === dst.width) {
|
|
745
|
+
const srcStart = regionY * srcStride
|
|
746
|
+
const totalBytes = (maxY - regionY) * srcStride
|
|
747
|
+
dstCells.set(
|
|
748
|
+
srcCells.subarray(srcStart, srcStart + totalBytes),
|
|
749
|
+
srcStart, // srcStart === dstStart when strides match and regionX === 0
|
|
750
|
+
)
|
|
751
|
+
// noSelect is 1 byte/cell vs cells' 8 — same region, different scale
|
|
752
|
+
const nsStart = regionY * src.width
|
|
753
|
+
const nsLen = (maxY - regionY) * src.width
|
|
754
|
+
dstNoSel.set(srcNoSel.subarray(nsStart, nsStart + nsLen), nsStart)
|
|
755
|
+
} else {
|
|
756
|
+
// Per-row copy for partial-width or mismatched-stride regions
|
|
757
|
+
let srcRowCI = regionY * srcStride + (regionX << 1)
|
|
758
|
+
let dstRowCI = regionY * dstStride + (regionX << 1)
|
|
759
|
+
let srcRowNS = regionY * src.width + regionX
|
|
760
|
+
let dstRowNS = regionY * dst.width + regionX
|
|
761
|
+
for (let y = regionY; y < maxY; y++) {
|
|
762
|
+
dstCells.set(srcCells.subarray(srcRowCI, srcRowCI + rowBytes), dstRowCI)
|
|
763
|
+
dstNoSel.set(srcNoSel.subarray(srcRowNS, srcRowNS + rowLen), dstRowNS)
|
|
764
|
+
srcRowCI += srcStride
|
|
765
|
+
dstRowCI += dstStride
|
|
766
|
+
srcRowNS += src.width
|
|
767
|
+
dstRowNS += dst.width
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
// Compute damage once for the whole region
|
|
772
|
+
const regionRect = {
|
|
773
|
+
x: regionX,
|
|
774
|
+
y: regionY,
|
|
775
|
+
width: rowLen,
|
|
776
|
+
height: maxY - regionY,
|
|
777
|
+
}
|
|
778
|
+
if (dst.damage) {
|
|
779
|
+
dst.damage = unionRect(dst.damage, regionRect)
|
|
780
|
+
} else {
|
|
781
|
+
dst.damage = regionRect
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
// Handle wide char at right edge: spacer might be outside blit region
|
|
785
|
+
// but still within dst bounds. Per-row check only at the boundary column.
|
|
786
|
+
if (maxX < dst.width) {
|
|
787
|
+
let srcLastCI = (regionY * src.width + (maxX - 1)) << 1
|
|
788
|
+
let dstSpacerCI = (regionY * dst.width + maxX) << 1
|
|
789
|
+
let wroteSpacerOutsideRegion = false
|
|
790
|
+
for (let y = regionY; y < maxY; y++) {
|
|
791
|
+
if ((srcCells[srcLastCI + 1]! & WIDTH_MASK) === CellWidth.Wide) {
|
|
792
|
+
dstCells[dstSpacerCI] = SPACER_CHAR_INDEX
|
|
793
|
+
dstCells[dstSpacerCI + 1] = packWord1(
|
|
794
|
+
dst.emptyStyleId,
|
|
795
|
+
0,
|
|
796
|
+
CellWidth.SpacerTail,
|
|
797
|
+
)
|
|
798
|
+
wroteSpacerOutsideRegion = true
|
|
799
|
+
}
|
|
800
|
+
srcLastCI += srcStride
|
|
801
|
+
dstSpacerCI += dstStride
|
|
802
|
+
}
|
|
803
|
+
// Expand damage to include SpacerTail column if we wrote any
|
|
804
|
+
if (wroteSpacerOutsideRegion && dst.damage) {
|
|
805
|
+
const rightEdge = dst.damage.x + dst.damage.width
|
|
806
|
+
if (rightEdge === maxX) {
|
|
807
|
+
dst.damage = { ...dst.damage, width: dst.damage.width + 1 }
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
/** Bulk-clear a rectangular region of the screen. */
|
|
814
|
+
export function clearRegion(
|
|
815
|
+
screen: Screen,
|
|
816
|
+
regionX: number,
|
|
817
|
+
regionY: number,
|
|
818
|
+
regionWidth: number,
|
|
819
|
+
regionHeight: number,
|
|
820
|
+
): void {
|
|
821
|
+
const startX = Math.max(0, regionX)
|
|
822
|
+
const startY = Math.max(0, regionY)
|
|
823
|
+
const maxX = Math.min(regionX + regionWidth, screen.width)
|
|
824
|
+
const maxY = Math.min(regionY + regionHeight, screen.height)
|
|
825
|
+
if (startX >= maxX || startY >= maxY) return
|
|
826
|
+
|
|
827
|
+
const cells = screen.cells
|
|
828
|
+
const cells64 = screen.cells64
|
|
829
|
+
const screenWidth = screen.width
|
|
830
|
+
const rowBase = startY * screenWidth
|
|
831
|
+
let damageMinX = startX
|
|
832
|
+
let damageMaxX = maxX
|
|
833
|
+
|
|
834
|
+
// EMPTY_CELL_VALUE (0n) matches the zero-initialized state:
|
|
835
|
+
// word0=EMPTY_CHAR_INDEX(0), word1=packWord1(0,0,0)=0
|
|
836
|
+
if (startX === 0 && maxX === screenWidth) {
|
|
837
|
+
// Full-width: single fill, no boundary checks needed
|
|
838
|
+
cells64.fill(
|
|
839
|
+
EMPTY_CELL_VALUE,
|
|
840
|
+
rowBase,
|
|
841
|
+
rowBase + (maxY - startY) * screenWidth,
|
|
842
|
+
)
|
|
843
|
+
} else {
|
|
844
|
+
// Partial-width: single loop handles boundary cleanup and fill per row.
|
|
845
|
+
const stride = screenWidth << 1 // 2 Int32s per cell
|
|
846
|
+
const rowLen = maxX - startX
|
|
847
|
+
const checkLeft = startX > 0
|
|
848
|
+
const checkRight = maxX < screenWidth
|
|
849
|
+
let leftEdge = (rowBase + startX) << 1
|
|
850
|
+
let rightEdge = (rowBase + maxX - 1) << 1
|
|
851
|
+
let fillStart = rowBase + startX
|
|
852
|
+
|
|
853
|
+
for (let y = startY; y < maxY; y++) {
|
|
854
|
+
// Left boundary: if cell at startX is a SpacerTail, the Wide char
|
|
855
|
+
// at startX-1 (outside the region) will be orphaned. Clear it.
|
|
856
|
+
if (checkLeft) {
|
|
857
|
+
// leftEdge points to word0 of cell at startX; +1 is its word1
|
|
858
|
+
if ((cells[leftEdge + 1]! & WIDTH_MASK) === CellWidth.SpacerTail) {
|
|
859
|
+
// word1 of cell at startX-1 is leftEdge-1; word0 is leftEdge-2
|
|
860
|
+
const prevW1 = leftEdge - 1
|
|
861
|
+
if ((cells[prevW1]! & WIDTH_MASK) === CellWidth.Wide) {
|
|
862
|
+
cells[prevW1 - 1] = EMPTY_CHAR_INDEX
|
|
863
|
+
cells[prevW1] = packWord1(screen.emptyStyleId, 0, CellWidth.Narrow)
|
|
864
|
+
damageMinX = startX - 1
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
// Right boundary: if cell at maxX-1 is Wide, its SpacerTail at maxX
|
|
870
|
+
// (outside the region) will be orphaned. Clear it.
|
|
871
|
+
if (checkRight) {
|
|
872
|
+
// rightEdge points to word0 of cell at maxX-1; +1 is its word1
|
|
873
|
+
if ((cells[rightEdge + 1]! & WIDTH_MASK) === CellWidth.Wide) {
|
|
874
|
+
// word1 of cell at maxX is rightEdge+3 (+2 to next word0, +1 to word1)
|
|
875
|
+
const nextW1 = rightEdge + 3
|
|
876
|
+
if ((cells[nextW1]! & WIDTH_MASK) === CellWidth.SpacerTail) {
|
|
877
|
+
cells[nextW1 - 1] = EMPTY_CHAR_INDEX
|
|
878
|
+
cells[nextW1] = packWord1(screen.emptyStyleId, 0, CellWidth.Narrow)
|
|
879
|
+
damageMaxX = maxX + 1
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
cells64.fill(EMPTY_CELL_VALUE, fillStart, fillStart + rowLen)
|
|
885
|
+
leftEdge += stride
|
|
886
|
+
rightEdge += stride
|
|
887
|
+
fillStart += screenWidth
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
// Update damage once for the whole region
|
|
892
|
+
const regionRect = {
|
|
893
|
+
x: damageMinX,
|
|
894
|
+
y: startY,
|
|
895
|
+
width: damageMaxX - damageMinX,
|
|
896
|
+
height: maxY - startY,
|
|
897
|
+
}
|
|
898
|
+
if (screen.damage) {
|
|
899
|
+
screen.damage = unionRect(screen.damage, regionRect)
|
|
900
|
+
} else {
|
|
901
|
+
screen.damage = regionRect
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
/** Shift full-width rows within [top, bottom] (inclusive, 0-indexed) by n. */
|
|
906
|
+
export function shiftRows(
|
|
907
|
+
screen: Screen,
|
|
908
|
+
top: number,
|
|
909
|
+
bottom: number,
|
|
910
|
+
n: number,
|
|
911
|
+
): void {
|
|
912
|
+
if (n === 0 || top < 0 || bottom >= screen.height || top > bottom) return
|
|
913
|
+
const w = screen.width
|
|
914
|
+
const cells64 = screen.cells64
|
|
915
|
+
const noSel = screen.noSelect
|
|
916
|
+
const sw = screen.softWrap
|
|
917
|
+
const absN = Math.abs(n)
|
|
918
|
+
if (absN > bottom - top) {
|
|
919
|
+
cells64.fill(EMPTY_CELL_VALUE, top * w, (bottom + 1) * w)
|
|
920
|
+
noSel.fill(0, top * w, (bottom + 1) * w)
|
|
921
|
+
sw.fill(0, top, bottom + 1)
|
|
922
|
+
return
|
|
923
|
+
}
|
|
924
|
+
if (n > 0) {
|
|
925
|
+
// SU: row top+n..bottom → top..bottom-n; clear bottom-n+1..bottom
|
|
926
|
+
cells64.copyWithin(top * w, (top + n) * w, (bottom + 1) * w)
|
|
927
|
+
noSel.copyWithin(top * w, (top + n) * w, (bottom + 1) * w)
|
|
928
|
+
sw.copyWithin(top, top + n, bottom + 1)
|
|
929
|
+
cells64.fill(EMPTY_CELL_VALUE, (bottom - n + 1) * w, (bottom + 1) * w)
|
|
930
|
+
noSel.fill(0, (bottom - n + 1) * w, (bottom + 1) * w)
|
|
931
|
+
sw.fill(0, bottom - n + 1, bottom + 1)
|
|
932
|
+
} else {
|
|
933
|
+
// SD: row top..bottom+n → top-n..bottom; clear top..top-n-1
|
|
934
|
+
cells64.copyWithin((top - n) * w, top * w, (bottom + n + 1) * w)
|
|
935
|
+
noSel.copyWithin((top - n) * w, top * w, (bottom + n + 1) * w)
|
|
936
|
+
sw.copyWithin(top - n, top, bottom + n + 1)
|
|
937
|
+
cells64.fill(EMPTY_CELL_VALUE, top * w, (top - n) * w)
|
|
938
|
+
noSel.fill(0, top * w, (top - n) * w)
|
|
939
|
+
sw.fill(0, top, top - n)
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
// Matches OSC 8 ; ; URI BEL
|
|
944
|
+
const OSC8_REGEX = new RegExp(`^${ESC}\\]8${SEP}${SEP}([^${BEL}]*)${BEL}$`)
|
|
945
|
+
// OSC8 prefix: ESC ] 8 ; — cheap check to skip regex for the vast majority of styles (SGR = ESC [)
|
|
946
|
+
export const OSC8_PREFIX = `${ESC}]8${SEP}`
|
|
947
|
+
|
|
948
|
+
export function extractHyperlinkFromStyles(
|
|
949
|
+
styles: AnsiCode[],
|
|
950
|
+
): Hyperlink | null {
|
|
951
|
+
for (const style of styles) {
|
|
952
|
+
const code = style.code
|
|
953
|
+
if (code.length < 5 || !code.startsWith(OSC8_PREFIX)) continue
|
|
954
|
+
const match = code.match(OSC8_REGEX)
|
|
955
|
+
if (match) {
|
|
956
|
+
return match[1] || null
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
return null
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
export function filterOutHyperlinkStyles(styles: AnsiCode[]): AnsiCode[] {
|
|
963
|
+
return styles.filter(
|
|
964
|
+
style =>
|
|
965
|
+
!style.code.startsWith(OSC8_PREFIX) || !OSC8_REGEX.test(style.code),
|
|
966
|
+
)
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
// ---
|
|
970
|
+
|
|
971
|
+
/** Returns an array of all changes between two screens. */
|
|
972
|
+
export function diff(
|
|
973
|
+
prev: Screen,
|
|
974
|
+
next: Screen,
|
|
975
|
+
): [point: Point, removed: Cell | undefined, added: Cell | undefined][] {
|
|
976
|
+
const output: [Point, Cell | undefined, Cell | undefined][] = []
|
|
977
|
+
diffEach(prev, next, (x, y, removed, added) => {
|
|
978
|
+
// Copy cells since diffEach reuses the objects
|
|
979
|
+
output.push([
|
|
980
|
+
{ x, y },
|
|
981
|
+
removed ? { ...removed } : undefined,
|
|
982
|
+
added ? { ...added } : undefined,
|
|
983
|
+
])
|
|
984
|
+
})
|
|
985
|
+
return output
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
type DiffCallback = (
|
|
989
|
+
x: number,
|
|
990
|
+
y: number,
|
|
991
|
+
removed: Cell | undefined,
|
|
992
|
+
added: Cell | undefined,
|
|
993
|
+
) => boolean | void
|
|
994
|
+
|
|
995
|
+
/** Like diff(), but calls a callback for each change instead of building an array. */
|
|
996
|
+
export function diffEach(
|
|
997
|
+
prev: Screen,
|
|
998
|
+
next: Screen,
|
|
999
|
+
cb: DiffCallback,
|
|
1000
|
+
): boolean {
|
|
1001
|
+
const prevWidth = prev.width
|
|
1002
|
+
const nextWidth = next.width
|
|
1003
|
+
const prevHeight = prev.height
|
|
1004
|
+
const nextHeight = next.height
|
|
1005
|
+
|
|
1006
|
+
let region: Rectangle
|
|
1007
|
+
if (prevWidth === 0 && prevHeight === 0) {
|
|
1008
|
+
region = { x: 0, y: 0, width: nextWidth, height: nextHeight }
|
|
1009
|
+
} else if (next.damage) {
|
|
1010
|
+
region = next.damage
|
|
1011
|
+
if (prev.damage) {
|
|
1012
|
+
region = unionRect(region, prev.damage)
|
|
1013
|
+
}
|
|
1014
|
+
} else if (prev.damage) {
|
|
1015
|
+
region = prev.damage
|
|
1016
|
+
} else {
|
|
1017
|
+
region = { x: 0, y: 0, width: 0, height: 0 }
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
if (prevHeight > nextHeight) {
|
|
1021
|
+
region = unionRect(region, {
|
|
1022
|
+
x: 0,
|
|
1023
|
+
y: nextHeight,
|
|
1024
|
+
width: prevWidth,
|
|
1025
|
+
height: prevHeight - nextHeight,
|
|
1026
|
+
})
|
|
1027
|
+
}
|
|
1028
|
+
if (prevWidth > nextWidth) {
|
|
1029
|
+
region = unionRect(region, {
|
|
1030
|
+
x: nextWidth,
|
|
1031
|
+
y: 0,
|
|
1032
|
+
width: prevWidth - nextWidth,
|
|
1033
|
+
height: prevHeight,
|
|
1034
|
+
})
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
const maxHeight = Math.max(prevHeight, nextHeight)
|
|
1038
|
+
const maxWidth = Math.max(prevWidth, nextWidth)
|
|
1039
|
+
const endY = Math.min(region.y + region.height, maxHeight)
|
|
1040
|
+
const endX = Math.min(region.x + region.width, maxWidth)
|
|
1041
|
+
|
|
1042
|
+
if (prevWidth === nextWidth) {
|
|
1043
|
+
return diffSameWidth(prev, next, region.x, endX, region.y, endY, cb)
|
|
1044
|
+
}
|
|
1045
|
+
return diffDifferentWidth(prev, next, region.x, endX, region.y, endY, cb)
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
/** Scan for the next cell that differs between two Int32Arrays. */
|
|
1049
|
+
function findNextDiff(
|
|
1050
|
+
a: Int32Array,
|
|
1051
|
+
b: Int32Array,
|
|
1052
|
+
w0: number,
|
|
1053
|
+
count: number,
|
|
1054
|
+
): number {
|
|
1055
|
+
for (let i = 0; i < count; i++, w0 += 2) {
|
|
1056
|
+
const w1 = w0 | 1
|
|
1057
|
+
if (a[w0] !== b[w0] || a[w1] !== b[w1]) return i
|
|
1058
|
+
}
|
|
1059
|
+
return count
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
/** Diff one row where both screens are in bounds. */
|
|
1063
|
+
function diffRowBoth(
|
|
1064
|
+
prevCells: Int32Array,
|
|
1065
|
+
nextCells: Int32Array,
|
|
1066
|
+
prev: Screen,
|
|
1067
|
+
next: Screen,
|
|
1068
|
+
ci: number,
|
|
1069
|
+
y: number,
|
|
1070
|
+
startX: number,
|
|
1071
|
+
endX: number,
|
|
1072
|
+
prevCell: Cell,
|
|
1073
|
+
nextCell: Cell,
|
|
1074
|
+
cb: DiffCallback,
|
|
1075
|
+
): boolean {
|
|
1076
|
+
let x = startX
|
|
1077
|
+
while (x < endX) {
|
|
1078
|
+
const skip = findNextDiff(prevCells, nextCells, ci, endX - x)
|
|
1079
|
+
x += skip
|
|
1080
|
+
ci += skip << 1
|
|
1081
|
+
if (x >= endX) break
|
|
1082
|
+
cellAtCI(prev, ci, prevCell)
|
|
1083
|
+
cellAtCI(next, ci, nextCell)
|
|
1084
|
+
if (cb(x, y, prevCell, nextCell)) return true
|
|
1085
|
+
x++
|
|
1086
|
+
ci += 2
|
|
1087
|
+
}
|
|
1088
|
+
return false
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
/** Emit removals for a row that only exists in prev (height shrank). */
|
|
1092
|
+
function diffRowRemoved(
|
|
1093
|
+
prev: Screen,
|
|
1094
|
+
ci: number,
|
|
1095
|
+
y: number,
|
|
1096
|
+
startX: number,
|
|
1097
|
+
endX: number,
|
|
1098
|
+
prevCell: Cell,
|
|
1099
|
+
cb: DiffCallback,
|
|
1100
|
+
): boolean {
|
|
1101
|
+
for (let x = startX; x < endX; x++, ci += 2) {
|
|
1102
|
+
cellAtCI(prev, ci, prevCell)
|
|
1103
|
+
if (cb(x, y, prevCell, undefined)) return true
|
|
1104
|
+
}
|
|
1105
|
+
return false
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
/** Emit additions for a row that only exists in next (height grew). */
|
|
1109
|
+
function diffRowAdded(
|
|
1110
|
+
nextCells: Int32Array,
|
|
1111
|
+
next: Screen,
|
|
1112
|
+
ci: number,
|
|
1113
|
+
y: number,
|
|
1114
|
+
startX: number,
|
|
1115
|
+
endX: number,
|
|
1116
|
+
nextCell: Cell,
|
|
1117
|
+
cb: DiffCallback,
|
|
1118
|
+
): boolean {
|
|
1119
|
+
for (let x = startX; x < endX; x++, ci += 2) {
|
|
1120
|
+
if (nextCells[ci] === 0 && nextCells[ci | 1] === 0) continue
|
|
1121
|
+
cellAtCI(next, ci, nextCell)
|
|
1122
|
+
if (cb(x, y, undefined, nextCell)) return true
|
|
1123
|
+
}
|
|
1124
|
+
return false
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
/** Diff two screens with identical width. */
|
|
1128
|
+
function diffSameWidth(
|
|
1129
|
+
prev: Screen,
|
|
1130
|
+
next: Screen,
|
|
1131
|
+
startX: number,
|
|
1132
|
+
endX: number,
|
|
1133
|
+
startY: number,
|
|
1134
|
+
endY: number,
|
|
1135
|
+
cb: DiffCallback,
|
|
1136
|
+
): boolean {
|
|
1137
|
+
const prevCells = prev.cells
|
|
1138
|
+
const nextCells = next.cells
|
|
1139
|
+
const width = prev.width
|
|
1140
|
+
const prevHeight = prev.height
|
|
1141
|
+
const nextHeight = next.height
|
|
1142
|
+
const stride = width << 1
|
|
1143
|
+
|
|
1144
|
+
const prevCell: Cell = {
|
|
1145
|
+
char: ' ',
|
|
1146
|
+
styleId: 0,
|
|
1147
|
+
width: CellWidth.Narrow,
|
|
1148
|
+
hyperlink: undefined,
|
|
1149
|
+
}
|
|
1150
|
+
const nextCell: Cell = {
|
|
1151
|
+
char: ' ',
|
|
1152
|
+
styleId: 0,
|
|
1153
|
+
width: CellWidth.Narrow,
|
|
1154
|
+
hyperlink: undefined,
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
const rowEndX = Math.min(endX, width)
|
|
1158
|
+
let rowCI = (startY * width + startX) << 1
|
|
1159
|
+
|
|
1160
|
+
for (let y = startY; y < endY; y++) {
|
|
1161
|
+
const prevIn = y < prevHeight
|
|
1162
|
+
const nextIn = y < nextHeight
|
|
1163
|
+
|
|
1164
|
+
if (prevIn && nextIn) {
|
|
1165
|
+
if (
|
|
1166
|
+
diffRowBoth(
|
|
1167
|
+
prevCells,
|
|
1168
|
+
nextCells,
|
|
1169
|
+
prev,
|
|
1170
|
+
next,
|
|
1171
|
+
rowCI,
|
|
1172
|
+
y,
|
|
1173
|
+
startX,
|
|
1174
|
+
rowEndX,
|
|
1175
|
+
prevCell,
|
|
1176
|
+
nextCell,
|
|
1177
|
+
cb,
|
|
1178
|
+
)
|
|
1179
|
+
)
|
|
1180
|
+
return true
|
|
1181
|
+
} else if (prevIn) {
|
|
1182
|
+
if (diffRowRemoved(prev, rowCI, y, startX, rowEndX, prevCell, cb))
|
|
1183
|
+
return true
|
|
1184
|
+
} else if (nextIn) {
|
|
1185
|
+
if (
|
|
1186
|
+
diffRowAdded(nextCells, next, rowCI, y, startX, rowEndX, nextCell, cb)
|
|
1187
|
+
)
|
|
1188
|
+
return true
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
rowCI += stride
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
return false
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
/** Fallback: diff two screens with different widths (resize). */
|
|
1198
|
+
function diffDifferentWidth(
|
|
1199
|
+
prev: Screen,
|
|
1200
|
+
next: Screen,
|
|
1201
|
+
startX: number,
|
|
1202
|
+
endX: number,
|
|
1203
|
+
startY: number,
|
|
1204
|
+
endY: number,
|
|
1205
|
+
cb: DiffCallback,
|
|
1206
|
+
): boolean {
|
|
1207
|
+
const prevWidth = prev.width
|
|
1208
|
+
const nextWidth = next.width
|
|
1209
|
+
const prevCells = prev.cells
|
|
1210
|
+
const nextCells = next.cells
|
|
1211
|
+
|
|
1212
|
+
const prevCell: Cell = {
|
|
1213
|
+
char: ' ',
|
|
1214
|
+
styleId: 0,
|
|
1215
|
+
width: CellWidth.Narrow,
|
|
1216
|
+
hyperlink: undefined,
|
|
1217
|
+
}
|
|
1218
|
+
const nextCell: Cell = {
|
|
1219
|
+
char: ' ',
|
|
1220
|
+
styleId: 0,
|
|
1221
|
+
width: CellWidth.Narrow,
|
|
1222
|
+
hyperlink: undefined,
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
const prevStride = prevWidth << 1
|
|
1226
|
+
const nextStride = nextWidth << 1
|
|
1227
|
+
let prevRowCI = (startY * prevWidth + startX) << 1
|
|
1228
|
+
let nextRowCI = (startY * nextWidth + startX) << 1
|
|
1229
|
+
|
|
1230
|
+
for (let y = startY; y < endY; y++) {
|
|
1231
|
+
const prevIn = y < prev.height
|
|
1232
|
+
const nextIn = y < next.height
|
|
1233
|
+
const prevEndX = prevIn ? Math.min(endX, prevWidth) : startX
|
|
1234
|
+
const nextEndX = nextIn ? Math.min(endX, nextWidth) : startX
|
|
1235
|
+
const bothEndX = Math.min(prevEndX, nextEndX)
|
|
1236
|
+
|
|
1237
|
+
let prevCI = prevRowCI
|
|
1238
|
+
let nextCI = nextRowCI
|
|
1239
|
+
|
|
1240
|
+
for (let x = startX; x < bothEndX; x++) {
|
|
1241
|
+
if (
|
|
1242
|
+
prevCells[prevCI] === nextCells[nextCI] &&
|
|
1243
|
+
prevCells[prevCI + 1] === nextCells[nextCI + 1]
|
|
1244
|
+
) {
|
|
1245
|
+
prevCI += 2
|
|
1246
|
+
nextCI += 2
|
|
1247
|
+
continue
|
|
1248
|
+
}
|
|
1249
|
+
cellAtCI(prev, prevCI, prevCell)
|
|
1250
|
+
cellAtCI(next, nextCI, nextCell)
|
|
1251
|
+
prevCI += 2
|
|
1252
|
+
nextCI += 2
|
|
1253
|
+
if (cb(x, y, prevCell, nextCell)) return true
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
if (prevEndX > bothEndX) {
|
|
1257
|
+
prevCI = prevRowCI + ((bothEndX - startX) << 1)
|
|
1258
|
+
for (let x = bothEndX; x < prevEndX; x++) {
|
|
1259
|
+
cellAtCI(prev, prevCI, prevCell)
|
|
1260
|
+
prevCI += 2
|
|
1261
|
+
if (cb(x, y, prevCell, undefined)) return true
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
if (nextEndX > bothEndX) {
|
|
1266
|
+
nextCI = nextRowCI + ((bothEndX - startX) << 1)
|
|
1267
|
+
for (let x = bothEndX; x < nextEndX; x++) {
|
|
1268
|
+
if (nextCells[nextCI] === 0 && nextCells[nextCI | 1] === 0) {
|
|
1269
|
+
nextCI += 2
|
|
1270
|
+
continue
|
|
1271
|
+
}
|
|
1272
|
+
cellAtCI(next, nextCI, nextCell)
|
|
1273
|
+
nextCI += 2
|
|
1274
|
+
if (cb(x, y, undefined, nextCell)) return true
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
prevRowCI += prevStride
|
|
1279
|
+
nextRowCI += nextStride
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
return false
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
/** Mark a rectangular region as noSelect (exclude from text selection). */
|
|
1286
|
+
export function markNoSelectRegion(
|
|
1287
|
+
screen: Screen,
|
|
1288
|
+
x: number,
|
|
1289
|
+
y: number,
|
|
1290
|
+
width: number,
|
|
1291
|
+
height: number,
|
|
1292
|
+
): void {
|
|
1293
|
+
const maxX = Math.min(x + width, screen.width)
|
|
1294
|
+
const maxY = Math.min(y + height, screen.height)
|
|
1295
|
+
const noSel = screen.noSelect
|
|
1296
|
+
const stride = screen.width
|
|
1297
|
+
for (let row = Math.max(0, y); row < maxY; row++) {
|
|
1298
|
+
const rowStart = row * stride
|
|
1299
|
+
noSel.fill(1, rowStart + Math.max(0, x), rowStart + maxX)
|
|
1300
|
+
}
|
|
1301
|
+
}
|