nastech-tui 0.0.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/.prettierrc +11 -0
- package/README.md +346 -0
- package/eslint.config.mjs +111 -0
- package/package.json +51 -0
- package/packages/nastech-ink/ambient.d.ts +83 -0
- package/packages/nastech-ink/index.d.ts +40 -0
- package/packages/nastech-ink/index.js +1 -0
- package/packages/nastech-ink/nastech-ink/ambient.d.ts +83 -0
- package/packages/nastech-ink/nastech-ink/index.d.ts +40 -0
- package/packages/nastech-ink/nastech-ink/index.js +1 -0
- package/packages/nastech-ink/nastech-ink/package.json +54 -0
- package/packages/nastech-ink/nastech-ink/src/bootstrap/state.ts +9 -0
- package/packages/nastech-ink/nastech-ink/src/entry-exports.ts +32 -0
- package/packages/nastech-ink/nastech-ink/src/hooks/use-stderr.ts +15 -0
- package/packages/nastech-ink/nastech-ink/src/hooks/use-stdout.ts +15 -0
- package/packages/nastech-ink/nastech-ink/src/ink/Ansi.tsx +435 -0
- package/packages/nastech-ink/nastech-ink/src/ink/app-mouse.test.ts +123 -0
- package/packages/nastech-ink/nastech-ink/src/ink/bidi.ts +145 -0
- package/packages/nastech-ink/nastech-ink/src/ink/cache-eviction.ts +45 -0
- package/packages/nastech-ink/nastech-ink/src/ink/clearTerminal.ts +68 -0
- package/packages/nastech-ink/nastech-ink/src/ink/colorize.test.ts +60 -0
- package/packages/nastech-ink/nastech-ink/src/ink/colorize.ts +277 -0
- package/packages/nastech-ink/nastech-ink/src/ink/components/AlternateScreen.tsx +133 -0
- package/packages/nastech-ink/nastech-ink/src/ink/components/App.tsx +830 -0
- package/packages/nastech-ink/nastech-ink/src/ink/components/AppContext.ts +20 -0
- package/packages/nastech-ink/nastech-ink/src/ink/components/Box.tsx +294 -0
- package/packages/nastech-ink/nastech-ink/src/ink/components/Button.tsx +236 -0
- package/packages/nastech-ink/nastech-ink/src/ink/components/ClockContext.tsx +133 -0
- package/packages/nastech-ink/nastech-ink/src/ink/components/CursorAdvanceContext.ts +35 -0
- package/packages/nastech-ink/nastech-ink/src/ink/components/CursorDeclarationContext.ts +28 -0
- package/packages/nastech-ink/nastech-ink/src/ink/components/ErrorOverview.tsx +130 -0
- package/packages/nastech-ink/nastech-ink/src/ink/components/Link.tsx +38 -0
- package/packages/nastech-ink/nastech-ink/src/ink/components/Newline.tsx +43 -0
- package/packages/nastech-ink/nastech-ink/src/ink/components/NoSelect.tsx +73 -0
- package/packages/nastech-ink/nastech-ink/src/ink/components/RawAnsi.tsx +61 -0
- package/packages/nastech-ink/nastech-ink/src/ink/components/ScrollBox.tsx +290 -0
- package/packages/nastech-ink/nastech-ink/src/ink/components/Spacer.tsx +23 -0
- package/packages/nastech-ink/nastech-ink/src/ink/components/StdinContext.ts +25 -0
- package/packages/nastech-ink/nastech-ink/src/ink/components/TerminalFocusContext.tsx +63 -0
- package/packages/nastech-ink/nastech-ink/src/ink/components/TerminalSizeContext.tsx +7 -0
- package/packages/nastech-ink/nastech-ink/src/ink/components/Text.test.ts +38 -0
- package/packages/nastech-ink/nastech-ink/src/ink/components/Text.tsx +336 -0
- package/packages/nastech-ink/nastech-ink/src/ink/constants.ts +6 -0
- package/packages/nastech-ink/nastech-ink/src/ink/cursor.ts +5 -0
- package/packages/nastech-ink/nastech-ink/src/ink/devtools.ts +2 -0
- package/packages/nastech-ink/nastech-ink/src/ink/dom.ts +495 -0
- package/packages/nastech-ink/nastech-ink/src/ink/events/click-event.ts +38 -0
- package/packages/nastech-ink/nastech-ink/src/ink/events/cmd-shortcuts.test.ts +65 -0
- package/packages/nastech-ink/nastech-ink/src/ink/events/dispatcher.ts +242 -0
- package/packages/nastech-ink/nastech-ink/src/ink/events/emitter.ts +40 -0
- package/packages/nastech-ink/nastech-ink/src/ink/events/event-handlers.ts +84 -0
- package/packages/nastech-ink/nastech-ink/src/ink/events/event.ts +11 -0
- package/packages/nastech-ink/nastech-ink/src/ink/events/focus-event.ts +18 -0
- package/packages/nastech-ink/nastech-ink/src/ink/events/input-event.ts +176 -0
- package/packages/nastech-ink/nastech-ink/src/ink/events/keyboard-event.ts +57 -0
- package/packages/nastech-ink/nastech-ink/src/ink/events/mouse-event.ts +18 -0
- package/packages/nastech-ink/nastech-ink/src/ink/events/paste-event.ts +10 -0
- package/packages/nastech-ink/nastech-ink/src/ink/events/resize-event.ts +12 -0
- package/packages/nastech-ink/nastech-ink/src/ink/events/terminal-event.ts +107 -0
- package/packages/nastech-ink/nastech-ink/src/ink/events/terminal-focus-event.ts +19 -0
- package/packages/nastech-ink/nastech-ink/src/ink/focus.ts +219 -0
- package/packages/nastech-ink/nastech-ink/src/ink/frame.ts +124 -0
- package/packages/nastech-ink/nastech-ink/src/ink/get-max-width.ts +27 -0
- package/packages/nastech-ink/nastech-ink/src/ink/global.d.ts +1 -0
- package/packages/nastech-ink/nastech-ink/src/ink/hit-test.test.ts +38 -0
- package/packages/nastech-ink/nastech-ink/src/ink/hit-test.ts +224 -0
- package/packages/nastech-ink/nastech-ink/src/ink/hooks/use-animation-frame.ts +62 -0
- package/packages/nastech-ink/nastech-ink/src/ink/hooks/use-app.ts +9 -0
- package/packages/nastech-ink/nastech-ink/src/ink/hooks/use-cursor-advance.ts +33 -0
- package/packages/nastech-ink/nastech-ink/src/ink/hooks/use-declared-cursor.ts +75 -0
- package/packages/nastech-ink/nastech-ink/src/ink/hooks/use-external-process.ts +27 -0
- package/packages/nastech-ink/nastech-ink/src/ink/hooks/use-input.ts +95 -0
- package/packages/nastech-ink/nastech-ink/src/ink/hooks/use-interval.ts +71 -0
- package/packages/nastech-ink/package.json +57 -0
- package/packages/nastech-ink/src/bootstrap/state.ts +9 -0
- package/packages/nastech-ink/src/entry-exports.ts +32 -0
- package/packages/nastech-ink/src/hooks/use-stderr.ts +15 -0
- package/packages/nastech-ink/src/hooks/use-stdout.ts +15 -0
- package/packages/nastech-ink/src/ink/Ansi.tsx +435 -0
- package/packages/nastech-ink/src/ink/app-mouse.test.ts +123 -0
- package/packages/nastech-ink/src/ink/app-rawmode-mouse.test.ts +91 -0
- package/packages/nastech-ink/src/ink/bidi.ts +145 -0
- package/packages/nastech-ink/src/ink/cache-eviction.ts +45 -0
- package/packages/nastech-ink/src/ink/clearTerminal.ts +68 -0
- package/packages/nastech-ink/src/ink/colorize.test.ts +60 -0
- package/packages/nastech-ink/src/ink/colorize.ts +277 -0
- package/packages/nastech-ink/src/ink/components/AlternateScreen.tsx +133 -0
- package/packages/nastech-ink/src/ink/components/App.tsx +855 -0
- package/packages/nastech-ink/src/ink/components/AppContext.ts +20 -0
- package/packages/nastech-ink/src/ink/components/Box.tsx +294 -0
- package/packages/nastech-ink/src/ink/components/Button.tsx +236 -0
- package/packages/nastech-ink/src/ink/components/ClockContext.tsx +133 -0
- package/packages/nastech-ink/src/ink/components/CursorAdvanceContext.ts +35 -0
- package/packages/nastech-ink/src/ink/components/CursorDeclarationContext.ts +28 -0
- package/packages/nastech-ink/src/ink/components/ErrorOverview.tsx +130 -0
- package/packages/nastech-ink/src/ink/components/Link.tsx +38 -0
- package/packages/nastech-ink/src/ink/components/Newline.tsx +43 -0
- package/packages/nastech-ink/src/ink/components/NoSelect.tsx +73 -0
- package/packages/nastech-ink/src/ink/components/RawAnsi.tsx +61 -0
- package/packages/nastech-ink/src/ink/components/ScrollBox.tsx +290 -0
- package/packages/nastech-ink/src/ink/components/Spacer.tsx +23 -0
- package/packages/nastech-ink/src/ink/components/StdinContext.ts +25 -0
- package/packages/nastech-ink/src/ink/components/TerminalFocusContext.tsx +63 -0
- package/packages/nastech-ink/src/ink/components/TerminalSizeContext.tsx +7 -0
- package/packages/nastech-ink/src/ink/components/Text.test.ts +38 -0
- package/packages/nastech-ink/src/ink/components/Text.tsx +336 -0
- package/packages/nastech-ink/src/ink/constants.ts +6 -0
- package/packages/nastech-ink/src/ink/cursor.ts +5 -0
- package/packages/nastech-ink/src/ink/devtools.ts +2 -0
- package/packages/nastech-ink/src/ink/dom.ts +495 -0
- package/packages/nastech-ink/src/ink/events/click-event.ts +38 -0
- package/packages/nastech-ink/src/ink/events/cmd-shortcuts.test.ts +65 -0
- package/packages/nastech-ink/src/ink/events/dispatcher.ts +242 -0
- package/packages/nastech-ink/src/ink/events/emitter.ts +40 -0
- package/packages/nastech-ink/src/ink/events/event-handlers.ts +84 -0
- package/packages/nastech-ink/src/ink/events/event.ts +11 -0
- package/packages/nastech-ink/src/ink/events/focus-event.ts +18 -0
- package/packages/nastech-ink/src/ink/events/input-event.ts +176 -0
- package/packages/nastech-ink/src/ink/events/keyboard-event.ts +57 -0
- package/packages/nastech-ink/src/ink/events/mouse-event.ts +18 -0
- package/packages/nastech-ink/src/ink/events/paste-event.ts +10 -0
- package/packages/nastech-ink/src/ink/events/resize-event.ts +12 -0
- package/packages/nastech-ink/src/ink/events/terminal-event.ts +107 -0
- package/packages/nastech-ink/src/ink/events/terminal-focus-event.ts +19 -0
- package/packages/nastech-ink/src/ink/focus.ts +219 -0
- package/packages/nastech-ink/src/ink/frame.ts +124 -0
- package/packages/nastech-ink/src/ink/get-max-width.ts +27 -0
- package/packages/nastech-ink/src/ink/global.d.ts +1 -0
- package/packages/nastech-ink/src/ink/hit-test.test.ts +38 -0
- package/packages/nastech-ink/src/ink/hit-test.ts +224 -0
- package/packages/nastech-ink/src/ink/hooks/use-animation-frame.ts +62 -0
- package/packages/nastech-ink/src/ink/hooks/use-app.ts +9 -0
- package/packages/nastech-ink/src/ink/hooks/use-cursor-advance.ts +33 -0
- package/packages/nastech-ink/src/ink/hooks/use-declared-cursor.ts +75 -0
- package/packages/nastech-ink/src/ink/hooks/use-external-process.ts +27 -0
- package/packages/nastech-ink/src/ink/hooks/use-input.ts +95 -0
- package/packages/nastech-ink/src/ink/hooks/use-interval.ts +71 -0
- package/packages/nastech-ink/src/ink/hooks/use-search-highlight.ts +56 -0
- package/packages/nastech-ink/src/ink/hooks/use-selection.ts +101 -0
- package/packages/nastech-ink/src/ink/hooks/use-stdin.ts +9 -0
- package/packages/nastech-ink/src/ink/hooks/use-tab-status.ts +71 -0
- package/packages/nastech-ink/src/ink/hooks/use-terminal-focus.ts +18 -0
- package/packages/nastech-ink/src/ink/hooks/use-terminal-title.ts +34 -0
- package/packages/nastech-ink/src/ink/hooks/use-terminal-viewport.ts +100 -0
- package/packages/nastech-ink/src/ink/hyperlinkHover.ts +52 -0
- package/packages/nastech-ink/src/ink/ink-cursor-advance.test.ts +234 -0
- package/packages/nastech-ink/src/ink/ink-resize.test.ts +50 -0
- package/packages/nastech-ink/src/ink/ink.tsx +2705 -0
- package/packages/nastech-ink/src/ink/instances.ts +10 -0
- package/packages/nastech-ink/src/ink/layout/engine.ts +6 -0
- package/packages/nastech-ink/src/ink/layout/geometry.ts +98 -0
- package/packages/nastech-ink/src/ink/layout/node.ts +145 -0
- package/packages/nastech-ink/src/ink/layout/yoga.ts +313 -0
- package/packages/nastech-ink/src/ink/line-width-cache.ts +38 -0
- package/packages/nastech-ink/src/ink/log-update.test.ts +223 -0
- package/packages/nastech-ink/src/ink/log-update.ts +752 -0
- package/packages/nastech-ink/src/ink/lru.ts +14 -0
- package/packages/nastech-ink/src/ink/measure-element.ts +23 -0
- package/packages/nastech-ink/src/ink/measure-text.ts +50 -0
- package/packages/nastech-ink/src/ink/node-cache.ts +53 -0
- package/packages/nastech-ink/src/ink/optimizer.ts +99 -0
- package/packages/nastech-ink/src/ink/output.ts +845 -0
- package/packages/nastech-ink/src/ink/parse-keypress.test.ts +133 -0
- package/packages/nastech-ink/src/ink/parse-keypress.ts +848 -0
- package/packages/nastech-ink/src/ink/reconciler.ts +382 -0
- package/packages/nastech-ink/src/ink/render-border.ts +206 -0
- package/packages/nastech-ink/src/ink/render-node-to-output.ts +1582 -0
- package/packages/nastech-ink/src/ink/render-to-screen.ts +236 -0
- package/packages/nastech-ink/src/ink/renderer.ts +169 -0
- package/packages/nastech-ink/src/ink/root.ts +204 -0
- package/packages/nastech-ink/src/ink/screen.ts +1590 -0
- package/packages/nastech-ink/src/ink/searchHighlight.ts +91 -0
- package/packages/nastech-ink/src/ink/selection.test.ts +82 -0
- package/packages/nastech-ink/src/ink/selection.ts +1143 -0
- package/packages/nastech-ink/src/ink/squash-text-nodes.ts +74 -0
- package/packages/nastech-ink/src/ink/stringWidth.ts +341 -0
- package/packages/nastech-ink/src/ink/styles.ts +750 -0
- package/packages/nastech-ink/src/ink/supports-hyperlinks.ts +51 -0
- package/packages/nastech-ink/src/ink/tabstops.ts +44 -0
- package/packages/nastech-ink/src/ink/terminal-focus-state.ts +52 -0
- package/packages/nastech-ink/src/ink/terminal-querier.ts +222 -0
- package/packages/nastech-ink/src/ink/terminal.test.ts +15 -0
- package/packages/nastech-ink/src/ink/terminal.ts +299 -0
- package/packages/nastech-ink/src/ink/termio/ansi.ts +75 -0
- package/packages/nastech-ink/src/ink/termio/csi.ts +334 -0
- package/packages/nastech-ink/src/ink/termio/dec.ts +99 -0
- package/packages/nastech-ink/src/ink/termio/esc.ts +69 -0
- package/packages/nastech-ink/src/ink/termio/osc.test.ts +191 -0
- package/packages/nastech-ink/src/ink/termio/osc.ts +724 -0
- package/packages/nastech-ink/src/ink/termio/parser.ts +467 -0
- package/packages/nastech-ink/src/ink/termio/sgr.ts +362 -0
- package/packages/nastech-ink/src/ink/termio/tokenize.test.ts +185 -0
- package/packages/nastech-ink/src/ink/termio/tokenize.ts +350 -0
- package/packages/nastech-ink/src/ink/termio/types.ts +230 -0
- package/packages/nastech-ink/src/ink/termio.ts +42 -0
- package/packages/nastech-ink/src/ink/useTerminalNotification.ts +110 -0
- package/packages/nastech-ink/src/ink/warn.ts +15 -0
- package/packages/nastech-ink/src/ink/widest-line.ts +22 -0
- package/packages/nastech-ink/src/ink/wrap-text.test.ts +17 -0
- package/packages/nastech-ink/src/ink/wrap-text.ts +144 -0
- package/packages/nastech-ink/src/ink/wrapAnsi.ts +13 -0
- package/packages/nastech-ink/src/native-ts/yoga-layout/enums.ts +112 -0
- package/packages/nastech-ink/src/native-ts/yoga-layout/index.ts +2326 -0
- package/packages/nastech-ink/src/utils/debug.ts +6 -0
- package/packages/nastech-ink/src/utils/earlyInput.ts +131 -0
- package/packages/nastech-ink/src/utils/env.ts +66 -0
- package/packages/nastech-ink/src/utils/envUtils.ts +13 -0
- package/packages/nastech-ink/src/utils/execFileNoThrow.test.ts +146 -0
- package/packages/nastech-ink/src/utils/execFileNoThrow.ts +115 -0
- package/packages/nastech-ink/src/utils/fullscreen.ts +3 -0
- package/packages/nastech-ink/src/utils/intl.ts +87 -0
- package/packages/nastech-ink/src/utils/log.ts +7 -0
- package/packages/nastech-ink/src/utils/semver.ts +57 -0
- package/packages/nastech-ink/src/utils/sliceAnsi.ts +106 -0
- package/packages/nastech-ink/text-input.d.ts +2 -0
- package/packages/nastech-ink/text-input.js +1 -0
- package/scripts/build.mjs +61 -0
- package/scripts/profile-tui.mjs +121 -0
- package/src/__tests__/activeSessionSwitcher.test.ts +157 -0
- package/src/__tests__/appChromeStatusRule.test.tsx +84 -0
- package/src/__tests__/appChromeStatusRuleDevCredits.test.tsx +73 -0
- package/src/__tests__/approvalAction.test.ts +50 -0
- package/src/__tests__/asCommandDispatch.test.ts +27 -0
- package/src/__tests__/blockLayout.test.ts +122 -0
- package/src/__tests__/clipboard.test.ts +369 -0
- package/src/__tests__/constants.test.ts +53 -0
- package/src/__tests__/createGatewayEventHandler.test.ts +1091 -0
- package/src/__tests__/createSlashHandler.test.ts +822 -0
- package/src/__tests__/creditsCommand.test.ts +144 -0
- package/src/__tests__/cursorDriftRegression.test.ts +114 -0
- package/src/__tests__/details.test.ts +115 -0
- package/src/__tests__/emoji.test.ts +64 -0
- package/src/__tests__/externalLink.test.ts +144 -0
- package/src/__tests__/forceTruecolor.test.ts +191 -0
- package/src/__tests__/gatewayClient.test.ts +394 -0
- package/src/__tests__/gatewayRecovery.test.ts +47 -0
- package/src/__tests__/markdown.test.ts +331 -0
- package/src/__tests__/mathUnicode.test.ts +293 -0
- package/src/__tests__/memoryMonitor.test.ts +102 -0
- package/src/__tests__/messageLine.test.ts +19 -0
- package/src/__tests__/messages.test.ts +92 -0
- package/src/__tests__/orchestratorPromptSession.test.ts +64 -0
- package/src/__tests__/osc52.test.ts +67 -0
- package/src/__tests__/parentLog.test.ts +75 -0
- package/src/__tests__/paths.test.ts +70 -0
- package/src/__tests__/platform.test.ts +556 -0
- package/src/__tests__/precisionWheel.test.ts +44 -0
- package/src/__tests__/prompt.test.ts +31 -0
- package/src/__tests__/providers.test.ts +65 -0
- package/src/__tests__/reasoning.test.ts +76 -0
- package/src/__tests__/rpc.test.ts +27 -0
- package/src/__tests__/scroll.test.ts +99 -0
- package/src/__tests__/slashParity.test.ts +123 -0
- package/src/__tests__/spawnHistoryStore.test.ts +46 -0
- package/src/__tests__/stateIsolation.test.ts +46 -0
- package/src/__tests__/statusBarTicker.test.ts +18 -0
- package/src/__tests__/statusRule.test.ts +32 -0
- package/src/__tests__/streamingMarkdown.test.ts +121 -0
- package/src/__tests__/subagentTree.test.ts +407 -0
- package/src/__tests__/syntax.test.ts +45 -0
- package/src/__tests__/terminalModes.test.ts +39 -0
- package/src/__tests__/terminalParity.test.ts +77 -0
- package/src/__tests__/terminalSetup.test.ts +386 -0
- package/src/__tests__/termux.test.ts +35 -0
- package/src/__tests__/termuxComposerLayout.test.ts +40 -0
- package/src/__tests__/text.test.ts +233 -0
- package/src/__tests__/textInputBurstInput.test.ts +40 -0
- package/src/__tests__/textInputCursorSourceOfTruth.test.ts +50 -0
- package/src/__tests__/textInputFastEcho.test.ts +200 -0
- package/src/__tests__/textInputLineNav.test.ts +55 -0
- package/src/__tests__/textInputPassThrough.test.ts +59 -0
- package/src/__tests__/textInputRightClick.test.ts +48 -0
- package/src/__tests__/textInputWrap.test.ts +151 -0
- package/src/__tests__/theme.test.ts +311 -0
- package/src/__tests__/turnControllerNotice.test.ts +43 -0
- package/src/__tests__/turnStore.test.ts +66 -0
- package/src/__tests__/useCompletion.test.ts +35 -0
- package/src/__tests__/useComposerState.test.ts +59 -0
- package/src/__tests__/useConfigSync.test.ts +460 -0
- package/src/__tests__/useInputHandlers.test.ts +77 -0
- package/src/__tests__/useQueue.test.ts +28 -0
- package/src/__tests__/useSessionLifecycle.test.ts +60 -0
- package/src/__tests__/useVirtualHistoryHeights.test.ts +39 -0
- package/src/__tests__/viewport.test.ts +58 -0
- package/src/__tests__/viewportStore.test.ts +85 -0
- package/src/__tests__/virtualHeights.test.ts +96 -0
- package/src/__tests__/virtualHistoryClamp.test.ts +19 -0
- package/src/__tests__/virtualHistoryOffsetCache.test.ts +282 -0
- package/src/__tests__/wheelAccel.test.ts +138 -0
- package/src/app/createGatewayEventHandler.ts +833 -0
- package/src/app/createSlashHandler.ts +130 -0
- package/src/app/delegationStore.ts +77 -0
- package/src/app/gatewayContext.tsx +19 -0
- package/src/app/gatewayRecovery.ts +35 -0
- package/src/app/inputSelectionStore.ts +15 -0
- package/src/app/interfaces.ts +394 -0
- package/src/app/overlayStore.ts +53 -0
- package/src/app/scroll.ts +71 -0
- package/src/app/setupHandoff.ts +54 -0
- package/src/app/slash/commands/core.ts +648 -0
- package/src/app/slash/commands/credits.ts +57 -0
- package/src/app/slash/commands/debug.ts +48 -0
- package/src/app/slash/commands/ops.ts +717 -0
- package/src/app/slash/commands/session.ts +554 -0
- package/src/app/slash/commands/setup.ts +20 -0
- package/src/app/slash/registry.ts +20 -0
- package/src/app/slash/types.ts +21 -0
- package/src/app/spawnHistoryStore.ts +159 -0
- package/src/app/turnController.ts +866 -0
- package/src/app/turnStore.ts +85 -0
- package/src/app/uiStore.ts +44 -0
- package/src/app/useComposerState.ts +367 -0
- package/src/app/useConfigSync.ts +288 -0
- package/src/app/useInputHandlers.ts +576 -0
- package/src/app/useLongRunToolCharms.ts +69 -0
- package/src/app/useMainApp.ts +1039 -0
- package/src/app/useSessionLifecycle.ts +366 -0
- package/src/app/useSubmission.ts +429 -0
- package/src/app.tsx +25 -0
- package/src/banner.ts +93 -0
- package/src/components/activeSessionSwitcher.tsx +635 -0
- package/src/components/agentsOverlay.tsx +1073 -0
- package/src/components/appChrome.tsx +554 -0
- package/src/components/appLayout.tsx +444 -0
- package/src/components/appOverlays.tsx +254 -0
- package/src/components/branding.tsx +466 -0
- package/src/components/fpsOverlay.tsx +30 -0
- package/src/components/helpHint.tsx +73 -0
- package/src/components/markdown.tsx +1119 -0
- package/src/components/maskedPrompt.tsx +34 -0
- package/src/components/messageLine.tsx +237 -0
- package/src/components/modelPicker.tsx +527 -0
- package/src/components/overlayControls.tsx +50 -0
- package/src/components/pluginsHub.tsx +238 -0
- package/src/components/prompts.tsx +276 -0
- package/src/components/queuedMessages.tsx +64 -0
- package/src/components/sessionPicker.tsx +227 -0
- package/src/components/skillsHub.tsx +308 -0
- package/src/components/streamingAssistant.tsx +110 -0
- package/src/components/streamingMarkdown.tsx +174 -0
- package/src/components/textInput.tsx +1340 -0
- package/src/components/themed.tsx +30 -0
- package/src/components/thinking.tsx +1224 -0
- package/src/components/todoPanel.tsx +93 -0
- package/src/config/env.ts +64 -0
- package/src/config/limits.ts +13 -0
- package/src/config/timing.ts +6 -0
- package/src/content/charms.ts +1 -0
- package/src/content/faces.ts +17 -0
- package/src/content/fortunes.ts +30 -0
- package/src/content/hotkeys.ts +37 -0
- package/src/content/placeholders.ts +13 -0
- package/src/content/setup.ts +17 -0
- package/src/content/verbs.ts +38 -0
- package/src/domain/blockLayout.ts +146 -0
- package/src/domain/details.ts +76 -0
- package/src/domain/messages.ts +91 -0
- package/src/domain/paths.ts +16 -0
- package/src/domain/providers.ts +11 -0
- package/src/domain/roles.ts +9 -0
- package/src/domain/slash.ts +10 -0
- package/src/domain/usage.ts +3 -0
- package/src/domain/viewport.ts +51 -0
- package/src/entry.tsx +104 -0
- package/src/gatewayClient.ts +730 -0
- package/src/gatewayTypes.ts +568 -0
- package/src/hooks/useCompletion.ts +112 -0
- package/src/hooks/useGitBranch.ts +72 -0
- package/src/hooks/useInputHistory.ts +11 -0
- package/src/hooks/useQueue.ts +76 -0
- package/src/hooks/useVirtualHistory.ts +554 -0
- package/src/lib/circularBuffer.ts +48 -0
- package/src/lib/clipboard.ts +182 -0
- package/src/lib/editor.test.ts +74 -0
- package/src/lib/editor.ts +47 -0
- package/src/lib/emoji.ts +55 -0
- package/src/lib/externalCli.ts +16 -0
- package/src/lib/externalLink.ts +435 -0
- package/src/lib/forceTruecolor.ts +60 -0
- package/src/lib/fpsStore.ts +51 -0
- package/src/lib/fuzzy.test.ts +109 -0
- package/src/lib/fuzzy.ts +177 -0
- package/src/lib/gracefulExit.ts +47 -0
- package/src/lib/history.ts +82 -0
- package/src/lib/inputMetrics.ts +203 -0
- package/src/lib/liveProgress.test.ts +116 -0
- package/src/lib/liveProgress.ts +79 -0
- package/src/lib/mathUnicode.ts +770 -0
- package/src/lib/memory.test.ts +155 -0
- package/src/lib/memory.ts +188 -0
- package/src/lib/memoryMonitor.ts +109 -0
- package/src/lib/messages.test.ts +29 -0
- package/src/lib/messages.ts +8 -0
- package/src/lib/openExternalUrl.test.ts +217 -0
- package/src/lib/openExternalUrl.ts +158 -0
- package/src/lib/osc52.ts +73 -0
- package/src/lib/parentLog.ts +57 -0
- package/src/lib/perfPane.tsx +107 -0
- package/src/lib/platform.ts +409 -0
- package/src/lib/precisionWheel.ts +48 -0
- package/src/lib/prompt.ts +35 -0
- package/src/lib/reasoning.ts +55 -0
- package/src/lib/rpc.ts +41 -0
- package/src/lib/subagentTree.ts +355 -0
- package/src/lib/syntax.ts +117 -0
- package/src/lib/terminalModes.ts +51 -0
- package/src/lib/terminalParity.ts +78 -0
- package/src/lib/terminalSetup.ts +444 -0
- package/src/lib/termux.ts +29 -0
- package/src/lib/text.test.ts +18 -0
- package/src/lib/text.ts +339 -0
- package/src/lib/todo.test.ts +21 -0
- package/src/lib/todo.ts +9 -0
- package/src/lib/viewportStore.ts +124 -0
- package/src/lib/virtualHeights.ts +145 -0
- package/src/lib/wheelAccel.ts +190 -0
- package/src/protocol/interpolation.ts +3 -0
- package/src/protocol/paste.ts +1 -0
- package/src/theme.ts +589 -0
- package/src/types/nastech-ink.d.ts +176 -0
- package/src/types.ts +212 -0
- package/tsconfig.build.json +9 -0
- package/tsconfig.json +19 -0
- package/vitest.config.ts +7 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { createContext, useCallback, useContext, useMemo } from 'react'
|
|
2
|
+
|
|
3
|
+
import { isProgressReportingAvailable, type Progress } from './terminal.js'
|
|
4
|
+
import { BEL } from './termio/ansi.js'
|
|
5
|
+
import { ITERM2, OSC, osc, PROGRESS, wrapForMultiplexer } from './termio/osc.js'
|
|
6
|
+
|
|
7
|
+
type WriteRaw = (data: string) => void
|
|
8
|
+
|
|
9
|
+
export const TerminalWriteContext = createContext<WriteRaw | null>(null)
|
|
10
|
+
|
|
11
|
+
export const TerminalWriteProvider = TerminalWriteContext.Provider
|
|
12
|
+
|
|
13
|
+
export type TerminalNotification = {
|
|
14
|
+
notifyITerm2: (opts: { message: string; title?: string }) => void
|
|
15
|
+
notifyKitty: (opts: { message: string; title: string; id: number }) => void
|
|
16
|
+
notifyGhostty: (opts: { message: string; title: string }) => void
|
|
17
|
+
notifyBell: () => void
|
|
18
|
+
/**
|
|
19
|
+
* Report progress to the terminal via OSC 9;4 sequences.
|
|
20
|
+
* Supported terminals: ConEmu, Ghostty 1.2.0+, iTerm2 3.6.6+
|
|
21
|
+
* Pass state=null to clear progress.
|
|
22
|
+
*/
|
|
23
|
+
progress: (state: Progress['state'] | null, percentage?: number) => void
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function useTerminalNotification(): TerminalNotification {
|
|
27
|
+
const writeRaw = useContext(TerminalWriteContext)
|
|
28
|
+
|
|
29
|
+
if (!writeRaw) {
|
|
30
|
+
throw new Error('useTerminalNotification must be used within TerminalWriteProvider')
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const notifyITerm2 = useCallback(
|
|
34
|
+
({ message, title }: { message: string; title?: string }) => {
|
|
35
|
+
const displayString = title ? `${title}:\n${message}` : message
|
|
36
|
+
writeRaw(wrapForMultiplexer(osc(OSC.ITERM2, `\n\n${displayString}`)))
|
|
37
|
+
},
|
|
38
|
+
[writeRaw]
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
const notifyKitty = useCallback(
|
|
42
|
+
({ message, title, id }: { message: string; title: string; id: number }) => {
|
|
43
|
+
writeRaw(wrapForMultiplexer(osc(OSC.KITTY, `i=${id}:d=0:p=title`, title)))
|
|
44
|
+
writeRaw(wrapForMultiplexer(osc(OSC.KITTY, `i=${id}:p=body`, message)))
|
|
45
|
+
writeRaw(wrapForMultiplexer(osc(OSC.KITTY, `i=${id}:d=1:a=focus`, '')))
|
|
46
|
+
},
|
|
47
|
+
[writeRaw]
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
const notifyGhostty = useCallback(
|
|
51
|
+
({ message, title }: { message: string; title: string }) => {
|
|
52
|
+
writeRaw(wrapForMultiplexer(osc(OSC.GHOSTTY, 'notify', title, message)))
|
|
53
|
+
},
|
|
54
|
+
[writeRaw]
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
const notifyBell = useCallback(() => {
|
|
58
|
+
// Raw BEL — inside tmux this triggers tmux's bell-action (window flag).
|
|
59
|
+
// Wrapping would make it opaque DCS payload and lose that fallback.
|
|
60
|
+
writeRaw(BEL)
|
|
61
|
+
}, [writeRaw])
|
|
62
|
+
|
|
63
|
+
const progress = useCallback(
|
|
64
|
+
(state: Progress['state'] | null, percentage?: number) => {
|
|
65
|
+
if (!isProgressReportingAvailable()) {
|
|
66
|
+
return
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (!state) {
|
|
70
|
+
writeRaw(wrapForMultiplexer(osc(OSC.ITERM2, ITERM2.PROGRESS, PROGRESS.CLEAR, '')))
|
|
71
|
+
|
|
72
|
+
return
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const pct = Math.max(0, Math.min(100, Math.round(percentage ?? 0)))
|
|
76
|
+
|
|
77
|
+
switch (state) {
|
|
78
|
+
case 'completed':
|
|
79
|
+
writeRaw(wrapForMultiplexer(osc(OSC.ITERM2, ITERM2.PROGRESS, PROGRESS.CLEAR, '')))
|
|
80
|
+
|
|
81
|
+
break
|
|
82
|
+
|
|
83
|
+
case 'error':
|
|
84
|
+
writeRaw(wrapForMultiplexer(osc(OSC.ITERM2, ITERM2.PROGRESS, PROGRESS.ERROR, pct)))
|
|
85
|
+
|
|
86
|
+
break
|
|
87
|
+
|
|
88
|
+
case 'indeterminate':
|
|
89
|
+
writeRaw(wrapForMultiplexer(osc(OSC.ITERM2, ITERM2.PROGRESS, PROGRESS.INDETERMINATE, '')))
|
|
90
|
+
|
|
91
|
+
break
|
|
92
|
+
|
|
93
|
+
case 'running':
|
|
94
|
+
writeRaw(wrapForMultiplexer(osc(OSC.ITERM2, ITERM2.PROGRESS, PROGRESS.SET, pct)))
|
|
95
|
+
|
|
96
|
+
break
|
|
97
|
+
|
|
98
|
+
case null:
|
|
99
|
+
// Handled by the if guard above
|
|
100
|
+
break
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
[writeRaw]
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
return useMemo(
|
|
107
|
+
() => ({ notifyITerm2, notifyKitty, notifyGhostty, notifyBell, progress }),
|
|
108
|
+
[notifyITerm2, notifyKitty, notifyGhostty, notifyBell, progress]
|
|
109
|
+
)
|
|
110
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { logForDebugging } from '../utils/debug.js'
|
|
2
|
+
|
|
3
|
+
export function ifNotInteger(value: number | undefined, name: string): void {
|
|
4
|
+
if (value === undefined) {
|
|
5
|
+
return
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
if (Number.isInteger(value)) {
|
|
9
|
+
return
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
logForDebugging(`${name} should be an integer, got ${value}`, {
|
|
13
|
+
level: 'warn'
|
|
14
|
+
})
|
|
15
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { lineWidth } from './line-width-cache.js'
|
|
2
|
+
|
|
3
|
+
export function widestLine(string: string): number {
|
|
4
|
+
let maxWidth = 0
|
|
5
|
+
let start = 0
|
|
6
|
+
|
|
7
|
+
while (start <= string.length) {
|
|
8
|
+
const end = string.indexOf('\n', start)
|
|
9
|
+
|
|
10
|
+
const line = end === -1 ? string.substring(start) : string.substring(start, end)
|
|
11
|
+
|
|
12
|
+
maxWidth = Math.max(maxWidth, lineWidth(line))
|
|
13
|
+
|
|
14
|
+
if (end === -1) {
|
|
15
|
+
break
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
start = end + 1
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return maxWidth
|
|
22
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest'
|
|
2
|
+
|
|
3
|
+
import wrapText from './wrap-text.js'
|
|
4
|
+
|
|
5
|
+
describe('wrapText wrap-trim', () => {
|
|
6
|
+
it('removes a single soft-wrap boundary space', () => {
|
|
7
|
+
expect(wrapText('Let me', 5, 'wrap-trim')).toBe('Let\nme')
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
it('preserves extra original spacing at soft-wrap boundaries', () => {
|
|
11
|
+
expect(wrapText('foo bar', 5, 'wrap-trim')).toBe('foo \nbar')
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
it('preserves leading whitespace on unwrapped source lines', () => {
|
|
15
|
+
expect(wrapText(' indented', 20, 'wrap-trim')).toBe(' indented')
|
|
16
|
+
})
|
|
17
|
+
})
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import sliceAnsi from '../utils/sliceAnsi.js'
|
|
2
|
+
|
|
3
|
+
import { lruEvict } from './lru.js'
|
|
4
|
+
import { stringWidth } from './stringWidth.js'
|
|
5
|
+
import type { Styles } from './styles.js'
|
|
6
|
+
import { wrapAnsi } from './wrapAnsi.js'
|
|
7
|
+
|
|
8
|
+
const ELLIPSIS = '…'
|
|
9
|
+
|
|
10
|
+
// CPU profile (Apr 2026) showed `wrap-ansi` → `string-width` consuming 30% of
|
|
11
|
+
// total runtime during fast scroll: every layout pass re-wraps every visible
|
|
12
|
+
// line via wrap-ansi, which calls string-width once per grapheme. The output
|
|
13
|
+
// is pure of (text, maxWidth, wrapType), so memoize it. LRU-bounded so long
|
|
14
|
+
// sessions don't accrete unbounded cache.
|
|
15
|
+
const WRAP_CACHE_LIMIT = 4096
|
|
16
|
+
const wrapCache = new Map<string, string>()
|
|
17
|
+
|
|
18
|
+
function memoizedWrap(text: string, maxWidth: number, wrapType: Styles['textWrap']): string {
|
|
19
|
+
// Key folds maxWidth + wrapType into the prefix so the same text re-wrapped
|
|
20
|
+
// at a different width doesn't collide. Width prefix bounded by viewport
|
|
21
|
+
// (~10 distinct widths in a session); wrapType bounded by enum (~6 values).
|
|
22
|
+
const key = `${maxWidth}|${wrapType}|${text}`
|
|
23
|
+
const cached = wrapCache.get(key)
|
|
24
|
+
|
|
25
|
+
if (cached !== undefined) {
|
|
26
|
+
// LRU touch
|
|
27
|
+
wrapCache.delete(key)
|
|
28
|
+
wrapCache.set(key, cached)
|
|
29
|
+
|
|
30
|
+
return cached
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const result = computeWrap(text, maxWidth, wrapType)
|
|
34
|
+
|
|
35
|
+
if (wrapCache.size >= WRAP_CACHE_LIMIT) {
|
|
36
|
+
wrapCache.delete(wrapCache.keys().next().value!)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
wrapCache.set(key, result)
|
|
40
|
+
|
|
41
|
+
return result
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// sliceAnsi may include a boundary-spanning wide char (e.g. CJK at position
|
|
45
|
+
// end-1 with width 2 overshoots by 1). Retry with a tighter bound once.
|
|
46
|
+
function sliceFit(text: string, start: number, end: number): string {
|
|
47
|
+
const s = sliceAnsi(text, start, end)
|
|
48
|
+
|
|
49
|
+
return stringWidth(s) > end - start ? sliceAnsi(text, start, end - 1) : s
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function truncate(text: string, columns: number, position: 'start' | 'middle' | 'end'): string {
|
|
53
|
+
if (columns < 1) {
|
|
54
|
+
return ''
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (columns === 1) {
|
|
58
|
+
return ELLIPSIS
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const length = stringWidth(text)
|
|
62
|
+
|
|
63
|
+
if (length <= columns) {
|
|
64
|
+
return text
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (position === 'start') {
|
|
68
|
+
return ELLIPSIS + sliceFit(text, length - columns + 1, length)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (position === 'middle') {
|
|
72
|
+
const half = Math.floor(columns / 2)
|
|
73
|
+
|
|
74
|
+
return sliceFit(text, 0, half) + ELLIPSIS + sliceFit(text, length - (columns - half) + 1, length)
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return sliceFit(text, 0, columns - 1) + ELLIPSIS
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function trimSoftWrapBoundaries(text: string, maxWidth: number): string {
|
|
81
|
+
return text
|
|
82
|
+
.split('\n')
|
|
83
|
+
.map(line => {
|
|
84
|
+
const pieces = wrapAnsi(line, maxWidth, { trim: false, hard: true }).split('\n')
|
|
85
|
+
|
|
86
|
+
if (pieces.length === 1) {
|
|
87
|
+
return pieces[0]!
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
for (let index = 0; index < pieces.length - 1; index++) {
|
|
91
|
+
const current = pieces[index]!
|
|
92
|
+
const next = pieces[index + 1]!
|
|
93
|
+
|
|
94
|
+
if (/\s$/.test(current)) {
|
|
95
|
+
pieces[index] = current.replace(/\s$/, '')
|
|
96
|
+
} else if (/^\s/.test(next)) {
|
|
97
|
+
pieces[index + 1] = next.replace(/^\s/, '')
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return pieces.join('\n')
|
|
102
|
+
})
|
|
103
|
+
.join('\n')
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function computeWrap(text: string, maxWidth: number, wrapType: Styles['textWrap']): string {
|
|
107
|
+
if (wrapType === 'wrap') {
|
|
108
|
+
return wrapAnsi(text, maxWidth, { trim: false, hard: true })
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
if (wrapType === 'wrap-char') {
|
|
112
|
+
return wrapAnsi(text, maxWidth, { trim: false, hard: true, wordWrap: false })
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if (wrapType === 'wrap-trim') {
|
|
116
|
+
return trimSoftWrapBoundaries(text, maxWidth)
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (wrapType!.startsWith('truncate')) {
|
|
120
|
+
const position: 'end' | 'middle' | 'start' =
|
|
121
|
+
wrapType === 'truncate-middle' ? 'middle' : wrapType === 'truncate-start' ? 'start' : 'end'
|
|
122
|
+
|
|
123
|
+
return truncate(text, maxWidth, position)
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return text
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export default function wrapText(text: string, maxWidth: number, wrapType: Styles['textWrap']): string {
|
|
130
|
+
// Skip cache for trivial inputs (faster than Map lookup).
|
|
131
|
+
if (!text || maxWidth <= 0) {
|
|
132
|
+
return computeWrap(text, maxWidth, wrapType)
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
return memoizedWrap(text, maxWidth, wrapType)
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function wrapCacheSize(): number {
|
|
139
|
+
return wrapCache.size
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export function evictWrapCache(keepRatio = 0): void {
|
|
143
|
+
lruEvict(wrapCache, keepRatio)
|
|
144
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import wrapAnsiNpm from 'wrap-ansi'
|
|
2
|
+
|
|
3
|
+
type WrapAnsiOptions = {
|
|
4
|
+
hard?: boolean
|
|
5
|
+
wordWrap?: boolean
|
|
6
|
+
trim?: boolean
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const wrapAnsiBun = typeof Bun !== 'undefined' && typeof Bun.wrapAnsi === 'function' ? Bun.wrapAnsi : null
|
|
10
|
+
|
|
11
|
+
const wrapAnsi: (input: string, columns: number, options?: WrapAnsiOptions) => string = wrapAnsiBun ?? wrapAnsiNpm
|
|
12
|
+
|
|
13
|
+
export { wrapAnsi }
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
export const Align = {
|
|
2
|
+
Auto: 0,
|
|
3
|
+
FlexStart: 1,
|
|
4
|
+
Center: 2,
|
|
5
|
+
FlexEnd: 3,
|
|
6
|
+
Stretch: 4,
|
|
7
|
+
Baseline: 5,
|
|
8
|
+
SpaceBetween: 6,
|
|
9
|
+
SpaceAround: 7,
|
|
10
|
+
SpaceEvenly: 8
|
|
11
|
+
} as const
|
|
12
|
+
export type Align = (typeof Align)[keyof typeof Align]
|
|
13
|
+
export const BoxSizing = {
|
|
14
|
+
BorderBox: 0,
|
|
15
|
+
ContentBox: 1
|
|
16
|
+
} as const
|
|
17
|
+
export type BoxSizing = (typeof BoxSizing)[keyof typeof BoxSizing]
|
|
18
|
+
export const Dimension = {
|
|
19
|
+
Width: 0,
|
|
20
|
+
Height: 1
|
|
21
|
+
} as const
|
|
22
|
+
export type Dimension = (typeof Dimension)[keyof typeof Dimension]
|
|
23
|
+
export const Direction = {
|
|
24
|
+
Inherit: 0,
|
|
25
|
+
LTR: 1,
|
|
26
|
+
RTL: 2
|
|
27
|
+
} as const
|
|
28
|
+
export type Direction = (typeof Direction)[keyof typeof Direction]
|
|
29
|
+
export const Display = {
|
|
30
|
+
Flex: 0,
|
|
31
|
+
None: 1,
|
|
32
|
+
Contents: 2
|
|
33
|
+
} as const
|
|
34
|
+
export type Display = (typeof Display)[keyof typeof Display]
|
|
35
|
+
export const Edge = {
|
|
36
|
+
Left: 0,
|
|
37
|
+
Top: 1,
|
|
38
|
+
Right: 2,
|
|
39
|
+
Bottom: 3,
|
|
40
|
+
Start: 4,
|
|
41
|
+
End: 5,
|
|
42
|
+
Horizontal: 6,
|
|
43
|
+
Vertical: 7,
|
|
44
|
+
All: 8
|
|
45
|
+
} as const
|
|
46
|
+
export type Edge = (typeof Edge)[keyof typeof Edge]
|
|
47
|
+
export const Errata = {
|
|
48
|
+
None: 0,
|
|
49
|
+
StretchFlexBasis: 1,
|
|
50
|
+
AbsolutePositionWithoutInsetsExcludesPadding: 2,
|
|
51
|
+
AbsolutePercentAgainstInnerSize: 4,
|
|
52
|
+
All: 2147483647,
|
|
53
|
+
Classic: 2147483646
|
|
54
|
+
} as const
|
|
55
|
+
export type Errata = (typeof Errata)[keyof typeof Errata]
|
|
56
|
+
export const ExperimentalFeature = {
|
|
57
|
+
WebFlexBasis: 0
|
|
58
|
+
} as const
|
|
59
|
+
export type ExperimentalFeature = (typeof ExperimentalFeature)[keyof typeof ExperimentalFeature]
|
|
60
|
+
export const FlexDirection = {
|
|
61
|
+
Column: 0,
|
|
62
|
+
ColumnReverse: 1,
|
|
63
|
+
Row: 2,
|
|
64
|
+
RowReverse: 3
|
|
65
|
+
} as const
|
|
66
|
+
export type FlexDirection = (typeof FlexDirection)[keyof typeof FlexDirection]
|
|
67
|
+
export const Gutter = {
|
|
68
|
+
Column: 0,
|
|
69
|
+
Row: 1,
|
|
70
|
+
All: 2
|
|
71
|
+
} as const
|
|
72
|
+
export type Gutter = (typeof Gutter)[keyof typeof Gutter]
|
|
73
|
+
export const Justify = {
|
|
74
|
+
FlexStart: 0,
|
|
75
|
+
Center: 1,
|
|
76
|
+
FlexEnd: 2,
|
|
77
|
+
SpaceBetween: 3,
|
|
78
|
+
SpaceAround: 4,
|
|
79
|
+
SpaceEvenly: 5
|
|
80
|
+
} as const
|
|
81
|
+
export type Justify = (typeof Justify)[keyof typeof Justify]
|
|
82
|
+
export const MeasureMode = {
|
|
83
|
+
Undefined: 0,
|
|
84
|
+
Exactly: 1,
|
|
85
|
+
AtMost: 2
|
|
86
|
+
} as const
|
|
87
|
+
export type MeasureMode = (typeof MeasureMode)[keyof typeof MeasureMode]
|
|
88
|
+
export const Overflow = {
|
|
89
|
+
Visible: 0,
|
|
90
|
+
Hidden: 1,
|
|
91
|
+
Scroll: 2
|
|
92
|
+
} as const
|
|
93
|
+
export type Overflow = (typeof Overflow)[keyof typeof Overflow]
|
|
94
|
+
export const PositionType = {
|
|
95
|
+
Static: 0,
|
|
96
|
+
Relative: 1,
|
|
97
|
+
Absolute: 2
|
|
98
|
+
} as const
|
|
99
|
+
export type PositionType = (typeof PositionType)[keyof typeof PositionType]
|
|
100
|
+
export const Unit = {
|
|
101
|
+
Undefined: 0,
|
|
102
|
+
Point: 1,
|
|
103
|
+
Percent: 2,
|
|
104
|
+
Auto: 3
|
|
105
|
+
} as const
|
|
106
|
+
export type Unit = (typeof Unit)[keyof typeof Unit]
|
|
107
|
+
export const Wrap = {
|
|
108
|
+
NoWrap: 0,
|
|
109
|
+
Wrap: 1,
|
|
110
|
+
WrapReverse: 2
|
|
111
|
+
} as const
|
|
112
|
+
export type Wrap = (typeof Wrap)[keyof typeof Wrap]
|