Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix(ui): frontend pruning (#2842)
Fake-Useraa6d9207a77a
diff --git a/js/app/packages/app/component/MacroJump.tsx b/js/app/packages/app/component/MacroJump.tsxdeleted file mode 100644index d3531e2c04..0000000000--- a/js/app/packages/app/component/MacroJump.tsx+++ /dev/null@@ -1,437 +0,0 @@-import { getClippedOverlayRect } from '@app/util/getClippedOverlayRect';-import { getScrollElementParent } from '@app/util/getScrollElementParent';-import {- isElementVisibleInScrollElViewport,- isElementVisibleInViewport,-} from '@core/util/isElementVisibleInViewport';-import { autoUpdate } from '@floating-ui/dom';-import {- type Accessor,- type Component,- createEffect,- createSignal,- createUniqueId,- For,- on,- onCleanup,- onMount,-} from 'solid-js';-import { createStore, reconcile } from 'solid-js/store';-import { tabbable } from 'tabbable';--type TJumpLabel = {- id: string;- label: string;- originalLabel: string;- active: boolean;- targetEl: HTMLElement;- targetElScrollParent: HTMLElement | null;-};--const componentStack: string[] = [];-const [triggerMacroJump, setTriggerMacroJump] = createSignal<Symbol>(Symbol());-export const fireMacroJump = () => {- setTriggerMacroJump(Symbol());-};--const MacroJump: Component<{- tabbableParent?: Accessor<Element | undefined>;-}> = (props) => {- const componentId = createUniqueId();- componentStack.push(componentId);- const [jumpLabels, setJumpLabels] = createStore<TJumpLabel[]>([]);-- const removeAllOverlays = () => {- setJumpLabels([]);- };-- const filterOverlaysAndUpdateLabels = (input: string) => {- const matchingLabels = jumpLabels.flatMap((item) => {- const remainingPart = item.originalLabel.substring(input.length);- return item.originalLabel.startsWith(input)- ? [- {- ...item,- label: remainingPart,- },- ]- : [];- });-- return matchingLabels;- };-- const [currentInput, setCurrentInput] = createSignal('');-- const runMacroJump = () => {- const root = props.tabbableParent?.() ?? document.getElementById('root')!;-- const tabbableEls = tabbable(root);-- const ignoreEls = [- ...root.querySelectorAll(- '[data-corvu-resizable-handle],[data-focus-trap]'- ),- ];-- const newJumpLabels: TJumpLabel[] = tabbableEls- .filter((el) => {- return (- isElementVisibleInViewport(el as HTMLElement, {- padding: {- // include bottom navbar height to reduce viewport bottom- // bottom: 32,- },- }) &&- isElementVisibleInScrollElViewport(el as HTMLElement).isVisible &&- !ignoreEls.includes(el)- );- })- .map((tabbableEl) => {- const id = createUniqueId();- const jumpLetter = jump.getLabel();- tabbableEl = tabbableEl as HTMLElement;- const targetElScrollParent = getScrollElementParent(tabbableEl);-- return {- id,- active: true,- label: jumpLetter,- originalLabel: jumpLetter,- targetEl: tabbableEl,- targetElScrollParent,- };- });-- setJumpLabels(newJumpLabels);-- window.addEventListener('keydown', handleKeyDown, { capture: true });- // If user clicks anywhere, exit- document.addEventListener(- 'mousedown',- () => {- runCleanup();- },- { once: true }- );- };-- const runCleanup = () => {- jump.reset();- setCurrentInput('');- removeAllOverlays();- window.removeEventListener('keydown', handleKeyDown, {- capture: true,- });- };-- const handleKeyDown = (e: KeyboardEvent) => {- e.stopImmediatePropagation();- e.stopPropagation();- e.preventDefault();-- if (e.key === 'Escape') {- removeAllOverlays();- window.removeEventListener('keydown', handleKeyDown, {- capture: true,- });- jump.reset();- return;- }-- if (e.key.length === 1 && /[a-zA-Z0-9;]/.test(e.key)) {- setCurrentInput((prev) => prev + e.key.toLowerCase());- const matchingLabels = filterOverlaysAndUpdateLabels(currentInput());-- if (matchingLabels.length === 1) {- const targetElement = matchingLabels[0].targetEl;- if (targetElement) {- targetElement.focus();-- runCleanup();- return;- }- }-- if (matchingLabels.length === 0) {- runCleanup();- } else {- setJumpLabels(reconcile(matchingLabels));- }-- return;- }-- runCleanup();- };-- createEffect(- on(- triggerMacroJump,- () => {- if (componentStack.at(-1) !== componentId) return;-- setCurrentInput('');- setJumpLabels([]);-- runMacroJump();- },- { defer: true }- )- );- onCleanup(() => {- componentStack.pop();- runCleanup();- });-- return (- // <Portal mount={props.mount ?? document.getElementById('root')!}>- <div>- <For each={jumpLabels}>- {(jumpLabel) => <JumpLabelOverlay {...jumpLabel} />}- </For>- </div>- // </Portal>- );-};--const JumpLabelOverlay: Component<TJumpLabel> = (props) => {- const [targetData, setTargetData] = createStore({- isClippedBottom: false,- isClippedLeft: false,- isClippedRight: false,- isClippedTop: false,- });- let overlayRef!: HTMLDivElement;-- onMount(() => {- const overlay = overlayRef;-- // Get the element's position and dimensions to check if it's visible- const targetRect = props.targetEl.getBoundingClientRect();- if (targetRect.width === 0 || targetRect.height === 0) return null;- const {- rect: clippedRect,- isClippedBottom,- isClippedLeft,- isClippedRight,- isClippedTop,- } = getClippedOverlayRect(props.targetEl, props.targetElScrollParent);-- overlay.style.left = `${clippedRect.left}px`;- overlay.style.top = `${clippedRect.top}px`;- overlay.style.width = `${clippedRect.width}px`;- overlay.style.height = `${clippedRect.height}px`;-- setTargetData({- isClippedBottom,- isClippedLeft,- isClippedRight,- isClippedTop,- });-- const updateOverlay = async () => {- const {- rect: clippedRect,- isFullyClipped,- isClippedBottom,- isClippedLeft,- isClippedRight,- isClippedTop,- } = getClippedOverlayRect(props.targetEl, props.targetElScrollParent);-- overlay.style.display = isFullyClipped ? 'none' : 'block';- overlay.style.left = `${clippedRect.left}px`;- overlay.style.top = `${clippedRect.top}px`;- overlay.style.width = `${clippedRect.width}px`;- overlay.style.height = `${clippedRect.height}px`;-- setTargetData({- isClippedBottom,- isClippedLeft,- isClippedRight,- isClippedTop,- });- };- const cleanup = autoUpdate(props.targetEl, overlayRef, updateOverlay);- onCleanup(() => {- cleanup();- });- });-- return (- <div- class={- 'highlight-overlay fixed pointer-events-none z-[9999] border-page border'- }- style={{- 'border-left-width': targetData.isClippedLeft ? '0' : '',- 'border-top-width': targetData.isClippedTop ? '0' : '',- 'border-right-width': targetData.isClippedRight ? '0' : '',- 'border-bottom-width': targetData.isClippedBottom ? '0' : '',- }}- data-target-id={props.id}- ref={overlayRef}- >- <div- class="relative w-full h-full border-accent border"- style={{- 'background-color':- 'color-mix(in srgb, var(--color-accent) 10%, transparent)',- 'border-left-width': targetData.isClippedLeft ? '0' : '',- 'border-top-width': targetData.isClippedTop ? '0' : '',- 'border-right-width': targetData.isClippedRight ? '0' : '',- 'border-bottom-width': targetData.isClippedBottom ? '0' : '',- }}- >- <div- class={- 'relative font-mono text-page font-bold w-fit bg-accent border-l-accent border-t-accent border-r-page border-b-page border p-[2px] text-xs z-[1]'- }- >- {props.label}- </div>- <div- class="absolute inset-0 border-page border"- style={{- 'border-left-width': targetData.isClippedLeft ? '0' : '',- 'border-top-width': targetData.isClippedTop ? '0' : '',- 'border-right-width': targetData.isClippedRight ? '0' : '',- 'border-bottom-width': targetData.isClippedBottom ? '0' : '',- }}- />- </div>- </div>- );-};--function createJumpLabelGenerator() {- // Use 'asdfghjkl' for main characters and ';qwertyuiopzxcvbnm' for prefix characters- const chars = ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l'];- const prefixChars = [- ';',- 'q',- 'w',- 'e',- 'r',- 't',- 'y',- 'u',- 'i',- 'o',- 'p',- 'z',- 'x',- 'c',- 'v',- 'b',- 'n',- 'm',- ];-- return {- getLabel(index: number) {- if (index < chars.length) {- // Single character labels- return chars[index];- } else {- // Multi-character labels using prefix + character- const remainder = index - chars.length;- const currentStep = Math.floor(remainder / chars.length) + 1;-- if (currentStep > prefixChars.length) {- return null; // No more labels available- }-- const prefix = prefixChars[currentStep - 1];- const label = chars[remainder % chars.length];-- // Avoid repeating the same character- if (prefix === label) {- // Calculate the next valid index that doesn't repeat characters- const nextIndex = index + 1;- return this.getLabel(nextIndex);- }-- return prefix + label;- }- },-- // Better implementation that pre-calculates valid combinations- createQueueBasedGenerator() {- const queue = [...chars]; // Start with single-letter labels- const seen = new Set(queue);-- return {- getLabel(): string {- // if (queue.length === 0) return null;- const label = queue.shift();-- // Generate next level labels only when we're about to run out- // This matches easymotion's approach of using prefix + character- if (queue.length === 0) {- for (let step = 1; step <= prefixChars.length; step++) {- const prefix = prefixChars[step - 1];- for (const c of chars) {- const next = prefix + c;- // Avoid repeating the same character and ensure it's not already seen- if (prefix !== c && !seen.has(next)) {- queue.push(next);- seen.add(next);- }- }- }- }-- return label!;- },-- reset() {- queue.length = 0;- seen.clear();- for (const c of chars) {- queue.push(c);- seen.add(c);- }- },- };- },-- // Alternative implementation that directly calculates valid labels- getLabelDirect(index: number) {- if (index < chars.length) {- return chars[index];- }-- // For multi-character labels, we need to account for skipped combinations- let validIndex = index - chars.length;- let currentStep = 1;-- while (currentStep <= prefixChars.length) {- const prefix = prefixChars[currentStep - 1];- const validCharsInStep = chars.filter((c) => c !== prefix);- const stepSize = validCharsInStep.length;-- if (validIndex < stepSize) {- return prefix + validCharsInStep[validIndex];- }-- validIndex -= stepSize;- currentStep++;- }-- return null; // No more labels available- },-- // Reset method for the main generator- reset() {- // This resets any internal state if needed- // For the index-based approach, no state to reset- // For queue-based generators, they have their own reset methods- return this;- },- };-}-const jump = createJumpLabelGenerator().createQueueBasedGenerator();--export default MacroJump;diff --git a/js/app/packages/app/component/Root.tsx b/js/app/packages/app/component/Root.tsxindex 9d81ec86c0..ba1b4220db 100644--- a/js/app/packages/app/component/Root.tsx+++ b/js/app/packages/app/component/Root.tsx@@ -77,7 +77,6 @@ import { makeEmailAuthComponents } from './EmailAuth';import { GlobalAppStateProvider } from './GlobalAppState';import { SearchProvider } from './next-soup/search-context';import { Layout } from './Layout';-import MacroJump from './MacroJump';import { ReactiveFavicon } from './ReactiveFavicon';import { lazy } from 'solid-js';import { LAYOUT_ROUTE } from './split-layout/SplitLayoutRoute';@@ -85,7 +84,6 @@ import { LAYOUT_ROUTE } from './split-layout/SplitLayoutRoute';const InteractiveOnboarding = lazy(() => import('./interactive-onboarding/InteractiveOnboarding'));-import Visor from './Visor';import { QuickAccessProvider } from '@core/context/quickAccess';import {AnalyticsContextProvider,@@ -446,8 +444,6 @@ export function Root() {<ChatAttachmentsInit /><ReactiveFavicon /><Title>{tabTitle()}</Title>- <MacroJump />- <Visor /><Suspense><IsomorphicRoutertransformUrl={transformShortIdInUrlPathname}diff --git a/js/app/packages/app/component/Visor.tsx b/js/app/packages/app/component/Visor.tsxdeleted file mode 100644index d0df21a6b7..0000000000--- a/js/app/packages/app/component/Visor.tsx+++ /dev/null@@ -1,290 +0,0 @@-import { useSubscribeToKeypress } from '@app/signal/hotkeyRoot';-import { getClippedOverlayRect } from '@app/util/getClippedOverlayRect';-import { getScrollElementParent } from '@app/util/getScrollElementParent';-import { Hotkey } from '@core/component/Hotkey';-import { activeScope } from '@core/hotkey/state';-import { TOKENS, tokenMap } from '@core/hotkey/tokens';-import type { HotkeyCommand, ValidHotkey } from '@core/hotkey/types';-import {- getActiveCommandByToken,- getHotkeyCommandByToken,- isScopeInActiveBranch,- prettyPrintHotkeyString,- useIsInCommandScope,-} from '@core/hotkey/utils';-import {- isElementVisibleInScrollElViewport,- isElementVisibleInViewport,-} from '@core/util/isElementVisibleInViewport';-import { autoUpdate } from '@floating-ui/dom';-import {- type Accessor,- type Component,- createEffect,- createSignal,- createUniqueId,- For,- on,- onCleanup,- onMount,- Show,-} from 'solid-js';-import { createStore } from 'solid-js/store';--function isElementVisible(element: HTMLElement) {- if (- element.offsetParent === null ||- getComputedStyle(element).visibility === 'hidden'- ) {- return false;- }- return true;-}--type VisorLabel = {- id: string;- hotkey: ValidHotkey;- commands: HotkeyCommand[];- targetEl: HTMLElement;- targetElScrollParent: HTMLElement | null;-};--const [isVisorOpen, setIsVisorOpen] = createSignal(false);-export const fireVisor = () => {- setIsVisorOpen(true);-};-export const resetVisor = () => {- setIsVisorOpen(false);-};--const VisorInner: Component<{- parent?: Accessor<Element | undefined>;-}> = (props) => {- const [visorLabels, setVisorLabels] = createStore<VisorLabel[]>([]);- const isInCommandScope = useIsInCommandScope();-- useSubscribeToKeypress((context) => {- if (- context.eventType === 'keydown' &&- context.isNonModifierKeypress &&- !context.isEditableFocused &&- !getHotkeyCommandByToken(TOKENS.global.toggleVisor)?.hotkeys?.some(- (hotkey) => context.pressedKeysString === hotkey- ) &&- !context.commandScopeActivated- ) {- resetVisor();- }- });-- createEffect(- on([isInCommandScope, activeScope], () => {- const root = props.parent?.() ?? document.getElementById('root')!;- const currentScopeId = activeScope();- const inCommandScope = isInCommandScope();-- const hotkeyEls = Array.from(- root.querySelectorAll<HTMLElement>('[data-hotkey-token]')- ).filter((el) => {- const scopeElement = el.closest('[data-hotkey-scope]') as HTMLElement;- if (!scopeElement) return false;-- const scopeId = scopeElement.dataset.hotkeyScope;- return scopeId && isScopeInActiveBranch(scopeId);- });-- const newVisorLabels: VisorLabel[] = hotkeyEls- .filter((el) => {- return (- isElementVisible(el) &&- isElementVisibleInViewport(el, {- padding: {- // include bottom navbar height to reduce viewport bottom- // bottom: 32,- },- }) &&- isElementVisibleInScrollElViewport(el).isVisible- );- })- .reduce<VisorLabel[]>((acc, hotkeyEl) => {- const targetElScrollParent = getScrollElementParent(hotkeyEl);- const id = createUniqueId();- const tokenString = hotkeyEl.dataset.hotkeyToken ?? '';- const token = tokenMap.get(tokenString);- if (!token) return acc;- const commands = getActiveCommandByToken(token, true);- if (!commands || commands.length === 0) return acc;-- let filteredCommands: HotkeyCommand[];- if (inCommandScope && currentScopeId) {- // When in a command scope, only show commands that belong to this scope- filteredCommands = commands.filter(- (cmd) => cmd.scopeId === currentScopeId- );- } else {- filteredCommands = commands;- }-- if (filteredCommands.length === 0) return acc;-- const firstCommand = filteredCommands[0];- if (!firstCommand.hotkeys || firstCommand.hotkeys.length === 0) {- return acc;- }-- const hotkey = firstCommand.hotkeys[0];-- acc.push({- id,- hotkey,- commands: filteredCommands,- targetEl: hotkeyEl,- targetElScrollParent,- } satisfies VisorLabel);- return acc;- }, []);-- setVisorLabels(newVisorLabels);- })- );-- // If user clicks anywhere, exit- const handleMousedown = () => {- setIsVisorOpen(false);- };- document.addEventListener('mousedown', handleMousedown);-- onCleanup(() => {- document.removeEventListener('mousedown', handleMousedown);- });-- return (- <div>- <For each={visorLabels}>- {(jumpLabel) => <VisorLabelOverlay {...jumpLabel} />}- </For>- </div>- );-};--const Visor: Component<{- parent?: Accessor<Element | undefined>;-}> = (props) => {- return (- <Show when={isVisorOpen()}>- <VisorInner {...props} />- </Show>- );-};--const VisorLabelOverlay: Component<VisorLabel> = (props) => {- const [targetData, setTargetData] = createStore({- isClippedBottom: false,- isClippedLeft: false,- isClippedRight: false,- isClippedTop: false,- });- let overlayRef!: HTMLDivElement;-- onMount(() => {- const overlay = overlayRef;-- // Get the element's position and dimensions to check if it's visible- const targetRect = props.targetEl.getBoundingClientRect();- if (targetRect.width === 0 || targetRect.height === 0) return null;- const {- rect: clippedRect,- isClippedBottom,- isClippedLeft,- isClippedRight,- isClippedTop,- } = getClippedOverlayRect(props.targetEl, props.targetElScrollParent);-- overlay.style.left = `${clippedRect.left}px`;- overlay.style.top = `${clippedRect.top}px`;- overlay.style.width = `${clippedRect.width}px`;- overlay.style.height = `${clippedRect.height}px`;-- setTargetData({- isClippedBottom,- isClippedLeft,- isClippedRight,- isClippedTop,- });-- const updateOverlay = async () => {- const {- rect: clippedRect,- isFullyClipped,- isClippedBottom,- isClippedLeft,- isClippedRight,- isClippedTop,- } = getClippedOverlayRect(props.targetEl, props.targetElScrollParent);-- overlay.style.display = isFullyClipped ? 'none' : 'block';- overlay.style.left = `${clippedRect.left}px`;- overlay.style.top = `${clippedRect.top}px`;- overlay.style.width = `${clippedRect.width}px`;- overlay.style.height = `${clippedRect.height}px`;-- setTargetData({- isClippedBottom,- isClippedLeft,- isClippedRight,- isClippedTop,- });- };- const cleanup = autoUpdate(props.targetEl, overlayRef, updateOverlay);- onCleanup(() => {- cleanup();- });- });-- return (- <div- class={- 'highlight-overlay fixed pointer-events-none z-[9999] border-page border'- }- style={{- 'border-left-width': targetData.isClippedLeft ? '0' : '',- 'border-top-width': targetData.isClippedTop ? '0' : '',- 'border-right-width': targetData.isClippedRight ? '0' : '',- 'border-bottom-width': targetData.isClippedBottom ? '0' : '',- }}- data-target-id={props.id}- ref={overlayRef}- >- <div- class="relative w-full h-full border-accent border"- style={{- 'background-color':- 'color-mix(in srgb, var(--color-accent) 10%, transparent)',- 'border-left-width': targetData.isClippedLeft ? '0' : '',- 'border-top-width': targetData.isClippedTop ? '0' : '',- 'border-right-width': targetData.isClippedRight ? '0' : '',- 'border-bottom-width': targetData.isClippedBottom ? '0' : '',- }}- >- <div- class={- 'relative font-mono text-page font-bold w-fit bg-accent border-l-accent border-t-accent border-r-page border-b-page border p-[2px] text-xs z-[1] flex items-center gap-1'- }- >- <Hotkey shortcut={prettyPrintHotkeyString(props.hotkey)} />- </div>- <div- class="absolute inset-0 border-page border"- style={{- 'border-left-width': targetData.isClippedLeft ? '0' : '',- 'border-top-width': targetData.isClippedTop ? '0' : '',- 'border-right-width': targetData.isClippedRight ? '0' : '',- 'border-bottom-width': targetData.isClippedBottom ? '0' : '',- }}- />- </div>- </div>- );-};--export default Visor;diff --git a/js/app/packages/app/component/WhichKey.tsx b/js/app/packages/app/component/WhichKey.tsxdeleted file mode 100644index 9811b2e490..0000000000--- a/js/app/packages/app/component/WhichKey.tsx+++ /dev/null@@ -1,152 +0,0 @@-import { useSubscribeToKeypress } from '@app/signal/hotkeyRoot';-import { Hotkey } from '@core/component/Hotkey';-import { getActiveCommandsFromScope } from '@core/hotkey/getCommands';-import { activeScope, hotkeyScopeTree } from '@core/hotkey/state';-import { TOKENS } from '@core/hotkey/tokens';-import type { HotkeyCommand } from '@core/hotkey/types';-import {- getHotkeyCommandByToken,- prettyPrintHotkeyString,-} from '@core/hotkey/utils';-import {- type Accessor,- createMemo,- createSignal,- For,- onCleanup,- onMount,- Show,-} from 'solid-js';-import { Portal } from 'solid-js/web';--export const [openWhichKey, setOpenWhichKey] = createSignal(false);--type WhichKeyContentProps = {- commandsWithActivateScope: Accessor<HotkeyCommand[]>;- commandsWithoutActivateScope: Accessor<HotkeyCommand[]>;-};--function WhichKeyContent(props: WhichKeyContentProps) {- return (- <Show- when={- props.commandsWithActivateScope().length > 0 ||- props.commandsWithoutActivateScope().length > 0- }- >- <Portal>- <div class="absolute z-9999 right-2 bottom-14">- {/* <dfiv class="absolute -z-1 top-2 right-2 pattern-edge pattern-diagonal-4 opacity-100 w-full h-full mask-l-from-[calc(100%_-_1rem)] mask-b-from-[calc(100%_-_1rem)]" /> */}- <div class="w-[280px] px-6 py-3 h-full bg-dialog/75 backdrop-blur-sm border-2 border-accent text-sm shadow-[0_0_2px_0_var(--color-accent)]">- <Show when={props.commandsWithActivateScope().length > 0}>- <div class="mb-6">- <For each={props.commandsWithActivateScope()}>- {(command) => (- <div class="grid grid-cols-[8ch_1fr] gap-x-2 mb-1">- <div class="justify-self-start bg-panel border border-edge px-1.5 py-0.25 rounded-xs">- <Hotkey- token={command.hotkeyToken}- shortcut={prettyPrintHotkeyString(- // Asserting this, because useActiveCommands only returns commands with hotkeys.- command.hotkeys!.at(0)!- )}- />- </div>- <div class="truncate min-w-0">- {typeof command.description === 'function'- ? command.description()- : command.description}{' '}- </div>- </div>- )}- </For>- </div>- </Show>- <For each={props.commandsWithoutActivateScope()}>- {(command) => (- <div class="grid grid-cols-[8ch_1fr] gap-2 mb-1">- <div class="justify-self-start bg-panel border border-edge px-1.5 py-0.25 rounded-xs">- <Hotkey- token={command.hotkeyToken}- shortcut={prettyPrintHotkeyString(- // Asserting this, because useActiveCommands only returns commands with hotkeys.- command.hotkeys!.at(0)!- )}- />- </div>- <div class="truncate min-w-0">- {typeof command.description === 'function'- ? command.description()- : command.description}{' '}- </div>- </div>- )}- </For>- </div>- </div>- </Portal>- </Show>- );-}--export function WhichKey() {- useSubscribeToKeypress((context) => {- if (- context.eventType === 'keydown' &&- context.isNonModifierKeypress &&- (!context.commandScopeActivated ||- context.commandCaptured?.hotkeyToken === TOKENS.global.createCommand) &&- !getHotkeyCommandByToken(TOKENS.global.toggleVisor)?.hotkeys?.some(- (hotkey) => context.pressedKeysString === hotkey- )- ) {- setOpenWhichKey(false);- }- });-- const isInCommandScope = createMemo(() => {- const currentScopeId = activeScope();- if (!currentScopeId) return false;- const scopeNode = hotkeyScopeTree.get(currentScopeId);- return scopeNode?.type === 'command';- });-- const activeCommands = createMemo(() => {- const currentScopeId = activeScope() ?? '';- return getActiveCommandsFromScope(currentScopeId, {- hideCommandsWithoutHotkeys: true,- limitToCurrentScope: isInCommandScope(),- hideShadowedCommands: true,- });- });-- const commandsWithActivateScope = createMemo(() => {- return activeCommands().filter((command) => command.activateCommandScopeId);- });-- const commandsWithoutActivateScope = createMemo(() => {- return activeCommands().filter(- (command) => !command.activateCommandScopeId- );- });-- // If user clicks anywhere, exit- onMount(() => {- const handleMousedown = () => {- setOpenWhichKey(false);- };- document.addEventListener('mousedown', handleMousedown);- onCleanup(() => {- document.removeEventListener('mousedown', handleMousedown);- });- });-- return (- <Show when={openWhichKey()}>- <WhichKeyContent- commandsWithActivateScope={commandsWithActivateScope}- commandsWithoutActivateScope={commandsWithoutActivateScope}- />- </Show>- );-}diff --git a/js/app/packages/app/component/dock/BasicTierLimit.tsx b/js/app/packages/app/component/dock/BasicTierLimit.tsxdeleted file mode 100644index a8669a7020..0000000000--- a/js/app/packages/app/component/dock/BasicTierLimit.tsx+++ /dev/null@@ -1,48 +0,0 @@-import { usePaywallState } from '@core/constant/PaywallState';-import { useUserQuotaQuery } from '@queries/auth';-import { createMemo, Suspense } from 'solid-js';--const BasicTierLimitWrapper = () => {- const { showPaywall } = usePaywallState();- const userQuota = useUserQuotaQuery();- const MAX_DOCUMENTS = () => userQuota.data?.max_documents;- const MAX_AI_CHAT_MESSAGES = () => userQuota.data?.max_ai_chat_messages;- const documentCount = createMemo(() => userQuota.data?.documents);- const aiChatsCount = createMemo(() => userQuota.data?.ai_chat_messages);-- return (- <div class="flex items-center h-full px-1 text-sm font-mono whitespace-nowrap">- <span- class="p-0.5 px-2 border border-accent/30 border-r-0 text-[0.625rem] text-accent uppercase font-mono"- onClick={() => showPaywall(null)}- >- Guest Plan- </span>- <button- class="font-mono uppercase text-xs bg-accent border border-accent p-px px-2 text-panel font-semibold hover:opacity-50"- onClick={() => showPaywall(null)}- >- Upgrade- </button>- <div class="text-ink/50 px-1">- [<span class="text-ink">{documentCount()}</span>- <span>/{MAX_DOCUMENTS()}</span>]<span class="font-sans">Documents</span>- </div>-- <span class="opacity-50">|</span>-- <div class="text-ink/50 px-1">- [<span class="text-ink">{aiChatsCount()}</span>- <span>/{MAX_AI_CHAT_MESSAGES()}</span>]- <span class="font-sans">AI Messages</span>- </div>- </div>- );-};-export const BasicTierLimit = () => {- return (- <Suspense>- <BasicTierLimitWrapper />- </Suspense>- );-};diff --git a/js/app/packages/app/component/dock/Debug.tsx b/js/app/packages/app/component/dock/Debug.tsxdeleted file mode 100644index 25e4ddf39a..0000000000--- a/js/app/packages/app/component/dock/Debug.tsx+++ /dev/null@@ -1,73 +0,0 @@-import { activeScope } from '@core/hotkey/state';-import { createSignal } from 'solid-js';--const [debugOpen, setDebugOpen] = createSignal(true);--export function Debug() {- return (- <div- onMouseLeave={(e) => {- if (!debugOpen()) e.currentTarget.style.opacity = '0.5';- }}- onMouseEnter={(e) => {- if (!debugOpen()) e.currentTarget.style.opacity = '1';- }}- style={{- transform: debugOpen() ? 'translateX(0)' : 'translateX(100%)',- outline: '1px solid rgb(239 68 68)',- opacity: debugOpen() ? '1' : '0.5',- 'font-family': 'monospace',- transition: 'all 500ms',- 'font-size': '0.75rem',- 'line-height': '1rem',- cursor: 'var(--cursor-pointer)',- right: '-0.5rem',- bottom: '100%',- top: '300px',- }}- onClick={() => setDebugOpen((p) => !p)}- title="Click to keep open"- >- <h3- style={{- 'transform-origin': 'bottom right',- 'background-color': 'var(--ink)',- transform: 'rotate(-90deg)',- padding: '1px 0.25rem',- 'white-space': 'nowrap',- position: 'absolute',- bottom: '7ch',- right: '100%',- }}- >- Debug- </h3>- <ol- style={{- 'background-color': 'rgba(var(--ink-rgb), 0.5)',- 'list-style-position': 'inside',- 'list-style-type': 'decimal',- 'flex-direction': 'column',- padding: '1lh 1ch',- display: 'flex',- }}- >- <li- style={{- 'white-space': 'nowrap',- display: 'list-item',- }}- >- <span- style={{- 'background-color': 'var(--ink)',- padding: '1px 0.25rem',- }}- >- {activeScope()}- </span>- </li>- </ol>- </div>- );-}diff --git a/js/app/packages/app/component/dock/Dock.tsx b/js/app/packages/app/component/dock/Dock.tsxdeleted file mode 100644index c6352d45b5..0000000000--- a/js/app/packages/app/component/dock/Dock.tsx+++ /dev/null@@ -1,250 +0,0 @@-import { globalSplitManager } from "@app/signal/splitLayout";-import { useHasPaidAccess } from "@core/auth";-import { RoundPanel } from "@core/component/RoundPanel";-import { GlobalNotificationBell } from "@core/component/GlobalNotificationBell";-import { Hotkey } from "@core/component/Hotkey";-import { LabelAndHotKey } from "@core/component/Tooltip";-import { ENABLE_DOCK_NOTITIFCATIONS } from "@core/constant/featureFlags";-import { useSettingsState } from "@core/constant/SettingsState";-import { TOKENS } from "@core/hotkey/tokens";-import { isMobile } from "@core/mobile/isMobile";-import MacroCreateIcon from "@macro-icons/macro-create-b.svg";-import IconGear from "@macro-icons/macro-gear.svg";-import IconLogo from "@macro-icons/macro-logo.svg";-import SplitIcon from "@macro-icons/new-split.svg";-import { Button } from "@ui/components/Button";-import { Show } from "solid-js";-import { CommandState } from "../command";-import { useGlobalNotificationSource } from "../GlobalAppState";-import { setCreateMenuOpen } from "../Launcher";-import { BasicTierLimit } from "./BasicTierLimit";--export function Dock() {- const notificationSource = useGlobalNotificationSource();- const { settingsOpen, toggleSettings } = useSettingsState();- const hasPaid = useHasPaidAccess();-- return (- <>- <style>{`- .dock-button-hover{- transition: var(--transition);- background-color: #0000;- }- @media(hover){- .dock-button-hover:hover{- background-color: var(--color-hover);- transition: none;- }- }- `}</style>-- <div- style={{- padding: "0 var(--gutter-size) var(--gutter-size) var(--gutter-size)",- height: "calc(40px + var(--gutter-size))",- "box-sizing": "border-box",- width: "100vw",- }}- >- <RoundPanel>- <div- style={{- "grid-template-columns": "min-content 1fr min-content",- "box-sizing": "border-box",- "scrollbar-width": "none",- "align-content": "center",- "overflow-y": "hidden",- padding: "0 7px",- display: "grid",- height: "100%",- gap: "7px",- }}- >- <div- style={{- "border-right": "1px solid var(--color-edge-muted)",- "grid-auto-columns": "min-content",- "grid-auto-flow": "column",- "align-items": "center",- "padding-right": "7px",- display: "grid",- gap: "7px",- }}- >- <div- style={{- "grid-template-columns": "min-content min-content",- "box-sizing": "border-box",- "align-items": "center",- padding: "0 4px",- display: "grid",- height: "24px",- gap: "7px",- }}- onClick={CommandState.toggle}- class="dock-button-hover"- data-hotkey-token={TOKENS.global.commandMenu}- >- <IconLogo- style={{- display: "block",- height: "9px",- }}- />- {/*<div style={{- 'font-family': 'monospace',- 'background-color': '#f00',- 'font-size': '10px',- 'padding': '0 4px',- }}>- <Hotkey token={TOKENS.global.createCommand}/>- </div>*/}- <div class="**:border-none! flex border border-edge-muted text-[0.625rem] rounded-xs items-center px-1.5 py-0.25">- <Hotkey shortcut="cmd+k" class="flex gap-1" />- </div>- </div>-- <div- style={{- "background-color": "var(--color-edge-muted)",- height: "38px",- width: "1px",- }}- />-- <div- style={{- "grid-template-columns": "min-content min-content",- "box-sizing": "border-box",- "align-items": "center",- padding: "0 4px",- display: "grid",- height: "24px",- gap: "10px",- }}- onClick={() => {- setCreateMenuOpen(true);- }}- class="dock-button-hover"- data-hotkey-token={TOKENS.global.createCommand}- >- <MacroCreateIcon- style={{- display: "block",- height: "9px",- }}- />- {/*<div style={{- 'background-color': '#f00',- 'font-family': 'monospace',- 'font-size': '10px',- 'padding': '0 4px',- }}>- <Hotkey token={TOKENS.global.commandMenu}/>- </div>*/}- <div class="**:border-none! flex border border-edge-muted text-[0.625rem] rounded-xs items-center px-1.5 py-0.25">- <Hotkey shortcut="c" />- </div>- </div>- </div>-- <Show when={!isMobile()} fallback={<div></div>}>- <div- style={{- "border-top": "1px solid var(--edge-muted)",- color: "var(--ink-extra-muted)",- "justify-content": "center",- "font-family": "monospace",- "align-items": "center",- "font-size": "0.75rem",- "line-height": "1rem",- display: "flex",- gap: "4px",- }}- >- <Show when={!hasPaid()}>- <BasicTierLimit />- </Show>-- <div class="w-full" />-- <Show when={ENABLE_DOCK_NOTITIFCATIONS}>- <GlobalNotificationBell- notificationSource={notificationSource}- />- </Show>- </div>- </Show>-- <div- style={{- "border-left": "1px solid var(--color-edge-muted)",- "grid-auto-columns": "min-content",- "grid-auto-flow": "column",- "align-items": "center",- "padding-left": "7px",- display: "grid",- height: "38px",- gap: "4px",- }}- >- <div class="mobile-width:hidden">- <Button- tooltip={- <LabelAndHotKey- label="Create New Split"- hotkeyToken={TOKENS.global.createNewSplit}- />- }- onClick={() => {- const manager = globalSplitManager();- if (manager) {- const canFit =- manager.resizeContext()?.canFit({ minSize: 400 }) ??- true;- if (canFit) {- manager.createNewSplit({- content: {- id: "unified-list",- type: "component",- },- referredFrom: "dock",- });- }- }- }}- class="p-1"- >- <SplitIcon class="h-4" />- </Button>- </div>-- <Button- tooltip={- <LabelAndHotKey- label={settingsOpen() ? "Close Settings" : "Open Settings"}- hotkeyToken={TOKENS.global.toggleSettings}- />- }- onClick={() => {- toggleSettings();- }}- class="p-1 size-6"- classList={{- "bg-accent/20 text-accent": settingsOpen(),- }}- >- <IconGear />- </Button>- </div>- </div>- </RoundPanel>- </div>-- {/*<Show when={DEV_MODE_ENV}>- <Debug/>- </Show>*/}- </>- );-}diff --git a/js/app/packages/app/component/dock/PresentModeGlitch.tsx b/js/app/packages/app/component/dock/PresentModeGlitch.tsxdeleted file mode 100644index 552247d889..0000000000--- a/js/app/packages/app/component/dock/PresentModeGlitch.tsx+++ /dev/null@@ -1,201 +0,0 @@-import { PcNoiseGrid } from '@core/component/PcNoiseGrid';-import { GlitchText } from '@ui/components/GlitchText';-import { createEffect, createSignal, For, onCleanup, Show } from 'solid-js';--interface PresentModeGlitchProps {- show: boolean;- onComplete: () => void;-}--export function PresentModeGlitch(props: PresentModeGlitchProps) {- const [isVisible, setIsVisible] = createSignal(false);- const [showContent, setShowContent] = createSignal(false);- let timeoutIds: number[] = [];-- createEffect(() => {- if (props.show) {- setIsVisible(true);- // Start content animation after a brief delay- const id = window.setTimeout(() => {- setShowContent(true);- }, 50);- timeoutIds.push(id);- } else {- setIsVisible(false);- setShowContent(false);- timeoutIds.forEach((id) => clearTimeout(id));- timeoutIds = [];- }- });-- onCleanup(() => {- timeoutIds.forEach((id) => clearTimeout(id));- });-- const handleAnimationComplete = () => {- // Wait a bit then fade out- const id1 = window.setTimeout(() => {- setIsVisible(false);- const id2 = window.setTimeout(() => {- props.onComplete();- }, 200);- timeoutIds.push(id2);- }, 800);- timeoutIds.push(id1);- };-- return (- <Show when={isVisible()}>- <div- class="fixed inset-0 z-[99999] pointer-events-none"- style={{- 'background-color': '#000000',- opacity: isVisible() ? 1 : 0,- transition: 'opacity 0.2s ease-out',- }}- >- {/* Cybernetic noise grid background */}- <div class="absolute inset-0 opacity-20">- <PcNoiseGrid- cellSize={8}- warp={2}- crunch={0.5}- size={[1, 1]}- rounding={0}- freq={0.01}- speed={[0.5, 0.3]}- />- </div>-- {/* Scanlines overlay */}- <div- class="absolute inset-0 opacity-20"- style={{- 'background-image':- 'repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 196, 255, 0.1) 2px, rgba(0, 196, 255, 0.1) 4px)',- 'background-size': '100% 4px',- }}- />-- {/* Glitch distortion effect */}- <div- class="absolute inset-0 opacity-10"- style={{- 'background-image': `- linear-gradient(90deg, transparent 0%, rgba(0, 196, 255, 0.1) 50%, transparent 100%),- linear-gradient(0deg, transparent 0%, rgba(0, 196, 255, 0.05) 50%, transparent 100%)- `,- 'background-size': '200% 200%',- animation: 'glitch-scan 0.1s linear infinite',- }}- />-- {/* Main content */}- <Show when={showContent()}>- <div class="absolute inset-0 flex flex-col items-center justify-center gap-8">- {/* Glitch text with shadow effects */}- <div class="relative">- {/* Shadow glitch layers */}- <div class="absolute inset-0 blur-sm opacity-50">- <GlitchText- from=""- to="JACKED IN"- chars="█▓▒░▀▄▌▐■□▲►▼◄◀▶◁▷◊○●◯◮◭◬◫◪◩◨◧◦◥◤◣◢◡◠◟◞◝◜◛◚◙◘◗◖◕◔◓◒◑◐●◎◍◌○◊"- cycles={1}- framerate={48}- delay={0}- class="font-mono text-6xl sm:text-8xl text-accent/30 font-bold tracking-wider"- />- </div>- {/* Main glitch text */}- <div class="relative">- <GlitchText- from=""- to="JACKED IN"- chars="█▓▒░▀▄▌▐■□▲►▼◄◀▶◁▷◊○●◯◮◭◬◫◪◩◨◧◦◥◤◣◢◡◠◟◞◝◜◛◚◙◘◗◖◕◔◓◒◑◐●◎◍◌○◊"- cycles={1}- framerate={48}- delay={0}- onComplete={handleAnimationComplete}- class="font-mono text-6xl sm:text-8xl text-accent font-bold tracking-wider drop-shadow-[0_0_20px_rgba(0,196,255,0.5)]"- />- </div>- </div>-- {/* Cybernetic brackets with animated dots */}- <div class="flex items-center gap-4 text-accent/50 font-mono text-2xl">- <span class="animate-pulse">[</span>- <span class="text-accent/30 flex items-center gap-1">- <span>A</span>- <span class="animate-pulse">C</span>- <span>T</span>- <span class="animate-pulse">I</span>- <span>V</span>- <span class="animate-pulse">A</span>- <span>T</span>- <span class="animate-pulse">I</span>- <span>N</span>- <span class="animate-pulse">G</span>- </span>- <span class="animate-pulse">]</span>- </div>-- {/* Animated glitch lines */}- <div class="absolute inset-0 pointer-events-none overflow-hidden">- <For each={Array.from({ length: 30 }, (_, i) => i)}>- {(i) => {- const delay = i * 50;- const offset = (i % 3) * 33;- return (- <div- class="absolute w-full h-px bg-accent glitch-line"- style={{- top: `${offset}%`,- left: '0%',- opacity: '0.1',- 'animation-delay': `${delay}ms`,- }}- />- );- }}- </For>- </div>-- {/* Corner brackets */}- <div class="absolute top-8 left-8 text-accent/20 font-mono text-4xl">- {'{'}- </div>- <div class="absolute top-8 right-8 text-accent/20 font-mono text-4xl">- {'}'}- </div>- <div class="absolute bottom-8 left-8 text-accent/20 font-mono text-4xl">- {'['}- </div>- <div class="absolute bottom-8 right-8 text-accent/20 font-mono text-4xl">- {']'}- </div>- </div>- </Show>-- {/* CSS animations */}- <style>- {`- @keyframes glitch-scan {- 0% { background-position: 0% 0%; }- 100% { background-position: 100% 100%; }- }- @keyframes glitch-line {- 0%, 100% { transform: translateX(0px); }- 25% { transform: translateX(50px); }- 50% { transform: translateX(-50px); }- 75% { transform: translateX(30px); }- }- .glitch-line {- animation: glitch-line 0.5s linear infinite;- }- `}- </style>- </div>- </Show>- );-}diff --git a/js/app/packages/app/component/paywall/Paywall.tsx b/js/app/packages/app/component/paywall/Paywall.tsxindex 71258d779a..571d27743a 100644--- a/js/app/packages/app/component/paywall/Paywall.tsx+++ b/js/app/packages/app/component/paywall/Paywall.tsx@@ -3,7 +3,6 @@ import { usePaywallState } from '@core/constant/PaywallState';import { useHotkeyDOMScope } from '@core/hotkey/hotkeys';import Dialog from '@corvu/dialog';import { onMount } from 'solid-js';-import MacroJump from '../MacroJump';import PaywallComponent from './PaywallComponent';export function Paywall() {@@ -123,7 +122,6 @@ export function Paywall() {</div></div></div>- <MacroJump tabbableParent={() => paywallContentEl} /></Dialog.Content></Dialog.Portal></Dialog>diff --git a/js/app/packages/app/component/split-layout/components/SplitContainer.tsx b/js/app/packages/app/component/split-layout/components/SplitContainer.tsxindex 2578a7e408..11267135cc 100644--- a/js/app/packages/app/component/split-layout/components/SplitContainer.tsx+++ b/js/app/packages/app/component/split-layout/components/SplitContainer.tsx@@ -1,4 +1,3 @@-import MacroJump from '@app/component/MacroJump';import { createElementSize } from '@solid-primitives/resize-observer';import {createEffect,@@ -109,9 +108,6 @@ export function SplitContainer(<div class="@container/split size-full overflow-hidden relative">{props.children}</div>- <Show when={panel.handle.isSpotLight()}>- <MacroJump tabbableParent={ref} />- </Show></div></MaybeRoundPanel></div>diff --git a/js/app/packages/app/component/split-layout/registerSplitHotkeys.ts b/js/app/packages/app/component/split-layout/registerSplitHotkeys.tsindex b1f50396c1..8ea9ac6d0f 100644--- a/js/app/packages/app/component/split-layout/registerSplitHotkeys.ts+++ b/js/app/packages/app/component/split-layout/registerSplitHotkeys.ts@@ -1,7 +1,6 @@import { TOKENS } from '@core/hotkey/tokens';import { registerHotkey } from 'core/hotkey/hotkeys';import { globalSplitManager } from '../../signal/splitLayout';-import { fireMacroJump } from '../MacroJump';import type { SplitContent } from './layoutManager';import { focusAdjacentSplit } from './layoutUtils';import { canSpotlight } from './utils/canSpotlight';@@ -95,19 +94,6 @@ export function registerSplitHotkeys(args: {runWithInputFocused: true,});- // Macro Jump - legacy binding.- registerHotkey({- hotkeyToken: TOKENS.split.go.macroJump,- hotkey: 'cmd+m',- scopeId: splitHotkeyScope,- description: 'Macro Jump',- keyDownHandler: () => {- fireMacroJump();- return true;- },- runWithInputFocused: true,- });-registerHotkey({hotkeyToken: TOKENS.window.focusSplitRight,hotkey: ['shift+l', 'shift+arrowright'],diff --git a/js/app/packages/block-md/component/MarkdownPopup.tsx b/js/app/packages/block-md/component/MarkdownPopup.tsxindex 75dc66f3c3..958ec370c2 100644--- a/js/app/packages/block-md/component/MarkdownPopup.tsx+++ b/js/app/packages/block-md/component/MarkdownPopup.tsx@@ -52,7 +52,6 @@ import LinkIcon from '@phosphor-icons/core/regular/link.svg?component-solid';import PencilIcon from '@phosphor-icons/core/regular/pencil.svg?component-solid';import { makeResizeObserver } from '@solid-primitives/resize-observer';import { createCallback } from '@solid-primitives/rootless';-import { GlitchText } from '@ui/components/GlitchText';import {$getLocationUrl,$getSelectionLocation,@@ -505,7 +504,6 @@ export function MarkdownPopup(props: {height={20}class="text-accent"/>- <GlitchText from="Reading document" continuous /></div>}>diff --git a/js/app/packages/core/component/DocumentBlockContainer.tsx b/js/app/packages/core/component/DocumentBlockContainer.tsxindex 0150bc8bd0..36bd22eeef 100644--- a/js/app/packages/core/component/DocumentBlockContainer.tsx+++ b/js/app/packages/core/component/DocumentBlockContainer.tsx@@ -1,4 +1,3 @@-import { useBlockId } from '@core/block';import { BlockContainer } from '@core/component/BlockContainer';import { blockDataSignal } from '@core/internal/BlockLoader';import { blockErrorSignal } from '@core/signal/load';@@ -18,7 +17,6 @@ export function DocumentBlockContainer(const [local, others] = splitProps(props, ['usesCenterBar']);const isLoading = () => !hasBlockData() && !blockError();- const blockId = useBlockId();return (<Show@@ -33,7 +31,7 @@ export function DocumentBlockContainer(}><Match when={isLoading()}>- <LoadingPanel blockId={blockId} />+ <LoadingPanel /></Match><Match when={blockError() === 'UNAUTHORIZED'}><Unauthorized />diff --git a/js/app/packages/core/component/FormControls/DropdownMenu.tsx b/js/app/packages/core/component/FormControls/DropdownMenu.tsxindex 5bbc112bc3..d2a1f470ee 100644--- a/js/app/packages/core/component/FormControls/DropdownMenu.tsx+++ b/js/app/packages/core/component/FormControls/DropdownMenu.tsx@@ -1,4 +1,3 @@-import MacroJump from '@app/component/MacroJump';import { useSplitPanel } from '@app/component/split-layout/layoutUtils';import { Popover, type PopoverRootProps } from '@kobalte/core/popover';import { createMutationObserver } from '@solid-primitives/mutation-observer';@@ -176,7 +175,6 @@ const DropdownMenu: ParentComponent<{props.children}</div></Popover.Content>- <MacroJump tabbableParent={() => popoverContentEl} /></Popover.Portal></Popover>);diff --git a/js/app/packages/core/component/LoadingBlock.tsx b/js/app/packages/core/component/LoadingBlock.tsxindex fb04a30f94..31b3fb5d0c 100644--- a/js/app/packages/core/component/LoadingBlock.tsx+++ b/js/app/packages/core/component/LoadingBlock.tsx@@ -1,11 +1,10 @@-import { nanoid } from 'nanoid';import { LoadingPanel } from './LoadingSpinner';export function LoadingBlock() {return (<div class="relative flex flex-col size-full select-none"><div class="overflow-hidden size-full">- <LoadingPanel blockId={nanoid(32)} />+ <LoadingPanel /></div></div>);diff --git a/js/app/packages/core/component/LoadingSpinner.tsx b/js/app/packages/core/component/LoadingSpinner.tsxindex c0c17357e1..711c066dad 100644--- a/js/app/packages/core/component/LoadingSpinner.tsx+++ b/js/app/packages/core/component/LoadingSpinner.tsx@@ -1,9 +1,6 @@-import CropMarkCircle from '@macro-icons/macro-crop-circle.svg';import Macro from '@macro-icons/macro-macro.svg';-import { GlitchText } from '@ui/components/GlitchText';import { createSignal, onMount } from 'solid-js';import { PcNoiseGrid } from './PcNoiseGrid';-import { Uuid7Viz } from './UuidVisualizer';export function LoadingSpinner() {return (@@ -23,7 +20,7 @@ export function LoadingSpinner() {);}-export function LoadingPanel(props: { blockId: string }) {+export function LoadingPanel() {const [showSpinner, setShowSpinner] = createSignal(false);onMount(() => {@@ -43,20 +40,6 @@ export function LoadingPanel(props: { blockId: string }) {}}><LoadingSpinner />- <div class="absolute bottom-2 right-2 text-ink-extra-muted">- <CropMarkCircle />- </div>- <div class="absolute top-2 left-2 text-xs text-ink-extra-muted flex flex-col gap-2">- <CropMarkCircle />- <GlitchText from={`INIT DOCUMENT [ ${props.blockId} ]`} continuous />- <Uuid7Viz uuid={props.blockId} mode="barcode" cell={1} />- </div>- <div class="absolute top-2 right-2 text-xs text-ink-extra-muted">- <CropMarkCircle />- </div>- <div class="absolute bottom-2 left-2 text-xs text-ink-extra-muted">- <CropMarkCircle />- </div></div>);}diff --git a/js/app/packages/core/component/UuidVisualizer.tsx b/js/app/packages/core/component/UuidVisualizer.tsxdeleted file mode 100644index fc32b9c663..0000000000--- a/js/app/packages/core/component/UuidVisualizer.tsx+++ /dev/null@@ -1,84 +0,0 @@-// Uuid7Viz.tsx-type Mode = 'grid' | 'barcode';--export function Uuid7Viz({- uuid,- mode = 'grid',- cell = 2,- gap = 0,-}: {- uuid: string;- mode?: Mode;- cell?: number;- gap?: number;-}) {- // 128 bits = 32 hex chars; remove dashes, clamp to 32- const hex = uuid.replace(/-/g, '').toLowerCase().slice(0, 32);-- // expand hex -> bits (MSB first per nibble)- const bits: number[] = [];- for (let i = 0; i < hex.length; i++) {- const n = parseInt(hex[i], 16);- bits.push((n >> 3) & 1, (n >> 2) & 1, (n >> 1) & 1, n & 1);- }-- if (mode === 'barcode') {- const cols = bits.length; // 128- const w = cols * cell + (cols - 1) * gap;- const h = 8 * cell;- return (- <svg- viewBox={`0 0 ${w} ${h}`}- width={w}- height={h}- shape-rendering="crispEdges"- >- <g fill="currentColor">- {- // biome-ignore lint/performance/useSolidForComponent: Exceptions- bits.map((b, i) =>- b ? (- <rect x={i * (cell + gap)} y={0} width={cell} height={h} />- ) : null- )- }- </g>- </svg>- );- }-- // grid: 16x8 = 128 cells- const cols = 16,- rows = 8;- const w = cols * cell + (cols - 1) * gap;- const h = rows * cell + (rows - 1) * gap;-- return (- <svg- viewBox={`0 0 ${w} ${h}`}- width={w}- height={h}- shape-rendering="crispEdges"- >- <g fill="currentColor">- {- // biome-ignore lint/performance/useSolidForComponent: Exceptions- bits- .slice(0, cols * rows)- .map((b, i) =>- b ? (- <rect- x={(i % cols) * (cell + gap)}- y={Math.floor(i / cols) * (cell + gap)}- width={cell}- height={cell}- rx={cell / 2}- ry={cell / 2}- />- ) : null- )- }- </g>- </svg>- );-}diff --git a/js/app/packages/core/hotkey/tokens.ts b/js/app/packages/core/hotkey/tokens.tsindex 92687d054c..cb3ffd6bc3 100644--- a/js/app/packages/core/hotkey/tokens.ts+++ b/js/app/packages/core/hotkey/tokens.ts@@ -75,7 +75,6 @@ export const TOKENS = {searchMenu: 'global.searchMenu',toggleSettings: 'global.toggleSettings',createNewSplit: 'global.createNewSplit',- toggleVisor: 'global.toggleVisor',inviteTeam: 'global.inviteTeam',undo: 'global.undo',redo: 'global.redo',@@ -119,7 +118,6 @@ export const TOKENS = {inbox: 'split.go.inbox',docs: 'split.go.docs',toggleRightPanel: 'split.go.toggleRightPanel',- macroJump: 'split.go.macroJump',back: 'split.go.back',forward: 'split.go.forward',},diff --git a/js/app/packages/core/util/color.ts b/js/app/packages/core/util/color.tsdeleted file mode 100644index 6b640ab703..0000000000--- a/js/app/packages/core/util/color.ts+++ /dev/null@@ -1,35 +0,0 @@-export type RGBAColor = {- r: number;- g: number;- b: number;- a: number;-};--export type ColorValueHex = `#${string}`;--const HEX_COLOR_REGEX = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/;--export function hexToRGBA(hex: string): RGBAColor {- var result = HEX_COLOR_REGEX.exec(hex);- if (!result) {- throw new Error('Invalid hex color');- }- const r = parseInt(result[0], 16);- const g = parseInt(result[1], 16);- const b = parseInt(result[2], 16);- return { r, g, b, a: 1 };-}--export function rgbaToHex(rgba: RGBAColor): ColorValueHex {- return `#${[rgba.r, rgba.g, rgba.b]- .map((x) => x.toString(16).padStart(2, '0'))- .join('')}`;-}--export function stringAsHex(hex: string): ColorValueHex {- if (HEX_COLOR_REGEX.test(hex)) {- return hex as ColorValueHex;- }-- throw new Error('Invalid hex color');-}diff --git a/js/app/packages/macro-icons/macro-crop-circle.svg b/js/app/packages/macro-icons/macro-crop-circle.svgdeleted file mode 100644index 2ab5e13c10..0000000000--- a/js/app/packages/macro-icons/macro-crop-circle.svg+++ /dev/null@@ -1,4 +0,0 @@-<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">- <path d="M12 2V22M2 12H22" stroke="currentcolor" stroke-miterlimit="3.07155"/>- <circle cx="12" cy="12" r="6.5" stroke="currentcolor"/>-</svg>diff --git a/js/app/packages/ui/components/BrightJoins.tsx b/js/app/packages/ui/components/BrightJoins.tsxdeleted file mode 100644index a3a2c05fbf..0000000000--- a/js/app/packages/ui/components/BrightJoins.tsx+++ /dev/null@@ -1,87 +0,0 @@-import type { JSX } from 'solid-js';-import { twMerge } from 'tailwind-merge';--/**- * BrightJoins- *- * @param props.dots - The dots to show in the corners. [top-left, top-right, bottom-right, bottom-left]- * @param props.class - Any overrides to the default styles- *- * @example- * ```tsx- * <div class="relative">- * <BrightJoins dots={[true, true, true, true]} />- * </div>- * ```- */-export function BrightJoins(props: {- dots?: [boolean, boolean, boolean, boolean];- class?: string;-}): JSX.Element {- const backgroundStyles = () => {- const [tl, tr, br, bl] = props.dots ?? [true, true, true, true];- const layers: string[] = [];- const positions: string[] = [];- if (tl) {- layers.push('linear-gradient(currentColor, currentColor)');- positions.push('top left');- }- if (tr) {- layers.push('linear-gradient(currentColor, currentColor)');- positions.push('top right');- }- if (br) {- layers.push('linear-gradient(currentColor, currentColor)');- positions.push('bottom right');- }- if (bl) {- layers.push('linear-gradient(currentColor, currentColor)');- positions.push('bottom left');- }- return {- 'background-image': layers.join(', '),- 'background-position': positions.join(', '),- };- };-- return (- <div- class={twMerge(- 'absolute inset-[-1px] z-200 pointer-events-none bg-no-repeat bg-size-[1px_1px]',- props.class- )}- style={backgroundStyles()}- />- );-}--/**- * Progress meter to complement BrightJoins. Just put them next to each other.- *- * @param props.progress - The progress percentage (0-100)- * @param props.class - Any overrides to the default styles- *- * @example- * ```tsx- * <div class="relative">- * <BrightJoins />- * <BrightJoinsProgressMeter progress={50} class="from-accent to-accent-bg" />- * </div>- * ```- */-export function BrightJoinsProgressMeter(props: {- progress: number;- class?: string;-}) {- return (- <div- class={twMerge(- '-top-px left-[2px] absolute bg-gradient-to-r from-edge to-ink w-[calc(var(--onboarding-progress)-4px)] h-px transition-[width] duration-1000',- props.class- )}- style={{- '--onboarding-progress': `${props.progress}%`,- }}- ></div>- );-}diff --git a/js/app/packages/ui/components/GlitchText.tsx b/js/app/packages/ui/components/GlitchText.tsxdeleted file mode 100644index 60cccc0322..0000000000--- a/js/app/packages/ui/components/GlitchText.tsx+++ /dev/null@@ -1,340 +0,0 @@-import { createEffect, createSignal, onCleanup } from 'solid-js';--const DEFAULT_GLITCH_CHARACTERS = '!@#$%^&*()_+-=[]{}|;\':",./<>?';-const DEFAULT_CONFIG = {- chars: DEFAULT_GLITCH_CHARACTERS,- cycles: 2,- framerate: 12,- delay: 1000,-} as const;--const getRandomInt = (min: number, max: number): number =>- Math.floor(Math.random() * (max - min + 1)) + min;--const getRandomCharacter = (characters: string[]): string =>- characters[getRandomInt(0, characters.length - 1)];--const generateRandomString = (length: number, characters: string[]): string =>- Array.from({ length }, () => getRandomCharacter(characters)).join('');--const shuffleIndices = (indices: number[]): number[] => {- const shuffled = [...indices];- for (let i = shuffled.length - 1; i > 0; i--) {- const j = Math.floor(Math.random() * (i + 1));- [shuffled[i], shuffled[j]] = [shuffled[j], shuffled[i]];- }- return shuffled;-};--const isUserProvidedText = (- text: string,- fromProp?: string,- toProp?: string-): boolean => {- return text === fromProp || text === toProp;-};--enum AnimationPhase {- Corrupting = 0,- Decoding = 1,-}--interface AnimationConfig {- sourceText: string;- targetText: string;- glitchCharacters: string[];- cycleCount: number;- frameRate: number;- maxDisplayLength: number;- clearTextDelay: number;- updateDisplay: (chars: string[]) => void;- onAnimationComplete: () => void;- preserveCurrentState?: boolean;- fromProp?: string;- toProp?: string;-}--function createGlitchAnimation(config: AnimationConfig): () => void {- const {- sourceText,- targetText,- glitchCharacters,- cycleCount,- frameRate,- maxDisplayLength,- clearTextDelay,- updateDisplay,- onAnimationComplete,- preserveCurrentState = false,- fromProp,- toProp,- } = config;-- // Setup padded text arrays for consistent display width- const displayLength =- maxDisplayLength || Math.max(sourceText.length, targetText.length);- const finalTargetChars = targetText.padEnd(displayLength, ' ').split('');- let displayChars = sourceText.padEnd(displayLength, ' ').split('');-- // Pre-compute animatable character positions (exclude positions that are spaces in both strings)- const animatableIndices = displayChars- .map((_, index) => index)- .filter(- (i) =>- sourceText.padEnd(displayLength, ' ')[i] !== ' ' ||- targetText.padEnd(displayLength, ' ')[i] !== ' '- );-- // Pre-shuffle processing orders for visual randomness- const corruptionOrder = shuffleIndices(animatableIndices);- const decodingOrder = shuffleIndices(animatableIndices);-- // Animation state management- let animationFrameId: number | undefined;- let lastTimestamp = 0;- let currentPhase = AnimationPhase.Corrupting;- let completedCycles = 0;- let processedCharacterIndex = 0;- let delayStartTimestamp = 0;- let isWaitingForDelay = false;-- const millisecondsPerFrame = 1000 / (frameRate || DEFAULT_CONFIG.framerate);-- // Initialize display state- if (!preserveCurrentState) {- updateDisplay([...displayChars]);- }-- const processAnimationFrame = (timestamp: number): void => {- // Handle clear text delay period- if (isWaitingForDelay) {- if (timestamp - delayStartTimestamp >= clearTextDelay) {- onAnimationComplete();- return;- }- animationFrameId = requestAnimationFrame(processAnimationFrame);- return;- }-- // Enforce frame rate limiting- if (timestamp - lastTimestamp < millisecondsPerFrame) {- animationFrameId = requestAnimationFrame(processAnimationFrame);- return;- }- lastTimestamp = timestamp;-- // Get processing order and target character for current phase- const processingOrder =- currentPhase === AnimationPhase.Corrupting- ? corruptionOrder- : decodingOrder;- const characterPosition =- processingOrder[processedCharacterIndex % processingOrder.length];-- // Apply character transformation based on current phase- if (currentPhase === AnimationPhase.Corrupting) {- displayChars[characterPosition] = getRandomCharacter(glitchCharacters);- } else {- displayChars[characterPosition] = finalTargetChars[characterPosition];- }-- updateDisplay([...displayChars]);- processedCharacterIndex++;-- // Check for cycle completion- if (processedCharacterIndex >= processingOrder.length) {- completedCycles++;- processedCharacterIndex = 0;-- if (completedCycles >= cycleCount) {- if (currentPhase === AnimationPhase.Corrupting) {- currentPhase = AnimationPhase.Decoding;- completedCycles = 0;- } else {- // Animation sequence complete - finalize display and handle delay- displayChars = [...finalTargetChars];- updateDisplay([...displayChars]);-- const shouldPauseOnTarget =- clearTextDelay > 0 &&- isUserProvidedText(targetText, fromProp, toProp);- if (shouldPauseOnTarget) {- isWaitingForDelay = true;- delayStartTimestamp = timestamp;- animationFrameId = requestAnimationFrame(processAnimationFrame);- return;- } else {- onAnimationComplete();- return;- }- }- }- }-- animationFrameId = requestAnimationFrame(processAnimationFrame);- };-- animationFrameId = requestAnimationFrame(processAnimationFrame);- return () => {- if (animationFrameId) cancelAnimationFrame(animationFrameId);- };-}--export interface GlitchTextProps {- /** Source text to animate from. If only `from` provided, corrupts then randomizes. @default undefined */- from?: string;-- /** Target text to animate to. If only `to` provided, decodes from random glitch. @default undefined */- to?: string;-- /** Cycle animation continuously between `from` and `to` @default false */- continuous?: boolean;-- /** Characters used for glitch effect during corruption phase. @default "!@#$%^&*()_+-=[]{}|;':\",./<>?" @example "01" */- chars?: string;-- /** Number of times each character should change before completing from->to. @default 2 */- cycles?: number;-- /** Animation frame rate in FPS. Higher = faster but more CPU intensive. @default 12 */- framerate?: number;-- /** Pause duration in milliseconds when displaying clear text. @default 1000 */- delay?: number;-- /** Callback when animation completes. Only fires in non-continuous mode. @default undefined */- onComplete?: () => void;-- /** CSS classes to apply to the span element. @default undefined @example "font-mono text-success" */- class?: string;-}--/**- * Glitch text transitions.- *- * @example- * ```tsx- * <GlitchText from="Hello World" /> // Basic corruption effect- * <GlitchText to="Welcome!" /> // Decode effect- *- * // Transform between two texts- * <GlitchText from="Loading..." to="Complete!" />- *- * // Continuous oscillating animation- * <GlitchText- * from="Hello World"- * to="Nice to meet you"- * continuous- * cycles={2}- * framerate={60}- * delay={200}- * />- *- * // Custom glitch characters- * <GlitchText- * from="Blocks"- * to="Cool"- * chars="█▓▒░"- * class="font-mono text-accent"- * />- * ```- */-export function GlitchText(props: GlitchTextProps) {- const [displayedCharacters, setDisplayedCharacters] = createSignal<string[]>(- []- );-- let animationCleanup: (() => void) | undefined;- let initialDelayTimeoutId: number | undefined;- let sourceText = '';- let targetText = '';- let maxTextLength = 0;-- const startAnimationSequence = (- from: string,- to: string,- isInitialRun = true- ) => {- // Clean up any existing animation resources- if (animationCleanup) animationCleanup();- if (initialDelayTimeoutId) clearTimeout(initialDelayTimeoutId);-- // Show clear source text only on initial animation (not during continuous cycles)- if (isInitialRun) {- setDisplayedCharacters(from.padEnd(maxTextLength, ' ').split(''));- }-- const beginGlitchTransition = () => {- animationCleanup = createGlitchAnimation({- sourceText: from,- targetText: to,- glitchCharacters: (props.chars ?? DEFAULT_CONFIG.chars).split(''),- cycleCount: props.cycles ?? DEFAULT_CONFIG.cycles,- frameRate: props.framerate || DEFAULT_CONFIG.framerate,- maxDisplayLength: maxTextLength,- clearTextDelay: props.delay ?? DEFAULT_CONFIG.delay,- updateDisplay: setDisplayedCharacters,- onAnimationComplete: () => {- if (props.continuous) {- // Swap source and target for continuous oscillation- [sourceText, targetText] = [targetText, sourceText];- startAnimationSequence(sourceText, targetText, false);- } else {- props.onComplete?.();- }- },- preserveCurrentState: !isInitialRun,- fromProp: props.from,- toProp: props.to,- });- };-- // Apply initial delay only if the source text is user-provided- const shouldPauseOnSource = isUserProvidedText(from, props.from, props.to);- const initialDelay = props.delay ?? DEFAULT_CONFIG.delay;- if (isInitialRun && initialDelay > 0 && shouldPauseOnSource) {- initialDelayTimeoutId = window.setTimeout(- beginGlitchTransition,- initialDelay- );- } else {- beginGlitchTransition();- }- };-- createEffect(() => {- // Require at least one text prop to animate- if (!props.from && !props.to) {- if (animationCleanup) animationCleanup();- console.error('GlitchText needs props.from or props.to to render!');- return;- }-- const glitchCharacters = (props.chars ?? DEFAULT_CONFIG.chars).split('');-- if (props.from && !props.to) {- // from only: from → glitch → random- sourceText = props.from;- targetText = generateRandomString(props.from.length, glitchCharacters);- } else if (!props.from && props.to) {- // to only: random → glitch → to- sourceText = generateRandomString(props.to.length, glitchCharacters);- targetText = props.to;- } else if (props.from && props.to) {- // from + to: from → glitch → to- sourceText = props.from;- targetText = props.to;- }-- // Calculate consistent display width to prevent visual jumping- maxTextLength = Math.max(sourceText.length, targetText.length);- startAnimationSequence(sourceText, targetText, true);- });-- onCleanup(() => {- if (animationCleanup) animationCleanup();- if (initialDelayTimeoutId) clearTimeout(initialDelayTimeoutId);- });-- return <span class={props.class}>{displayedCharacters().join('')}</span>;-}diff --git a/js/app/packages/ui/index.ts b/js/app/packages/ui/index.tsindex 646e725f67..801772009a 100644--- a/js/app/packages/ui/index.ts+++ b/js/app/packages/ui/index.ts@@ -1,2 +1 @@-export { GlitchText } from './components/GlitchText';export { TabbedControl } from './components/TabbedControl';