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
Russell/split (#2754)
Fake-User4e0cb5c2d1a8
diff --git a/js/app/biome.jsonc b/js/app/biome.jsoncindex 3eed8492dd..ba543a5d28 100644--- a/js/app/biome.jsonc+++ b/js/app/biome.jsonc@@ -1,5 +1,5 @@{- "$schema": "https://biomejs.dev/schemas/2.4.7/schema.json",+ "$schema": "https://biomejs.dev/schemas/2.4.12/schema.json","vcs": {"clientKind": "git","enabled": true,diff --git a/js/app/bun.lock b/js/app/bun.lockindex c13b3682ae..ea3669bd0f 100644--- a/js/app/bun.lock+++ b/js/app/bun.lock@@ -1,6 +1,5 @@{"lockfileVersion": 1,- "configVersion": 0,"workspaces": {"": {"name": "@coparse/monorepo",@@ -318,12 +317,11 @@"@lexical/[email protected]": "patches/@lexical%[email protected]",},"overrides": {- "ajv": ">=6.14.0",- "cross-spawn": "7.0.6","flatted": ">=3.4.0",- "minimatch": ">=3.1.4",+ "cross-spawn": "7.0.6","rollup": ">=4.59.0",- "undici": ">=6.24.0",+ "minimatch": ">=3.1.4",+ "ajv": ">=6.14.0",},"packages": {"@adobe/css-tools": ["@adobe/[email protected]", "", {}, "sha512-Elp+iwUx5rN5+Y8xLt5/GRoG20WGoDCQ/1Fb+1LiGtvwbDavuSk0jhD/eZdckHAuzcDzccnkv+rEjyWfRx18gg=="],diff --git a/js/app/packages/app/component/Layout.tsx b/js/app/packages/app/component/Layout.tsxindex 42b9b44b1b..3b40dd39c8 100644--- a/js/app/packages/app/component/Layout.tsx+++ b/js/app/packages/app/component/Layout.tsx@@ -1,13 +1,8 @@import { ROUTER_BASE_CONCAT } from '@app/constants/routerBase';import { mountGlobalFocusListener } from '@app/signal/focus';import { useIsAuthenticated } from '@core/auth';-import { Resize } from '@core/component/Resize';import { usePaywallState } from '@core/constant/PaywallState';import { virtualKeyboardVisible } from '@core/mobile/virtualKeyboard';-import {- LAYOUT_CONTEXT_ID,- setPersistedLayoutSizes,-} from '@core/signal/layout';import { updateCookie } from '@core/util/cookies';import { type RouteSectionProps, useLocation } from '@solidjs/router';import { cn } from '@ui/utils/classname';@@ -32,7 +27,6 @@ import { createMenuOpen, Launcher, setCreateMenuOpen } from './Launcher';import { AutomationComposer } from '@block-automation/component';import { Paywall } from './paywall/Paywall';import { PropertyEditorModal } from './property-edit-modal/PropertyEditorModal';-import { SettingsWrapper } from './settings/SettingsWrapper';import { useAppSquishHandlers } from './useAppSquishHandlers';import {AppSidebar,@@ -113,18 +107,6 @@ function LayoutInner(props: RouteSectionProps) {}});- // This effect is to handle moving from unauthenticated to authenticated- createEffect((prevAuth: boolean | undefined) => {- const currentAuth = isAuthenticated();- if (prevAuth === false && currentAuth === true) {- setPersistedLayoutSizes([1, 0]);- }- if (currentAuth === false) {- setPersistedLayoutSizes([1, 0]);- }- return currentAuth;- }, isAuthenticated());-mountGlobalFocusListener();attachGlobalDOMScope(document.body);@@ -185,19 +167,11 @@ function LayoutInner(props: RouteSectionProps) {/></Show>- <Resize.Zone- gutter={2}- direction="horizontal"- class="flex-1 w-full min-h-0 font-sans text-ink caret-accent"- id={'main-layout'}- >- <ItemDndProvider>- <Resize.Panel id={LAYOUT_CONTEXT_ID} minSize={250}>- {props.children}- </Resize.Panel>- <SettingsWrapper />- </ItemDndProvider>- </Resize.Zone>+ <ItemDndProvider>+ <div class="flex-1 w-full min-h-0 font-sans text-ink caret-accent">+ {props.children}+ </div>+ </ItemDndProvider></div><Showwhen={diff --git a/js/app/packages/app/component/settings/Settings.tsx b/js/app/packages/app/component/settings/Settings.tsxindex 82eddc866b..1e59f63b72 100644--- a/js/app/packages/app/component/settings/Settings.tsx+++ b/js/app/packages/app/component/settings/Settings.tsx@@ -1,24 +1,22 @@-import { createEffect, createMemo, createSignal, For, onMount, Show, Suspense } from 'solid-js';+import { createEffect, For, onMount, Show, Suspense } from 'solid-js';import { type SettingsTab, useSettingsState } from '@core/constant/SettingsState';-import { SplitlikeContainer } from '../split-layout/components/SplitContainer';import { isNativeMobilePlatform } from '@core/mobile/isNativeMobilePlatform';-import CloseIcon from '@phosphor-icons/core/regular/x.svg?component-solid';import { usePermissions } from '@core/context/user';import { DEV_MODE_ENV, ENABLE_APP_STORE_QR_CODE } from '@core/constant/featureFlags';-import { DeprecatedIconButton } from '@core/component/DeprecatedIconButton';-import ContractIcon from '@icon/regular/arrows-in.svg';-import ExpandIcon from '@icon/regular/arrows-out.svg';import { Subscription } from './Subscription';import { MobileApp } from './MobileApp';import { Appearance } from './Appearance';-import { Tabs } from '@kobalte/core/tabs';+import { Tabs } from '@core/component/Tabs';import { Account } from './Account';import { Shortcuts } from './Shortcuts';import { isMobile } from '@core/mobile/isMobile';import { registerHotkey, useHotkeyDOMScope } from '@core/hotkey/hotkeys';import type { ValidHotkey } from '@core/hotkey/types';-import { SplitHeaderRight } from '../split-layout/components/SplitHeader';+import { SplitHeaderLeft, SplitHeaderRight } from '../split-layout/components/SplitHeader';import { SettingsButton } from './SettingsButton';+import { CollapsibleHeaderItem } from '../split-layout/components/CollapsibleHeaderItem';+import { DropdownMenu } from '@kobalte/core/dropdown-menu';+import ChevronDownIcon from '@icon/regular/caret-down.svg';/*** Wrapper specifically for in-Split version of Settings Panel used on Mobile. Includes the correct Header button.@@ -41,7 +39,6 @@ type SettingsPanelProps = {export function SettingsPanel(props: SettingsPanelProps) {const { settingsOpen, closeSettings, activeTabId, setActiveTabId } = useSettingsState();const permissions = usePermissions();- const [spotlight, setSpotlight] = createSignal(false);// Set up hotkey scope for settings panelconst [attachHotkeys, settingsHotkeyScope] = useHotkeyDOMScope('settings');@@ -56,26 +53,18 @@ export function SettingsPanel(props: SettingsPanelProps) {}});- /*- very verbose way to choose which tabs should be shown- this will be replaced with <Show when={}>- */- const settingsTabs = createMemo(() => {- const tabs: {value: string; label: string }[] = [- {value: 'Appearance', label: 'Appearance'},- {value: 'Account', label: 'Account'},+ const settingsTabs = () => {+ const tabs: { value: string; label: string }[] = [+ { value: 'Appearance', label: 'Appearance' },+ { value: 'Account', label: 'Account' },];- if (!isMobile()) {- tabs.push({value: 'Shortcuts', label: 'Shortcuts'})- }-- if(permissions()?.includes('write:stripe_subscription') && !isNativeMobilePlatform()){tabs.push({value: 'Subscription', label: 'Subscription'})}- if(ENABLE_APP_STORE_QR_CODE && !isNativeMobilePlatform()){tabs.push({ value: 'Mobile App', label: 'Mobile App' })}- if(isNativeMobilePlatform() && DEV_MODE_ENV){tabs.push({ value: 'Mobile', label: 'Mobile Dev Tools' })}-+ if (!isMobile()) { tabs.push({ value: 'Shortcuts', label: 'Shortcuts' }) }+ if (permissions()?.includes('write:stripe_subscription') && !isNativeMobilePlatform()) { tabs.push({ value: 'Subscription', label: 'Subscription' }) }+ if (ENABLE_APP_STORE_QR_CODE && !isNativeMobilePlatform()) { tabs.push({ value: 'Mobile App', label: 'Mobile App' }) }+ if (isNativeMobilePlatform() && DEV_MODE_ENV) { tabs.push({ value: 'Mobile', label: 'Mobile Dev Tools' }) }return tabs;- });+ };// Attach hotkeys to the settings containeronMount(() => {@@ -153,111 +142,126 @@ export function SettingsPanel(props: SettingsPanelProps) {});}+ const handleTabChange = (value: string) => {+ if (value === 'Account' || value === 'Subscription' || value === 'Appearance' || value === 'Mobile' || value === 'AI Memory' || value === 'Shortcuts' || value === 'Mobile App') {+ setActiveTabId(value as SettingsTab);+ }+ };++ const activeLabel = () => {+ const tab = activeTabId();+ return settingsTabs().find((item) => item.value === tab)?.label ?? settingsTabs()[0]?.label;+ };++ const SettingsTabs = () => (+ <Tabs+ list={settingsTabs()}+ value={activeTabId()}+ defaultValue="Appearance"+ onChange={handleTabChange}+ />+ );++ const CollapsedSettingsTabs = () => (+ <DropdownMenu placement="bottom-start" gutter={4}>+ <DropdownMenu.Trigger class="flex items-center gap-1 px-2 py-1 text-xs font-medium rounded-xs border border-edge-muted hover:bg-ink/6 transition-colors">+ <span class="truncate">{activeLabel()}</span>+ <ChevronDownIcon class="size-3 shrink-0" />+ </DropdownMenu.Trigger>+ <DropdownMenu.Portal>+ <DropdownMenu.Content class="z-action-menu bg-surface-0 border border-edge-muted rounded-sm shadow-sm p-1">+ <For each={settingsTabs()}>+ {(item) => (+ <DropdownMenu.Item+ class="w-full px-2 py-1.5 text-left text-xs transition-colors hover:bg-ink/5 focus:bg-ink/5 outline-none cursor-default rounded-md"+ classList={{+ 'font-semibold': activeTabId() === item.value,+ }}+ onSelect={() => handleTabChange(item.value)}+ >+ {item.label}+ </DropdownMenu.Item>+ )}+ </For>+ </DropdownMenu.Content>+ </DropdownMenu.Portal>+ </DropdownMenu>+ );++ const MobileSettingsTabs = () => (+ <div class="bg-panel border-t border-edge-muted h-11 px-1">+ <Tabs+ list={settingsTabs()}+ value={activeTabId()}+ defaultValue="Appearance"+ onChange={handleTabChange}+ indicatorPosition="top"+ class="[&_[data-indicator]]:h-[3px]"+ />+ </div>+ );+return (<div- class="size-full p-2 pl-0 outline-none bracket-never"+ class="size-full outline-none bracket-never"classList={{invisible: props.hide,}}tabIndex={0}ref={settingsContainerRef}>- <SplitlikeContainer- setSpotlight={setSpotlight}- spotlight={spotlight}- tr={!spotlight()}- >- <div class="flex flex-col h-full bg-panel border border-edge-muted rounded-sm overflow-hidden isolate">- <Tabs- value={activeTabId()}- onChange={(value: string | undefined) => {- if(value && (value === 'Account' || value === 'Subscription' || value === 'Appearance' || value === 'Mobile' || value === 'AI Memory' || value === 'Shortcuts' || value === 'Mobile App')){- setActiveTabId(value as SettingsTab);- }- }}- class="flex flex-col h-full"- >- {/* Header with tabs */}- <div class="relative isolate shrink-0 border-b border-edge-muted">- <div class="flex items-center pl-2 pr-3 gap-2">- <Show when={!isMobile()}>- <DeprecatedIconButton- icon={CloseIcon}- onClick={closeSettings}- tooltip={{ label: 'Close Settings' }}- theme="clear"- size="sm"- />- </Show>-- <Tabs.List- class="flex flex-1 items-center justify-center py-2"- as="div"- >- <div class="border border-edge-muted rounded-xs inline-flex overflow-hidden">- <For each={settingsTabs()}>- {({ value, label }, i) => {- return (- <Tabs.Trigger- value={value}- tabIndex={-1}- data-value={value}- class="text-xs font-medium relative flex items-center px-2 py-1 border-r border-edge-muted last:border-r-0 transition-colors duration-150 text-ink-muted data-[selected]:text-ink data-[selected]:bg-ink/10 hover:text-ink hover:bg-ink/15 data-[selected]:hover:bg-ink/20 whitespace-nowrap"- >- <span class="flex items-center gap-1.5">- <span>{label}</span>- <span class="font-mono text-[10px] opacity-50 border border-edge-muted rounded-[3px] px-1 py-px leading-none">{(i() + 1).toString()}</span>- </span>- </Tabs.Trigger>- );- }}- </For>- </div>- </Tabs.List>-- <div class="flex-1" />+ {/* Tabs in split header */}+ <SplitHeaderLeft>+ <div class="h-full flex gap-3 items-center">+ <Show when={!isMobile()}>+ <h1 class="font-semibold text-ink select-none text-sm shrink-0">+ Settings+ </h1>+ <CollapsibleHeaderItem+ id="settings-tabs"+ priority={1}+ expanded={() => <SettingsTabs />}+ collapsed={() => <CollapsedSettingsTabs />}+ containerClass="h-full"+ />+ </Show>+ </div>+ </SplitHeaderLeft>- <Show when={!isMobile()}>- <DeprecatedIconButton- icon={spotlight() ? ContractIcon : ExpandIcon}- onClick={() => setSpotlight(!spotlight())}- tooltip={{- label: spotlight() ? 'Exit Spotlight' : 'Enter Spotlight Mode'- }}- theme="clear"- size="sm"- />- </Show>- </div>- </div>-- {/* Content area */}- <div class="flex-1 min-h-0 relative">- <Tabs.Content value="Account" class="absolute inset-0">- <Suspense>- <Account />- </Suspense>- </Tabs.Content>- <Show when={permissions()?.includes('write:stripe_subscription') && !isNativeMobilePlatform()}>- <Tabs.Content value="Subscription" class="absolute inset-0">- <Subscription />- </Tabs.Content>- </Show>- <Tabs.Content value="Appearance" class="absolute inset-0">- <Appearance />- </Tabs.Content>- <Tabs.Content value="Shortcuts" class="absolute inset-0">- <Shortcuts />- </Tabs.Content>- <Show when={ENABLE_APP_STORE_QR_CODE && !isNativeMobilePlatform()}>- <Tabs.Content value="Mobile App" class="absolute inset-0">- <MobileApp />- </Tabs.Content>- </Show>- </div>- </Tabs>+ {/* Content area */}+ <div class="flex-1 min-h-0 flex flex-col overflow-hidden">+ <Show when={activeTabId() === 'Account'}>+ <div class="size-full">+ <Suspense>+ <Account />+ </Suspense>+ </div>+ </Show>+ <Show when={activeTabId() === 'Subscription' && permissions()?.includes('write:stripe_subscription') && !isNativeMobilePlatform()}>+ <div class="size-full">+ <Subscription />+ </div>+ </Show>+ <Show when={activeTabId() === 'Appearance'}>+ <div class="size-full">+ <Appearance />+ </div>+ </Show>+ <Show when={activeTabId() === 'Shortcuts'}>+ <div class="size-full">+ <Shortcuts />+ </div>+ </Show>+ <Show when={activeTabId() === 'Mobile App' && ENABLE_APP_STORE_QR_CODE && !isNativeMobilePlatform()}>+ <div class="size-full">+ <MobileApp /></div>- </SplitlikeContainer>+ </Show></div>+ {/* Mobile bottom tabs */}+ <Show when={isMobile()}>+ <MobileSettingsTabs />+ </Show>+ </div>);}diff --git a/js/app/packages/app/component/settings/SettingsWrapper.tsx b/js/app/packages/app/component/settings/SettingsWrapper.tsxdeleted file mode 100644index c21fb7c161..0000000000--- a/js/app/packages/app/component/settings/SettingsWrapper.tsx+++ /dev/null@@ -1,25 +0,0 @@-import { Show, Suspense } from 'solid-js';-import { Resize } from '@core/component/Resize';-import { isSettingsPanelOpen } from '@core/signal/layout/settings';-import { useIsAuthenticated } from '@core/auth';-import { SettingsPanel } from './Settings';--export const SettingsWrapper = () => {- const isAuthenticated = useIsAuthenticated();-- return (- <Show when={isAuthenticated() && isSettingsPanelOpen()}>- <Resize.Panel- id="settings-panel"- minSize={440}- maxSize={800}- hidden={() => !isSettingsPanelOpen()}- persistent={true}- >- <Suspense>- <SettingsPanel hide={!isSettingsPanelOpen()} />- </Suspense>- </Resize.Panel>- </Show>- );-};diff --git a/js/app/packages/app/component/split-layout/components/SplitContainer.tsx b/js/app/packages/app/component/split-layout/components/SplitContainer.tsxindex 616f0d2ee8..8c1a8c4b3a 100644--- a/js/app/packages/app/component/split-layout/components/SplitContainer.tsx+++ b/js/app/packages/app/component/split-layout/components/SplitContainer.tsx@@ -1,13 +1,11 @@import MacroJump from '@app/component/MacroJump';import { createElementSize } from '@solid-primitives/resize-observer';import {- type Accessor,createEffect,createMemo,createSignal,on,type ParentProps,- type Setter,Show,} from 'solid-js';import { useSplitPanelOrThrow } from '../layoutUtils';@@ -132,46 +130,3 @@ export function SplitContainer(</SplitModalProvider>);}--export function SplitlikeContainer(- props: ParentProps<{- setSpotlight: Setter<boolean>;- spotlight: Accessor<boolean>;- active?: boolean;- tl?: boolean;- tr?: boolean;- br?: boolean;- bl?: boolean;- }>-) {- const [panel, setPanel] = createSignal<HTMLDivElement | null>(null);- const panelSize = createElementSize(panel);-- return (- <SplitModalProvider>- <SplitDrawerGroup panelSize={panelSize} contentOffsetTop={() => 0}>- <Show when={props.spotlight()}>- <MacroJump tabbableParent={() => panel() ?? undefined} />- <div- class="fixed inset-0 w-screen h-screen z-modal-overlay bg-modal-overlay pattern-diagonal-4 pattern-edge-muted"- onClick={() => props.setSpotlight(false)}- />- <div class="fixed inset-[4rem] bg-panel shadow-xl" />- </Show>-- <div- class="@container/split flex flex-col min-h-0 bracket-never bg-panel rounded-sm overflow-hidden"- classList={{- 'fixed inset-[4rem] z-modal isolate': props.spotlight(),- 'size-full': !props.spotlight(),- }}- data-split-container- tabindex={-1}- ref={setPanel}- >- <div class="size-full">{props.children}</div>- </div>- </SplitDrawerGroup>- </SplitModalProvider>- );-}diff --git a/js/app/packages/app/component/split-layout/layoutManager.ts b/js/app/packages/app/component/split-layout/layoutManager.tsindex 062657e47e..b6ee0278f4 100644--- a/js/app/packages/app/component/split-layout/layoutManager.ts+++ b/js/app/packages/app/component/split-layout/layoutManager.ts@@ -11,7 +11,7 @@ import type {BlockInstanceHandle,BlockOrchestrator,} from '@core/orchestrator';-import { isSettingsPanelOpen } from '@core/signal/layout';+import {type Accessor,createMemo,@@ -713,7 +713,7 @@ export function createSplitLayout(}function spotlightSplit(id: SplitId) {- if (state.splits.length <= 1 && !isSettingsPanelOpen()) {+ if (state.splits.length <= 1) {return;}const split = findSplitById(id);diff --git a/js/app/packages/app/component/split-layout/utils/canSpotlight.ts b/js/app/packages/app/component/split-layout/utils/canSpotlight.tsindex f4221549cf..92d8333e88 100644--- a/js/app/packages/app/component/split-layout/utils/canSpotlight.ts+++ b/js/app/packages/app/component/split-layout/utils/canSpotlight.ts@@ -1,6 +1,5 @@-import { isSettingsPanelOpen } from '@core/signal/layout';import type { SplitManager } from '../layoutManager';export function canSpotlight(splitManager: SplitManager) {- return splitManager.splits().length > 1 || isSettingsPanelOpen();+ return splitManager.splits().length > 1;}diff --git a/js/app/packages/block-theme/components/ColorSwatch.tsx b/js/app/packages/block-theme/components/ColorSwatch.tsxindex c129524088..359a3b43c2 100644--- a/js/app/packages/block-theme/components/ColorSwatch.tsx+++ b/js/app/packages/block-theme/components/ColorSwatch.tsx@@ -5,12 +5,14 @@ export function ColorSwatch(props: { width: string; color: string }) {style="transition: border-color var(--transition);border: 1px solid var(--color-edge-muted);+ border-radius: 2px;padding: 3px;"><divstyle={{'background-color': props.color,+ 'border-radius': '1px',width: props.width,height: '10px',}}diff --git a/js/app/packages/block-theme/components/ThemeEditorAdvanced.tsx b/js/app/packages/block-theme/components/ThemeEditorAdvanced.tsxindex dd7a904ba8..7081d80f41 100644--- a/js/app/packages/block-theme/components/ThemeEditorAdvanced.tsx+++ b/js/app/packages/block-theme/components/ThemeEditorAdvanced.tsx@@ -45,7 +45,7 @@ export function ThemeEditorAdvanced(){<divstyle="background-color: var(--b1);- font-family: var(--font-mono);+ font-family: var(--font-sans);scrollbar-width: none;position: relative;overflow: hidden;@@ -122,8 +122,8 @@ export function ThemeEditorAdvanced(){<div style="background-color: var(--b1);"><divstyle="- grid-template-columns: min-content 1fr min-content;background-color: var(--color-edge-muted);+ grid-template-columns: 140px 1fr 80px;align-items: center;display: grid;height: 41px;diff --git a/js/app/packages/block-theme/components/ThemeEditorBasic.tsx b/js/app/packages/block-theme/components/ThemeEditorBasic.tsxindex e72600c2a5..64b8f39ba6 100644--- a/js/app/packages/block-theme/components/ThemeEditorBasic.tsx+++ b/js/app/packages/block-theme/components/ThemeEditorBasic.tsx@@ -276,7 +276,7 @@ export function ThemeEditorBasic(){<divstyle="- font-family: var(--font-mono);+ font-family: var(--font-sans);background-color: var(--b1);box-sizing: border-box;height: min-content;@@ -356,6 +356,7 @@ export function ThemeEditorBasic(){border: 1px solid var(--color-edge-muted);transform: translate(-50%, -50%);box-sizing: border-box;+ border-radius: 2px;position: absolute;height: 10px;width: 100%;@@ -371,7 +372,7 @@ export function ThemeEditorBasic(){'transform': 'translate(-50%, -50%)','background-color': 'var(--a0)','box-sizing': 'border-box',- 'border-radius': '0px',+ 'border-radius': '2px','position': 'absolute','height': '18px','width': '18px',@@ -391,7 +392,7 @@ export function ThemeEditorBasic(){cursor: var(--cursor-pointer);width: calc(100% + 18px);box-sizing: border-box;- border-radius: 0px;+ border-radius: 2px;position: absolute;background: #0000;outline: none;@@ -434,7 +435,9 @@ export function ThemeEditorBasic(){border: 1px solid var(--color-edge-muted);transform: translate(-50%, -50%);box-sizing: border-box;+ border-radius: 2px;position: absolute;+ overflow: clip;display: grid;height: 10px;width: 100%;@@ -462,7 +465,7 @@ export function ThemeEditorBasic(){'transform': 'translate(-50%, -50%)','background-color': 'var(--b1)','box-sizing': 'border-box',- 'border-radius': '0px',+ 'border-radius': '2px','position': 'absolute','height': '18px','width': '18px',@@ -481,7 +484,7 @@ export function ThemeEditorBasic(){cursor: var(--cursor-pointer);width: calc(100% + 18px);box-sizing: border-box;- border-radius: 0px;+ border-radius: 2px;position: absolute;background: #0000;outline: none;@@ -526,7 +529,9 @@ export function ThemeEditorBasic(){border: 1px solid var(--color-edge-muted);transform: translate(-50%, -50%);box-sizing: border-box;+ border-radius: 2px;position: absolute;+ overflow: clip;display: grid;height: 10px;width: 100%;@@ -558,7 +563,7 @@ export function ThemeEditorBasic(){'transform': 'translate(-50%, -50%)','background-color': 'var(--b1)','box-sizing': 'border-box',- 'border-radius': '0px',+ 'border-radius': '2px','position': 'absolute','height': '18px','width': '18px',@@ -577,7 +582,7 @@ export function ThemeEditorBasic(){cursor: var(--cursor-pointer);width: calc(100% + 18px);box-sizing: border-box;- border-radius: 0px;+ border-radius: 2px;position: absolute;background: #0000;outline: none;diff --git a/js/app/packages/block-theme/components/ThemeList.tsx b/js/app/packages/block-theme/components/ThemeList.tsxindex a8c29d1b5e..39e18c7fdf 100644--- a/js/app/packages/block-theme/components/ThemeList.tsx+++ b/js/app/packages/block-theme/components/ThemeList.tsx@@ -1,8 +1,9 @@-import { For } from 'solid-js';import { currentThemeId, isThemeSaved, themes } from '../signals/themeSignals';+import { useAnalytics } from 'app/component/analytics-context';import { applyTheme } from '../utils/themeUtils';import { ColorSwatch } from './ColorSwatch';-import { useAnalytics } from 'app/component/analytics-context';++import { For } from 'solid-js';export function ThemeList() {const analytics = useAnalytics()@@ -55,7 +56,7 @@ export function ThemeList() {<divstyle="- font-family: var(--font-mono);+ font-family: var(--font-sans);background-color: var(--b1);scrollbar-width: none;position: relative;diff --git a/js/app/packages/block-theme/components/ThemeTools.tsx b/js/app/packages/block-theme/components/ThemeTools.tsxindex f875ec73ff..aa8eb5212c 100644--- a/js/app/packages/block-theme/components/ThemeTools.tsx+++ b/js/app/packages/block-theme/components/ThemeTools.tsx@@ -1,19 +1,20 @@import { deleteTheme, exportTheme, importTheme, invertTheme, saveTheme } from '../utils/themeUtils';import { currentThemeId, isThemeSaved, themes, userThemes } from '../signals/themeSignals';+import { DeprecatedIconButton } from '@core/component/DeprecatedIconButton';import { createEffect, createMemo, createSignal, Show } from 'solid-js';+import IconPaintbrush from '@macro-icons/wide/paintbrush.svg';import IconLightDark from '@macro-icons/macro-light-dark.svg';import IconClipboard from '@macro-icons/macro-clipboard.svg';import IconImport from '@macro-icons/macro-import.svg';-import { DeprecatedIconButton } from '@core/component/DeprecatedIconButton';import IconTrash from '@macro-icons/macro-trash.svg';import { randomizeTheme } from './ThemeEditorBasic';import IconDice from '@macro-icons/macro-dice.svg';import IconSave from '@macro-icons/macro-save.svg';-import IconPaintbrush from '@macro-icons/wide/paintbrush.svg';+export function ThemeTools() {let themeName!: HTMLDivElement;-+const defaultThemeName = 'New Theme';const currentThemeName = createMemo(() => {@@ -41,14 +42,14 @@ export function ThemeTools() {'grid-template-columns': `min-content min-content 1fr repeat(${columnCount()}, min-content)`,'padding': '0 12px 0 20px' /* (41 - 32) / 2 */,'gap': '4.5px' /* (41 - 32) / 2 */,- 'font-family': 'var( --font-mono)',+ 'font-family': 'var(--font-sans)','background-color': 'var(--b1)','scrollbar-width': 'none','align-items': 'center','overflow': 'hidden','font-size': '14px',+ 'height': '39.5px','display': 'grid',- 'height': '43px','width': '100%',}}>diff --git a/js/app/packages/core/component/Resize/Resize.tsx b/js/app/packages/core/component/Resize/Resize.tsxindex 37d698425a..1d498abaab 100644--- a/js/app/packages/core/component/Resize/Resize.tsx+++ b/js/app/packages/core/component/Resize/Resize.tsx@@ -178,7 +178,7 @@ function Zone(props: ParentProps<ZoneProps>) {* @property hidden - Accessor that returns whether the panel should be hidden (temporarily* removed from layout but still registered). When hidden, other panels flow around it.* @property persistent - When true, panel stays registered even when hidden (for singleton panels- * like settings/rightbar). When false or undefined, hidden panels unregister (default behavior).+ * like settings). When false or undefined, hidden panels unregister (default behavior).*/type PanelProps = {id: PanelId;diff --git a/js/app/packages/core/constant/SettingsState.tsx b/js/app/packages/core/constant/SettingsState.tsxindex c8bd5b3d4a..8094046fa2 100644--- a/js/app/packages/core/constant/SettingsState.tsx+++ b/js/app/packages/core/constant/SettingsState.tsx@@ -1,10 +1,6 @@import { useSplitLayout } from '@app/component/split-layout/layout';import { globalSplitManager } from '@app/signal/splitLayout';import { isMobile } from '@core/mobile/isMobile';-import {- isSettingsPanelOpen,- setIsSettingsPanelOpen,-} from '@core/signal/layout/settings';import { createSignal } from 'solid-js';export type SettingsTab =@@ -18,48 +14,40 @@ export type SettingsTab =| 'Shortcuts'| 'Mobile App';-export const settingsOpen = isSettingsPanelOpen;-export const setSettingsOpen = setIsSettingsPanelOpen;export const [activeTabId, setActiveTabId] =createSignal<SettingsTab>('Appearance');export const useSettingsState = () => {- const { replaceSplit } = useSplitLayout();+ const { replaceSplit, insertSplit } = useSplitLayout();- const activeSplit = () => {+ const getSettingsSplit = () => {const splitManager = globalSplitManager();- const activeSplitId = splitManager?.activeSplitId();- return activeSplitId ? splitManager?.getSplit(activeSplitId) : undefined;- };-- const splitContent = () => {- return activeSplit()?.content();+ if (!splitManager) return undefined;+ return splitManager.splits().find((split) => {+ const content = split.content;+ return content.type === 'component' && content.id === 'settings';+ });};const isOpen = () => {- if (isMobile()) {- const content = splitContent();- return content?.type === 'component' && content?.id === 'settings';- } else {- return isSettingsPanelOpen();- }+ return getSettingsSplit() !== undefined;};const openSettings = (activeTabId?: SettingsTab) => {+ if (activeTabId) setActiveTabId(activeTabId);+ if (isOpen()) return; // Already openif (isMobile()) {replaceSplit({ content: { type: 'component', id: 'settings' } });} else {- setIsSettingsPanelOpen(true);+ insertSplit({ type: 'component', id: 'settings' });}- if (activeTabId) setActiveTabId(activeTabId);};+const closeSettings = () => {- if (isMobile()) {- if (isOpen()) {- activeSplit()?.goBack();- }- } else {- setIsSettingsPanelOpen(false);+ const settingsSplit = getSettingsSplit();+ if (settingsSplit) {+ const splitManager = globalSplitManager();+ splitManager?.removeSplit(settingsSplit.id);}};const toggleSettings = () => {diff --git a/js/app/packages/core/signal/layout/index.ts b/js/app/packages/core/signal/layout/index.tsindex 2daaf8e265..de3d2f50c0 100644--- a/js/app/packages/core/signal/layout/index.ts+++ b/js/app/packages/core/signal/layout/index.ts@@ -1,18 +1,2 @@-import type { ContextValue } from '@corvu/resizable';-import { createSignal } from 'solid-js';--export * from './settings';--export const LAYOUT_CONTEXT_ID = 'layout';-// TODO: deprecate side bar in layoutexport const TOP_BAR_HEIGHT = 42;--export const [resizableContext, setResizableContext] =- createSignal<ContextValue>();--// default to closed right bar-// NOTE: this is no longer persisted to local storage-export const [persistedLayoutSizes, setPersistedLayoutSizes] = createSignal<- [number, number]->([1, 0]);diff --git a/js/app/packages/core/signal/layout/settings.ts b/js/app/packages/core/signal/layout/settings.tsdeleted file mode 100644index a4307e4d94..0000000000--- a/js/app/packages/core/signal/layout/settings.ts+++ /dev/null@@ -1,16 +0,0 @@-import { createSignal } from 'solid-js';--const DEFAULT_SETTINGS_PANEL_SIZE = 600;--export const [storedSettingsPanelSize, setStoredSettingsPanelSize] =- createSignal(DEFAULT_SETTINGS_PANEL_SIZE);--// Simple boolean signal for settings panel collapsed state-// Default to collapsed (true)-export const [isSettingsPanelOpen, setIsSettingsPanelOpen] =- createSignal(false);--// Settings panel size for resize-export const [persistedSettingsSizes, setPersistedSettingsSizes] = createSignal<- [number, number]->([1, 0]);