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
chore: kill dead code (#3360)
teo1f03b460123b
diff --git a/js/app/knip.ts b/js/app/knip.tsindex 796a5d0c11..2cfa1b3201 100644--- a/js/app/knip.ts+++ b/js/app/knip.ts@@ -1,5 +1,10 @@import type { KnipConfig } from 'knip';+const blockEntry = {+ entry: ['**/*.{ts,tsx}'],+ project: ['**/*.{ts,tsx}'],+};+const config: KnipConfig = {// Generated files and vendored code should be ignoredignore: [@@ -7,6 +12,19 @@ const config: KnipConfig = {'scripts/**','../loro-mirror/**','packages/service-storage/**',+ // Tool/build configs that are entry points to their own tooling+ '**/vite.config.ts',+ '**/vite-ci.config.ts',+ '**/vite.base.ts',+ '**/vitest.config.ts',+ '**/vitest.setup.ts',+ '**/playwright.config.ts',+ '**/orval.config.ts',+ '**/*.d.ts',+ // Playwright tests (matched by a playwright config, not a JS import)+ '**/*.pw.ts',+ // Manually-invoked build scripts within packages+ '**/scripts/**',],// Dependencies that are used but hard to detect statically@@ -20,17 +38,24 @@ const config: KnipConfig = {// Type-only packages (global ambient types, no direct imports)'@types/facebook-pixel','@types/gtag.js',+ '@types/ws',+ '@types/wicg-file-system-access',// Code generation tools (invoked via CLI scripts, not imported in source)'bebop-tools','orval','json-refs','json-schema-to-typescript','json-schema-to-zod',+ 'typedoc',// Build tools used by Vite/bundler internally'lightningcss','concurrently',- // Legacy biome package (different from @biomejs/biome)- 'biome',+ // Runtime tooling invoked via CLI (npm scripts, justfile, etc.)+ '@biomejs/biome',+ '@vitest/ui',+ '@datadog/datadog-ci',+ // Dynamically imported in .js worker (knip can't see)+ 'libheif-js',],// Ignore workspaces that are not real app code@@ -38,7 +63,10 @@ const config: KnipConfig = {// Workspace configurationsworkspaces: {- // Packages with index.ts at root+ 'packages/app': {+ entry: ['index.tsx', 'index.css'],+ project: ['**/*.{ts,tsx}'],+ },'packages/core': {entry: ['index.ts'],project: ['**/*.{ts,tsx}'],@@ -47,58 +75,73 @@ const config: KnipConfig = {entry: ['index.ts'],project: ['**/*.{ts,tsx}'],},-- // Packages with src/index.ts- 'packages/filesystem': {- entry: ['src/main.ts'],- project: ['src/**/*.{ts,tsx}'],- },-- // Block packages and others consumed via tsconfig path aliases (no index.ts entry)- 'packages/block-canvas': {- entry: ['**/*.{ts,tsx}'],+ 'packages/queries': {+ entry: ['index.ts'],project: ['**/*.{ts,tsx}'],},- 'packages/block-channel': {- entry: ['**/*.{ts,tsx}'],+ 'packages/notifications': {+ entry: ['index.ts'],project: ['**/*.{ts,tsx}'],},- 'packages/block-chat': {- entry: ['**/*.{ts,tsx}'],+ 'packages/websocket': {+ entry: ['index.ts'],project: ['**/*.{ts,tsx}'],},- 'packages/block-code': {- entry: ['**/*.{ts,tsx}'],+ 'packages/baby-gl': {+ entry: ['index.ts'],project: ['**/*.{ts,tsx}'],},- 'packages/block-image': {- entry: ['**/*.{ts,tsx}'],- project: ['**/*.{ts,tsx}'],++ // Packages with src/index.ts+ 'packages/filesystem': {+ entry: ['src/main.ts'],+ project: ['src/**/*.{ts,tsx}'],},- 'packages/block-md': {- entry: ['**/*.{ts,tsx}'],- project: ['**/*.{ts,tsx}'],+ 'packages/document-processing-types': {+ entry: ['src/index.ts'],+ project: ['src/**/*.{ts,tsx}'],},- 'packages/block-pdf': {- entry: ['**/*.{ts,tsx}'],- project: ['**/*.{ts,tsx}'],+ 'packages/entity': {+ entry: ['src/index.ts'],+ project: ['src/**/*.{ts,tsx}'],},- 'packages/block-project': {- entry: ['**/*.{ts,tsx}'],- project: ['**/*.{ts,tsx}'],+ 'packages/macro-entity': {+ entry: ['src/index.tsx'],+ project: ['src/**/*.{ts,tsx}'],},- 'packages/block-unknown': {- entry: ['**/*.{ts,tsx}'],- project: ['**/*.{ts,tsx}'],+ 'packages/observability': {+ entry: ['src/index.ts'],+ project: ['src/**/*.{ts,tsx}'],},- 'packages/block-video': {- entry: ['**/*.{ts,tsx}'],- project: ['**/*.{ts,tsx}'],+ 'packages/property': {+ entry: ['src/index.ts'],+ project: ['src/**/*.{ts,tsx}'],},- 'packages/channel': {- entry: ['**/*.{ts,tsx}'],- project: ['**/*.{ts,tsx}'],+ 'packages/tauri': {+ entry: ['src/index.ts'],+ project: ['src/**/*.{ts,tsx}'],},++ // Block packages and others consumed via tsconfig path aliases (no index.ts entry)+ 'packages/block-automation': blockEntry,+ 'packages/block-call': blockEntry,+ 'packages/block-canvas': blockEntry,+ 'packages/block-channel': blockEntry,+ 'packages/block-chat': blockEntry,+ 'packages/block-code': blockEntry,+ 'packages/block-email': blockEntry,+ 'packages/block-image': blockEntry,+ 'packages/block-md': blockEntry,+ 'packages/block-pdf': blockEntry,+ 'packages/block-project': blockEntry,+ 'packages/block-unknown': blockEntry,+ 'packages/block-video': blockEntry,+ 'packages/channel': blockEntry,+ 'packages/design': blockEntry,+ 'packages/icon': blockEntry,+ 'packages/service-clients': blockEntry,+ 'packages/theme': blockEntry,+ 'packages/workers': blockEntry,},};diff --git a/js/app/package.json b/js/app/package.jsonindex 640b241947..d12b63fd01 100644--- a/js/app/package.json+++ b/js/app/package.json@@ -31,8 +31,6 @@"@codemirror/language": "^6.11.3","@corvu/dialog": "^0.2.4","@corvu/drawer": "^0.2.4",- "@corvu/resizable": "^0.2.5",- "@corvu/tooltip": "^0.2.2","@date-fns/tz": "^1.4.1","@floating-ui/dom": "^1.7.4","@fontsource-variable/inter": "^5.2.8",@@ -61,7 +59,6 @@"@solid-primitives/event-bus": "^1.1.2","@solid-primitives/lifecycle": "^0.1.2","@solid-primitives/memo": "^1.4.5",- "@solid-primitives/mutation-observer": "^1.2.2","@solid-primitives/platform": "^0.2.1","@solid-primitives/promise": "^1.1.2","@solid-primitives/resize-observer": "^2.1.3",@@ -76,7 +73,6 @@"@tauri-apps/api": "^2.8.0","@tauri-apps/plugin-haptics": "~2","@tauri-apps/plugin-http": "~2.5.8",- "@tauri-apps/plugin-log": "^2.8.0","@tauri-apps/plugin-notification": "~2","@tauri-apps/plugin-os": "~2","@tauri-apps/plugin-websocket": "~2",@@ -91,7 +87,6 @@"email-validator": "^2.0.4","emojilib": "^4.0.2","fuse.js": "^7.1.0",- "fuzzy": "^0.1.3","katex": "^0.16.22","lexical": "^0.32.1","libheif-js": "^1.19.8",@@ -101,7 +96,6 @@"nanoid": "^3.3.7","neverthrow": "^8.2.0","posthog-js": "^1.360.2",- "prismjs": "^1.30.0","short-uuid": "^5.2.0","signature_pad": "^5.0.10","solid-gesture": "^0.0.3",@@ -125,14 +119,12 @@"@playwright/test": "^1.55.1","@solidjs/meta": "^0.29.4","@solidjs/testing-library": "^0.8.10",- "@testing-library/jest-dom": "^6.9.1","@testing-library/user-event": "^14.6.1","@types/facebook-pixel": "^0.0.31","@types/gtag.js": "^0.0.20","@types/linkify-it": "^5.0.0","@types/lodash": "^4.17.20","@types/node": "^24.8.0",- "@types/prismjs": "^1.26.5","@types/uuid": "^10.0.0","@types/wicg-file-system-access": "^2020.9.5","@types/ws": "^8.5.14",diff --git a/js/app/packages/app/component/ChatWithAgentButton.tsx b/js/app/packages/app/component/ChatWithAgentButton.tsxindex 3e1ad96c61..d6fa017887 100644--- a/js/app/packages/app/component/ChatWithAgentButton.tsx+++ b/js/app/packages/app/component/ChatWithAgentButton.tsx@@ -13,14 +13,14 @@ export { AnimatedStarIcon as ChatWithAgentIcon };const CHANNEL_TYPE_VALUES = new Set<string>(Object.values(ChannelType));-export function toChatChannelType(+function _toChatChannelType(t: string | undefined | null): ChannelType | undefined {if (t && CHANNEL_TYPE_VALUES.has(t)) return t as ChannelType;return undefined;}-export type ChatWithAgentEntity =+type ChatWithAgentEntity =| { type: 'email'; id: string; name: string }| {type: 'document';diff --git a/js/app/packages/app/component/DevStatusBar.tsx b/js/app/packages/app/component/DevStatusBar.tsxindex e0c2c243a6..050b30cb25 100644--- a/js/app/packages/app/component/DevStatusBar.tsx+++ b/js/app/packages/app/component/DevStatusBar.tsx@@ -15,7 +15,7 @@ const PORT_COLORS = ['#0d9488', // teal - 3009];-export const [gitBranch, setGitBranch] = createSignal<string>(+const [gitBranch, setGitBranch] = createSignal<string>(import.meta.env.__GIT_BRANCH__ ?? '');@@ -23,7 +23,7 @@ if (import.meta.env.DEV && import.meta.hot) {import.meta.hot.on('git-branch:update', (data: string) => setGitBranch(data));}-export const [devStatusBarOpen, setDevStatusBarOpen] = makePersisted(+const [devStatusBarOpen, _setDevStatusBarOpen] = makePersisted(createSignal<boolean>(false),{ name: 'dev-status-bar-open' });diff --git a/js/app/packages/app/component/EntityModal/EntityModal.tsx b/js/app/packages/app/component/EntityModal/EntityModal.tsxindex 5ca664e2ee..adb8019108 100644--- a/js/app/packages/app/component/EntityModal/EntityModal.tsx+++ b/js/app/packages/app/component/EntityModal/EntityModal.tsx@@ -99,7 +99,7 @@ const EntityModalContent = (props: {</SplitModal>);};-export const EntityModal: ParentComponent<{+const _EntityModal: ParentComponent<{isOpen: Accessor<boolean>;setIsOpen: Setter<boolean>;view: Accessor<'rename' | 'moveToProject'>;diff --git a/js/app/packages/app/component/GlobalAppState.tsx b/js/app/packages/app/component/GlobalAppState.tsxindex e420441278..4837449d23 100644--- a/js/app/packages/app/component/GlobalAppState.tsx+++ b/js/app/packages/app/component/GlobalAppState.tsx@@ -2,12 +2,12 @@ import type { BlockOrchestrator } from '@core/orchestrator';import type { NotificationSource } from '@notifications';import { createContext, type ParentProps, useContext } from 'solid-js';-export interface GlobalAppState {+interface GlobalAppState {notificationSource: NotificationSource;blockOrchestrator: BlockOrchestrator;}-export const GlobalAppStateContext = createContext<GlobalAppState>();+const GlobalAppStateContext = createContext<GlobalAppState>();function tryGetContext(): GlobalAppState {const context = useContext(GlobalAppStateContext);@@ -20,7 +20,7 @@ function tryGetContext(): GlobalAppState {return context;}-export function useGlobalAppStateContext(): GlobalAppState {+function _useGlobalAppStateContext(): GlobalAppState {return tryGetContext();}@@ -32,7 +32,7 @@ export function useGlobalBlockOrchestrator(): BlockOrchestrator {return tryGetContext().blockOrchestrator;}-export type GlobalAppStateProps = {+type GlobalAppStateProps = {notificationSource: NotificationSource;blockOrchestrator: BlockOrchestrator;};diff --git a/js/app/packages/app/component/ItemDragAndDrop.tsx b/js/app/packages/app/component/ItemDragAndDrop.tsxindex 4dd6eac8f2..cb2df52645 100644--- a/js/app/packages/app/component/ItemDragAndDrop.tsx+++ b/js/app/packages/app/component/ItemDragAndDrop.tsx@@ -32,7 +32,7 @@ export function useDragOperation() {return context;}-export function ItemDragOverlay() {+function ItemDragOverlay() {const [state] = useDragDropContext() ?? [];const activeDraggable = createMemo(() => {return state?.active.draggable;diff --git a/js/app/packages/app/component/Layout.tsx b/js/app/packages/app/component/Layout.tsxindex ac954a9274..07f669fcab 100644--- a/js/app/packages/app/component/Layout.tsx+++ b/js/app/packages/app/component/Layout.tsx@@ -45,8 +45,6 @@ import { Paywall } from './paywall/Paywall';import { PropertyEditorModal } from './property-edit-modal/PropertyEditorModal';import { useAppSquishHandlers } from './useAppSquishHandlers';-export { isSidebarVisible, SidebarVisibilityContext };-const AUTH_URLS = [`${ROUTER_BASE_CONCAT}login`,`${ROUTER_BASE_CONCAT}login/popup`,@@ -58,7 +56,7 @@ const AUTH_URLS = [`${ROUTER_BASE_CONCAT}team-invite`,];-export const [sidebarState, setSidebarState] = makePersisted(+const [sidebarState, setSidebarState] = makePersisted(createSignal<SidebarState>(!isMobile() ? 'slim' : 'hidden'),{name: 'sidebar-state',diff --git a/js/app/packages/app/component/PropertyDisplayControl.tsx b/js/app/packages/app/component/PropertyDisplayControl.tsxdeleted file mode 100644index ce4c32e1d4..0000000000--- a/js/app/packages/app/component/PropertyDisplayControl.tsx+++ /dev/null@@ -1,393 +0,0 @@-import type { PropertyDefinitionDomain } from '@core/component/Properties/types';-import {- PropertyDataTypeIcon,- toPropertyDefinitionDomain,-} from '@core/component/Properties/utils';-import { ERROR_MESSAGES } from '@core/component/Properties/utils/errorHandling';-import { toast } from '@core/component/Toast/Toast';-import MagnifyingGlassIcon from '@phosphor/magnifying-glass.svg';-import XIcon from '@phosphor/x.svg';-import { propertiesServiceClient } from '@service-properties/client';-import type { Accessor, Component } from 'solid-js';-import {- createEffect,- createMemo,- createSignal,- For,- onCleanup,- onMount,- Show,-} from 'solid-js';--export type DisplayOptions = {- layout: 'compact' | 'expanded' | 'visual';- unrollNotifications: boolean;- showUnreadIndicator: boolean;- displayProperties: string[];- limit?: number;-};--const MAX_DISPLAY_PROPERTIES = 4;--type PropertyDisplayControlProps = {- selectedPropertyIds: Accessor<DisplayOptions['displayProperties']>;- setSelectedPropertyIds: (- properties: DisplayOptions['displayProperties']- ) => void;- suggestedProperties?: PropertyDefinitionDomain[];-};--type PropertyPillProps = {- property: PropertyDefinitionDomain;- onRemove: () => void;-};--type SuggestedPillProps = {- property: PropertyDefinitionDomain;- onClick: () => void;-};--type PropertyDropdownProps = {- filteredProperties: Accessor<PropertyDefinitionDomain[]>;- onSelectProperty: (property: PropertyDefinitionDomain) => void;- dropdownRef: (el: HTMLDivElement) => void;- isOpen: Accessor<boolean>;-};--const PropertyDropdown: Component<PropertyDropdownProps> = (props) => {- return (- <Show when={props.isOpen()}>- <div- ref={props.dropdownRef}- class="absolute inset-x-0 top-full mt-1 z-full-page-modal-base- border border-edge bg-surface shadow-lg- max-h-48 overflow-y-auto- font-mono"- >- <Show- when={props.filteredProperties().length > 0}- fallback={- <div class="px-3 py-2 text-xs text-ink-muted text-center">- No properties found- </div>- }- >- <For each={props.filteredProperties()}>- {(property) => (- <button- type="button"- onMouseDown={(e) => {- e.preventDefault(); // Prevent input blur- e.stopPropagation(); // Prevent click outside handler- props.onSelectProperty(property);- }}- class="w-full px-2 py-1.5- text-xs text-ink- hover:bg-hover- flex items-center gap-2- text-left"- >- <PropertyDataTypeIcon property={property} />- <span class="truncate flex-1">{property.displayName}</span>- </button>- )}- </For>- </Show>- </div>- </Show>- );-};--const SuggestedPill: Component<SuggestedPillProps> = (props) => {- return (- <button- type="button"- onClick={props.onClick}- class="inline-flex max-w-35 shrink-0- w-fit min-h-6- items-center gap-2- px-2 py-1- text-xs text-ink- bg-transparent hover:bg-hover- border border-edge- transition-colors"- >- <PropertyDataTypeIcon property={props.property} />- <span class="truncate flex-1 font-mono">- {props.property.displayName}- </span>- </button>- );-};--const PropertyPill: Component<PropertyPillProps> = (props) => {- return (- <div class="inline-flex max-w-50 shrink-0">- <div- class="min-h-6- inline-flex items-center gap-1.5- px-2 py-1- text-xs text-ink- bg-transparent hover:bg-hover- border border-edge- min-w-0 overflow-hidden"- >- <PropertyDataTypeIcon- property={props.property}- class="size-4 text-ink-muted shrink-0"- />- <span class="truncate font-mono">{props.property.displayName}</span>- </div>- <button- type="button"- onClick={(e) => {- e.stopPropagation();- props.onRemove();- }}- class="px-1 bg-edge-muted hover:opacity-70 transition-opacity shrink-0 border border-edge"- >- <XIcon class="size-3.5" />- </button>- </div>- );-};--export const PropertyDisplayControl: Component<PropertyDisplayControlProps> = (- props-) => {- const [availableProperties, setAvailableProperties] = createSignal<- PropertyDefinitionDomain[]- >([]);- const [_isLoading, setIsLoading] = createSignal(false);- const [_error, setError] = createSignal<string | null>(null);- const [searchQuery, setSearchQuery] = createSignal('');- const [isDropdownOpen, setIsDropdownOpen] = createSignal(false);-- let searchInputRef!: HTMLInputElement;- let dropdownRef!: HTMLDivElement;- let containerRef!: HTMLDivElement;-- const fetchAvailableProperties = async () => {- setIsLoading(true);- setError(null);-- try {- const result = await propertiesServiceClient.listProperties({- scope: 'all',- include_options: false,- });-- if (result.isErr()) {- setError(ERROR_MESSAGES.PROPERTY_FETCH);- setIsLoading(false);- return;- }-- const normalizedProperties = result.value.map((item) => {- const definition = 'definition' in item ? item.definition : item;- return toPropertyDefinitionDomain(definition);- });-- setAvailableProperties(normalizedProperties);- setIsLoading(false);- } catch (_apiError) {- setError(ERROR_MESSAGES.PROPERTY_FETCH);- setIsLoading(false);- }- };-- const selectedProperties = createMemo(() => {- const selectedIds = props.selectedPropertyIds();- const allProperties = availableProperties();- return allProperties.filter((property) =>- selectedIds.includes(property.id)- );- });-- const suggestedProperties = createMemo(() => {- const allSuggested = props.suggestedProperties ?? [];- const selectedIds = new Set(props.selectedPropertyIds());- return allSuggested.filter((property) => !selectedIds.has(property.id));- });-- const handleSuggestedSelect = (property: PropertyDefinitionDomain) => {- const currentIds = props.selectedPropertyIds();- if (!currentIds.includes(property.id)) {- const currentIds = props.selectedPropertyIds();- // Enforce max 4 properties- if (currentIds.length >= MAX_DISPLAY_PROPERTIES) {- toast.failure('You can only select up to 4 properties to display.');- return;- }-- props.setSelectedPropertyIds([...currentIds, property.id]);- }- };-- const handleRemoveProperty = (propertyId: string) => {- const currentIds = props.selectedPropertyIds();- props.setSelectedPropertyIds(currentIds.filter((id) => id !== propertyId));- };-- const handleSelectProperty = (property: PropertyDefinitionDomain) => {- const currentIds = props.selectedPropertyIds();- // Enforce max 4 properties- if (currentIds.length >= MAX_DISPLAY_PROPERTIES) {- toast.failure('You can only select up to 4 properties to display.');- return;- }-- if (!currentIds.includes(property.id)) {- props.setSelectedPropertyIds([...currentIds, property.id]);- setSearchQuery('');- searchInputRef?.focus();- }- };-- const filteredProperties = createMemo(() => {- const query = searchQuery().toLowerCase().trim();- const allProperties = availableProperties();- const selectedIds = new Set(props.selectedPropertyIds());-- const available = allProperties.filter(- (property) => !selectedIds.has(property.id)- );-- if (!query) return available;-- return available.filter((property) => {- const name = property.displayName.toLowerCase();- if (name.includes(query)) return true;-- const dataType = property.valueType;- let typeDisplay = dataType;-- if (dataType === 'ENTITY' && property.specificEntityType) {- typeDisplay += ` ${property.specificEntityType}`;- }-- return typeDisplay.toLowerCase().includes(query);- });- });-- onMount(() => {- fetchAvailableProperties();- });-- // Close dropdown when clicking or focusing outside the container- createEffect(() => {- if (!isDropdownOpen()) return;-- const handleClickOutside = (event: MouseEvent) => {- const target = event.target;- if (!(target instanceof Node)) return;-- const path = event.composedPath();-- // Don't close if clicking inside container or dropdown- // Check both composedPath and contains for reliability- const isInsideContainer =- containerRef &&- (path.includes(containerRef) || containerRef.contains(target));- const isInsideDropdown =- dropdownRef &&- (path.includes(dropdownRef) || dropdownRef.contains(target));-- if (isInsideContainer || isInsideDropdown) {- return;- }-- setIsDropdownOpen(false);- };-- const handleFocusOutside = () => {- const activeElement = document.activeElement;- if (- activeElement &&- containerRef &&- !containerRef.contains(activeElement) &&- dropdownRef &&- !dropdownRef.contains(activeElement)- ) {- setIsDropdownOpen(false);- }- };-- document.addEventListener('mousedown', handleClickOutside);- document.addEventListener('focusin', handleFocusOutside);-- onCleanup(() => {- document.removeEventListener('mousedown', handleClickOutside);- document.removeEventListener('focusin', handleFocusOutside);- });- });-- return (- <>- <div class="font-medium text-xs mb-2">Display Properties</div>-- <Show when={suggestedProperties().length > 0}>- <div class="mb-2 px-2">- <div class="text-xs text-ink-muted mb-1">Suggested Properties</div>- <div- class="w-full h-fit- flex flex-wrap items-start justify-start- gap-1"- >- <For each={suggestedProperties()}>- {(property) => (- <SuggestedPill- property={property}- onClick={() => handleSuggestedSelect(property)}- />- )}- </For>- </div>- </div>- </Show>-- <div- ref={containerRef}- class="flex flex-col gap-1 w-full max-w-full border border-edge focus-within:ring-2 focus-within:ring-accent/50 focus-within:border-accent"- >- <Show when={selectedProperties().length > 0}>- <div class="w-full h-fit px-1 pt-1 flex flex-wrap items-start justify-start gap-1">- <For each={selectedProperties()}>- {(property) => (- <PropertyPill- property={property}- onRemove={() => handleRemoveProperty(property.id)}- />- )}- </For>- </div>- </Show>-- <div class="relative flex w-full">- <MagnifyingGlassIcon class="absolute left-2 top-1/2 -translate-y-1/2 size-3.5 text-ink-muted pointer-events-none" />- <input- ref={searchInputRef}- type="text"- value={searchQuery()}- onInput={(e) => {- setSearchQuery(e.currentTarget.value);- setIsDropdownOpen(true);- }}- onFocus={() => setIsDropdownOpen(true)}- placeholder="Search Properties..."- class="w-full pl-7 pr-2 py-1 font-mono text-xs text-ink placeholder-ink-muted bg-transparent"- />-- <PropertyDropdown- filteredProperties={filteredProperties}- onSelectProperty={handleSelectProperty}- dropdownRef={(el) => {- dropdownRef = el;- }}- isOpen={isDropdownOpen}- />- </div>- </div>- </>- );-};diff --git a/js/app/packages/app/component/PropertyFilter/FilterAction.tsx b/js/app/packages/app/component/PropertyFilter/FilterAction.tsxdeleted file mode 100644index 0cee6a2df2..0000000000--- a/js/app/packages/app/component/PropertyFilter/FilterAction.tsx+++ /dev/null@@ -1,116 +0,0 @@-import type { PropertyDefinitionDomain } from '@core/component/Properties/types';-import type { Component } from 'solid-js';-import {- createMemo,- createSignal,- For,- onCleanup,- onMount,- Show,-} from 'solid-js';-import type { FilterAction } from '../PropertyFilterTypes';-import {- ACTION_DISPLAY_NAMES,- ACTION_SYMBOLS,- getValidFilterActions,-} from '../PropertyFilterTypes';--export type FilterActionSelectProps = {- property: PropertyDefinitionDomain;- selectedAction: FilterAction | null;- onSelectAction: (action: FilterAction) => void;-};--export const FilterActionSelect: Component<FilterActionSelectProps> = (- props-) => {- const [isOpen, setIsOpen] = createSignal(false);-- let containerRef!: HTMLDivElement;- let dropdownRef!: HTMLDivElement;-- const validActions = createMemo(() => {- return getValidFilterActions(- props.property.valueType,- props.property.isMultiSelect ?? false- );- });-- const handleSelectAction = (action: FilterAction) => {- props.onSelectAction(action);- setIsOpen(false);- };-- // Close dropdown when clicking outside- const handleClickOutside = (event: MouseEvent) => {- if (!isOpen()) return;- const target = event.target;- if (!(target instanceof Node)) return;-- const isInsideContainer = containerRef?.contains(target);- const isInsideDropdown = dropdownRef?.contains(target);-- if (!isInsideContainer && !isInsideDropdown) {- setIsOpen(false);- }- };-- onMount(() => {- document.addEventListener('mousedown', handleClickOutside);- onCleanup(() =>- document.removeEventListener('mousedown', handleClickOutside)- );- });-- return (- <div ref={containerRef} class="flex relative">- <button- type="button"- onClick={() => setIsOpen(!isOpen())}- class="h-6 px-2 min-w-fit text-xxs border border-edge hover:bg-hover text-left font-mono flex items-center"- classList={{- 'text-ink': props.selectedAction !== null,- 'text-ink-muted': props.selectedAction === null,- }}- >- {props.selectedAction- ? ACTION_SYMBOLS[props.selectedAction]- : 'Select...'}- </button>- <Show when={isOpen()}>- <div- ref={dropdownRef}- class="absolute left-0 top-full mt-1 border border-edge bg-surface shadow-lg max-h-48 overflow-y-auto font-mono min-w-30 z-user-highlight"- >- <Show- when={validActions().length > 0}- fallback={- <div class="px-3 py-2 text-xxs text-ink-muted text-center">- No actions available- </div>- }- >- <For each={validActions()}>- {(action) => (- <button- type="button"- onMouseDown={(e) => {- e.preventDefault();- e.stopPropagation();- handleSelectAction(action);- }}- class="w-full px-2 py-1.5 text-xxs text-ink hover:bg-hover text-left"- classList={{- 'bg-hover': props.selectedAction === action,- }}- >- {ACTION_DISPLAY_NAMES[action]}- </button>- )}- </For>- </Show>- </div>- </Show>- </div>- );-};diff --git a/js/app/packages/app/component/PropertyFilter/FilterProperty.tsx b/js/app/packages/app/component/PropertyFilter/FilterProperty.tsxdeleted file mode 100644index 4198624e21..0000000000--- a/js/app/packages/app/component/PropertyFilter/FilterProperty.tsx+++ /dev/null@@ -1,148 +0,0 @@-import type { PropertyDefinitionDomain } from '@core/component/Properties/types';-import {- isPropertyDefinition,- PropertyDataTypeIcon,- toPropertyDefinitionDomain,-} from '@core/component/Properties/utils';-import MagnifyingGlassIcon from '@phosphor/magnifying-glass.svg';-import { useListPropertiesQuery } from '@queries/properties/definitions';-import type { Component } from 'solid-js';-import {- createMemo,- createSignal,- For,- onCleanup,- onMount,- Show,-} from 'solid-js';-import { isFilterableDataType } from '../PropertyFilterTypes';--export type FilterPropertySelectProps = {- onSelectProperty: (property: PropertyDefinitionDomain) => void;- onCancel?: () => void;-};--export const FilterPropertySelect: Component<FilterPropertySelectProps> = (- props-) => {- const [searchQuery, setSearchQuery] = createSignal('');- const [isDropdownOpen, setIsDropdownOpen] = createSignal(false);-- let searchInputRef!: HTMLInputElement;- let dropdownRef!: HTMLDivElement;- let containerRef!: HTMLDivElement;-- const propertiesQuery = useListPropertiesQuery(() => ({- scope: 'all',- includeOptions: false,- }));-- const availableProperties = createMemo((): PropertyDefinitionDomain[] => {- const data = propertiesQuery.data;- if (!data) return [];- return (Array.isArray(data) ? data : [])- .filter(isPropertyDefinition)- .map((def) => toPropertyDefinitionDomain(def));- });-- // Filter to only filterable properties (exclude COMPANY entity type)- const filterableProperties = createMemo(() => {- return availableProperties().filter(- (property) =>- isFilterableDataType(property.valueType) &&- property.specificEntityType !== 'COMPANY'- );- });-- const filteredProperties = createMemo(() => {- const query = searchQuery().toLowerCase().trim();- const properties = filterableProperties();-- if (!query) return properties;-- return properties.filter((property) => {- const name = property.displayName.toLowerCase();- return name.includes(query);- });- });-- const handleSelectProperty = (property: PropertyDefinitionDomain) => {- props.onSelectProperty(property);- setSearchQuery('');- setIsDropdownOpen(false);- };-- // Close dropdown and cancel when clicking outside- const handleClickOutside = (event: MouseEvent) => {- if (!isDropdownOpen()) return;- const target = event.target;- if (!(target instanceof Node)) return;-- const isInsideContainer = containerRef?.contains(target);- const isInsideDropdown = dropdownRef?.contains(target);-- if (!isInsideContainer && !isInsideDropdown) {- setIsDropdownOpen(false);- props.onCancel?.();- }- };-- onMount(() => {- // Autofocus the search input- searchInputRef?.focus();- document.addEventListener('mousedown', handleClickOutside);- onCleanup(() =>- document.removeEventListener('mousedown', handleClickOutside)- );- });-- return (- <div ref={containerRef} class="flex relative w-full h-6">- <MagnifyingGlassIcon class="absolute left-2 top-1/2 -translate-y-1/2 size-3 text-ink-muted pointer-events-none" />- <input- ref={searchInputRef}- type="text"- value={searchQuery()}- onInput={(e) => {- setSearchQuery(e.currentTarget.value);- setIsDropdownOpen(true);- }}- onFocus={() => setIsDropdownOpen(true)}- placeholder="Search Properties..."- class="size-full pl-6 pr-2 font-mono text-xxs text-ink placeholder-ink-muted bg-transparent border border-edge focus:ring-2 focus:ring-accent/50 focus:border-accent"- />- <Show when={isDropdownOpen()}>- <div- ref={dropdownRef}- class="absolute inset-x-0 top-full mt-1 border border-edge bg-surface shadow-lg max-h-48 overflow-y-auto font-mono z-user-highlight"- >- <Show- when={filteredProperties().length > 0}- fallback={- <div class="px-3 py-2 text-xxs text-ink-muted text-center">- No filterable properties found- </div>- }- >- <For each={filteredProperties()}>- {(property) => (- <button- type="button"- onMouseDown={(e) => {- e.preventDefault();- e.stopPropagation();- handleSelectProperty(property);- }}- class="w-full px-2 py-1.5 text-xxs text-ink hover:bg-hover flex items-center gap-2 text-left"- >- <PropertyDataTypeIcon property={property} />- <span class="truncate flex-1">{property.displayName}</span>- </button>- )}- </For>- </Show>- </div>- </Show>- </div>- );-};diff --git a/js/app/packages/app/component/PropertyFilter/FilterPropertyPill.tsx b/js/app/packages/app/component/PropertyFilter/FilterPropertyPill.tsxdeleted file mode 100644index fcf56a50f4..0000000000--- a/js/app/packages/app/component/PropertyFilter/FilterPropertyPill.tsx+++ /dev/null@@ -1,632 +0,0 @@-import type { PropertyDefinitionDomain } from '@core/component/Properties/types';-import { PropertyDataTypeIcon } from '@core/component/Properties/utils/PropertyDataTypeIcon';-import CheckIcon from '@phosphor/check.svg';-import XIcon from '@phosphor/x.svg';-import type { Component } from 'solid-js';-import { createSignal, Match, Show, Switch } from 'solid-js';-import type {- EntityFilterValue,- FilterAction,- PropertyFilter,-} from '../PropertyFilterTypes';-import {- ComparisonAction,- ContainsAction,- EqualityAction,-} from '../PropertyFilterTypes';--// Type guards for action types-const isEqualityAction = (a: FilterAction): a is EqualityAction =>- a === EqualityAction.EQUAL || a === EqualityAction.NOT_EQUAL;--const isComparisonActionType = (a: FilterAction): a is ComparisonAction =>- a === ComparisonAction.GREATER_THAN ||- a === ComparisonAction.GREATER_THAN_OR_EQUAL ||- a === ComparisonAction.LESS_THAN ||- a === ComparisonAction.LESS_THAN_OR_EQUAL;--const isContainsAction = (a: FilterAction): a is ContainsAction =>- a === ContainsAction.HAS_ANY ||- a === ContainsAction.HAS_ALL ||- a === ContainsAction.DOES_NOT_HAVE;--import { FilterActionSelect } from './FilterAction';-import { FilterPropertySelect } from './FilterProperty';-import { FilterValueBoolean } from './FilterValueBoolean';-import { FilterValueDate } from './FilterValueDate';-import { FilterValueDateMulti } from './FilterValueDateMulti';-import { FilterValueEntity } from './FilterValueEntity';-import { FilterValueNumber } from './FilterValueNumber';-import { FilterValueNumberMulti } from './FilterValueNumberMulti';-import { FilterValueSelect } from './FilterValueSelect';-import { FilterValueSelectMulti } from './FilterValueSelectMulti';--type FilterPillProps = {- id: string;- savedData: PropertyFilter | null; // null = pending, non-null = saved- /** Property definition for restoring saved filters (looked up by parent) */- initialProperty?: PropertyDefinitionDomain;- onSave: (data: PropertyFilter) => void;- onCancel: () => void;-};--export const FilterPropertyPill: Component<FilterPillProps> = (props) => {- // Initialize state from savedData if available- const initBooleanValue = (): boolean | null => {- if (props.savedData?.dataType === 'BOOLEAN' && 'value' in props.savedData) {- return props.savedData.value as boolean;- }- return null;- };-- const initDateValue = (): string | null => {- if (props.savedData?.dataType === 'DATE' && 'value' in props.savedData) {- return props.savedData.value as string;- }- return null;- };-- const initDateValues = (): string[] => {- if (props.savedData?.dataType === 'DATE' && 'values' in props.savedData) {- return props.savedData.values as string[];- }- return [];- };-- const initNumberValue = (): number | null => {- if (props.savedData?.dataType === 'NUMBER' && 'value' in props.savedData) {- return props.savedData.value as number;- }- return null;- };-- const initNumberValues = (): number[] => {- if (props.savedData?.dataType === 'NUMBER' && 'values' in props.savedData) {- return props.savedData.values as number[];- }- return [];- };-- const initSelectValue = (): string | null => {- if (- (props.savedData?.dataType === 'SELECT_STRING' ||- props.savedData?.dataType === 'SELECT_NUMBER') &&- 'value' in props.savedData- ) {- return String(props.savedData.value);- }- return null;- };-- const initSelectValues = (): string[] => {- if (- (props.savedData?.dataType === 'SELECT_STRING' ||- props.savedData?.dataType === 'SELECT_NUMBER') &&- 'values' in props.savedData- ) {- return (props.savedData.values as (string | number)[]).map(String);- }- return [];- };-- const initEntityValues = (): EntityFilterValue[] => {- if (props.savedData?.dataType === 'ENTITY' && 'values' in props.savedData) {- return props.savedData.values as EntityFilterValue[];- }- return [];- };-- // Internal editing state - initialized from props- const [selectedProperty, setSelectedProperty] =- createSignal<PropertyDefinitionDomain | null>(- props.initialProperty ?? null- );- const [action, setAction] = createSignal<FilterAction | null>(- props.savedData?.action ?? null- );- const [values, _setValues] = createSignal<string[]>([]);- const [booleanValue, setBooleanValue] = createSignal<boolean | null>(- initBooleanValue()- );- const [dateValue, setDateValue] = createSignal<string | null>(- initDateValue()- );- const [dateValues, setDateValues] = createSignal<string[]>(initDateValues());- const [numberValue, setNumberValue] = createSignal<number | null>(- initNumberValue()- );- const [numberValues, setNumberValues] = createSignal<number[]>(- initNumberValues()- );- const [selectValue, setSelectValue] = createSignal<string | null>(- initSelectValue()- );- const [selectValues, setSelectValues] = createSignal<string[]>(- initSelectValues()- );- const [entityValues, setEntityValues] = createSignal<EntityFilterValue[]>(- initEntityValues()- );-- // Track if user is editing property (to show search instead of pill)- const [previousProperty, setPreviousProperty] =- createSignal<PropertyDefinitionDomain | null>(null);-- const isPending = () => props.savedData === null;-- // Helper to check if action is a comparison- const isComparisonAction = (a: FilterAction | null) =>- a === ComparisonAction.GREATER_THAN ||- a === ComparisonAction.GREATER_THAN_OR_EQUAL ||- a === ComparisonAction.LESS_THAN ||- a === ComparisonAction.LESS_THAN_OR_EQUAL;-- // Check if value is set based on data type- const hasValue = () => {- const property = selectedProperty();- if (!property) return false;-- if (property.valueType === 'BOOLEAN') {- return booleanValue() !== null;- }- if (property.valueType === 'DATE') {- if (isComparisonAction(action())) {- return dateValue() !== null;- }- return dateValues().length > 0; // Equality actions use multi-date- }- if (property.valueType === 'NUMBER') {- if (isComparisonAction(action())) {- return numberValue() !== null;- }- return numberValues().length > 0; // Equality actions use multi-number- }- if (- property.valueType === 'SELECT_STRING' ||- property.valueType === 'SELECT_NUMBER'- ) {- if (isComparisonAction(action())) {- return selectValue() !== null;- }- return selectValues().length > 0; // Equality actions use multi-select- }- if (property.valueType === 'ENTITY') {- return entityValues().length > 0;- }- return values().length > 0;- };-- const canConfirm = () => selectedProperty() && action() && hasValue();-- const handleSelectProperty = (property: PropertyDefinitionDomain) => {- // Only clear action/values if property actually changed- const prev = previousProperty();- if (prev && prev.id !== property.id) {- setAction(null);- setBooleanValue(null);- setDateValue(null);- setDateValues([]);- setNumberValue(null);- setNumberValues([]);- setSelectValue(null);- setSelectValues([]);- setEntityValues([]);- _setValues([]);- }- setSelectedProperty(property);- setPreviousProperty(null);- };-- const handleStartEditProperty = () => {- setPreviousProperty(selectedProperty());- setSelectedProperty(null);- // Don't clear action here - we might select the same property- };-- const handleCancelEditProperty = () => {- // Restore previous property if we were editing- if (previousProperty()) {- setSelectedProperty(previousProperty());- }- setPreviousProperty(null);- };-- const handleSelectAction = (selectedAction: FilterAction) => {- setAction(selectedAction);-- // Auto-save to store when action is selected- const property = selectedProperty();- if (property) {- // Build partial filter with current values- const filter = buildPartialFilter(property, selectedAction);- if (filter) {- props.onSave(filter);- }- }- };-- const handleValueChange = (value: boolean | string | number) => {- const property = selectedProperty();- if (!property) return;-- // Set the appropriate value based on data type- if (property.valueType === 'BOOLEAN' && typeof value === 'boolean') {- setBooleanValue(value);- } else if (property.valueType === 'DATE' && typeof value === 'string') {- setDateValue(value);- } else if (property.valueType === 'NUMBER' && typeof value === 'number') {- setNumberValue(value);- } else if (- (property.valueType === 'SELECT_STRING' ||- property.valueType === 'SELECT_NUMBER') &&- typeof value === 'string'- ) {- setSelectValue(value);- }-- // Auto-save when value changes- const currentAction = action();- if (currentAction) {- const filter = buildPartialFilter(property, currentAction);- if (filter) {- props.onSave(filter);- }- }- };-- // Handler for multi-date values- const handleDateValuesChange = (newValues: string[]) => {- setDateValues(newValues);-- // Auto-save when values change- const property = selectedProperty();- const currentAction = action();- if (property && currentAction) {- const filter = buildPartialFilter(property, currentAction);- if (filter) {- props.onSave(filter);- }- }- };-- // Handler for multi-number values- const handleNumberValuesChange = (newValues: number[]) => {- setNumberValues(newValues);-- // Auto-save when values change- const property = selectedProperty();- const currentAction = action();- if (property && currentAction) {- const filter = buildPartialFilter(property, currentAction);- if (filter) {- props.onSave(filter);- }- }- };-- // Handler for multi-select values- const handleSelectValuesChange = (newValues: string[]) => {- setSelectValues(newValues);-- // Auto-save when values change- const property = selectedProperty();- const currentAction = action();- if (property && currentAction) {- const filter = buildPartialFilter(property, currentAction);- if (filter) {- props.onSave(filter);- }- }- };-- // Handler for entity values- const handleEntityValuesChange = (newValues: EntityFilterValue[]) => {- setEntityValues(newValues);-- // Auto-save when values change- const property = selectedProperty();- const currentAction = action();- if (property && currentAction) {- const filter = buildPartialFilter(property, currentAction);- if (filter) {- props.onSave(filter);- }- }- };-- const handleConfirm = () => {- if (!canConfirm()) return;- const property = selectedProperty();- const currentAction = action();- if (!property || !currentAction) return;-- // Build filter with actual values- const filter = buildPartialFilter(property, currentAction, values());- if (filter) {- props.onSave(filter);- }- };-- // Build a PropertyFilter from the current state- const buildPartialFilter = (- property: PropertyDefinitionDomain,- filterAction: FilterAction,- _filterValues: string[] = []- ): PropertyFilter | null => {- const dataType = property.valueType;- const propertyId = property.id;-- switch (dataType) {- case 'BOOLEAN':- if (!isEqualityAction(filterAction)) return null;- return {- propertyId,- dataType: 'BOOLEAN',- action: filterAction,- value: booleanValue() ?? false,- };- case 'DATE':- if (isComparisonActionType(filterAction)) {- return {- propertyId,- dataType: 'DATE',- action: filterAction,- value: dateValue() ?? '',- };- }- if (isEqualityAction(filterAction)) {- return {- propertyId,- dataType: 'DATE',- action: filterAction,- values: dateValues(),- };- }- return null;- case 'NUMBER':- if (isComparisonActionType(filterAction)) {- return {- propertyId,- dataType: 'NUMBER',- action: filterAction,- value: numberValue() ?? 0,- };- }- if (isEqualityAction(filterAction)) {- return {- propertyId,- dataType: 'NUMBER',- action: filterAction,- values: numberValues(),- };- }- return null;- case 'SELECT_NUMBER':- case 'SELECT_STRING':- if (isComparisonActionType(filterAction)) {- return {- propertyId,- dataType,- action: filterAction,- value: selectValue() ?? '',- };- }- if (isEqualityAction(filterAction)) {- return {- propertyId,- dataType,- action: filterAction,- values: selectValues(),- };- }- if (isContainsAction(filterAction)) {- return {- propertyId,- dataType,- action: filterAction,- values: selectValues(),- };- }- return null;- case 'ENTITY':- if (isEqualityAction(filterAction)) {- return {- propertyId,- dataType: 'ENTITY',- action: filterAction,- values: entityValues(),- };- }- if (isContainsAction(filterAction)) {- return {- propertyId,- dataType: 'ENTITY',- action: filterAction,- values: entityValues(),- };- }- return null;- default:- return null;- }- };-- return (- <Show- when={selectedProperty()}- fallback={- <div class="flex items-center gap-0.5 w-full">- <FilterPropertySelect- onSelectProperty={handleSelectProperty}- onCancel={handleCancelEditProperty}- />- {/* Cancel/Remove button */}- <button- type="button"- onClick={props.onCancel}- class="size-6 flex items-center justify-center text-ink hover:text-failure-ink hover:bg-hover"- >- <XIcon class="size-3" />- </button>- </div>- }- >- <div class="flex items-start gap-0.5">- {/* Property pill */}- <button- type="button"- onClick={handleStartEditProperty}- class="h-6 px-2 text-xxs text-ink border border-edge hover:bg-hover text-left flex items-center gap-1.5 font-mono shrink-0"- >- <PropertyDataTypeIcon- property={selectedProperty()!}- class="size-3.5 shrink-0"- />- <span class="truncate max-w-30">- {selectedProperty()!.displayName}- </span>- </button>-- {/* Action dropdown */}- <div class="shrink-0">- <FilterActionSelect- property={selectedProperty()!}- selectedAction={action()}- onSelectAction={handleSelectAction}- />- </div>-- {/* Value input - only show after action is set */}- <Show when={action()}>- <Switch- fallback={- <button- type="button"- class="h-6 px-2 w-fit text-xxs text-ink-muted font-mono border border-edge hover:bg-hover text-left flex items-center"- >- {values().length > 0 ? values().join(', ') : '...'}- </button>- }- >- <Match when={selectedProperty()?.valueType === 'BOOLEAN'}>- <FilterValueBoolean- value={booleanValue()}- onSelect={handleValueChange}- />- </Match>- <Match- when={- selectedProperty()?.valueType === 'DATE' &&- isComparisonAction(action())- }- >- <FilterValueDate- value={dateValue()}- onChange={handleValueChange}- />- </Match>- <Match- when={- selectedProperty()?.valueType === 'DATE' &&- !isComparisonAction(action())- }- >- <FilterValueDateMulti- values={dateValues()}- onChange={handleDateValuesChange}- />- </Match>- <Match- when={- selectedProperty()?.valueType === 'NUMBER' &&- isComparisonAction(action())- }- >- <FilterValueNumber- value={numberValue()}- onChange={handleValueChange}- />- </Match>- <Match- when={- selectedProperty()?.valueType === 'NUMBER' &&- !isComparisonAction(action())- }- >- <FilterValueNumberMulti- values={numberValues()}- onChange={handleNumberValuesChange}- />- </Match>- <Match- when={- (selectedProperty()?.valueType === 'SELECT_STRING' ||- selectedProperty()?.valueType === 'SELECT_NUMBER') &&- isComparisonAction(action())- }- >- <FilterValueSelect- propertyId={selectedProperty()!.id}- dataType={- selectedProperty()!.valueType as- | 'SELECT_STRING'- | 'SELECT_NUMBER'- }- value={selectValue()}- onChange={handleValueChange}- />- </Match>- <Match- when={- (selectedProperty()?.valueType === 'SELECT_STRING' ||- selectedProperty()?.valueType === 'SELECT_NUMBER') &&- !isComparisonAction(action())- }- >- <FilterValueSelectMulti- propertyId={selectedProperty()!.id}- dataType={- selectedProperty()!.valueType as- | 'SELECT_STRING'- | 'SELECT_NUMBER'- }- values={selectValues()}- onChange={handleSelectValuesChange}- />- </Match>- <Match when={selectedProperty()?.valueType === 'ENTITY'}>- <FilterValueEntity- specificEntityType={selectedProperty()!.specificEntityType!}- values={entityValues()}- onChange={handleEntityValuesChange}- />- </Match>- </Switch>- </Show>-- {/* Confirm button - only show when pending and all fields filled */}- <Show when={action() && hasValue() && isPending()}>- <button- type="button"- onClick={handleConfirm}- disabled={!canConfirm()}- class="size-6 flex items-center justify-center text-ink hover:bg-hover border border-edge disabled:opacity-50 disabled:cursor-not-allowed shrink-0"- >- <CheckIcon class="size-4" />- </button>- </Show>-- {/* Cancel/Remove button */}- <button- type="button"- onClick={props.onCancel}- class="size-6 flex items-center justify-center text-ink hover:text-failure-ink hover:bg-hover shrink-0"- >- <XIcon class="size-3" />- </button>- </div>- </Show>- );-};--export default FilterPropertyPill;diff --git a/js/app/packages/app/component/PropertyFilter/FilterValueBoolean.tsx b/js/app/packages/app/component/PropertyFilter/FilterValueBoolean.tsxdeleted file mode 100644index 50b5633002..0000000000--- a/js/app/packages/app/component/PropertyFilter/FilterValueBoolean.tsx+++ /dev/null@@ -1,94 +0,0 @@-import type { Component } from 'solid-js';-import { createSignal, onCleanup, onMount, Show } from 'solid-js';--export type FilterValueBooleanProps = {- value: boolean | null;- onSelect: (value: boolean) => void;-};--export const FilterValueBoolean: Component<FilterValueBooleanProps> = (- props-) => {- const [isOpen, setIsOpen] = createSignal(false);-- let containerRef!: HTMLDivElement;- let dropdownRef!: HTMLDivElement;-- const handleSelect = (value: boolean) => {- props.onSelect(value);- setIsOpen(false);- };-- // Close dropdown when clicking outside- const handleClickOutside = (event: MouseEvent) => {- if (!isOpen()) return;- const target = event.target;- if (!(target instanceof Node)) return;-- const isInsideContainer = containerRef?.contains(target);- const isInsideDropdown = dropdownRef?.contains(target);-- if (!isInsideContainer && !isInsideDropdown) {- setIsOpen(false);- }- };-- onMount(() => {- document.addEventListener('mousedown', handleClickOutside);- onCleanup(() =>- document.removeEventListener('mousedown', handleClickOutside)- );- });-- const displayValue = () => {- if (props.value === null) return 'Select...';- return props.value ? 'True' : 'False';- };-- return (- <div ref={containerRef} class="flex relative">- <button- type="button"- onClick={() => setIsOpen(!isOpen())}- class="h-6 px-2 w-fit text-xxs border border-edge hover:bg-hover text-left font-mono flex items-center"- classList={{- 'text-ink': props.value !== null,- 'text-ink-muted': props.value === null,- }}- >- {displayValue()}- </button>- <Show when={isOpen()}>- <div- ref={dropdownRef}- class="absolute left-0 top-full mt-1 border border-edge bg-surface shadow-lg font-mono min-w-20 z-user-highlight"- >- <button- type="button"- onMouseDown={(e) => {- e.preventDefault();- e.stopPropagation();- handleSelect(true);- }}- class="w-full px-2 py-1.5 text-xxs text-ink hover:bg-hover text-left"- classList={{ 'bg-hover': props.value === true }}- >- True- </button>- <button- type="button"- onMouseDown={(e) => {- e.preventDefault();- e.stopPropagation();- handleSelect(false);- }}- class="w-full px-2 py-1.5 text-xxs text-ink hover:bg-hover text-left"- classList={{ 'bg-hover': props.value === false }}- >- False- </button>- </div>- </Show>- </div>- );-};diff --git a/js/app/packages/app/component/PropertyFilter/FilterValueDate.tsx b/js/app/packages/app/component/PropertyFilter/FilterValueDate.tsxdeleted file mode 100644index 1783be10e1..0000000000--- a/js/app/packages/app/component/PropertyFilter/FilterValueDate.tsx+++ /dev/null@@ -1,72 +0,0 @@-import { DatePicker } from '@core/component/DatePicker';-import type { Component } from 'solid-js';-import { createSignal, Show } from 'solid-js';--export type FilterValueDateProps = {- value: string | null; // ISO date string or null- onChange: (value: string) => void;-};--export const FilterValueDate: Component<FilterValueDateProps> = (props) => {- const [isOpen, setIsOpen] = createSignal(false);- let buttonRef!: HTMLButtonElement;-- // Parse YYYY-MM-DD as local date (not UTC)- const parseLocalDate = (dateStr: string): Date => {- const [year, month, day] = dateStr.split('-').map(Number);- return new Date(year, month - 1, day);- };-- // Format Date as YYYY-MM-DD using local date components (not UTC)- const formatLocalDate = (date: Date): string => {- const year = date.getFullYear();- const month = String(date.getMonth() + 1).padStart(2, '0');- const day = String(date.getDate()).padStart(2, '0');- return `${year}-${month}-${day}`;- };-- const dateValue = () => {- if (!props.value) return new Date();- return parseLocalDate(props.value);- };-- const displayValue = () => {- if (!props.value) return 'Select date...';- const date = parseLocalDate(props.value);- return date.toLocaleDateString('en-US', {- month: 'short',- day: 'numeric',- year: 'numeric',- });- };-- const handleDateChange = (date: Date) => {- props.onChange(formatLocalDate(date));- setIsOpen(false);- };-- return (- <div class="relative">- <button- ref={buttonRef}- type="button"- onClick={() => setIsOpen(true)}- class="h-6 px-2 w-fit text-xxs border border-edge hover:bg-hover text-left font-mono flex items-center"- classList={{- 'text-ink': props.value !== null,- 'text-ink-muted': props.value === null,- }}- >- {displayValue()}- </button>- <Show when={isOpen()}>- <DatePicker- value={dateValue()}- onChange={handleDateChange}- onClose={() => setIsOpen(false)}- anchorRef={buttonRef}- />- </Show>- </div>- );-};diff --git a/js/app/packages/app/component/PropertyFilter/FilterValueDateMulti.tsx b/js/app/packages/app/component/PropertyFilter/FilterValueDateMulti.tsxdeleted file mode 100644index 69bdf67354..0000000000--- a/js/app/packages/app/component/PropertyFilter/FilterValueDateMulti.tsx+++ /dev/null@@ -1,94 +0,0 @@-import { DatePicker } from '@core/component/DatePicker';-import XIcon from '@phosphor/x.svg';-import type { Component } from 'solid-js';-import { createSignal, For, Show } from 'solid-js';--export type FilterValueDateMultiProps = {- values: string[]; // Array of ISO date strings- onChange: (values: string[]) => void;-};--export const FilterValueDateMulti: Component<FilterValueDateMultiProps> = (- props-) => {- const [isPickerOpen, setIsPickerOpen] = createSignal(false);- let addButtonRef!: HTMLButtonElement;-- // Parse YYYY-MM-DD as local date (not UTC)- const parseLocalDate = (dateStr: string): Date => {- const [year, month, day] = dateStr.split('-').map(Number);- return new Date(year, month - 1, day);- };-- // Format Date as YYYY-MM-DD using local date components (not UTC)- const formatLocalDate = (date: Date): string => {- const year = date.getFullYear();- const month = String(date.getMonth() + 1).padStart(2, '0');- const day = String(date.getDate()).padStart(2, '0');- return `${year}-${month}-${day}`;- };-- // Format for display (shorter)- const formatDisplayDate = (dateStr: string): string => {- const date = parseLocalDate(dateStr);- return date.toLocaleDateString('en-US', {- month: 'short',- day: 'numeric',- year: 'numeric',- });- };-- const handleAddDate = (date: Date) => {- const dateStr = formatLocalDate(date);- // Don't add duplicates- if (!props.values.includes(dateStr)) {- props.onChange([...props.values, dateStr]);- }- setIsPickerOpen(false);- };-- const handleRemoveDate = (dateStr: string) => {- props.onChange(props.values.filter((d) => d !== dateStr));- };-- return (- <div class="flex flex-wrap items-center gap-0.5 min-w-0">- {/* Selected date pills */}- <For each={props.values}>- {(dateStr) => (- <div class="group relative h-6 px-1.5 text-xxs text-ink border border-edge bg-surface font-mono flex items-center">- <span class="whitespace-nowrap">{formatDisplayDate(dateStr)}</span>- {/* X shows on hover, overlays the text */}- <button- type="button"- onClick={() => handleRemoveDate(dateStr)}- class="absolute inset-0 flex items-center justify-end pr-1 bg-linear-to-l from-surface via-surface to-transparent opacity-0 group-hover:opacity-100 hover:text-failure-ink"- >- <XIcon class="size-3" />- </button>- </div>- )}- </For>-- {/* Add button */}- <div class="relative">- <button- ref={addButtonRef}- type="button"- onClick={() => setIsPickerOpen(true)}- class="h-6 px-2 text-xxs text-ink-muted border border-edge hover:bg-hover font-mono flex items-center"- >- {props.values.length === 0 ? 'Add date...' : '+'}- </button>- <Show when={isPickerOpen()}>- <DatePicker- value={new Date()}- onChange={handleAddDate}- onClose={() => setIsPickerOpen(false)}- anchorRef={addButtonRef}- />- </Show>- </div>- </div>- );-};diff --git a/js/app/packages/app/component/PropertyFilter/FilterValueEntity.tsx b/js/app/packages/app/component/PropertyFilter/FilterValueEntity.tsxdeleted file mode 100644index 2c00c82aee..0000000000--- a/js/app/packages/app/component/PropertyFilter/FilterValueEntity.tsx+++ /dev/null@@ -1,377 +0,0 @@-import { usePropertyEntityDisplay } from '@core/component/Properties/hooks/usePropertyEntityDisplay';-import { useEmail, useUserId } from '@core/context/user';-import { useAugmentUserWithDmActivity } from '@core/user';-import { createFreshSearch } from '@core/util/freshSort';-import type { EmailEntity } from '@entity';-import { createEmailsInfiniteQuery } from '@macro-entity';-import XIcon from '@phosphor/x.svg';-import {- type CombinedEntity,- createEntitySearchConfig,- getEntityName,- getEntitySearchText,- getEntityTimestampedItem,- getEntityType,- isChannelEntity,- quickAccessItemToEntity,- sortEntitiesWithSelfFirst,- threadMapper,- useQuickAccessEntities,- userToEntity,-} from '@property';-import { useSearchSoupQuery } from '@queries/soup/search';-import type { EntityType } from '@service-properties/generated/schemas/entityType';-import { debounce } from '@solid-primitives/scheduled';-import type { Component } from 'solid-js';-import {- createEffect,- createMemo,- createSignal,- For,- onCleanup,- onMount,- Show,-} from 'solid-js';-import type { EntityFilterValue } from '../PropertyFilterTypes';--export type FilterValueEntityProps = {- specificEntityType: EntityType;- values: EntityFilterValue[];- onChange: (values: EntityFilterValue[]) => void;-};--/** Pill component that uses usePropertyEntityDisplay for proper name/icon resolution */-const EntityPill: Component<{- value: EntityFilterValue;- onRemove: () => void;-}> = (props) => {- const { name, icon, isLoading } = usePropertyEntityDisplay(- () => props.value.entityId,- () => props.value.entityType- );-- return (- <div class="group relative h-6 px-1.5 text-xxs text-ink border border-edge bg-surface font-mono flex items-center gap-1.5">- <span class="size-3 flex items-center justify-center shrink-0">- {icon()}- </span>- <span class="whitespace-nowrap max-w-20 truncate">- {isLoading() ? 'Loading...' : name()}- </span>- {/* X shows on hover, overlays the text */}- <button- type="button"- onClick={props.onRemove}- class="absolute inset-0 flex items-center justify-end pr-1 bg-linear-to-l from-surface via-surface to-transparent opacity-0 group-hover:opacity-100 hover:text-failure-ink"- >- <XIcon class="size-3" />- </button>- </div>- );-};--export const FilterValueEntity: Component<FilterValueEntityProps> = (props) => {- const [isAdding, setIsAdding] = createSignal(false);- const [searchQuery, setSearchQuery] = createSignal('');- const [searchTerm, setSearchTerm] = createSignal('');-- // Debounce search term updates (same as PropertyEntitySelector)- const debouncedSetSearchTerm = debounce(- (term: string) => setSearchTerm(term.toLowerCase()),- 60- );- createEffect(() => debouncedSetSearchTerm(searchQuery()));-- let inputRef!: HTMLInputElement;- let containerRef!: HTMLDivElement;- let dropdownRef!: HTMLDivElement;-- const augmentUserWithDmActivity = useAugmentUserWithDmActivity();-- // Get current user info for same-domain boost and self-boost in search- const currentUserEmail = useEmail();- const currentUserId = useUserId();- const currentUserDomain = createMemo(() => {- const email = currentUserEmail();- return email ? email.split('@')[1] : undefined;- });-- // Get items from quickAccess based on entity type- const { items: quickAccessItems } = useQuickAccessEntities(- () => props.specificEntityType- );-- // Email queries for THREAD type or generic ENTITY (no specific type)- const needsEmailSearch = () =>- props.specificEntityType === 'THREAD' || !props.specificEntityType;-- const emailsQuery = createEmailsInfiniteQuery(() => ({ view: 'all' }), {- disabled: () => !needsEmailSearch(),- });- const emails = () => emailsQuery.data ?? [];-- // Server-side email search- // TODO: fix this it doesn't work- const emailSearchQuery = useSearchSoupQuery(- () => ({- params: { page_size: 20 },- body: {- query: searchTerm(),- match_type: 'partial' as const,- include: ['emails' as const],- search_on: 'name' as const,- },- }),- () => ({- enabled: needsEmailSearch(),- })- );-- // Server search results mapped to our format- const serverEmails = createMemo((): CombinedEntity[] => {- if (emailSearchQuery.status !== 'success' || !emailSearchQuery.data) {- return [];- }- return emailSearchQuery.data- .filter((entity) => entity.type === 'email')- .map((entity) => threadMapper(entity as EmailEntity));- });-- // Convert quickAccess items to CombinedEntity format- const entities = createMemo((): CombinedEntity[] => {- const specificEntityType = props.specificEntityType;-- // For THREAD type, use email data (not in quickAccess yet)- if (specificEntityType === 'THREAD') {- return emails().map(threadMapper);- }-- // For COMPANY type, return empty (not in quickAccess)- if (specificEntityType === 'COMPANY') {- return [];- }-- // Convert quickAccess items to CombinedEntity- const items = quickAccessItems();- const converted: CombinedEntity[] = [];-- for (const item of items) {- // Augment users with DM activity- if (item.kind === 'user') {- const augmentedUser = augmentUserWithDmActivity(item.data);- converted.push(userToEntity(augmentedUser));- } else {- const entity = quickAccessItemToEntity(item);- // Filter by specific entity type if needed- if (specificEntityType) {- const entityType = getEntityType(entity);- if (entityType === specificEntityType) {- converted.push(entity);- }- } else {- converted.push(entity);- }- }- }-- // For generic entity type, also include emails- if (!specificEntityType) {- converted.push(...emails().map(threadMapper));- }-- return converted;- });-- // Search function for fuzzy matching (same config as PropertyEntitySelector)- const entitySearch = createFreshSearch<CombinedEntity>({- config: createEntitySearchConfig(currentUserDomain, currentUserId),- getName: getEntitySearchText,- isChannelItem: isChannelEntity,- getTimestamp: getEntityTimestampedItem,- });-- // Get selected entity IDs for filtering- const selectedIds = createMemo(- () => new Set(props.values.map((v) => v.entityId))- );-- // Get available options (not already selected, filtered by search)- const availableEntities = createMemo(() => {- const query = searchTerm();- const ids = selectedIds();- const userId = currentUserId();- // Sort self to top BEFORE filtering to ensure self appears even if not in top 50 by default- const available = sortEntitiesWithSelfFirst(- entities().filter((e) => !ids.has(e.id)),- userId- );-- const MAX_RESULTS = 50;-- // When no search query, return sorted list- if (!query) {- return available.slice(0, MAX_RESULTS);- }-- // Local search results- const localResults = entitySearch(available, query)- .slice(0, MAX_RESULTS)- .map((result) => result.item);-- // For THREAD or generic entity: merge local + server results (local first, server appended, deduped)- if (needsEmailSearch() && query) {- const localIds = new Set(localResults.map((e) => e.id));- const serverResults = serverEmails().filter(- (e) => !localIds.has(e.id) && !ids.has(e.id)- );- return [...localResults, ...serverResults].slice(0, MAX_RESULTS);- }-- return localResults;- });-- const handleAddClick = () => {- setIsAdding(true);- setSearchQuery('');- setTimeout(() => inputRef?.focus(), 0);- };-- const handleSelectEntity = (entity: CombinedEntity) => {- if (!selectedIds().has(entity.id)) {- const newValue: EntityFilterValue = {- entityId: entity.id,- entityType: getEntityType(entity),- };- props.onChange([...props.values, newValue]);- }- setSearchQuery('');- setIsAdding(false);- };-- const handleRemoveValue = (entityId: string) => {- props.onChange(props.values.filter((v) => v.entityId !== entityId));- };-- // Close when clicking outside- const handleClickOutside = (event: MouseEvent) => {- if (!isAdding()) return;- const target = event.target;- if (!(target instanceof Node)) return;-- const isInsideContainer = containerRef?.contains(target);- const isInsideDropdown = dropdownRef?.contains(target);-- if (!isInsideContainer && !isInsideDropdown) {- setIsAdding(false);- setSearchQuery('');- }- };-- onMount(() => {- document.addEventListener('mousedown', handleClickOutside);- onCleanup(() => {- document.removeEventListener('mousedown', handleClickOutside);- });- });-- const getPlaceholderText = () => {- const type = props.specificEntityType?.toLowerCase() ?? '';- if (props.values.length === 0) {- return `Select ${type}...`;- }- return '+';- };-- return (- <div class="flex flex-wrap items-center gap-0.5 min-w-0">- {/* Selected value pills - uses usePropertyEntityDisplay for proper resolution */}- <For each={props.values}>- {(value) => (- <EntityPill- value={value}- onRemove={() => handleRemoveValue(value.entityId)}- />- )}- </For>-- {/* Add button / input */}- <div ref={containerRef} class="relative flex items-center">- <Show- when={isAdding()}- fallback={- <button- type="button"- onClick={handleAddClick}- class="h-6 px-2 text-xxs text-ink-muted border border-edge hover:bg-hover font-mono flex items-center"- >- {getPlaceholderText()}- </button>- }- >- <input- ref={inputRef}- type="text"- value={searchQuery()}- onInput={(e) => setSearchQuery(e.currentTarget.value)}- placeholder="Search..."- class="h-6 px-2 min-w-16 w-fit text-xxs text-ink border border-edge hover:bg-hover focus:ring-1 focus:ring-accent font-mono placeholder:text-ink-muted"- />- <div- ref={dropdownRef}- class="absolute left-0 top-full mt-1 border border-edge bg-surface shadow-lg font-mono min-w-50 max-h-48 overflow-y-auto z-user-highlight"- >- <Show- when={availableEntities().length > 0}- fallback={- <div class="px-3 py-2 text-xxs text-ink-muted text-center">- {entities().length === 0- ? 'No entities available'- : searchQuery()- ? 'No matches'- : 'All selected'}- </div>- }- >- <For each={availableEntities()}>- {(entity) => (- <DropdownEntityRow- entity={entity}- onSelect={() => handleSelectEntity(entity)}- />- )}- </For>- </Show>- </div>- </Show>- </div>- </div>- );-};--/** Dropdown row that uses usePropertyEntityDisplay for proper icon resolution */-const DropdownEntityRow: Component<{- entity: CombinedEntity;- onSelect: () => void;-}> = (props) => {- const { icon } = usePropertyEntityDisplay(- () => props.entity.id,- () => getEntityType(props.entity)- );-- return (- <button- type="button"- onMouseDown={(e) => {- e.preventDefault();- e.stopPropagation();- props.onSelect();- }}- class="w-full px-2 py-1.5 text-xxs text-ink hover:bg-hover text-left flex items-center gap-2"- >- <span class="size-3 flex items-center justify-center shrink-0">- {icon()}- </span>- <span class="truncate">{getEntityName(props.entity)}</span>- </button>- );-};diff --git a/js/app/packages/app/component/PropertyFilter/FilterValueNumber.tsx b/js/app/packages/app/component/PropertyFilter/FilterValueNumber.tsxdeleted file mode 100644index 31cd68616b..0000000000--- a/js/app/packages/app/component/PropertyFilter/FilterValueNumber.tsx+++ /dev/null@@ -1,93 +0,0 @@-import type { Component } from 'solid-js';-import { createSignal, Show } from 'solid-js';--export type FilterValueNumberProps = {- value: number | null;- onChange: (value: number) => void;-};--export const FilterValueNumber: Component<FilterValueNumberProps> = (props) => {- const [isEditing, setIsEditing] = createSignal(false);- // Track local input value for controlled input- const [inputValue, setInputValue] = createSignal(- props.value !== null ? String(props.value) : ''- );- let inputRef!: HTMLInputElement;-- const handleInput = (e: InputEvent) => {- const target = e.currentTarget as HTMLInputElement;- // Only allow digits, decimal point, and minus sign- const filtered = target.value.replace(/[^0-9.\-]/g, '');- // Prevent multiple decimals or minus signs- const parts = filtered.split('.');- const sanitized =- parts.length > 2- ? parts[0] + '.' + parts.slice(1).join('')- : filtered.replace(/(?!^)-/g, ''); // Only allow minus at start- setInputValue(sanitized);- target.value = sanitized; // Update DOM to match filtered value- };-- const handleFocus = () => {- setIsEditing(true);- };-- const handleBlur = () => {- const parsed = parseFloat(inputValue());- if (!isNaN(parsed)) {- props.onChange(parsed);- }- setIsEditing(false);- };-- const handleKeyDown = (e: KeyboardEvent) => {- if (e.key === 'Enter') {- const parsed = parseFloat(inputValue());- if (!isNaN(parsed)) {- props.onChange(parsed);- }- }- };-- const handleClick = () => {- setIsEditing(true);- setTimeout(() => inputRef?.focus(), 0);- };-- const displayValue = () => {- if (props.value === null) return 'Value...';- return String(props.value);- };-- return (- <Show- when={isEditing()}- fallback={- <button- type="button"- onClick={handleClick}- class="h-6 px-2 w-fit text-xxs border border-edge hover:bg-hover text-left font-mono flex items-center"- classList={{- 'text-ink': props.value !== null,- 'text-ink-muted': props.value === null,- }}- >- {displayValue()}- </button>- }- >- <input- ref={inputRef}- type="text"- inputMode="decimal"- value={inputValue()}- onInput={handleInput}- onFocus={handleFocus}- onBlur={handleBlur}- onKeyDown={handleKeyDown}- placeholder="Enter value..."- class="h-6 px-2 min-w-8 w-fit text-xxs text-ink border border-edge hover:bg-hover focus:ring-1 focus:ring-accent font-mono placeholder:text-ink-muted"- />- </Show>- );-};diff --git a/js/app/packages/app/component/PropertyFilter/FilterValueNumberMulti.tsx b/js/app/packages/app/component/PropertyFilter/FilterValueNumberMulti.tsxdeleted file mode 100644index bb01a5effd..0000000000--- a/js/app/packages/app/component/PropertyFilter/FilterValueNumberMulti.tsx+++ /dev/null@@ -1,107 +0,0 @@-import XIcon from '@phosphor/x.svg';-import type { Component } from 'solid-js';-import { createSignal, For, Show } from 'solid-js';--export type FilterValueNumberMultiProps = {- values: number[];- onChange: (values: number[]) => void;-};--export const FilterValueNumberMulti: Component<FilterValueNumberMultiProps> = (- props-) => {- const [isAdding, setIsAdding] = createSignal(false);- const [inputValue, setInputValue] = createSignal('');- let inputRef!: HTMLInputElement;-- const handleInput = (e: InputEvent) => {- const target = e.currentTarget as HTMLInputElement;- // Only allow digits, decimal point, and minus sign- const filtered = target.value.replace(/[^0-9.\-]/g, '');- // Prevent multiple decimals or minus signs- const parts = filtered.split('.');- const sanitized =- parts.length > 2- ? parts[0] + '.' + parts.slice(1).join('')- : filtered.replace(/(?!^)-/g, ''); // Only allow minus at start- setInputValue(sanitized);- target.value = sanitized;- };-- const handleAddClick = () => {- setIsAdding(true);- setInputValue('');- setTimeout(() => inputRef?.focus(), 0);- };-- const handleConfirm = () => {- const parsed = parseFloat(inputValue());- if (!isNaN(parsed) && !props.values.includes(parsed)) {- props.onChange([...props.values, parsed]);- }- setIsAdding(false);- setInputValue('');- };-- const handleKeyDown = (e: KeyboardEvent) => {- if (e.key === 'Enter') {- handleConfirm();- } else if (e.key === 'Escape') {- setIsAdding(false);- setInputValue('');- }- };-- const handleRemoveValue = (value: number) => {- props.onChange(props.values.filter((v) => v !== value));- };-- return (- <div class="flex flex-wrap items-center gap-0.5 min-w-0">- {/* Selected value pills */}- <For each={props.values}>- {(value) => (- <div class="group relative h-6 px-1.5 text-xxs text-ink border border-edge bg-surface font-mono flex items-center">- <span class="whitespace-nowrap">{String(value)}</span>- {/* X shows on hover, overlays the text */}- <button- type="button"- onClick={() => handleRemoveValue(value)}- class="absolute inset-0 flex items-center justify-end pr-1 bg-linear-to-l from-surface via-surface to-transparent opacity-0 group-hover:opacity-100 hover:text-failure-ink"- >- <XIcon class="size-3" />- </button>- </div>- )}- </For>-- {/* Add button / input */}- <div class="relative flex items-center">- <Show- when={isAdding()}- fallback={- <button- type="button"- onClick={handleAddClick}- class="h-6 px-2 text-xxs text-ink-muted border border-edge hover:bg-hover font-mono flex items-center"- >- {props.values.length === 0 ? 'Add value...' : '+'}- </button>- }- >- <input- ref={inputRef}- type="text"- inputMode="decimal"- value={inputValue()}- onInput={handleInput}- onBlur={handleConfirm}- onKeyDown={handleKeyDown}- placeholder="Enter value..."- class="h-6 px-2 min-w-8 w-fit text-xxs text-ink border border-edge hover:bg-hover focus:ring-1 focus:ring-accent font-mono placeholder:text-ink-muted"- />- </Show>- </div>- </div>- );-};diff --git a/js/app/packages/app/component/PropertyFilter/FilterValueSelect.tsx b/js/app/packages/app/component/PropertyFilter/FilterValueSelect.tsxdeleted file mode 100644index e3976f030e..0000000000--- a/js/app/packages/app/component/PropertyFilter/FilterValueSelect.tsx+++ /dev/null@@ -1,181 +0,0 @@-import { propertiesServiceClient } from '@service-properties/client';-import type { PropertyOption } from '@service-properties/generated/schemas/propertyOption';-import type { Component } from 'solid-js';-import {- createMemo,- createSignal,- For,- onCleanup,- onMount,- Show,-} from 'solid-js';--export type FilterValueSelectProps = {- propertyId: string;- dataType: 'SELECT_STRING' | 'SELECT_NUMBER';- value: string | null; // option ID- onChange: (optionId: string) => void;-};--export const FilterValueSelect: Component<FilterValueSelectProps> = (props) => {- const [isEditing, setIsEditing] = createSignal(false);- const [options, setOptions] = createSignal<PropertyOption[]>([]);- const [isLoading, setIsLoading] = createSignal(true);- const [searchQuery, setSearchQuery] = createSignal('');-- let inputRef!: HTMLInputElement;- let containerRef!: HTMLDivElement;- let dropdownRef!: HTMLDivElement;-- // Fetch options for this property- const fetchOptions = async () => {- setIsLoading(true);- try {- const result = await propertiesServiceClient.getPropertyOptions({- definition_id: props.propertyId,- });-- if (result.isErr()) {- setOptions([]);- return;- }-- const data = result.value;- setOptions(Array.isArray(data) ? data : []);- } catch (_error) {- setOptions([]);- } finally {- setIsLoading(false);- }- };-- onMount(() => {- fetchOptions();- });-- // Get display value for an option- const getOptionDisplayValue = (option: PropertyOption): string => {- if (option.value.type === 'string') {- return option.value.value;- }- return String(option.value.value);- };-- // Get selected option display- const selectedDisplay = () => {- if (isLoading()) return '...';- if (!props.value) return 'Select...';- const option = options().find((o) => o.id === props.value);- if (!option) return 'Select...';- return getOptionDisplayValue(option);- };-- // Filter options by search query- const filteredOptions = createMemo(() => {- const query = searchQuery().toLowerCase().trim();- if (!query) return options();- return options().filter((o) =>- getOptionDisplayValue(o).toLowerCase().includes(query)- );- });-- const handleClick = () => {- setIsEditing(true);- setSearchQuery('');- setTimeout(() => inputRef?.focus(), 0);- };-- const handleSelectOption = (option: PropertyOption) => {- props.onChange(option.id);- setSearchQuery('');- setIsEditing(false);- };-- // Close when clicking outside- const handleClickOutside = (event: MouseEvent) => {- if (!isEditing()) return;- const target = event.target;- if (!(target instanceof Node)) return;-- const isInsideContainer = containerRef?.contains(target);- const isInsideDropdown = dropdownRef?.contains(target);-- if (!isInsideContainer && !isInsideDropdown) {- setIsEditing(false);- setSearchQuery('');- }- };-- onMount(() => {- document.addEventListener('mousedown', handleClickOutside);- onCleanup(() => {- document.removeEventListener('mousedown', handleClickOutside);- });- });-- return (- <div ref={containerRef} class="relative">- <Show- when={isEditing()}- fallback={- <button- type="button"- onClick={handleClick}- class="h-6 px-2 w-fit text-xxs border border-edge hover:bg-hover text-left font-mono flex items-center"- classList={{- 'text-ink': props.value !== null,- 'text-ink-muted': props.value === null,- }}- >- {selectedDisplay()}- </button>- }- >- <input- ref={inputRef}- type="text"- value={searchQuery()}- onInput={(e) => setSearchQuery(e.currentTarget.value)}- placeholder="Search..."- class="h-6 px-2 min-w-16 w-fit text-xxs text-ink border border-edge hover:bg-hover focus:ring-1 focus:ring-accent font-mono placeholder:text-ink-muted"- />- <div- ref={dropdownRef}- class="absolute left-0 top-full mt-1 border border-edge bg-surface shadow-lg font-mono min-w-40 max-h-48 overflow-y-auto z-user-highlight"- >- <Show- when={filteredOptions().length > 0}- fallback={- <div class="px-3 py-2 text-xxs text-ink-muted text-center">- {isLoading()- ? 'Loading...'- : options().length === 0- ? 'No options available'- : 'No matches'}- </div>- }- >- <For each={filteredOptions()}>- {(option) => (- <button- type="button"- onMouseDown={(e) => {- e.preventDefault();- e.stopPropagation();- handleSelectOption(option);- }}- class="w-full px-2 py-1.5 text-xxs text-ink hover:bg-hover text-left"- classList={{- 'bg-hover': props.value === option.id,- }}- >- {getOptionDisplayValue(option)}- </button>- )}- </For>- </Show>- </div>- </Show>- </div>- );-};diff --git a/js/app/packages/app/component/PropertyFilter/FilterValueSelectMulti.tsx b/js/app/packages/app/component/PropertyFilter/FilterValueSelectMulti.tsxdeleted file mode 100644index 95d9edc7df..0000000000--- a/js/app/packages/app/component/PropertyFilter/FilterValueSelectMulti.tsx+++ /dev/null@@ -1,222 +0,0 @@-import XIcon from '@phosphor/x.svg';-import { propertiesServiceClient } from '@service-properties/client';-import type { PropertyOption } from '@service-properties/generated/schemas/propertyOption';-import type { Component } from 'solid-js';-import {- createMemo,- createSignal,- For,- onCleanup,- onMount,- Show,-} from 'solid-js';--export type FilterValueSelectMultiProps = {- propertyId: string;- dataType: 'SELECT_STRING' | 'SELECT_NUMBER';- values: string[]; // Array of option IDs- onChange: (values: string[]) => void;-};--export const FilterValueSelectMulti: Component<FilterValueSelectMultiProps> = (- props-) => {- const [isAdding, setIsAdding] = createSignal(false);- const [options, setOptions] = createSignal<PropertyOption[]>([]);- const [isLoading, setIsLoading] = createSignal(true);- const [searchQuery, setSearchQuery] = createSignal('');-- let inputRef!: HTMLInputElement;- let containerRef!: HTMLDivElement;- let dropdownRef!: HTMLDivElement;-- // Fetch options for this property- const fetchOptions = async () => {- setIsLoading(true);- try {- const result = await propertiesServiceClient.getPropertyOptions({- definition_id: props.propertyId,- });-- if (result.isErr()) {- setOptions([]);- return;- }-- const data = result.value;- setOptions(Array.isArray(data) ? data : []);- } catch (_error) {- setOptions([]);- } finally {- setIsLoading(false);- }- };-- onMount(() => {- fetchOptions();- });-- // Get display value for an option- const getOptionDisplayValue = (option: PropertyOption): string => {- if (option.value.type === 'string') {- return option.value.value;- }- return String(option.value.value);- };-- // Get option by ID- const getOptionById = (id: string): PropertyOption | undefined => {- return options().find((o) => o.id === id);- };-- // Get available options (not already selected, filtered by search)- const availableOptions = createMemo(() => {- const query = searchQuery().toLowerCase().trim();- return options()- .filter((o) => !props.values.includes(o.id))- .filter((o) => {- if (!query) return true;- return getOptionDisplayValue(o).toLowerCase().includes(query);- });- });-- const handleAddClick = () => {- setIsAdding(true);- setSearchQuery('');- setTimeout(() => inputRef?.focus(), 0);- };-- const handleSelectOption = (option: PropertyOption) => {- if (!props.values.includes(option.id)) {- props.onChange([...props.values, option.id]);- }- setSearchQuery('');- setIsAdding(false);- };-- const handleRemoveValue = (optionId: string) => {- props.onChange(props.values.filter((id) => id !== optionId));- };-- // Close when clicking outside- const handleClickOutside = (event: MouseEvent) => {- if (!isAdding()) return;- const target = event.target;- if (!(target instanceof Node)) return;-- const isInsideContainer = containerRef?.contains(target);- const isInsideDropdown = dropdownRef?.contains(target);-- if (!isInsideContainer && !isInsideDropdown) {- setIsAdding(false);- setSearchQuery('');- }- };-- onMount(() => {- document.addEventListener('mousedown', handleClickOutside);- onCleanup(() => {- document.removeEventListener('mousedown', handleClickOutside);- });- });-- // Resolve display values for selected options- const getDisplayValue = (optionId: string): string => {- const option = getOptionById(optionId);- return option ? getOptionDisplayValue(option) : optionId;- };-- return (- <div class="flex flex-wrap items-center gap-0.5 min-w-0">- {/* Selected value pills - show loading if we have values but options not loaded */}- <Show- when={!isLoading() || props.values.length === 0}- fallback={- <div class="h-6 px-1.5 text-xxs text-ink-muted border border-edge font-mono flex items-center">- ...- </div>- }- >- <For each={props.values}>- {(optionId) => (- <div class="group relative h-6 px-1.5 text-xxs text-ink border border-edge bg-surface font-mono flex items-center">- <span class="whitespace-nowrap">{getDisplayValue(optionId)}</span>- {/* X shows on hover, overlays the text */}- <button- type="button"- onClick={() => handleRemoveValue(optionId)}- class="absolute inset-0 flex items-center justify-end pr-1 bg-linear-to-l from-surface via-surface to-transparent opacity-0 group-hover:opacity-100 hover:text-failure-ink"- >- <XIcon class="size-3" />- </button>- </div>- )}- </For>- </Show>-- {/* Add button / input */}- <div ref={containerRef} class="relative flex items-center">- <Show- when={isAdding()}- fallback={- <button- type="button"- onClick={handleAddClick}- class="h-6 px-2 text-xxs text-ink-muted border border-edge hover:bg-hover font-mono flex items-center"- >- {isLoading()- ? '...'- : props.values.length === 0- ? 'Select...'- : '+'}- </button>- }- >- <input- ref={inputRef}- type="text"- value={searchQuery()}- onInput={(e) => setSearchQuery(e.currentTarget.value)}- placeholder="Search..."- class="h-6 px-2 min-w-16 w-fit text-xxs text-ink border border-edge hover:bg-hover focus:ring-1 focus:ring-accent font-mono placeholder:text-ink-muted"- />- <div- ref={dropdownRef}- class="absolute left-0 top-full mt-1 border border-edge bg-surface shadow-lg font-mono min-w-40 max-h-48 overflow-y-auto z-user-highlight"- >- <Show- when={availableOptions().length > 0}- fallback={- <div class="px-3 py-2 text-xxs text-ink-muted text-center">- {isLoading()- ? 'Loading...'- : options().length === 0- ? 'No options available'- : searchQuery()- ? 'No matches'- : 'All options selected'}- </div>- }- >- <For each={availableOptions()}>- {(option) => (- <button- type="button"- onMouseDown={(e) => {- e.preventDefault();- e.stopPropagation();- handleSelectOption(option);- }}- class="w-full px-2 py-1.5 text-xxs text-ink hover:bg-hover text-left"- >- {getOptionDisplayValue(option)}- </button>- )}- </For>- </Show>- </div>- </Show>- </div>- </div>- );-};diff --git a/js/app/packages/app/component/PropertyFilter/index.ts b/js/app/packages/app/component/PropertyFilter/index.tsdeleted file mode 100644index 0b15c148cf..0000000000--- a/js/app/packages/app/component/PropertyFilter/index.ts+++ /dev/null@@ -1,11 +0,0 @@-export { FilterActionSelect } from './FilterAction';-export { FilterPropertySelect } from './FilterProperty';-export { FilterPropertyPill } from './FilterPropertyPill';-export { FilterValueBoolean } from './FilterValueBoolean';-export { FilterValueDate } from './FilterValueDate';-export { FilterValueDateMulti } from './FilterValueDateMulti';-export { FilterValueEntity } from './FilterValueEntity';-export { FilterValueNumber } from './FilterValueNumber';-export { FilterValueNumberMulti } from './FilterValueNumberMulti';-export { FilterValueSelect } from './FilterValueSelect';-export { FilterValueSelectMulti } from './FilterValueSelectMulti';diff --git a/js/app/packages/app/component/PropertyFilterControl.tsx b/js/app/packages/app/component/PropertyFilterControl.tsxdeleted file mode 100644index 97d301367f..0000000000--- a/js/app/packages/app/component/PropertyFilterControl.tsx+++ /dev/null@@ -1,209 +0,0 @@-import type { PropertyDefinitionDomain } from '@core/component/Properties/types';-import {- isPropertyDefinition,- toPropertyDefinitionDomain,-} from '@core/component/Properties/utils';-import { useListPropertiesQuery } from '@queries/properties/definitions';-import { cn } from '@ui';-import type { Accessor, Component } from 'solid-js';-import { createEffect, createMemo, For, Show } from 'solid-js';-import { createStore, reconcile } from 'solid-js/store';-import { FilterPropertyPill } from './PropertyFilter';-import type { PropertyFilter } from './PropertyFilterTypes';-import { checkFilterConflict } from './PropertyFilterTypes';--type FilterEntry = {- id: string;- data: PropertyFilter | null; // null = incomplete, non-null = complete-};--type PropertyFilterControlProps = {- propertyFilters: Accessor<PropertyFilter[]>;- setPropertyFilters: (filters: PropertyFilter[]) => void;- /** Called when incomplete filter state changes */- onIncompleteFiltersChange?: (hasIncomplete: boolean) => void;- /** Register a clear handler that parent can call to clear all filters */- registerClearHandler?: (clearFn: () => void) => void;-};--export const PropertyFilterControl: Component<PropertyFilterControlProps> = (- props-) => {- // Fetch all properties using query- const propertiesQuery = useListPropertiesQuery(() => ({- scope: 'all',- includeOptions: false,- }));-- const allProperties = createMemo((): PropertyDefinitionDomain[] => {- const data = propertiesQuery.data;- if (!data) return [];- return (Array.isArray(data) ? data : [])- .filter(isPropertyDefinition)- .map((def) => toPropertyDefinitionDomain(def));- });-- // Look up property definition by ID- const getPropertyById = (id: string): PropertyDefinitionDomain | undefined =>- allProperties().find((p) => p.id === id);-- // Simple incrementing ID generator (unique within component lifetime)- let nextFilterId = 0;- const getNextFilterId = () => `property-filter-${nextFilterId++}`;-- // Check if a filter has all required fields: propertyId, action, and value(s)- const isFilterComplete = (- filter: PropertyFilter | null- ): filter is PropertyFilter => {- if (!filter) return false;- if (!filter.propertyId || !filter.action) return false;-- // Check value based on filter variant- if ('value' in filter) {- // BOOLEAN value can be false, so check for undefined/null only- return filter.value !== undefined && filter.value !== null;- }- if ('values' in filter) {- return Array.isArray(filter.values) && filter.values.length > 0;- }-- return false;- };-- // Extract only complete filters- const getCompleteFilters = (entries: FilterEntry[]): PropertyFilter[] =>- entries.filter((f) => isFilterComplete(f.data)).map((f) => f.data!);-- // Convert saved filters to entries with stable IDs- const createEntriesFromProps = (): FilterEntry[] =>- props.propertyFilters().map((f) => ({- id: getNextFilterId(),- data: f,- }));-- // Local state for UI (includes incomplete filters)- const [filters, setFilters] = createStore<FilterEntry[]>(- createEntriesFromProps()- );-- // Clear all local filters (called by parent via registerClearHandler)- const clearFilters = () => {- setFilters(reconcile([]));- };-- // Register clear handler with parent- props.registerClearHandler?.(clearFilters);-- // Sync only complete filters to props- const syncCompleteFiltersToProps = (entries: FilterEntry[]) => {- props.setPropertyFilters(getCompleteFilters(entries));- };-- const addFilter = () => {- const newId = getNextFilterId();- setFilters([...filters, { id: newId, data: null }]);- };-- const removeFilter = (id: string) => {- const newFilters = filters.filter((f) => f.id !== id);- setFilters(reconcile(newFilters));- // Sync complete filters to props- syncCompleteFiltersToProps(newFilters);- };-- const updateFilter = (id: string, data: PropertyFilter) => {- const newFilters = filters.map((f) => (f.id === id ? { ...f, data } : f));- setFilters(reconcile(newFilters));- // Sync complete filters to props- syncCompleteFiltersToProps(newFilters);- };-- // Check for conflicts among all saved filters- const conflictErrors = createMemo(() => {- const completed = filters- .filter((f) => f.data !== null)- .map((f) => f.data!);- const errors: string[] = [];-- for (let i = 0; i < completed.length; i++) {- const filtersBefore = completed.slice(0, i);- const conflict = checkFilterConflict(completed[i], filtersBefore);- if (conflict) {- errors.push(conflict);- }- }-- return errors;- });-- // Check if there are any incomplete filters- const hasIncompleteFilters = createMemo(() =>- filters.some((f) => !isFilterComplete(f.data))- );-- // Notify parent when incomplete filter state changes- createEffect(() => {- props.onIncompleteFiltersChange?.(hasIncompleteFilters());- });-- // Show loading if we have saved filters but properties haven't loaded yet- const isLoading = () =>- filters.some((f) => f.data !== null) && allProperties().length === 0;-- return (- <div class="flex flex-col gap-1">- {/* Conflict warnings */}- <Show when={conflictErrors().length > 0}>- <div class="text-xs text-failure bg-failure/10 border border-failure px-2 py-1 mb-1">- <For each={conflictErrors()}>{(error) => <div>{error}</div>}</For>- </div>- </Show>-- <Show- when={!isLoading()}- fallback={- <div class="text-xs text-ink-muted px-2 py-1">Loading filters...</div>- }- >- {/* TODO: Add controlled editing state (editingPropertyId) so only one- dropdown is open at a time. */}- <For each={filters}>- {(filter, index) => (- <>- <FilterPropertyPill- id={filter.id}- savedData={filter.data}- initialProperty={- filter.data?.propertyId- ? getPropertyById(filter.data.propertyId)- : undefined- }- onSave={(data) => updateFilter(filter.id, data)}- onCancel={() => removeFilter(filter.id)}- />- <Show when={index() < filters.length - 1}>- <span class="text-xxs text-ink-muted font-mono pl-3 pt-px leading-none">- AND- </span>- </Show>- </>- )}- </For>- </Show>-- {/* Add filter button */}- <button- type="button"- onClick={addFilter}- class={cn(- 'px-2 py-0.75 text-xs text-ink border border-edge hover:bg-hover w-full',- filters.length > 0 && 'mt-2'- )}- >- + Add filter- </button>- </div>- );-};--export default PropertyFilterControl;diff --git a/js/app/packages/app/component/PropertyFilterTypes.ts b/js/app/packages/app/component/PropertyFilterTypes.tsdeleted file mode 100644index 7836b7e5db..0000000000--- a/js/app/packages/app/component/PropertyFilterTypes.ts+++ /dev/null@@ -1,260 +0,0 @@-import type { ValueType } from '@core/component/Properties/types';-import type { EntityType } from '@service-properties/generated/schemas/entityType';--// ============================================-// Property Filter Models-// ============================================--/** Data types that support filtering */-export const FILTERABLE_DATA_TYPES = [- 'BOOLEAN',- 'DATE',- 'NUMBER',- 'SELECT_NUMBER',- 'SELECT_STRING',- 'ENTITY',-] as const satisfies readonly ValueType[];--/** Equality actions - matches against one or more values (OR logic for multiple) */-export const EqualityAction = {- EQUAL: 'equal',- NOT_EQUAL: 'not_equal',-} as const;-export type EqualityAction =- (typeof EqualityAction)[keyof typeof EqualityAction];--/** Comparison actions - available for DATE, NUMBER, SELECT_NUMBER, SELECT_STRING (single value only) */-export const ComparisonAction = {- GREATER_THAN: 'greater_than',- GREATER_THAN_OR_EQUAL: 'greater_than_or_equal',- LESS_THAN: 'less_than',- LESS_THAN_OR_EQUAL: 'less_than_or_equal',-} as const;-export type ComparisonAction =- (typeof ComparisonAction)[keyof typeof ComparisonAction];--/** Contains actions - available for multi-value properties (SELECT_NUMBER, SELECT_STRING, ENTITY) */-export const ContainsAction = {- HAS_ANY: 'has_any',- HAS_ALL: 'has_all',- DOES_NOT_HAVE: 'does_not_have',-} as const;-export type ContainsAction =- (typeof ContainsAction)[keyof typeof ContainsAction];--/** All possible filter actions */-export type FilterAction = EqualityAction | ComparisonAction | ContainsAction;--/** Symbols for filter actions (shown in pill) */-export const ACTION_SYMBOLS: Record<FilterAction, string> = {- [EqualityAction.EQUAL]: '=',- [EqualityAction.NOT_EQUAL]: '≠',- [ComparisonAction.GREATER_THAN]: '>',- [ComparisonAction.GREATER_THAN_OR_EQUAL]: '≥',- [ComparisonAction.LESS_THAN]: '<',- [ComparisonAction.LESS_THAN_OR_EQUAL]: '≤',- [ContainsAction.HAS_ANY]: '∈',- [ContainsAction.HAS_ALL]: '⊇',- [ContainsAction.DOES_NOT_HAVE]: '∉',-};--/** Display names for filter actions (shown in dropdown: text + symbol) */-export const ACTION_DISPLAY_NAMES: Record<FilterAction, string> = {- [EqualityAction.EQUAL]: 'is =',- [EqualityAction.NOT_EQUAL]: 'is not ≠',- [ComparisonAction.GREATER_THAN]: 'greater than >',- [ComparisonAction.GREATER_THAN_OR_EQUAL]: 'at least ≥',- [ComparisonAction.LESS_THAN]: 'less than <',- [ComparisonAction.LESS_THAN_OR_EQUAL]: 'at most ≤',- [ContainsAction.HAS_ANY]: 'has any ∈',- [ContainsAction.HAS_ALL]: 'has all ⊇',- [ContainsAction.DOES_NOT_HAVE]: 'has none ∉',-};--/** Entity reference for ENTITY filter values */-export type EntityFilterValue = {- entityType: EntityType;- entityId: string;-};--/** Property filter - discriminated union by dataType */-export type PropertyFilter =- // BOOLEAN - equality only (single value)- | {- propertyId: string;- dataType: 'BOOLEAN';- action: EqualityAction;- value: boolean;- }- // DATE - equality (multiple) or comparison (single)- | {- propertyId: string;- dataType: 'DATE';- action: EqualityAction;- values: string[]; // ISO date strings- }- | {- propertyId: string;- dataType: 'DATE';- action: ComparisonAction;- value: string; // ISO date string- }- // NUMBER - equality (multiple) or comparison (single)- | {- propertyId: string;- dataType: 'NUMBER';- action: EqualityAction;- values: number[];- }- | {- propertyId: string;- dataType: 'NUMBER';- action: ComparisonAction;- value: number;- }- // SELECT_NUMBER | SELECT_STRING (single-value) - equality or comparison- | {- propertyId: string;- dataType: 'SELECT_NUMBER' | 'SELECT_STRING';- action: EqualityAction;- values: string[]; // option ids- }- | {- propertyId: string;- dataType: 'SELECT_NUMBER' | 'SELECT_STRING';- action: ComparisonAction;- value: string; // option id- }- // SELECT_NUMBER | SELECT_STRING (multi-value) - contains only- | {- propertyId: string;- dataType: 'SELECT_NUMBER' | 'SELECT_STRING';- action: ContainsAction;- values: string[]; // option ids- }- // ENTITY (single-value) - equality only- | {- propertyId: string;- dataType: 'ENTITY';- action: EqualityAction;- values: EntityFilterValue[];- }- // ENTITY (multi-value) - contains only- | {- propertyId: string;- dataType: 'ENTITY';- action: ContainsAction;- values: EntityFilterValue[];- };--/** Helper: Check if a data type is filterable */-export const isFilterableDataType = (dataType: ValueType): boolean => {- return (FILTERABLE_DATA_TYPES as readonly ValueType[]).includes(dataType);-};--/** Helper: Get valid filter actions for a property based on data type and multi-select */-export const getValidFilterActions = (- dataType: ValueType,- isMultiSelect: boolean-): FilterAction[] => {- const actions: FilterAction[] = [];-- // Multi-select properties only support contains actions- if (isMultiSelect) {- actions.push(ContainsAction.HAS_ANY);- actions.push(ContainsAction.HAS_ALL);- actions.push(ContainsAction.DOES_NOT_HAVE);- return actions;- }-- // BOOLEAN: only equality- if (dataType === 'BOOLEAN') {- return [EqualityAction.EQUAL, EqualityAction.NOT_EQUAL];- }-- // ENTITY (single-value): only equality- if (dataType === 'ENTITY') {- return [EqualityAction.EQUAL, EqualityAction.NOT_EQUAL];- }-- // DATE, NUMBER, SELECT_NUMBER, SELECT_STRING: equality + comparison- actions.push(EqualityAction.EQUAL);- actions.push(EqualityAction.NOT_EQUAL);- actions.push(ComparisonAction.GREATER_THAN);- actions.push(ComparisonAction.GREATER_THAN_OR_EQUAL);- actions.push(ComparisonAction.LESS_THAN);- actions.push(ComparisonAction.LESS_THAN_OR_EQUAL);-- return actions;-};--/** Helper: Check if a new filter conflicts with existing filters */-export const checkFilterConflict = (- newFilter: PropertyFilter,- existingFilters: PropertyFilter[]-): string | null => {- const filtersForProperty = existingFilters.filter(- (f) => f.propertyId === newFilter.propertyId- );-- if (filtersForProperty.length === 0) return null;-- const existingActions = new Set(filtersForProperty.map((f) => f.action));- const newAction = newFilter.action;-- // BOOLEAN: only one filter allowed per property- if (newFilter.dataType === 'BOOLEAN' && filtersForProperty.length > 0) {- return 'Redundant: boolean already filtered';- }-- // Duplicate action (except has_any which can be repeated)- if (existingActions.has(newAction) && newAction !== ContainsAction.HAS_ANY) {- return `Redundant: duplicate "${ACTION_DISPLAY_NAMES[newAction]}" filter`;- }-- // Equal conflicts with comparisons- if (newAction === EqualityAction.EQUAL) {- const hasComparison =- existingActions.has(ComparisonAction.GREATER_THAN) ||- existingActions.has(ComparisonAction.GREATER_THAN_OR_EQUAL) ||- existingActions.has(ComparisonAction.LESS_THAN) ||- existingActions.has(ComparisonAction.LESS_THAN_OR_EQUAL);- if (hasComparison) {- return 'Conflicting: "is" + comparison';- }- }-- // Comparisons conflict with equal- const isComparison =- newAction === ComparisonAction.GREATER_THAN ||- newAction === ComparisonAction.GREATER_THAN_OR_EQUAL ||- newAction === ComparisonAction.LESS_THAN ||- newAction === ComparisonAction.LESS_THAN_OR_EQUAL;- if (isComparison && existingActions.has(EqualityAction.EQUAL)) {- return 'Conflicting: comparison + "is"';- }-- // Lower bound conflicts- const isLowerBound =- newAction === ComparisonAction.GREATER_THAN ||- newAction === ComparisonAction.GREATER_THAN_OR_EQUAL;- const hasLowerBound =- existingActions.has(ComparisonAction.GREATER_THAN) ||- existingActions.has(ComparisonAction.GREATER_THAN_OR_EQUAL);- if (isLowerBound && hasLowerBound) {- return 'Redundant: multiple lower bounds';- }-- // Upper bound conflicts- const isUpperBound =- newAction === ComparisonAction.LESS_THAN ||- newAction === ComparisonAction.LESS_THAN_OR_EQUAL;- const hasUpperBound =- existingActions.has(ComparisonAction.LESS_THAN) ||- existingActions.has(ComparisonAction.LESS_THAN_OR_EQUAL);- if (isUpperBound && hasUpperBound) {- return 'Redundant: multiple upper bounds';- }-- return null;-};diff --git a/js/app/packages/app/component/Root.tsx b/js/app/packages/app/component/Root.tsxindex 4521f3674f..91eb19234e 100644--- a/js/app/packages/app/component/Root.tsx+++ b/js/app/packages/app/component/Root.tsx@@ -371,7 +371,7 @@ const ROUTES: RouteDefinition[] = [},];-export function ConfiguredGlobalAppStateProvider(props: ParentProps) {+function ConfiguredGlobalAppStateProvider(props: ParentProps) {// Initialize global notification helpersconst notifInterface = usePlatformNotificationState();diff --git a/js/app/packages/app/component/SimpleDropdown.tsx b/js/app/packages/app/component/SimpleDropdown.tsxindex e6a28c5d50..c2fa88b9ec 100644--- a/js/app/packages/app/component/SimpleDropdown.tsx+++ b/js/app/packages/app/component/SimpleDropdown.tsx@@ -126,7 +126,7 @@ function useSimpleDropdownContext() {// --- Item ----export type DropdownItemProps = {+type DropdownItemProps = {text: string | JSX.Element;icon?: Component<JSX.SvgSVGAttributes<SVGSVGElement>>;onClick?: (e?: MouseEvent) => void;@@ -262,14 +262,14 @@ function SimpleDropdownRoot(props: {);}-export const SimpleDropdown = Object.assign(SimpleDropdownRoot, {+const SimpleDropdown = Object.assign(SimpleDropdownRoot, {Trigger: SimpleDropdownTrigger,Portal: SimpleDropdownPortal,Content: SimpleDropdownContent,Item: DropdownItem,});-export type DropdownMenuLike = {+type DropdownMenuLike = {(props: {open: boolean;onOpenChange: (v: boolean) => void;diff --git a/js/app/packages/app/component/app-sidebar/invite-modal.tsx b/js/app/packages/app/component/app-sidebar/invite-modal.tsxindex 3ebaf65fd2..df39510d6c 100644--- a/js/app/packages/app/component/app-sidebar/invite-modal.tsx+++ b/js/app/packages/app/component/app-sidebar/invite-modal.tsx@@ -18,7 +18,7 @@ function parseEmails(raw: string): string[] {const [inviteModalOpen, setInviteModalOpen] = createSignal(false);-export { inviteModalOpen, setInviteModalOpen };+export { setInviteModalOpen };export const InviteModal = () => {const [value, setValue] = createSignal('');diff --git a/js/app/packages/app/component/app-sidebar/sidebar.tsx b/js/app/packages/app/component/app-sidebar/sidebar.tsxindex 73cb467121..11c556aa2d 100644--- a/js/app/packages/app/component/app-sidebar/sidebar.tsx+++ b/js/app/packages/app/component/app-sidebar/sidebar.tsx@@ -75,7 +75,7 @@ interface SidebarItem {standaloneHotkey?: boolean;}-export const SIDEBAR_LINKS = [+const SIDEBAR_LINKS = [{id: 'inbox',label: 'Inbox',@@ -238,7 +238,7 @@ type SidebarHotkeyDeps = {openWithSplit: ReturnType<typeof useSplitLayout>['openWithSplit'];};-export const registerSidebarHotkeys = ({+const registerSidebarHotkeys = ({links,isSlim,onOpenChange,diff --git a/js/app/packages/app/component/app-sidebar/soup-filter-presets.ts b/js/app/packages/app/component/app-sidebar/soup-filter-presets.tsindex 46b5c9dd0b..a5e69d00ba 100644--- a/js/app/packages/app/component/app-sidebar/soup-filter-presets.ts+++ b/js/app/packages/app/component/app-sidebar/soup-filter-presets.ts@@ -11,7 +11,7 @@ import {} from '@core/component/Properties/constants';import { subWeeks } from 'date-fns';-export type SoupFiltersPreset = {+type SoupFiltersPreset = {/** Filter data for server query */filters: Query;/** Client filters to apply */@@ -30,13 +30,11 @@ export type PresetContext = {email: string | undefined;};-export type TabPresetResolver = (- ctx: PresetContext-) => SoupFiltersPreset | undefined;+type TabPresetResolver = (ctx: PresetContext) => SoupFiltersPreset | undefined;-export type TabConfig = Record<string, TabPresetResolver>;+type TabConfig = Record<string, TabPresetResolver>;-export type ViewTabConfig = {+type ViewTabConfig = {default: string;tabs: TabConfig;};diff --git a/js/app/packages/app/component/auth/Shared.tsx b/js/app/packages/app/component/auth/Shared.tsxindex cb08820997..3922ff2cdd 100644--- a/js/app/packages/app/component/auth/Shared.tsx+++ b/js/app/packages/app/component/auth/Shared.tsx@@ -10,7 +10,7 @@ export function setCookie(name: string, value: string, days: number) {document.cookie = `${name}=${encodeURIComponent(value)}${expires}; path=/`;}-export const assignABGroup = async () => {+const _assignABGroup = async () => {const randomGroup = Math.random() < 0.5 ? 'A' : 'B';await authServiceClient.setGroup({ group: randomGroup });return randomGroup;diff --git a/js/app/packages/app/component/auth/store.ts b/js/app/packages/app/component/auth/store.tsdeleted file mode 100644index 661e292643..0000000000--- a/js/app/packages/app/component/auth/store.ts+++ /dev/null@@ -1,109 +0,0 @@-import { createSignal } from 'solid-js';-import { themeReactive } from '../../../theme/signals/themeReactive';--// RGB values as tuples - THREE.Color creation moved to ThreeWireframe for lazy loading-export const [colorContrastRgb, setColorContrastRgb] = createSignal<- [number, number, number] | undefined->();-export const [colorAccentRgb, setColorAccentRgb] = createSignal<- [number, number, number] | undefined->();-export const [colorBaseRgb, setColorBaseRgb] = createSignal<- [number, number, number] | undefined->();-export const rafSpeed = navigator.vendor?.includes('Apple') ? 2 : 1;-export const [currentTheme, setCurrentTheme] = createSignal();-export const [pixelation, setPixelation] = createSignal(1);-export const [speed, setSpeed] = createSignal(1);--export interface ThemeColor {- contrast: [number, number, number];- surface: [number, number, number];- accent: [number, number, number];-}--export interface ThemeValues {- '--accent-l': number;- '--accent-c': number;- '--accent-h': number;- '--contrast-l': number;- '--contrast-c': number;- '--contrast-h': number;- '--surface-l': number;- '--surface-c': number;- '--surface-h': number;-}--export function setColor() {- const currentTheme = getCurrentTheme();- setColorContrastRgb(currentTheme.contrast);- setColorBaseRgb(currentTheme.surface);- setColorAccentRgb(currentTheme.accent);-}--export function oklchToRgb(- lightness: number,- chroma: number,- hueInDegrees: number-): [number, number, number] {- const hueInRadians = (hueInDegrees * Math.PI) / 180;- const a = chroma * Math.cos(hueInRadians);- const b = chroma * Math.sin(hueInRadians);-- const okLabLCubed = Math.pow(- lightness + a * 0.3963377774 + b * 0.2158037573,- 3- );- const okLabMCubed = Math.pow(- lightness - a * 0.1055613458 - b * 0.0638541728,- 3- );- const okLabSCubed = Math.pow(- lightness - a * 0.0894841775 - b * 1.291485548,- 3- );-- function gammaCorrection(linearComponent: number): number {- return linearComponent <= 0.0031308- ? 12.92 * linearComponent- : 1.055 * Math.pow(linearComponent, 1 / 2.4) - 0.055;- }-- return [- gammaCorrection(- okLabLCubed * 4.0767416621 -- okLabMCubed * 3.3077115913 +- okLabSCubed * 0.2309699292- ),- gammaCorrection(- okLabLCubed * -1.2684380046 +- okLabMCubed * 2.6097574011 -- okLabSCubed * 0.3413193965- ),- gammaCorrection(- okLabLCubed * -0.0041960863 -- okLabMCubed * 0.7034186147 +- okLabSCubed * 1.707614701- ),- ];-}--export function getCurrentTheme(): ThemeColor {- return {- accent: oklchToRgb(- themeReactive.a0.l[0](),- themeReactive.a0.c[0](),- themeReactive.a0.h[0]()- ),- surface: oklchToRgb(- themeReactive.b0.l[0](),- themeReactive.b0.c[0](),- themeReactive.b0.h[0]()- ),- contrast: oklchToRgb(- themeReactive.c0.l[0](),- themeReactive.c0.c[0](),- themeReactive.c0.h[0]()- ),- };-}diff --git a/js/app/packages/app/component/banner/SmallLogo.tsx b/js/app/packages/app/component/banner/SmallLogo.tsxdeleted file mode 100644index e27ae88cb5..0000000000--- a/js/app/packages/app/component/banner/SmallLogo.tsx+++ /dev/null@@ -1,68 +0,0 @@-export default function SmallLogo(props: { class?: string }) {- return (- <svg- width="109"- height="54"- viewBox="0 0 109 54"- fill="none"- xmlns="http://www.w3.org/2000/svg"- class={props.class}- >- <path- d="M22.7303 16.6807L22.3102 16.3415L22.7303 16.6807C24.1913 14.8713 26.3924 13.8198 28.7181 13.8203C31.0438 13.8208 33.2444 14.8731 34.7047 16.6832L41.2457 24.7908L33.8732 40.3239L18.0314 53.4603H7.41038C4.76379 53.4603 2.35251 51.9401 1.21142 49.5521C0.0703582 47.1642 0.402405 44.3331 2.06506 42.2739L22.7303 16.6807Z"- fill="url(#paint0_linear_606_3909)"- stroke="black"- stroke-width="1.08"- />- <path- d="M106.016 40.8285C107.893 43.1533 108.269 46.3501 106.981 49.0467C105.692 51.7433 102.97 53.46 99.9812 53.46H65.7422L51.0262 39.5589L42.5313 24.7672L58.5249 4.96429C60.7846 2.16637 64.1882 0.540158 67.7847 0.54C71.3811 0.539842 74.7849 2.16581 77.0448 4.96354L106.016 40.8285Z"- fill="url(#paint1_linear_606_3909)"- stroke="black"- stroke-width="1.08"- />- <path- d="M69.9373 53.4603H15.9224C19.0511 52.3364 21.8544 50.3694 23.993 47.7216L41.8805 25.5753L57.7753 45.2582C60.9517 49.1916 65.2058 52.0213 69.9373 53.4603Z"- fill="url(#paint2_linear_606_3909)"- stroke="black"- stroke-width="1.08"- />- <defs>- <linearGradient- id="paint0_linear_606_3909"- x1="0.17114"- y1="49.5599"- x2="39.0206"- y2="21.403"- gradientUnits="userSpaceOnUse"- >- <stop stop-color="#568FFF" />- <stop offset="1" stop-color="#4918BD" />- </linearGradient>- <linearGradient- id="paint1_linear_606_3909"- x1="103.206"- y1="27"- x2="45.7199"- y2="27"- gradientUnits="userSpaceOnUse"- >- <stop stop-color="#1AB0E2" />- <stop offset="0.557813" stop-color="#43D2ED" />- <stop offset="1" stop-color="#5FE9F5" />- </linearGradient>- <linearGradient- id="paint2_linear_606_3909"- x1="9.5"- y1="39.3581"- x2="78.3768"- y2="39.3581"- gradientUnits="userSpaceOnUse"- >- <stop stop-color="#1AD1E2" />- <stop offset="0.382163" stop-color="#27B5EC" />- <stop offset="0.999227" stop-color="#4080FF" />- </linearGradient>- </defs>- </svg>- );-}diff --git a/js/app/packages/app/component/bulk-edit-entity/BulkEditEntityModal.tsx b/js/app/packages/app/component/bulk-edit-entity/BulkEditEntityModal.tsxindex 865290f122..327786497d 100644--- a/js/app/packages/app/component/bulk-edit-entity/BulkEditEntityModal.tsx+++ b/js/app/packages/app/component/bulk-edit-entity/BulkEditEntityModal.tsx@@ -76,14 +76,14 @@ const BulkEditEntityModalContent = (props: {);};-export type BulkEditEntityModalProps = {+type BulkEditEntityModalProps = {isOpen: Accessor<boolean>;setIsOpen: Setter<boolean>;view: 'rename' | 'moveToProject' | 'delete';entities: Accessor<EntityData[]>;};-export const BulkEditEntityModal: ParentComponent<BulkEditEntityModalProps> = (+const _BulkEditEntityModal: ParentComponent<BulkEditEntityModalProps> = (props) => {return (diff --git a/js/app/packages/app/component/command/CommandItem.tsx b/js/app/packages/app/component/command/CommandItem.tsxindex f2baabda38..7745021b87 100644--- a/js/app/packages/app/component/command/CommandItem.tsx+++ b/js/app/packages/app/component/command/CommandItem.tsx@@ -20,7 +20,7 @@ import {type SearchItem,} from './useCommandItems';-export interface CommandItemProps {+interface CommandItemProps {item: CommandMenuItem;index: number;selected: boolean;diff --git a/js/app/packages/app/component/command/category-search-filters.ts b/js/app/packages/app/component/command/category-search-filters.tsindex 23356cbff6..afa2b202bd 100644--- a/js/app/packages/app/component/command/category-search-filters.ts+++ b/js/app/packages/app/component/command/category-search-filters.ts@@ -3,7 +3,7 @@ import type { Query } from '@app/component/next-soup/filters/filter-store/types'import { INDEX_OPTIONS } from '@app/component/next-soup/soup-view/filters-bar/search-filter-controls';import type { CategoryFilter } from './types';-export type CategorySearchFilters = {+type CategorySearchFilters = {filters: Query;clientFilters: SetPredicatesInput<string>;};diff --git a/js/app/packages/app/component/command/index.ts b/js/app/packages/app/component/command/index.tsindex d1abd7d018..724c4242b2 100644--- a/js/app/packages/app/component/command/index.ts+++ b/js/app/packages/app/component/command/index.ts@@ -1,11 +1,6 @@export { CommandMenu, CommandMenuInner } from './CommandMenu';-export type { ICommandState } from './state';+export { CommandState } from './state';export type { CategoryFilter } from './types';-export type { CommandMenuItem } from './useCommandItems';-export {- isCommandItem,- isEntityItem,- isUserItem,- useCommandItems,-} from './useCommandItems';++export {} from './useCommandItems';diff --git a/js/app/packages/app/component/command/state.ts b/js/app/packages/app/component/command/state.tsindex eb435f01a1..017e9eae13 100644--- a/js/app/packages/app/component/command/state.ts+++ b/js/app/packages/app/component/command/state.ts@@ -7,7 +7,7 @@ import type { CategoryFilter } from './types';/** timestamp threshold for resetting state after menu close */const STATE_RESET_THRESHOLD_MS = 2_000;-export interface ICommandState {+interface ICommandState {/** visibility */isOpen: Accessor<boolean>;setIsOpen: Setter<boolean>;diff --git a/js/app/packages/app/component/command/useCommandItems.ts b/js/app/packages/app/component/command/useCommandItems.tsindex c326141c64..6d004becae 100644--- a/js/app/packages/app/component/command/useCommandItems.ts+++ b/js/app/packages/app/component/command/useCommandItems.ts@@ -1,6 +1,5 @@import { GO_TO_COMMAND_SCOPE, GO_TO_LEADER_KEY } from '@app/constants/hotkeys';import {- type Bucket,type EntityItem,exclude,type QuickAccessItem,@@ -61,7 +60,7 @@ function isEntityItem(item: CommandMenuItem): item is EntityItem {return item.kind === 'entity';}-function isUserItem(item: CommandMenuItem): item is UserItem {+function _isUserItem(item: CommandMenuItem): item is UserItem {return item.kind === 'user';}@@ -297,11 +296,5 @@ export function useCommandItems(return filteredItems;}-export type {- Bucket,- CommandItem,- CommandMenuItem,- QuickAccessItem,- SearchItem,-};-export { isCommandItem, isEntityItem, isSearchItem, isUserItem };+export type { CommandMenuItem, SearchItem };+export { isCommandItem, isEntityItem, isSearchItem };diff --git a/js/app/packages/app/component/global-share-modal/GlobalShareModal.tsx b/js/app/packages/app/component/global-share-modal/GlobalShareModal.tsxindex e948a20721..a04c253a26 100644--- a/js/app/packages/app/component/global-share-modal/GlobalShareModal.tsx+++ b/js/app/packages/app/component/global-share-modal/GlobalShareModal.tsx@@ -14,7 +14,7 @@ export type ShareableEntityData = Extract<{ type: ShareableEntityType }>;-export type GlobalShareModalProps = {+type GlobalShareModalProps = {entity: ShareableEntityData;onClose?: () => void;};@@ -52,7 +52,7 @@ export const openGlobalShareModal = (props: GlobalShareModalProps) => {setModalOpen(true);};-export const closeGlobalShareModal = () => {+const closeGlobalShareModal = () => {const props = globalModalProps();setModalOpen(false);setGlobalModalProps(null);diff --git a/js/app/packages/app/component/interactive-onboarding/components/MockAppChrome.tsx b/js/app/packages/app/component/interactive-onboarding/components/MockAppChrome.tsxindex e85f7d0063..4a5c2a07d9 100644--- a/js/app/packages/app/component/interactive-onboarding/components/MockAppChrome.tsx+++ b/js/app/packages/app/component/interactive-onboarding/components/MockAppChrome.tsx@@ -27,7 +27,7 @@ import {sidebarFilter,} from '../sandbox/sandbox-store';-export const MOCK_SIDEBAR_LINKS = [+const MOCK_SIDEBAR_LINKS = [{id: 'agents',label: 'Agents',diff --git a/js/app/packages/app/component/interactive-onboarding/create-onboarding-state.ts b/js/app/packages/app/component/interactive-onboarding/create-onboarding-state.tsindex d178d604dc..be52b471f6 100644--- a/js/app/packages/app/component/interactive-onboarding/create-onboarding-state.ts+++ b/js/app/packages/app/component/interactive-onboarding/create-onboarding-state.ts@@ -113,5 +113,3 @@ export function createOnboardingState(options: OnboardingStateOptions) {dismiss,};}--export type OnboardingState = ReturnType<typeof createOnboardingState>;diff --git a/js/app/packages/app/component/interactive-onboarding/lessons/composers-preview.tsx b/js/app/packages/app/component/interactive-onboarding/lessons/composers-preview.tsxdeleted file mode 100644index a1c67ac2c5..0000000000--- a/js/app/packages/app/component/interactive-onboarding/lessons/composers-preview.tsx+++ /dev/null@@ -1,143 +0,0 @@-import ArrowUpIcon from '@phosphor/arrow-up.svg';-import CalendarBlankIcon from '@phosphor/calendar-blank.svg';--import CheckIcon from '@phosphor/check.svg';-import CircleDashedIcon from '@phosphor/circle-dashed.svg';-import ClockIcon from '@phosphor/clock.svg';-import FlagIcon from '@phosphor/flag.svg';-import PaperclipIcon from '@phosphor/paperclip.svg';-import PlusIcon from '@phosphor/plus.svg';-import TextAaIcon from '@phosphor/text-aa.svg';-import UsersIcon from '@phosphor/users.svg';-import { onMount } from 'solid-js';-import type { LessonContentProps, LessonDefinition } from '../types';--function ComposersPreviewContent(props: LessonContentProps) {- onMount(() => setTimeout(() => props.onComplete('Got it')));-- return (- <div class="flex flex-col gap-3 onboarding-stagger">- <p>- Macro has dedicated composers for tasks, emails, and more — each- tailored to its content type.- </p>- <p>Open any item to start editing with the right tools built in.</p>- </div>- );-}--function ComposersPreviewDemo() {- return (- <div class="size-full flex flex-col items-center justify-center gap-6 px-10 py-8">- {/* Task composer */}- <div class="w-full max-w-lg rounded-sm border border-edge-muted bg-surface flex flex-col overflow-hidden">- <div class="px-4 pt-3 pb-1">- <div class="flex items-center gap-2">- <div class="size-5 rounded-xs bg-task-bg flex items-center justify-center">- <CheckIcon class="size-3 text-task" />- </div>- <span class="text-lg text-ink/40">Task Title</span>- </div>- <p class="text-xs text-ink/30 mt-1 pl-7">Add description...</p>- </div>-- {/* Properties grid */}- <div class="px-4 py-3 flex flex-wrap gap-x-6 gap-y-2 text-[11px]">- <div class="flex items-center gap-1.5">- <UsersIcon class="size-3.5 text-ink/50" />- <span class="text-ink/50">Assignees</span>- <span class="bg-accent/15 text-accent text-xxs px-1.5 py-0.5 rounded-xs font-medium">- seam- </span>- <PlusIcon class="size-3 text-ink/30" />- </div>- <div class="flex items-center gap-1.5">- <CircleDashedIcon class="size-3.5 text-ink/50" />- <span class="text-ink/50">Status</span>- <span class="text-ink/50 border border-edge-muted px-1.5 py-0.5 rounded-xs">- Not Started- </span>- </div>- <div class="flex items-center gap-1.5">- <CalendarBlankIcon class="size-3.5 text-ink/50" />- <span class="text-ink/50">Due Date</span>- <span class="text-ink/30 border border-edge-muted px-1.5 py-0.5 rounded-xs">- Empty- </span>- </div>- <div class="flex items-center gap-1.5">- <FlagIcon class="size-3.5 text-ink/50" />- <span class="text-ink/50">Priority</span>- <PlusIcon class="size-3 text-ink/30" />- </div>- </div>-- {/* Footer */}- <div class="px-4 py-2 border-t border-edge-muted flex items-center justify-between">- <div class="flex items-center gap-1.5 text-[11px] text-ink/40">- <span>Create More</span>- <div class="w-6 h-3.5 rounded-full bg-ink/10" />- </div>- <div class="flex items-center gap-1 text-[11px] text-ink/40 border border-edge-muted px-2.5 py-1 rounded-xs">- <CheckIcon class="size-3" />- <span>Create Task</span>- </div>- </div>- </div>-- {/* Email composer */}- <div class="w-full max-w-lg rounded-sm border border-edge-muted bg-surface flex flex-col overflow-hidden">- {/* From line */}- <div class="px-4 py-2.5 flex items-center justify-between text-xs">- <span class="text-ink/40">from [email protected]</span>- <div class="flex items-center gap-2 text-ink/50">- <span>+ Cc</span>- <span>+ Bcc</span>- </div>- </div>-- {/* To field */}- <div class="px-4 py-2 flex items-center gap-3">- <span class="text-sm text-ink/40">To</span>- <span class="text-sm text-ink/30">- Macro users or email addresses- </span>- </div>- <div class="mx-4 h-px bg-email" />-- {/* Subject field */}- <div class="px-4 py-2 flex items-center gap-3">- <span class="text-sm text-ink/40">Subject</span>- <span class="text-sm text-ink/30">Subject</span>- </div>- <div class="mx-4 h-px bg-edge-muted" />-- {/* Body */}- <div class="p-4 flex-1 min-h-20">- <span class="text-sm text-ink/25">Use `@` to reference files</span>- </div>-- {/* Footer */}- <div class="px-4 py-2.5 border-t border-edge-muted flex items-center justify-between">- <div class="flex items-center gap-3 text-ink/40">- <PaperclipIcon class="size-4" />- <TextAaIcon class="size-4" />- <ClockIcon class="size-4" />- </div>- <div class="size-7 rounded-full border-2 border-email flex items-center justify-center">- <ArrowUpIcon class="size-3.5 text-email" />- </div>- </div>- </div>- </div>- );-}--export const composersPreviewLesson: LessonDefinition = {- id: 'composers-preview',- title: 'Composers',- subtitle: 'Purpose-built editors for every content type.',- content: ComposersPreviewContent,- demo: ComposersPreviewDemo,- order: 60,-};diff --git a/js/app/packages/app/component/interactive-onboarding/lessons/home.tsx b/js/app/packages/app/component/interactive-onboarding/lessons/home.tsxdeleted file mode 100644index ffd63a4b40..0000000000--- a/js/app/packages/app/component/interactive-onboarding/lessons/home.tsx+++ /dev/null@@ -1,52 +0,0 @@-import { createSoupState } from '@app/component/next-soup/create-soup-state';-import { createEffect, onMount } from 'solid-js';-import { MockAppChrome } from '../components/MockAppChrome';-import { OnboardingEntityList } from '../OnboardingEntityList';-import { filteredSandboxEntities } from '../sandbox/sandbox-store';-import type { LessonContentProps, LessonDefinition } from '../types';--function HomeContent(props: LessonContentProps) {- onMount(() => setTimeout(() => props.onComplete('Got it')));-- return (- <div class="flex flex-col gap-3 onboarding-stagger">- <p>- The Macro workspace has a <strong>Sidebar</strong> and{' '}- <strong>Splits</strong>. Each split can contain{' '}- <strong>List Views</strong> or content.- </p>- <p class="text-sm text-ink/50">- Try clicking the sidebar icons on the right to filter the list.- </p>- </div>- );-}--function HomeDemo() {- const soup = createSoupState({- initialData: filteredSandboxEntities(),- wrapNavigation: true,- });-- createEffect(() => {- soup.setRows(- filteredSandboxEntities().map((e, i) =>- soup.buildRow({ id: e.id, index: i, original: e })- )- );- });-- return (- <MockAppChrome>- <OnboardingEntityList soup={soup} />- </MockAppChrome>- );-}--export const homeLesson: LessonDefinition = {- id: 'home',- title: 'Workspace',- content: HomeContent,- demo: HomeDemo,- order: 1,-};diff --git a/js/app/packages/app/component/interactive-onboarding/sandbox/sandbox-store.ts b/js/app/packages/app/component/interactive-onboarding/sandbox/sandbox-store.tsindex 21e73bb49a..10f04a0f15 100644--- a/js/app/packages/app/component/interactive-onboarding/sandbox/sandbox-store.ts+++ b/js/app/packages/app/component/interactive-onboarding/sandbox/sandbox-store.ts@@ -253,7 +253,7 @@ function matchesFilter(}}-export function sandboxEntities() {+function sandboxEntities() {return entities();}@@ -267,7 +267,7 @@ export function addSandboxEntity(entity: EntityData) {setEntities((prev) => [entity, ...prev]);}-export function removeSandboxEntity(id: string) {+function _removeSandboxEntity(id: string) {setEntities((prev) => prev.filter((e) => e.id !== id));}diff --git a/js/app/packages/app/component/interactive-onboarding/use-onboarding-checkout.ts b/js/app/packages/app/component/interactive-onboarding/use-onboarding-checkout.tsindex 66ff3d10c6..3ab15ea2c7 100644--- a/js/app/packages/app/component/interactive-onboarding/use-onboarding-checkout.ts+++ b/js/app/packages/app/component/interactive-onboarding/use-onboarding-checkout.ts@@ -5,16 +5,16 @@ import { useMutation } from '@tanstack/solid-query';const PENDING_TEAM_KEY = 'onboarding_pending_team';-export interface PendingTeamInfo {+interface PendingTeamInfo {name: string;members: Array<{ email: string; tier: PaidPlanTier }>;}-export interface OnboardingCheckoutArgs {+interface OnboardingCheckoutArgs {tier: PaidPlanTier;}-export interface OnboardingCheckoutResult {+interface OnboardingCheckoutResult {checkoutUrl: string;}diff --git a/js/app/packages/app/component/macro-mcp-setup-modal/MacroMcpSetupModal.tsx b/js/app/packages/app/component/macro-mcp-setup-modal/MacroMcpSetupModal.tsxindex 9df3ffe13a..870d3fc443 100644--- a/js/app/packages/app/component/macro-mcp-setup-modal/MacroMcpSetupModal.tsx+++ b/js/app/packages/app/component/macro-mcp-setup-modal/MacroMcpSetupModal.tsx@@ -14,7 +14,7 @@ export const openMacroMcpSetupModal = () => {setMacroMcpSetupOpen(true);};-export const closeMacroMcpSetupModal = () => {+const _closeMacroMcpSetupModal = () => {setMacroMcpSetupOpen(false);};diff --git a/js/app/packages/app/component/mobile/MobileSearch.tsx b/js/app/packages/app/component/mobile/MobileSearch.tsxindex 534d48499c..9fa4e27179 100644--- a/js/app/packages/app/component/mobile/MobileSearch.tsx+++ b/js/app/packages/app/component/mobile/MobileSearch.tsx@@ -68,7 +68,7 @@ export function MobileSearchOuter() {);}-export function MobileSearchInner() {+function MobileSearchInner() {const { openWithSplit } = useSplitLayout();const query = debouncedDependent(SearchState.query, 60);diff --git a/js/app/packages/app/component/mobile/mobileSearchState.ts b/js/app/packages/app/component/mobile/mobileSearchState.tsindex 94d5f56da9..f4027d34c9 100644--- a/js/app/packages/app/component/mobile/mobileSearchState.ts+++ b/js/app/packages/app/component/mobile/mobileSearchState.ts@@ -6,7 +6,7 @@ import type { CategoryFilter } from '../command/types';/** timestamp threshold for resetting state after menu close */const STATE_RESET_THRESHOLD_MS = 2_000;-export interface ICommandState {+interface ICommandState {/** visibility */isOpen: Accessor<boolean>;setIsOpen: Setter<boolean>;diff --git a/js/app/packages/app/component/next-soup/create-sort-state.ts b/js/app/packages/app/component/next-soup/create-sort-state.tsindex 1b047647e6..2de37e7aaf 100644--- a/js/app/packages/app/component/next-soup/create-sort-state.ts+++ b/js/app/packages/app/component/next-soup/create-sort-state.ts@@ -9,7 +9,7 @@ export type SortConfig<T, TId extends string = string> = {};/** Sort state return type with strongly typed IDs */-export type SortState<T, TId extends string = string> = {+type SortState<T, TId extends string = string> = {/** Currently active sort configs (ordered by priority) */active: Accessor<SortConfig<T, TId>[]>;isActive: (id: TId) => boolean;diff --git a/js/app/packages/app/component/next-soup/create-soup-state.ts b/js/app/packages/app/component/next-soup/create-soup-state.tsindex 2e79ff7424..702b872d5a 100644--- a/js/app/packages/app/component/next-soup/create-soup-state.ts+++ b/js/app/packages/app/component/next-soup/create-soup-state.ts@@ -45,19 +45,7 @@ export type SoupRow = {isSelected: () => boolean;};-export type NavigationResult = { row: SoupRow; index: number } | undefined;--export type GroupConfig<T> = {- id: string;- label: string;- getValue: (item: T) => unknown;- getLabel?: (value: unknown) => string;- renderHeader?: (props: {- value: unknown;- label: string;- count: number;- }) => JSX.Element;-};+type NavigationResult = { row: SoupRow; index: number } | undefined;export type SortConfig<T> = {id: string;diff --git a/js/app/packages/app/component/next-soup/filters/configs/base.ts b/js/app/packages/app/component/next-soup/filters/configs/base.tsindex 4ba53827cf..2913f02f22 100644--- a/js/app/packages/app/component/next-soup/filters/configs/base.ts+++ b/js/app/packages/app/component/next-soup/filters/configs/base.ts@@ -36,8 +36,8 @@ export const isAgent = { exclude: { chatId: [NIL_UUID] } };export const isTask = { include: { subType: ['task'] } };export const isNotTask = { exclude: { subType: ['task'] } };export const isEmailAttachment = { include: { isEmailAttachment: true } };-export const isChannel = { exclude: { channelId: [NIL_UUID] } };-export const isFolder = { exclude: { folderId: [NIL_UUID] } };+const _isChannel = { exclude: { channelId: [NIL_UUID] } };+const _isFolder = { exclude: { folderId: [NIL_UUID] } };export type FilterContext = {userId?: string;@@ -47,10 +47,10 @@ export type FilterContext = {export type Predicate = (entity: EntityData, ctx: FilterContext) => boolean;-export type QueryInput = Query;-export type QueryFn = (ctx: FilterContext) => QueryInput;+type QueryInput = Query;+type QueryFn = (ctx: FilterContext) => QueryInput;-export type FilterDefinition<TId extends string = string> = {+type FilterDefinition<TId extends string = string> = {id: TId;group?: string;predicate: Predicate;diff --git a/js/app/packages/app/component/next-soup/filters/configs/document.ts b/js/app/packages/app/component/next-soup/filters/configs/document.tsindex db4c15446b..b00a703e52 100644--- a/js/app/packages/app/component/next-soup/filters/configs/document.ts+++ b/js/app/packages/app/component/next-soup/filters/configs/document.ts@@ -7,13 +7,13 @@ import {VIDEO_EXTENSIONS,} from './base';-export const docMarkdownFilter = config({+const docMarkdownFilter = config({id: 'doc-markdown',predicate: (e) => isDocumentEntity(e) && e.fileType === 'md',query: { include: { fileAssoc: ['assoc:md'] } },});-export const docCanvasFilter = config({+const docCanvasFilter = config({id: 'doc-canvas',predicate: (e) => isDocumentEntity(e) && e.fileType === 'canvas',query: { include: { fileAssoc: ['assoc:canvas'] } },@@ -35,7 +35,7 @@ export const DOCUMENT_CONTEXTUAL_FILTERS = [emailAttachmentsFilter,] as const;-export const fileCodeFilter = config({+const fileCodeFilter = config({id: 'file-code',predicate: (e) => {if (e.type !== 'document') return false;@@ -44,7 +44,7 @@ export const fileCodeFilter = config({query: { include: { fileAssoc: ['assoc:code'] } },});-export const fileImageFilter = config({+const fileImageFilter = config({id: 'file-image',predicate: (e) => {if (e.type !== 'document') return false;@@ -53,19 +53,19 @@ export const fileImageFilter = config({query: { include: { fileAssoc: ['assoc:image'] } },});-export const filePdfFilter = config({+const filePdfFilter = config({id: 'file-pdf',predicate: (e) => e.type === 'document' && e.fileType === 'pdf',query: { include: { fileAssoc: ['assoc:pdf'] } },});-export const fileDocxFilter = config({+const fileDocxFilter = config({id: 'file-docx',predicate: (e) => e.type === 'document' && e.fileType === 'docx',query: { include: { fileAssoc: ['assoc:document'] } },});-export const fileVideoFilter = config({+const fileVideoFilter = config({id: 'file-video',predicate: (e) => {if (e.type !== 'document') return false;@@ -74,7 +74,7 @@ export const fileVideoFilter = config({query: { include: { fileAssoc: ['assoc:video'] } },});-export const fileOtherFilter = config({+const fileOtherFilter = config({id: 'file-other',predicate: (e) => {if (e.type !== 'document') return false;diff --git a/js/app/packages/app/component/next-soup/filters/configs/entity-type.ts b/js/app/packages/app/component/next-soup/filters/configs/entity-type.tsindex d0cd377b3e..cd6353a374 100644--- a/js/app/packages/app/component/next-soup/filters/configs/entity-type.ts+++ b/js/app/packages/app/component/next-soup/filters/configs/entity-type.ts@@ -10,7 +10,7 @@ import {} from '../predicates';import { config, isAgent, isEmail, isTask } from './base';-export const documentFilter = config({+const documentFilter = config({id: 'document',group: 'entity-type',predicate: documentPredicate,@@ -20,49 +20,49 @@ export const documentFilter = config({},});-export const agentFilter = config({+const agentFilter = config({id: 'agent',group: 'entity-type',predicate: agentPredicate,query: isAgent,});-export const automationFilter = config({+const automationFilter = config({id: 'automation',group: 'entity-type',predicate: automationPredicate,query: {}, // No server query - automations are merged client-side via additionalEntities});-export const peopleFilter = config({+const peopleFilter = config({id: 'people',group: 'entity-type',predicate: peoplePredicate,query: { include: { channelType: ['direct_message'] } },});-export const teamsFilter = config({+const teamsFilter = config({id: 'teams',group: 'entity-type',predicate: teamsPredicate,query: { exclude: { channelType: ['direct_message'] } },});-export const taskFilter = config({+const taskFilter = config({id: 'task',group: 'entity-type',predicate: taskPredicate,query: isTask,});-export const emailFilter = config({+const emailFilter = config({id: 'email',group: 'entity-type',predicate: emailPredicate,query: isEmail,});-export const fileFilter = config({+const fileFilter = config({id: 'file',group: 'entity-type',predicate: filePredicate,diff --git a/js/app/packages/app/component/next-soup/filters/configs/index.ts b/js/app/packages/app/component/next-soup/filters/configs/index.tsindex d861d9ff2e..57ea30cf7b 100644--- a/js/app/packages/app/component/next-soup/filters/configs/index.ts+++ b/js/app/packages/app/component/next-soup/filters/configs/index.ts@@ -4,10 +4,9 @@ export * from './document';export * from './email';export * from './entity';export * from './entity-type';-export { ENTITY_TYPE_FILTERS } from './entity-type';+export * from './general';export * from './task';-export { TASK_PRIORITY_FILTERS, TASK_STATUS_FILTERS } from './task';import type { FilterGroupConfig } from './base';import {@@ -90,7 +89,7 @@ export const SOUP_FILTERS = [...FILE_TYPE_FILTERS,] as const;-export const SOUP_FILTER_GROUPS: FilterGroupConfig[] = [+const _SOUP_FILTER_GROUPS: FilterGroupConfig[] = [{ id: 'focus', allowMultiple: false },{ id: 'entity-type', allowMultiple: true },];diff --git a/js/app/packages/app/component/next-soup/filters/configs/task.ts b/js/app/packages/app/component/next-soup/filters/configs/task.tsindex d0cda7e446..8c276fa8de 100644--- a/js/app/packages/app/component/next-soup/filters/configs/task.ts+++ b/js/app/packages/app/component/next-soup/filters/configs/task.ts@@ -62,31 +62,31 @@ const priorityFilter = <TId extends string>(},});-export const taskNotStartedFilter = statusFilter(+const taskNotStartedFilter = statusFilter('task-not-started',PROPERTY_OPTION_IDS.STATUS.NOT_STARTED,isNotStarted);-export const taskInProgressFilter = statusFilter(+const taskInProgressFilter = statusFilter('task-in-progress',PROPERTY_OPTION_IDS.STATUS.IN_PROGRESS,isInProgress);-export const taskInReviewFilter = statusFilter(+const taskInReviewFilter = statusFilter('task-in-review',PROPERTY_OPTION_IDS.STATUS.IN_REVIEW,isInReview);-export const taskCompletedFilter = statusFilter(+const taskCompletedFilter = statusFilter('task-completed',PROPERTY_OPTION_IDS.STATUS.COMPLETED,isCompleted);-export const taskCanceledFilter = statusFilter(+const taskCanceledFilter = statusFilter('task-canceled',PROPERTY_OPTION_IDS.STATUS.CANCELED,isCanceled@@ -122,31 +122,31 @@ export const TASK_STATUS_FILTERS = [taskCanceledFilter,] as const;-export const taskCriticalFilter = priorityFilter(+const taskCriticalFilter = priorityFilter('task-critical',PROPERTY_OPTION_IDS.PRIORITY.URGENT,isUrgentPriority);-export const taskHighPriorityFilter = priorityFilter(+const taskHighPriorityFilter = priorityFilter('task-high-priority',PROPERTY_OPTION_IDS.PRIORITY.HIGH,isHighPriority);-export const taskMediumPriorityFilter = priorityFilter(+const taskMediumPriorityFilter = priorityFilter('task-medium-priority',PROPERTY_OPTION_IDS.PRIORITY.MEDIUM,isMediumPriority);-export const taskLowPriorityFilter = priorityFilter(+const taskLowPriorityFilter = priorityFilter('task-low-priority',PROPERTY_OPTION_IDS.PRIORITY.LOW,isLowPriority);-export const taskNoPriorityFilter = config({+const taskNoPriorityFilter = config({id: 'task-no-priority',predicate: hasNoPriority,query: {diff --git a/js/app/packages/app/component/next-soup/filters/filter-store/index.ts b/js/app/packages/app/component/next-soup/filters/filter-store/index.tsindex 38c366a88e..b468267f4b 100644--- a/js/app/packages/app/component/next-soup/filters/filter-store/index.ts+++ b/js/app/packages/app/component/next-soup/filters/filter-store/index.ts@@ -1,6 +1,5 @@export { defineQueryFilters } from './compile';export type {- DateRangeFilter,PropertyFilter,Query,QueryState,diff --git a/js/app/packages/app/component/next-soup/filters/filter-store/predicates-store.ts b/js/app/packages/app/component/next-soup/filters/filter-store/predicates-store.tsindex 535d78687b..17ba490918 100644--- a/js/app/packages/app/component/next-soup/filters/filter-store/predicates-store.ts+++ b/js/app/packages/app/component/next-soup/filters/filter-store/predicates-store.ts@@ -15,16 +15,16 @@ export type SetPredicatesInput<TId extends string> = {or?: readonly IdInput<TId>[];};-export type CurrentPredicatesState<TId extends string> = {+type CurrentPredicatesState<TId extends string> = {andIds: TId[];orIds: TId[];};-export type SetPredicatesCallback<TId extends string> = (+type SetPredicatesCallback<TId extends string> = (current: CurrentPredicatesState<TId>) => SetPredicatesInput<TId>;-export type PredicatesStoreOptions<+type PredicatesStoreOptions<T,TConfig extends PredicateConfig<T>,TId extends string = TConfig['id'],diff --git a/js/app/packages/app/component/next-soup/filters/filter-store/query-store.ts b/js/app/packages/app/component/next-soup/filters/filter-store/query-store.tsindex 2ea8aaa3c0..6baaea3719 100644--- a/js/app/packages/app/component/next-soup/filters/filter-store/query-store.ts+++ b/js/app/packages/app/component/next-soup/filters/filter-store/query-store.ts@@ -4,10 +4,9 @@ import { compileToAst, type TargetAstMap } from './compile';import { addFieldValues, removeFieldValues } from './field-values';import type { FieldFilters, Query, QueryState } from './types';-export type { TargetAstMap } from './compile';-export type { EmailView, FieldFilters, Query, QueryState } from './types';+export type { Query } from './types';-export type QueryStoreOptions = {+type QueryStoreOptions = {readonly initial?: Query;};diff --git a/js/app/packages/app/component/next-soup/filters/filter-store/types.ts b/js/app/packages/app/component/next-soup/filters/filter-store/types.tsindex 3324fd10f2..1161ebcffa 100644--- a/js/app/packages/app/component/next-soup/filters/filter-store/types.ts+++ b/js/app/packages/app/component/next-soup/filters/filter-store/types.ts@@ -78,31 +78,3 @@ export type Query = {exclude?: FieldFilters;emailView?: EmailView;};--export type FilterPredicate<T> = (entity: T, ctx?: unknown) => boolean;--export type FilterConfig<T, TId extends string = string> = {- readonly id: TId;- readonly predicate: FilterPredicate<T>;- readonly query?: Query | ((ctx: unknown) => Query);-};--export type FilterStoreOptions<- T,- TFilter extends FilterConfig<T>,- TId extends string = TFilter['id'],-> = {- readonly filters: readonly TFilter[];- readonly initialFilters?: {- readonly and?: readonly TId[];- readonly or?: readonly TId[];- };- readonly initialQuery?: Query;-};--export type FilterIdInput<TId extends string> = TId | (string & {});--export type SetFiltersInput<TId extends string> = {- readonly and?: readonly FilterIdInput<TId>[];- readonly or?: readonly FilterIdInput<TId>[];-};diff --git a/js/app/packages/app/component/next-soup/filters/index.ts b/js/app/packages/app/component/next-soup/filters/index.tsindex 60d465cb52..1437b65d95 100644--- a/js/app/packages/app/component/next-soup/filters/index.ts+++ b/js/app/packages/app/component/next-soup/filters/index.ts@@ -1,18 +1,6 @@export {- assignedToMeFilter,- assigneeFilter,- ENTITY_TYPE_FILTERS,type FilterContext,- type FilterDefinition,type FilterID,NO_ASSIGNEE,- SOUP_FILTER_GROUPS,- SOUP_FILTERS,- TASK_PRIORITY_FILTERS,- TASK_STATUS_FILTERS,} from './configs/index';-export {- explicitNoiseFilter,- noiseFilter,- signalFilter,-} from './inbox-filters';+export {} from './inbox-filters';diff --git a/js/app/packages/app/component/next-soup/filters/predicates.ts b/js/app/packages/app/component/next-soup/filters/predicates.tsindex b74e4de28d..4e34a6249b 100644--- a/js/app/packages/app/component/next-soup/filters/predicates.ts+++ b/js/app/packages/app/component/next-soup/filters/predicates.ts@@ -201,7 +201,7 @@ export function sharedEntity(getUserID: () => string | undefined) {};}-export function ownedAgentFilter(getUserID: () => string | undefined) {+function _ownedAgentFilter(getUserID: () => string | undefined) {return function (entity: EntityData): boolean {if (entity.type !== 'chat') return false;const userID = getUserID();@@ -211,7 +211,7 @@ export function ownedAgentFilter(getUserID: () => string | undefined) {};}-export function sharedAgentFilter(getUserID: () => string | undefined) {+function _sharedAgentFilter(getUserID: () => string | undefined) {return function (entity: EntityData): boolean {if (entity.type !== 'chat') return false;const userID = getUserID();@@ -231,12 +231,12 @@ export function taskAssignedToUserFilter(getUserID: () => string | undefined) {};}-export function hasAssignees(entity: EntityData): boolean {+function _hasAssignees(entity: EntityData): boolean {if (!isTaskEntity(entity)) return false;return getTaskAssigneeIds(entity).length > 0;}-export function isAssignedTo(entity: EntityData, userId: string): boolean {+function _isAssignedTo(entity: EntityData, userId: string): boolean {if (!isTaskEntity(entity)) return false;const assigneeIds = getTaskAssigneeIds(entity);@@ -245,12 +245,12 @@ export function isAssignedTo(entity: EntityData, userId: string): boolean {return assigneeIds.includes(userId);}-export function isUnassigned(entity: EntityData): boolean {+function _isUnassigned(entity: EntityData): boolean {if (!isTaskEntity(entity)) return false;return getTaskAssigneeIds(entity).length === 0;}-export function hasStatus(entity: EntityData, statusOptionId: string): boolean {+function hasStatus(entity: EntityData, statusOptionId: string): boolean {if (!isTaskEntity(entity)) return false;return getTaskStatusOptionId(entity) === statusOptionId;}@@ -278,7 +278,7 @@ export function isCanceled(entity: EntityData): boolean {return hasStatus(entity, PROPERTY_OPTION_IDS.STATUS.CANCELED);}-export function isClosed(entity: EntityData): boolean {+function isClosed(entity: EntityData): boolean {return isCompleted(entity) || isCanceled(entity);}@@ -287,10 +287,7 @@ export function isOpen(entity: EntityData): boolean {return !isClosed(entity);}-export function hasPriority(- entity: EntityData,- priorityOptionId: string-): boolean {+function hasPriority(entity: EntityData, priorityOptionId: string): boolean {if (!isTaskEntity(entity)) return false;return getTaskPriorityOptionId(entity) === priorityOptionId;diff --git a/js/app/packages/app/component/next-soup/filters/query-filters.ts b/js/app/packages/app/component/next-soup/filters/query-filters.tsindex 335a69d17d..93107fb311 100644--- a/js/app/packages/app/component/next-soup/filters/query-filters.ts+++ b/js/app/packages/app/component/next-soup/filters/query-filters.ts@@ -2,9 +2,9 @@ import type { SoupBody, SoupItemsQueryFilters } from '@queries/soup/items';import type { SoupApiItem } from '@service-storage/generated/schemas';import { match } from 'ts-pattern';-export const NIL_UUID = '00000000-0000-0000-0000-000000000000';+const NIL_UUID = '00000000-0000-0000-0000-000000000000';-export const EXCLUDE: string[] = [NIL_UUID];+const EXCLUDE: string[] = [NIL_UUID];// Base filter that excludes all entity types by defaultexport const QUERY_FILTERS_BASE: SoupItemsQueryFilters = {diff --git a/js/app/packages/app/component/next-soup/search-utils.ts b/js/app/packages/app/component/next-soup/search-utils.tsindex 6793bdec68..df5e615e75 100644--- a/js/app/packages/app/component/next-soup/search-utils.ts+++ b/js/app/packages/app/component/next-soup/search-utils.ts@@ -5,9 +5,7 @@ import type { EntityData, WithSearch } from '@entity';import type { PredicateConfig } from './filters/filter-store/predicates-store';import type { SearchPoolItem } from './search-context';-export const getValidSearchFilters = <T>(- filters: readonly PredicateConfig<T>[]-) => {+const _getValidSearchFilters = <T>(filters: readonly PredicateConfig<T>[]) => {return filters.filter((f) => f.id !== 'explicit-noise');};diff --git a/js/app/packages/app/component/next-soup/selection-state.ts b/js/app/packages/app/component/next-soup/selection-state.tsindex abc0c28d6e..18d5dba3e5 100644--- a/js/app/packages/app/component/next-soup/selection-state.ts+++ b/js/app/packages/app/component/next-soup/selection-state.ts@@ -1,6 +1,6 @@import { type Accessor, createMemo, createSignal } from 'solid-js';-export type CreateSelectionOptions<T> = {+type CreateSelectionOptions<T> = {/** Function to extract ID from item */getItemId: (item: T) => string;/** Initial selected items */@@ -8,7 +8,7 @@ export type CreateSelectionOptions<T> = {onChange?: (selected: T[]) => void;};-export type SelectionState<T> = {+type SelectionState<T> = {readonly selected: Accessor<T[]>;readonly selectedIds: Accessor<Set<string>>;/** Number of selected items */diff --git a/js/app/packages/app/component/next-soup/soup-view/create-search-state.ts b/js/app/packages/app/component/next-soup/soup-view/create-search-state.tsindex af6048b674..4d78802578 100644--- a/js/app/packages/app/component/next-soup/soup-view/create-search-state.ts+++ b/js/app/packages/app/component/next-soup/soup-view/create-search-state.ts@@ -297,5 +297,3 @@ export const createSearchState = ({isLocalSearchSettling,};};--export type SearchState = ReturnType<typeof createSearchState>;diff --git a/js/app/packages/app/component/next-soup/soup-view/create-soup-entity-actions.ts b/js/app/packages/app/component/next-soup/soup-view/create-soup-entity-actions.tsindex 9865b3d3b1..33057745a8 100644--- a/js/app/packages/app/component/next-soup/soup-view/create-soup-entity-actions.ts+++ b/js/app/packages/app/component/next-soup/soup-view/create-soup-entity-actions.ts@@ -31,14 +31,14 @@ const SIGNAL_TABS = new Set<string | undefined>([]);const NOISE_TABS = new Set(['noise']);-export type SoupEntityActionItem = {+type SoupEntityActionItem = {id: string;label: string;onClick: () => void | Promise<void>;destructive?: boolean;};-export type SoupEntityActionGroup = {+type SoupEntityActionGroup = {items: SoupEntityActionItem[];};diff --git a/js/app/packages/app/component/next-soup/soup-view/empty-states.tsx b/js/app/packages/app/component/next-soup/soup-view/empty-states.tsxindex a67704e502..330aa002ed 100644--- a/js/app/packages/app/component/next-soup/soup-view/empty-states.tsx+++ b/js/app/packages/app/component/next-soup/soup-view/empty-states.tsx@@ -104,7 +104,7 @@ export function EmptyState(props: {);}-export interface EmptyStateInnerProps {+interface EmptyStateInnerProps {message?: string;showDropZone?: boolean;cta?: {@@ -113,7 +113,7 @@ export interface EmptyStateInnerProps {};}-export function EmptyStateInner(props: EmptyStateInnerProps) {+function EmptyStateInner(props: EmptyStateInnerProps) {const blockName = useMaybeBlockName();const blockId = useMaybeBlockId();const projectId = createMemo(() => {diff --git a/js/app/packages/app/component/next-soup/soup-view/filters-bar/group-dropdown.tsx b/js/app/packages/app/component/next-soup/soup-view/filters-bar/group-dropdown.tsxindex 0a293b6b2e..d8b0a992a3 100644--- a/js/app/packages/app/component/next-soup/soup-view/filters-bar/group-dropdown.tsx+++ b/js/app/packages/app/component/next-soup/soup-view/filters-bar/group-dropdown.tsx@@ -7,7 +7,7 @@ import StackSimpleIcon from '@phosphor/stack-simple.svg';import { Dropdown, Layer, Tooltip } from '@ui';import { type Component, For, Show } from 'solid-js';-export interface GroupDropdownProps {+interface GroupDropdownProps {value: () => GroupOptionId;onChange: (value: GroupOptionId) => void;options: GroupOption[];diff --git a/js/app/packages/app/component/next-soup/soup-view/filters-bar/parse-search-operators.ts b/js/app/packages/app/component/next-soup/soup-view/filters-bar/parse-search-operators.tsdeleted file mode 100644index 40b19f3226..0000000000--- a/js/app/packages/app/component/next-soup/soup-view/filters-bar/parse-search-operators.ts+++ /dev/null@@ -1,34 +0,0 @@-export type OperatorType = 'index' | 'in' | 'from';--export type ActiveOperator = {- type: OperatorType;- partial: string;- startIndex: number;- endIndex: number;-};--export function detectActiveOperator(- text: string,- cursorPosition: number-): ActiveOperator | null {- const before = text.slice(0, cursorPosition);- const match = before.match(/(^|\s)(index|in|from):(\S*)$/);- if (!match) return null;-- const type = match[2] as OperatorType;- const partial = match[3];- const startIndex = match.index! + match[1].length;- const endIndex = cursorPosition;-- return { type, partial, startIndex, endIndex };-}--export function stripOperatorAtRange(- text: string,- startIndex: number,- endIndex: number-): string {- const before = text.slice(0, startIndex);- const after = text.slice(endIndex);- return (before + after).replace(/\s{2,}/g, ' ').trim();-}diff --git a/js/app/packages/app/component/next-soup/soup-view/filters-bar/search-filter-controls.tsx b/js/app/packages/app/component/next-soup/soup-view/filters-bar/search-filter-controls.tsxindex e94b47859d..cc9ace2028 100644--- a/js/app/packages/app/component/next-soup/soup-view/filters-bar/search-filter-controls.tsx+++ b/js/app/packages/app/component/next-soup/soup-view/filters-bar/search-filter-controls.tsx@@ -122,20 +122,15 @@ export function useSearchFilterOptions() {};}-export type ChannelSubFilters = Pick<- ChannelFilters,- 'channel_ids' | 'sender_ids'->;-export type EmailSubFilters = Pick<EmailFilters, 'importance'>;-export type CallSubFilters = {+type ChannelSubFilters = Pick<ChannelFilters, 'channel_ids' | 'sender_ids'>;+type EmailSubFilters = Pick<EmailFilters, 'importance'>;+type CallSubFilters = {channel_ids?: string[];speaker_ids?: string[];attended?: boolean | null;};-export function getCachedChannelSubFilters(- contentId: string-): ChannelSubFilters {+function getCachedChannelSubFilters(contentId: string): ChannelSubFilters {if ((activeSoupViewCounts.get(contentId) ?? 0) > 1) return {};try {const raw = localStorage.getItem(@@ -162,7 +157,7 @@ export function cacheChannelSubFilters(}}-export function getCachedEmailSubFilters(contentId: string): EmailSubFilters {+function getCachedEmailSubFilters(contentId: string): EmailSubFilters {if ((activeSoupViewCounts.get(contentId) ?? 0) > 1) return {};try {const raw = localStorage.getItem(@@ -189,7 +184,7 @@ export function cacheEmailSubFilters(}}-export function getCachedCallSubFilters(contentId: string): CallSubFilters {+function getCachedCallSubFilters(contentId: string): CallSubFilters {if ((activeSoupViewCounts.get(contentId) ?? 0) > 1) return {};try {const raw = localStorage.getItem(diff --git a/js/app/packages/app/component/next-soup/soup-view/filters-bar/search-operator-autocomplete.tsx b/js/app/packages/app/component/next-soup/soup-view/filters-bar/search-operator-autocomplete.tsxdeleted file mode 100644index 474cca88c0..0000000000--- a/js/app/packages/app/component/next-soup/soup-view/filters-bar/search-operator-autocomplete.tsx+++ /dev/null@@ -1,135 +0,0 @@-import { EntityIcon } from '@core/component/EntityIcon';-import { UserIcon } from '@core/component/UserIcon';-import { useQuickAccess } from '@core/context/quickAccess';-import { useUserId } from '@core/context/user';-import { cn } from '@ui';-import { createMemo, For, type JSX, Show } from 'solid-js';-import type { ActiveOperator, OperatorType } from './parse-search-operators';-import { INDEX_OPTIONS as INDEX_OPTIONS_SOURCE } from './search-filter-controls';--export type AutocompleteOption = {- id: string;- label: string;- icon?: () => JSX.Element;-};--export const INDEX_OPTIONS: AutocompleteOption[] = INDEX_OPTIONS_SOURCE.map(- (o) => ({ id: o.value, label: o.label, icon: o.icon })-);--interface SearchOperatorAutocompleteProps {- activeOperator: ActiveOperator;- onSelect: (type: OperatorType, option: AutocompleteOption) => void;- onDismiss: () => void;- highlightedIndex: () => number;- setHighlightedIndex: (index: number) => void;-}--export const SearchOperatorAutocomplete = (- props: SearchOperatorAutocompleteProps-) => {- const { useList } = useQuickAccess();- const channels = useList('channel', 'dm');- const contacts = useList('person');- const userId = useUserId();-- const channelOptions = createMemo((): AutocompleteOption[] =>- channels()- .filter((ch) => ch.data.name)- .map((ch) => ({- id: ch.id,- label: ch.data.name,- icon: () => (- <EntityIcon targetType={ch.data.channelType || 'channel'} size="xs" />- ),- }))- );-- const contactOptions = createMemo((): AutocompleteOption[] => {- const currentUserId = userId();- let me: AutocompleteOption | undefined;- const others: AutocompleteOption[] = [];- for (const c of contacts()) {- const opt: AutocompleteOption = {- id: c.id,- label:- c.id === currentUserId- ? `${c.data.name || 'Me'} (me)`- : c.data.name || c.id,- icon: () => (- <UserIcon id={c.id} size="sm" suppressClick showTooltip={false} />- ),- };- if (c.id === currentUserId) {- me = opt;- } else {- others.push(opt);- }- }- return [...(me ? [me] : []), ...others];- });-- const baseOptions = createMemo((): AutocompleteOption[] => {- switch (props.activeOperator.type) {- case 'index':- return INDEX_OPTIONS;- case 'in':- return channelOptions();- case 'from':- return contactOptions();- }- });-- const filteredOptions = createMemo((): AutocompleteOption[] => {- const partial = props.activeOperator.partial.toLowerCase();- if (!partial) return baseOptions();- return baseOptions().filter((opt) =>- opt.label.toLowerCase().includes(partial)- );- });-- return (- <Show when={filteredOptions().length > 0}>- <div- data-operator-dropdown- class="absolute left-0 top-full mt-1 z-action-menu bg-surface ring-1 ring-edge-muted rounded-sm shadow-md min-w-50 max-w-[320px] max-h-60 overflow-y-auto p-1"- onMouseDown={(e) => e.preventDefault()}- >- <div class="px-2 py-1 text-xxs text-ink-faint uppercase tracking-wider">- {props.activeOperator.type === 'index' && 'Filter by type'}- {props.activeOperator.type === 'in' && 'Filter by channel'}- {props.activeOperator.type === 'from' && 'Filter by sender'}- </div>- <For each={filteredOptions()}>- {(option, index) => {- const highlighted = () => props.highlightedIndex() === index();- return (- <button- type="button"- class={cn(- 'w-full flex items-center gap-2.5 px-3 py-1.5 rounded-xs text-left text-xs transition-colors',- highlighted() ? 'bg-hover' : 'hover:bg-hover'- )}- onClick={() =>- props.onSelect(props.activeOperator.type, option)- }- onMouseEnter={() => props.setHighlightedIndex(index())}- >- <Show when={option.icon}>- {(icon) => (- <span class="size-4 flex items-center justify-center shrink-0">- {icon()()}- </span>- )}- </Show>- <span class="flex-1 truncate text-ink-muted">- {option.label}- </span>- </button>- );- }}- </For>- </div>- </Show>- );-};diff --git a/js/app/packages/app/component/next-soup/soup-view/filters-bar/searchable-multi-select.tsx b/js/app/packages/app/component/next-soup/soup-view/filters-bar/searchable-multi-select.tsxindex 8af0a88b34..8a0766508d 100644--- a/js/app/packages/app/component/next-soup/soup-view/filters-bar/searchable-multi-select.tsx+++ b/js/app/packages/app/component/next-soup/soup-view/filters-bar/searchable-multi-select.tsx@@ -17,7 +17,7 @@ import type { SearchableOption } from './search-filter-controls';const ITEM_HEIGHT = 36;const LISTBOX_CLASS = 'max-h-[240px] overflow-y-auto scrollbar-hidden';-export type SearchableMultiSelectProps = {+type SearchableMultiSelectProps = {options: Accessor<SearchableOption[]>;activeIds: Accessor<string[]>;onChange: (ids: string[]) => void;@@ -212,7 +212,7 @@ export const SearchableMultiSelect = (props: SearchableMultiSelectProps) => {);};-export type SearchableMultiSelectInlineProps = {+type SearchableMultiSelectInlineProps = {options: Accessor<SearchableOption[]>;activeIds: Accessor<string[]>;onChange: (ids: string[]) => void;diff --git a/js/app/packages/app/component/next-soup/soup-view/filters-bar/sort-dropdown.tsx b/js/app/packages/app/component/next-soup/soup-view/filters-bar/sort-dropdown.tsxindex f8801c70b2..2d87b78d4f 100644--- a/js/app/packages/app/component/next-soup/soup-view/filters-bar/sort-dropdown.tsx+++ b/js/app/packages/app/component/next-soup/soup-view/filters-bar/sort-dropdown.tsx@@ -8,7 +8,7 @@ import SortIcon from '@phosphor-icons/core/regular/funnel-simple.svg?component-simport { Dropdown, Layer, Tooltip } from '@ui';import { type Component, For, Show } from 'solid-js';-export interface SortDropdownProps {+interface SortDropdownProps {/** Current sort value */value: () => SystemSortOption;/** Handler for sort change */diff --git a/js/app/packages/app/component/next-soup/soup-view/filters-bar/unified-filter-dropdown.tsx b/js/app/packages/app/component/next-soup/soup-view/filters-bar/unified-filter-dropdown.tsxindex 70046f2a7b..b4bdfea3d8 100644--- a/js/app/packages/app/component/next-soup/soup-view/filters-bar/unified-filter-dropdown.tsx+++ b/js/app/packages/app/component/next-soup/soup-view/filters-bar/unified-filter-dropdown.tsx@@ -73,7 +73,7 @@ export type FilterOption = {icon?: () => JSX.Element;};-export type FilterCategory = {+type FilterCategory = {id: string;label: string;options: FilterOption[];diff --git a/js/app/packages/app/component/next-soup/soup-view/group-options.ts b/js/app/packages/app/component/next-soup/soup-view/group-options.tsindex 6273cd5506..4fd8d91fa6 100644--- a/js/app/packages/app/component/next-soup/soup-view/group-options.ts+++ b/js/app/packages/app/component/next-soup/soup-view/group-options.ts@@ -12,14 +12,14 @@ export interface GroupOption {label: string;}-export const GROUP_OPTIONS: GroupOption[] = [+const _GROUP_OPTIONS: GroupOption[] = [{ value: 'none', label: 'None' },{ value: 'date', label: 'Date' },{ value: 'entity_type', label: 'Type' },{ value: 'project', label: 'Project' },];-export const DEFAULT_GROUP_OPTIONS: GroupOption[] = [+const _DEFAULT_GROUP_OPTIONS: GroupOption[] = [{ value: 'none', label: 'None' },{ value: 'entity_type', label: 'Type' },{ value: 'project', label: 'Project' },@@ -34,13 +34,13 @@ export const TASK_GROUP_OPTIONS: GroupOption[] = [{ value: 'date', label: 'Date' },];-export const EMAIL_GROUP_OPTIONS: GroupOption[] = [+const _EMAIL_GROUP_OPTIONS: GroupOption[] = [{ value: 'none', label: 'None' },{ value: 'date', label: 'Date' },{ value: 'project', label: 'Project' },];-export const INBOX_GROUP_OPTIONS: GroupOption[] = [+const _INBOX_GROUP_OPTIONS: GroupOption[] = [{ value: 'none', label: 'None' },{ value: 'date', label: 'Date' },{ value: 'entity_type', label: 'Type' },diff --git a/js/app/packages/app/component/next-soup/soup-view/search-controllers.ts b/js/app/packages/app/component/next-soup/soup-view/search-controllers.tsindex 7da988c94f..369b648c3c 100644--- a/js/app/packages/app/component/next-soup/soup-view/search-controllers.ts+++ b/js/app/packages/app/component/next-soup/soup-view/search-controllers.ts@@ -2,13 +2,13 @@ import type { SetPredicatesInput } from '@app/component/next-soup/filters/filterimport type { Query } from '@app/component/next-soup/filters/filter-store/types';import type { SplitId } from '@app/component/split-layout/layoutManager';-export type SearchSplitOverrides = {+type SearchSplitOverrides = {query: string;filters: Query;clientFilters: SetPredicatesInput<string>;};-export type SearchSplitController = {+type SearchSplitController = {applyOverrides: (overrides: SearchSplitOverrides) => void;focus: () => void;};diff --git a/js/app/packages/app/component/next-soup/soup-view/sort-options.tsx b/js/app/packages/app/component/next-soup/soup-view/sort-options.tsxindex a58db6de29..56c21d90dc 100644--- a/js/app/packages/app/component/next-soup/soup-view/sort-options.tsx+++ b/js/app/packages/app/component/next-soup/soup-view/sort-options.tsx@@ -33,10 +33,7 @@ export interface SortOption {icon?: () => JSX.Element;}-export function sortByNotifiedAt<T extends WithNotification<EntityData>>(- a: T,- b: T-) {+function _sortByNotifiedAt<T extends WithNotification<EntityData>>(a: T, b: T) {const aNotification = a.notifications?.()[0];const bNotification = b.notifications?.()[0];@@ -51,15 +48,15 @@ export function sortByNotifiedAt<T extends WithNotification<EntityData>>(return sortByUpdatedAt(a, b);}-export function sortByCreatedAt<T extends EntityData>(a: T, b: T): number {+function sortByCreatedAt<T extends EntityData>(a: T, b: T): number {return compareDateDesc(a.sortTs ?? a.createdAt, b.sortTs ?? b.createdAt);}-export function sortByUpdatedAt<T extends EntityData>(a: T, b: T) {+function sortByUpdatedAt<T extends EntityData>(a: T, b: T) {return compareDateDesc(a.sortTs ?? a.updatedAt, b.sortTs ?? b.updatedAt);}-export function sortByViewedAt<T extends EntityData>(a: T, b: T) {+function sortByViewedAt<T extends EntityData>(a: T, b: T) {return compareDateDesc(a.sortTs ?? a.viewedAt, b.sortTs ?? b.viewedAt);}@@ -103,7 +100,7 @@ const getStatusOrder = (status: string | undefined) => {* Sort tasks by priority (Urgent first, no priority last).* Non-task entities are sorted to the end.*/-export function sortByPriority<T extends EntityData>(a: T, b: T): number {+function sortByPriority<T extends EntityData>(a: T, b: T): number {// Cast to TaskEntityWithProperties - the getter safely handles missing propertiesconst aPriority = getTaskPriorityOptionId(a as TaskEntityWithProperties);const bPriority = getTaskPriorityOptionId(b as TaskEntityWithProperties);@@ -123,7 +120,7 @@ export function sortByPriority<T extends EntityData>(a: T, b: T): number {* Sort tasks by status (Not Started first, Canceled last).* Non-task entities are sorted to the end.*/-export function sortByStatus<T extends EntityData>(a: T, b: T): number {+function sortByStatus<T extends EntityData>(a: T, b: T): number {// Cast to TaskEntityWithProperties - the getter safely handles missing propertiesconst aStatus = getTaskStatusOptionId(a as TaskEntityWithProperties);const bStatus = getTaskStatusOptionId(b as TaskEntityWithProperties);@@ -192,7 +189,7 @@ const SORT_OPTIONS = [type OptionValue = (typeof SORT_OPTIONS)[number]['value'];-export const buildSortOptions = (options: OptionValue[]) => {+const buildSortOptions = (options: OptionValue[]) => {return SORT_OPTIONS.filter((o) => options.includes(o.value));};diff --git a/js/app/packages/app/component/next-soup/soup-view/soup-view-context.tsx b/js/app/packages/app/component/next-soup/soup-view/soup-view-context.tsxindex 84e9eb8ff6..8586d2369c 100644--- a/js/app/packages/app/component/next-soup/soup-view/soup-view-context.tsx+++ b/js/app/packages/app/component/next-soup/soup-view/soup-view-context.tsx@@ -83,7 +83,7 @@ interface SoupViewContextValues {groupByField: Accessor<GroupByField | undefined>;}-export const SoupViewContext = createContext<SoupViewContextValues>();+const SoupViewContext = createContext<SoupViewContextValues>();export const useSoupView = () => {const context = useContext(SoupViewContext);diff --git a/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx b/js/app/packages/app/component/next-soup/soup-view/soup-view.tsxindex 3ced88aab0..133e8b7757 100644--- a/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx+++ b/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx@@ -148,7 +148,7 @@ const parseEntityRefId = (key: string): string | null => {}};-export const SoupSectionHeader = (props: {+const SoupSectionHeader = (props: {children: JSX.Element;onClick?: () => void;highlighted?: boolean;diff --git a/js/app/packages/app/component/next-soup/soup-view/views/tasks/TaskListHeader.tsx b/js/app/packages/app/component/next-soup/soup-view/views/tasks/TaskListHeader.tsxindex d165a6b81b..3019255267 100644--- a/js/app/packages/app/component/next-soup/soup-view/views/tasks/TaskListHeader.tsx+++ b/js/app/packages/app/component/next-soup/soup-view/views/tasks/TaskListHeader.tsx@@ -51,7 +51,7 @@ export function ResponsiveTaskListHeader(props: { class?: string }) {** Status, Priority, and Updated columns are clickable to set the active sort.*/-export function TaskListHeader(props: { class?: string }) {+function TaskListHeader(props: { class?: string }) {const { soup } = useSoupView();const activeSort = createMemo(() => soup.sort.active()[0]);const setSort = (id: SystemSortOption) => {diff --git a/js/app/packages/app/component/next-soup/soup-view/views/tasks/task-grid-template.ts b/js/app/packages/app/component/next-soup/soup-view/views/tasks/task-grid-template.tsindex c4c95aaa59..c365e79331 100644--- a/js/app/packages/app/component/next-soup/soup-view/views/tasks/task-grid-template.ts+++ b/js/app/packages/app/component/next-soup/soup-view/views/tasks/task-grid-template.ts@@ -36,12 +36,12 @@ export const TASK_GRID_COLUMNS = [] as const;/** Width for the "Created By" column - only shown on wide containers */-export const CREATED_BY_COLUMN_WIDTH = 'var(--task-col-created-by, 7rem)';+const CREATED_BY_COLUMN_WIDTH = 'var(--task-col-created-by, 7rem)';export type TaskGridColumn = (typeof TASK_GRID_COLUMNS)[number];/** Grid template for narrow containers (no Created By column) */-export const TASK_GRID_TEMPLATE_COLUMNS_NARROW = `1rem minmax(0, 100%) ${TASK_GRID_COLUMNS.map(+const TASK_GRID_TEMPLATE_COLUMNS_NARROW = `1rem minmax(0, 100%) ${TASK_GRID_COLUMNS.map((c) => c.width).join(' ')} var(--task-col-timestamp, 5rem)`;@@ -51,10 +51,10 @@ export const TASK_GRID_TEMPLATE_COLUMNS_WIDE = `1rem minmax(0, 100%) ${TASK_GRID).join(' ')} ${CREATED_BY_COLUMN_WIDTH} var(--task-col-timestamp, 5rem)`;/** @deprecated Use TASK_GRID_TEMPLATE_COLUMNS_NARROW or TASK_GRID_TEMPLATE_COLUMNS_WIDE */-export const TASK_GRID_TEMPLATE_COLUMNS = TASK_GRID_TEMPLATE_COLUMNS_NARROW;+const _TASK_GRID_TEMPLATE_COLUMNS = TASK_GRID_TEMPLATE_COLUMNS_NARROW;/** Grid template areas for narrow containers (no Created By column) */-export const TASK_GRID_TEMPLATE_AREAS_NARROW = `"indicator content ${TASK_GRID_COLUMNS.map(+const TASK_GRID_TEMPLATE_AREAS_NARROW = `"indicator content ${TASK_GRID_COLUMNS.map((c) => c.id).join(' ')} timestamp"`;@@ -64,4 +64,4 @@ export const TASK_GRID_TEMPLATE_AREAS_WIDE = `"indicator content ${TASK_GRID_COL).join(' ')} createdBy timestamp"`;/** @deprecated Use TASK_GRID_TEMPLATE_AREAS_NARROW or TASK_GRID_TEMPLATE_AREAS_WIDE */-export const TASK_GRID_TEMPLATE_AREAS = TASK_GRID_TEMPLATE_AREAS_NARROW;+const _TASK_GRID_TEMPLATE_AREAS = TASK_GRID_TEMPLATE_AREAS_NARROW;diff --git a/js/app/packages/app/component/next-soup/utils.ts b/js/app/packages/app/component/next-soup/utils.tsindex dc3185793e..fea5eda703 100644--- a/js/app/packages/app/component/next-soup/utils.ts+++ b/js/app/packages/app/component/next-soup/utils.ts@@ -152,7 +152,7 @@ const getEntityTimestamp = (entity: EntityData): DateValue => {/*** Returns true if the new entity should replace the existing one based on timestamp. If the timestamp is the same, prefer to use the newer entity to handle optimistic updates*/-export const isNewerEntity = (+const isNewerEntity = (newEntity: EntityData,existing: EntityData): boolean => {@@ -297,7 +297,7 @@ export const restoreSoupFocus = async (domRef.focus();};-export interface OpenEntityOptions {+interface OpenEntityOptions {openInNewSplit?: boolean;location?: SearchLocation;splitHandle?: SplitHandle;@@ -437,7 +437,7 @@ async function navigateToLocation(}}-export async function archiveEmail(+async function _archiveEmail(id: string,options: { archive: boolean; optimisticallyExclude?: boolean }) {@@ -496,7 +496,7 @@ export async function archiveEmail(}}-export type TrashEmailsHandle = {+type TrashEmailsHandle = {/** Fire-and-forget promise for the API calls. Rejects on failure (rolls back optimistic update). */done: Promise<void>;/** Optimistically restores all entities and calls the API to remove the TRASH label. */diff --git a/js/app/packages/app/component/paywall/plans.ts b/js/app/packages/app/component/paywall/plans.tsindex c6010614ad..bfa56f864f 100644--- a/js/app/packages/app/component/paywall/plans.ts+++ b/js/app/packages/app/component/paywall/plans.ts@@ -30,7 +30,7 @@ export type Plan = (typeof PLANS)[number];/** Tiers that correspond to real Stripe products. Excludes 'free'. */export type PaidPlanTier = Exclude<PlanTier, 'free'>;-export interface PlanFeature {+interface PlanFeature {label: string;values: Record<PlanTier, string>;}diff --git a/js/app/packages/app/component/property-edit-modal/hooks/usePropertyEditorHotkeys.ts b/js/app/packages/app/component/property-edit-modal/hooks/usePropertyEditorHotkeys.tsdeleted file mode 100644index 88b369738b..0000000000--- a/js/app/packages/app/component/property-edit-modal/hooks/usePropertyEditorHotkeys.ts+++ /dev/null@@ -1,147 +0,0 @@-import type { SoupState } from '@app/component/next-soup/create-soup-state';-import { SYSTEM_PROPERTY_IDS } from '@core/component/Properties/constants';-import type {- Property,- PropertyDefinitionDomain,-} from '@core/component/Properties/types';-import { HotkeyTags } from '@core/hotkey/constants';-import { TOKENS } from '@core/hotkey/tokens';-import { type EntityData, isTaskEntity } from '@entity';-import { createHotkeyGroup, registerHotkey } from 'core/hotkey/hotkeys';-import { openPropertyEditor } from '../state/propertyEditor';-import { useAllProperties } from './useAllProperties';--interface PropertyEditorHotkeyOptions {- scopeId: string;- soup: SoupState;-}--/**- * Hook that registers hotkeys for the property editor- * - `cmd-shift-o`: Opens property selector- * - `cmd-shift-s`: Direct edit status property- * - `cmd-shift-p`: Direct edit priority property- * - `cmd-shift-a`: Direct edit assignees property- */-export function usePropertyEditorHotkeys(options: PropertyEditorHotkeyOptions) {- const { scopeId, soup } = options;- const allProperties = useAllProperties();-- const propertyById = (propertyId: string) => {- return allProperties().find(({ id }) => {- return id === propertyId;- });- };- const status = () => propertyById(SYSTEM_PROPERTY_IDS.STATUS);- const priority = () => propertyById(SYSTEM_PROPERTY_IDS.PRIORITY);- const assignees = () => propertyById(SYSTEM_PROPERTY_IDS.ASSIGNEES);-- const getEntitiesForAction = (): EntityData[] => {- const selected = soup.selection.selected();- if (selected.length > 0) return selected;- const focused = soup.focus.item();- return focused ? [focused] : [];- };-- // Helper to open property editor if entities are selected- const openIfSelected = (- mode: 'selector' | 'direct' = 'selector',- property?: Property | PropertyDefinitionDomain- ) => {- const entities = getEntitiesForAction();- if (entities && entities.length > 0) {- openPropertyEditor(entities, mode, property);- } else {- console.warn('[PropertyEditor] No entities selected for property editor');- }- };-- const group = createHotkeyGroup();-- // Open property selector - shift+cmd+o- registerHotkey({- hotkey: ['shift+cmd+o'],- hotkeyToken: TOKENS.entity.action.properties,- tags: [HotkeyTags.SelectionModification],- displayPriority: 10,- description: 'Open property editor',- keyDownHandler: () => {- openIfSelected('selector');- return true;- },- condition: () => {- const entities = getEntitiesForAction();- return entities.length > 0 && entities.every(isTaskEntity);- },- scopeId,- }).withGroup(group);-- // Set priority - shift+cmd+p- registerHotkey({- hotkey: ['shift+cmd+p'],- hotkeyToken: TOKENS.entity.action.priority,- tags: [HotkeyTags.SelectionModification],- displayPriority: 10,- description: 'Set priority',- keyDownHandler: () => {- openIfSelected('direct', priority());- return true;- },- condition: () => {- const entities = getEntitiesForAction();- return (- entities.length > 0 &&- entities.every(isTaskEntity) &&- Boolean(priority())- );- },- scopeId,- }).withGroup(group);-- // Set assignee - shift+cmd+a- registerHotkey({- hotkey: ['shift+cmd+a'],- hotkeyToken: TOKENS.entity.action.assignee,- tags: [HotkeyTags.SelectionModification],- displayPriority: 10,- description: 'Set assignee',- keyDownHandler: () => {- openIfSelected('direct', assignees());- return true;- },- condition: () => {- const entities = getEntitiesForAction();- return (- entities.length > 0 &&- entities.every(isTaskEntity) &&- Boolean(assignees())- );- },- scopeId,- }).withGroup(group);-- // Set status - shift+cmd+s- registerHotkey({- hotkey: ['shift+cmd+s'],- hotkeyToken: TOKENS.entity.action.status,- tags: [HotkeyTags.SelectionModification],- displayPriority: 10,- description: 'Set status',- keyDownHandler: () => {- openIfSelected('direct', status());- return true;- },- condition: () => {- const entities = getEntitiesForAction();- return (- entities.length > 0 && entities.every(isTaskEntity) && Boolean(status())- );- },- scopeId,- }).withGroup(group);-- return {- openPropertyEditor: openIfSelected,- disposeHotkeys: group.dispose,- };-}diff --git a/js/app/packages/app/component/property-edit-modal/state/propertyEditor.ts b/js/app/packages/app/component/property-edit-modal/state/propertyEditor.tsindex 81e5208562..bd3ed991e3 100644--- a/js/app/packages/app/component/property-edit-modal/state/propertyEditor.ts+++ b/js/app/packages/app/component/property-edit-modal/state/propertyEditor.ts@@ -6,7 +6,7 @@ import { createControlledOpenSignal } from '@core/util/createControlledOpenSignaimport type { EntityData } from '@entity';import { createStore, reconcile } from 'solid-js/store';-export type PropertyEditorMode = 'selector' | 'direct';+type PropertyEditorMode = 'selector' | 'direct';export const [propertyEditorOpen, setPropertyEditorOpen] =createControlledOpenSignal(false, { id: 'property-edit' });diff --git a/js/app/packages/app/component/settings/Settings.tsx b/js/app/packages/app/component/settings/Settings.tsxindex 6c7ace3555..f57bea69c8 100644--- a/js/app/packages/app/component/settings/Settings.tsx+++ b/js/app/packages/app/component/settings/Settings.tsx@@ -34,7 +34,7 @@ type SettingsPanelProps = {hide?: boolean;};-export function SettingsPanel(props: SettingsPanelProps) {+function SettingsPanel(props: SettingsPanelProps) {const { settingsOpen, closeSettings, activeTabId, setActiveTabId } = useSettingsState();const teamsFlag = useFeatureFlag('enable-teams-settings', { enabledOverride: ENABLE_TEAMS_OVERRIDE });diff --git a/js/app/packages/app/component/side-panel/SidePanel.tsx b/js/app/packages/app/component/side-panel/SidePanel.tsxindex b42f438020..7ae51c7fef 100644--- a/js/app/packages/app/component/side-panel/SidePanel.tsx+++ b/js/app/packages/app/component/side-panel/SidePanel.tsx@@ -303,7 +303,7 @@ function NarrowTabs(props: { contentLabel?: string; infoLabel?: string }) {}/** Indicates whether the current subtree has a SidePanel.Layout ancestor. */-function useHasSidePanel(): boolean {+function _useHasSidePanel(): boolean {return useContext(SidePanelContext) !== undefined;}@@ -321,4 +321,4 @@ function Row(props: ParentProps<{ label: JSX.Element }>) {}export const SidePanel = { Layout, Section, Row, NarrowTabs };-export { useHasSidePanel, useSidePanel };+export { useSidePanel };diff --git a/js/app/packages/app/component/side-panel/index.ts b/js/app/packages/app/component/side-panel/index.tsindex 8308bb09f4..f1c1abff29 100644--- a/js/app/packages/app/component/side-panel/index.ts+++ b/js/app/packages/app/component/side-panel/index.ts@@ -1,5 +1,2 @@-export type {- SidePanelContextType,- SidePanelSectionEntry,-} from './context';-export { SidePanel, useHasSidePanel, useSidePanel } from './SidePanel';+export type {} from './context';+export { SidePanel, useSidePanel } from './SidePanel';diff --git a/js/app/packages/app/component/split-layout/componentRegistry.tsx b/js/app/packages/app/component/split-layout/componentRegistry.tsxindex 7120e38ebc..c0d514c392 100644--- a/js/app/packages/app/component/split-layout/componentRegistry.tsx+++ b/js/app/packages/app/component/split-layout/componentRegistry.tsx@@ -45,7 +45,7 @@ const withAuth = <P extends object>(Comp: Component<P>): Component<P> => {};};-export type ComponentFactory = (params?: Record<string, any>) => JSXElement;+type ComponentFactory = (params?: Record<string, any>) => JSXElement;export type UnifiedListMeta = {kind: 'unified-list';@@ -65,7 +65,7 @@ type ComponentRegistration = {const REGISTRY = new Map<string, ComponentRegistration>();-export function registerComponent<T extends Omit<ComponentMeta, 'kind'>>(+function registerComponent<T extends Omit<ComponentMeta, 'kind'>>(name: string,factory: ComponentFactory,initialMeta?: T@@ -74,13 +74,13 @@ export function registerComponent<T extends Omit<ComponentMeta, 'kind'>>(REGISTRY.set(name, { factory, initialMeta: metaWithKind as ComponentMeta });}-export type ResolvedComponent = {+type ResolvedComponent = {element: () => JSXElement;initialMeta?: ComponentMeta;};// Similar to SolidRouter's `<Navigate />` but for splits-export function RedirectSplit(props: { to: SplitContent }) {+function RedirectSplit(props: { to: SplitContent }) {const panel = useSplitPanelOrThrow();onMount(() => {diff --git a/js/app/packages/app/component/split-layout/components/PopoverSplitRenderer.tsx b/js/app/packages/app/component/split-layout/components/PopoverSplitRenderer.tsxindex 58dc36396d..53c677c5d3 100644--- a/js/app/packages/app/component/split-layout/components/PopoverSplitRenderer.tsx+++ b/js/app/packages/app/component/split-layout/components/PopoverSplitRenderer.tsx@@ -15,7 +15,7 @@ import type {false && clickOutside;-export type PopoverSplitData = {+type PopoverSplitData = {id: string;content: SplitContent;mount: SplitMount;diff --git a/js/app/packages/app/component/split-layout/components/SplitDrawerContext.tsx b/js/app/packages/app/component/split-layout/components/SplitDrawerContext.tsxindex efcb35f7ea..abe8e7ff07 100644--- a/js/app/packages/app/component/split-layout/components/SplitDrawerContext.tsx+++ b/js/app/packages/app/component/split-layout/components/SplitDrawerContext.tsx@@ -19,7 +19,7 @@ interface ISplitDrawerContext {contentOffsetTop: Accessor<number>;}-export const SplitDrawerContext = createContext<ISplitDrawerContext>();+const SplitDrawerContext = createContext<ISplitDrawerContext>();export function SplitDrawerGroup(props: ParentProps<{@@ -92,7 +92,7 @@ export function SplitDrawerGroup(* tie, the newer drawer wins.* @returns Signal<boolean> - A signal that can be used like any other boolean signal*/-export function createDrawerOpenSignal(+function createDrawerOpenSignal(id: string,initial?: boolean): Signal<boolean> {diff --git a/js/app/packages/app/component/split-layout/components/SplitPanel.tsx b/js/app/packages/app/component/split-layout/components/SplitPanel.tsxindex 9db3f02206..111e4cf800 100644--- a/js/app/packages/app/component/split-layout/components/SplitPanel.tsx+++ b/js/app/packages/app/component/split-layout/components/SplitPanel.tsx@@ -27,7 +27,7 @@ import { SplitDrawerGroup } from './SplitDrawerContext';import { SplitHeader } from './SplitHeader';import { SplitToolbar } from './SplitToolbar';-export type SplitPanelProps = {+type SplitPanelProps = {setPanelRef: (ref: HTMLDivElement) => void;handle: SplitHandle;split: SplitState;diff --git a/js/app/packages/app/component/split-layout/components/SplitTabs.tsx b/js/app/packages/app/component/split-layout/components/SplitTabs.tsxdeleted file mode 100644index 86fb7f60d6..0000000000--- a/js/app/packages/app/component/split-layout/components/SplitTabs.tsx+++ /dev/null@@ -1,181 +0,0 @@-import { TOKENS } from '@core/hotkey/tokens';-import type { ViewId } from '@core/types/view';-import { Tabs } from '@kobalte/core';-import { createElementSize } from '@solid-primitives/resize-observer';-import {- type Accessor,- createEffect,- createMemo,- createSignal,- For,- type JSXElement,- onMount,- type Setter,-} from 'solid-js';-import { useSplitPanelOrThrow } from '../layoutUtils';--// NOTE: unused since everything should already be correctly cased-const _titleCase = (str: string) => {- return str- .split('')- .map((c, i) => (i === 0 ? c.toUpperCase() : c.toLowerCase()))- .join('');-};--const SCROLL_THRESHOLD = 10;--export function SplitTabs(props: {- // values: readonly View[];- list: { value: ViewId; label: string; index: number }[];- active: Accessor<ViewId>;- setButtonsRef?: Setter<HTMLDivElement | null>;- newButton?: JSXElement;- contextMenu?: (props: { value: ViewId; label: string }) => JSXElement;-}) {- let scrollRef!: HTMLDivElement;- const panel = useSplitPanelOrThrow();- const size = createElementSize(panel.panelRef ?? null);- const panelWidth = () => size.width ?? 0;-- const [leftOpacity, setLeftOpacity] = createSignal(0);- const [rightOpacity, setRightOpacity] = createSignal(0);-- // Track the active tab's position and width for the sliding indicator- const [indicatorStyle, setIndicatorStyle] = createSignal({- left: 0,- width: 0,- });-- const updateClipIndicators = () => {- if (!scrollRef) return;- const { scrollLeft, scrollWidth, clientWidth } = scrollRef;-- const leftAmount = Math.min(scrollLeft, SCROLL_THRESHOLD);- setLeftOpacity(leftAmount / SCROLL_THRESHOLD);-- const maxScroll = scrollWidth - clientWidth;- const remainingScroll = maxScroll - scrollLeft;- const rightAmount = Math.min(remainingScroll, SCROLL_THRESHOLD);- setRightOpacity(rightAmount / SCROLL_THRESHOLD);- };-- const updateIndicatorPosition = (element: HTMLElement) => {- if (!scrollRef || !element) return;- const listRect = scrollRef.getBoundingClientRect();- const tabRect = element.getBoundingClientRect();- setIndicatorStyle({- left: tabRect.left - listRect.left + scrollRef.scrollLeft,- width: tabRect.width,- });- };-- onMount(() => {- const listener = (e: WheelEvent) => {- e.preventDefault();- const { deltaX, deltaY } = e;- const delta = Math.abs(deltaX) > Math.abs(deltaY) ? deltaX : deltaY;- scrollRef.scrollLeft += delta;- updateClipIndicators();- };- const scrollListener = () => {- updateClipIndicators();- };- scrollRef.addEventListener('wheel', listener);- scrollRef.addEventListener('scroll', scrollListener);- updateClipIndicators();- return () => {- scrollRef.removeEventListener('wheel', listener);- scrollRef.removeEventListener('scroll', scrollListener);- };- });-- createEffect(() => {- panelWidth();- updateClipIndicators();- });-- return (- <div class="mobile:hidden relative isolate h-full shrink grow-2 @container-normal">- {/* Left clip boundary indicator */}- <div- class="absolute pointer-events-none left-0 inset-y-px w-3 z-annotation-layer pattern-diagonal-4 pattern-edge mask-r-from-0% border-l border-edge-muted transition-opacity duration-150"- style={{ opacity: leftOpacity() }}- />- {/* Right clip boundary indicator */}- <div- class="absolute pointer-events-none right-0 inset-y-px w-3 z-annotation-layer pattern-diagonal-4 pattern-edge mask-l-from-0% border-r border-edge-muted transition-opacity duration-150"- style={{ opacity: rightOpacity() }}- />-- <Tabs.List- class="flex flex-row h-full bg-surface overflow-x-scroll overscroll-none scrollbar-hidden scroll-shadows-x relative"- as="div"- ref={(r) => {- scrollRef = r;- props.setButtonsRef?.(r);- }}- >- {/* Sliding indicator line */}- <div- class="absolute bottom-0 h-px bg-accent z-10 pointer-events-none transition-all duration-150 ease-out"- style={{- transform: `translateX(${indicatorStyle().left}px)`,- width: `${indicatorStyle().width}px`,- }}- />-- <For each={props.list}>- {({ value, label, index }, i) => {- const isActive = createMemo(() => value === props.active());-- let ref: HTMLDivElement | undefined;- createEffect(() => {- panelWidth(); // react on width to not clip active tab.- if (isActive() && ref) {- ref.scrollIntoView({- inline: 'end',- });- // Update indicator position and clip indicators- updateIndicatorPosition(ref);- setTimeout(updateClipIndicators, 0);- }- });-- createEffect(() => {- if (isActive()) {- panel.handle.setDisplayName(label);- }- });-- return (- <Tabs.Trigger- value={value}- ref={ref}- tabIndex={-1}- class="min-w-12 max-w-[40cqw] shrink-0 text-sm relative h-full flex items-center px-2"- classList={{- 'z-user-highlight text-accent': isActive(),- 'text-ink-disabled hover:text-accent/70': !isActive(),- }}- data-hotkey-token={- TOKENS.soup.tabs[- index.toString() as keyof typeof TOKENS.soup.tabs- ]- }- >- <span class="flex items-baseline gap-1 w-full">- <span class="text-xs font-mono opacity-70 mr-0.5">- {(i() + 1).toString()}- </span>- <span class="truncate">{label}</span>- </span>- {props.contextMenu?.({ label, value })}- </Tabs.Trigger>- );- }}- </For>- {props.newButton}- </Tabs.List>- </div>- );-}diff --git a/js/app/packages/app/component/split-layout/layoutUtils.ts b/js/app/packages/app/component/split-layout/layoutUtils.tsindex 8a1736e4f7..69255f9f3d 100644--- a/js/app/packages/app/component/split-layout/layoutUtils.ts+++ b/js/app/packages/app/component/split-layout/layoutUtils.ts@@ -54,7 +54,7 @@ export function decodePairs(segments: string[]): SplitContent[] {return pairs.length ? pairs : [{ type: 'component', id: LIST_VIEW_ID.inbox }];}-export function encodePairs(splits: ReadonlyArray<SplitContent>): string[] {+function _encodePairs(splits: ReadonlyArray<SplitContent>): string[] {return splits.flatMap((s) => [// Use the alias type if available, otherwise use the base types.type === 'component' ? s.type : s.aliasContext?.alias || s.type,@@ -62,11 +62,11 @@ export function encodePairs(splits: ReadonlyArray<SplitContent>): string[] {]);}-export const isInSplit = createCallback(() => {+const _isInSplit = createCallback(() => {return !!useContext(SplitPanelContext);});-export const isInSplitLayout = createCallback(() => {+const _isInSplitLayout = createCallback(() => {return !!useContext(SplitLayoutContext);});@@ -146,7 +146,7 @@ export function focusAdjacentSplit(direction: 'left' | 'right') {* Reactive boolean accessor indicating whether the active split is currently* showing a specific component content id.*/-export function createIsActiveSplitContentMemo(+function _createIsActiveSplitContentMemo(activeSplit: Accessor<SplitHandle | undefined>,contentType: SplitContentType,id: stringdiff --git a/js/app/packages/app/component/split-layout/mobile/MobileSwipeBackContainer.tsx b/js/app/packages/app/component/split-layout/mobile/MobileSwipeBackContainer.tsxindex 3b5d6e9b5a..507c82cfa1 100644--- a/js/app/packages/app/component/split-layout/mobile/MobileSwipeBackContainer.tsx+++ b/js/app/packages/app/component/split-layout/mobile/MobileSwipeBackContainer.tsx@@ -24,7 +24,7 @@ const SWIPE_DISTANCE_THRESHOLD = 0.5; // fraction of screen widthconst SWIPE_ANIMATION_MS = 88;const BG_PEEK_OFFSET = 110; // px the BG panel is offset left at rest; closes to 0 as FG slides away-export type MobileSwipeBackContainerProps = {+type MobileSwipeBackContainerProps = {splitManager: SplitManager;mobileSwipeLayout: MobileSwipeLayout;splits: Accessor<ReadonlyArray<SplitState>>;diff --git a/js/app/packages/app/constants/list-views.ts b/js/app/packages/app/constants/list-views.tsindex 131c87d4db..937e1166ad 100644--- a/js/app/packages/app/constants/list-views.ts+++ b/js/app/packages/app/constants/list-views.ts@@ -26,7 +26,7 @@ export const LIST_VIEW_PATHS = {search: '/search',} as const satisfies Record<ListView, string>;-export const isListViewPath = (path: string) => {+const _isListViewPath = (path: string) => {return LIST_VIEW_PATHS[path as ListView] !== undefined;};@@ -68,6 +68,6 @@ const BLOCK_LIST_VIEW_MAP = {automation: 'agents',} as const satisfies Record<BlockName | BlockAlias, ListView>;-export const getBlockListView = (block: BlockName | BlockAlias): ListView => {+const _getBlockListView = (block: BlockName | BlockAlias): ListView => {return BLOCK_LIST_VIEW_MAP[block];};diff --git a/js/app/packages/app/lib/analytics/analytics.ts b/js/app/packages/app/lib/analytics/analytics.tsindex ceaa1b0bfe..5b36b8c4a5 100644--- a/js/app/packages/app/lib/analytics/analytics.ts+++ b/js/app/packages/app/lib/analytics/analytics.ts@@ -136,7 +136,7 @@ const tryInitialize = (callback: VoidFunction) => {}};-export const createAnalytics = () => {+const createAnalytics = () => {const posthog = new PostHog();const disabled = import.meta.env.DEV === true;diff --git a/js/app/packages/app/lib/analytics/index.ts b/js/app/packages/app/lib/analytics/index.tsindex 58df75bed9..ccbb0c5200 100644--- a/js/app/packages/app/lib/analytics/index.ts+++ b/js/app/packages/app/lib/analytics/index.ts@@ -1,7 +1,4 @@export {- type AnalyticsInterface,type AnalyticsProvider,analytics,- createAnalytics,} from './analytics';-export type { AppEventNames, AppEvents } from './app-events';diff --git a/js/app/packages/app/signal/focus.ts b/js/app/packages/app/signal/focus.tsindex ae048facd9..8a92a43e4f 100644--- a/js/app/packages/app/signal/focus.ts+++ b/js/app/packages/app/signal/focus.ts@@ -43,4 +43,4 @@ export function mountGlobalFocusListener(withDebug?: boolean) {}export const activeElement = rawActiveElement;-export const recheckFocus = () => setDirty();+const _recheckFocus = () => setDirty();diff --git a/js/app/packages/app/util/getClippedOverlayRect.ts b/js/app/packages/app/util/getClippedOverlayRect.tsdeleted file mode 100644index 0513569f4c..0000000000--- a/js/app/packages/app/util/getClippedOverlayRect.ts+++ /dev/null@@ -1,55 +0,0 @@-export function getClippedOverlayRect(- targetEl: HTMLElement,- targetElScrollParent: HTMLElement | null-) {- const targetRect = targetEl.getBoundingClientRect();- if (!targetElScrollParent) {- return {- rect: {- left: targetRect.left,- top: targetRect.top,- right: targetRect.right,- bottom: targetRect.bottom,- width: targetRect.width,- height: targetRect.height,- },- isClippedLeft: false,- isClippedRight: false,- isClippedTop: false,- isClippedBottom: false,- isFullyClipped: false,- isPartiallyClipped: false,- };- }- const scrollParentRect = targetElScrollParent.getBoundingClientRect();-- // Calculate clipping edges- const clippedLeft = Math.max(targetRect.left, scrollParentRect.left);- const clippedTop = Math.max(targetRect.top, scrollParentRect.top);- const clippedRight = Math.min(targetRect.right, scrollParentRect.right);- const clippedBottom = Math.min(targetRect.bottom, scrollParentRect.bottom);-- const clippedWidth = Math.max(0, clippedRight - clippedLeft);- const clippedHeight = Math.max(0, clippedBottom - clippedTop);-- return {- rect: {- left: clippedLeft,- top: clippedTop,- width: clippedWidth,- height: clippedHeight,- right: clippedLeft + clippedWidth,- bottom: clippedTop + clippedHeight,- },- isClippedLeft: clippedLeft > targetRect.left,- isClippedRight: clippedRight < targetRect.right,- isClippedTop: clippedTop > targetRect.top,- isClippedBottom: clippedBottom < targetRect.bottom,- isFullyClipped: clippedWidth === 0 || clippedHeight === 0,- isPartiallyClipped:- clippedLeft > targetRect.left ||- clippedRight < targetRect.right ||- clippedTop > targetRect.top ||- clippedBottom < targetRect.bottom,- };-}diff --git a/js/app/packages/app/util/getScrollElementParent.ts b/js/app/packages/app/util/getScrollElementParent.tsdeleted file mode 100644index 00076f5056..0000000000--- a/js/app/packages/app/util/getScrollElementParent.ts+++ /dev/null@@ -1,24 +0,0 @@-function matchScroll(str: string) {- return str.match(/auto|scroll/);-}--export const getScrollElementParent = (- el: HTMLElement | null-): HTMLElement | null => {- if (!el) {- return null;- }-- const style = getComputedStyle(el);-- const hasScrollableOverflow =- matchScroll(style.overflow) ||- matchScroll(style.overflowY) ||- matchScroll(style.overflowX);-- if (hasScrollableOverflow && el.clientHeight !== el.scrollHeight) {- return el;- }-- return getScrollElementParent(el.parentElement);-};diff --git a/js/app/packages/block-email/component/AttachMenu.tsx b/js/app/packages/block-email/component/AttachMenu.tsxdeleted file mode 100644index 66cbd83e40..0000000000--- a/js/app/packages/block-email/component/AttachMenu.tsx+++ /dev/null@@ -1,165 +0,0 @@-import { EntityIcon } from '@core/component/EntityIcon';-import { DropdownMenuContent, MenuItem } from '@core/component/Menu';-import { blockAcceptedFileExtensions } from '@core/constant/allBlocks';-import { fileSelector } from '@core/directive/fileSelector';-import { isTouchDevice } from '@core/mobile/isTouchDevice';-import { getItemBlockName } from '@core/util/getItemBlockName';-import { DropdownMenu } from '@kobalte/core/dropdown-menu';-import type { DocumentMentionInfo } from '@lexical-core';-import DeviceMobileIcon from '@phosphor/device-mobile-speaker.svg';-import LaptopIcon from '@phosphor/laptop.svg';-import SearchIcon from '@phosphor/magnifying-glass.svg';-import { type HistoryItem, useHistoryQuery } from '@queries/history/history';-import fuzzy from 'fuzzy';-import {- createMemo,- createSignal,- type JSX,- type Setter,- Show,-} from 'solid-js';-import { VList } from 'virtua/solid';-import { handleFileUpload } from '../util/handleFileUpload';--// NOTE: solid directives-false && fileSelector;--type AttachMenuProps = {- open?: boolean;- onClose?: () => void;- trigger: JSX.Element;- onAttach: (items: HistoryItem[]) => void;- onAttachDocuments?: (items: DocumentMentionInfo[]) => void;- attachedItems?: () => HistoryItem[];- setIsPending?: Setter<boolean>;-};--function truncate(str: string, maxLength: number = 30) {- if (str.length <= maxLength) return str;- return str.slice(0, maxLength) + '...';-}--export function AttachMenu(props: AttachMenuProps) {- const historyQuery = useHistoryQuery();- const attachedItems = () => props.attachedItems?.() ?? [];-- const [input, setInput] = createSignal('');-- const baseHistory = createMemo(() => {- return [...(historyQuery.data ?? [])].filter(- (item) => !attachedItems().find((a) => a.id === item.id)- );- });-- const rankedHistory = createMemo(() => {- const searchQuery = input().toLowerCase();- if (!searchQuery) return baseHistory();- return fuzzy- .filter(searchQuery, baseHistory(), {- extract: (item) => item.name,- })- .map((item) => item.original);- });-- return (- <DropdownMenu- open={props.open}- onOpenChange={(isOpen) => {- if (!isOpen) props.onClose?.();- }}- >- <DropdownMenu.Trigger>{props.trigger}</DropdownMenu.Trigger>-- <DropdownMenu.Portal>- <DropdownMenuContent>- <div class="flex flex-row items-center w-full p-2 gap-2 text-sm border-b border-edge text-ink mb-1">- <SearchIcon class="size-3" />- <input- value={input()}- onInput={(e) => setInput(e.target.value)}- onKeyDown={(e) => e.stopImmediatePropagation()}- class="w-full"- placeholder="Search Attachments"- />- </div>- <div class="flex flex-col gap-1 max-h-62.5 w-75 overflow-y-auto">- <Show- when={rankedHistory().length > 0}- fallback={- <div class="p-2 w-full flex-col justify-center items-center">- <p class="text-sm text-ink-muted">No results</p>- </div>- }- >- <VList- data={rankedHistory()}- bufferSize={10 * 40}- itemSize={40}- style={{ height: '100%', contain: 'content' }}- >- {(item) => (- <MenuItem- text={truncate(item.name)}- icon={() => (- <EntityIcon- targetType={getItemBlockName(item, true)}- size="xs"- />- )}- closeOnSelect- onClick={() => {- props.onAttach([item]);- }}- />- )}- </VList>- </Show>- </div>- <div class="w-full h-px bg-edge mt-px" />- <div- class="w-full"- use:fileSelector={{- acceptedFileExtensions: blockAcceptedFileExtensions,- multiple: true,- onSelect: async (files) => {- if (props.setIsPending) {- await handleFileUpload(files, props.setIsPending, (items) => {- // Use direct DocumentMentionInfo if callback exists- if (props.onAttachDocuments) {- props.onAttachDocuments(items);- return;- }-- // Fallback to Item conversion for backward compatibility- const itemsToAttach = items.map((item) => ({- id: item.documentId,- name: item.documentName,- type:- item.blockName === 'project' ? 'project' : 'document',- fileType:- item.blockName !== 'project'- ? item.blockName- : undefined,- })) as HistoryItem[];-- props.onAttach(itemsToAttach);- });- }- props.onClose?.();- },- }}- >- <MenuItem- text={- isTouchDevice()- ? 'Upload from your device'- : 'Upload from your computer'- }- icon={isTouchDevice() ? DeviceMobileIcon : LaptopIcon}- />- </div>- </DropdownMenuContent>- </DropdownMenu.Portal>- </DropdownMenu>- );-}diff --git a/js/app/packages/block-email/component/EmailContext.tsx b/js/app/packages/block-email/component/EmailContext.tsxindex a2fcfad929..7d7d42f148 100644--- a/js/app/packages/block-email/component/EmailContext.tsx+++ b/js/app/packages/block-email/component/EmailContext.tsx@@ -61,7 +61,7 @@ export function markThreadDraftSaved(threadId: string) {}export type EmailRecipient = WithCustomUserInput<'user' | 'contact'>;-export type EmailContextValues = {+type EmailContextValues = {registerMessagesList: (list: HTMLElement) => void;messagesListRef: Accessor<HTMLElement | undefined>;registerMessagesContainer: (container: HTMLElement) => void;diff --git a/js/app/packages/block-email/component/FileItem.ts b/js/app/packages/block-email/component/FileItem.tsdeleted file mode 100644index 73d828fa35..0000000000--- a/js/app/packages/block-email/component/FileItem.ts+++ /dev/null@@ -1,7 +0,0 @@-import type { FileType } from '@service-storage/generated/schemas/fileType';--export type FileItem = {- name: string;- id: string;- type?: FileType;-};diff --git a/js/app/packages/block-email/component/compose/index.ts b/js/app/packages/block-email/component/compose/index.tsindex 21f052ff50..d861d8f91b 100644--- a/js/app/packages/block-email/component/compose/index.ts+++ b/js/app/packages/block-email/component/compose/index.ts@@ -1,8 +1,4 @@-export { EmailCompose } from './Compose';-export { ComposeBody } from './ComposeBody';-export * from './ComposeContext';export { ComposeLayout } from './ComposeLayout';-export { ComposeRecipients } from './ComposeRecipients';-export { ComposeSubject } from './ComposeSubject';+export { EmailComposeToolbar } from './ComposeToolbar';diff --git a/js/app/packages/block-email/signal/emailDraft.ts b/js/app/packages/block-email/signal/emailDraft.tsdeleted file mode 100644index 3adca2271c..0000000000--- a/js/app/packages/block-email/signal/emailDraft.ts+++ /dev/null@@ -1,38 +0,0 @@-import { logger } from '@observability/logger';-import { emailClient } from '@service-email/client';-import type {- ApiDraftInput,- ApiDraftOutputDbId,-} from '@service-email/generated/schemas';--export async function saveEmailDraft(- draft: ApiDraftInput,- sendTime?: Date | null-): Promise<ApiDraftOutputDbId | false> {- const createRes = await emailClient.createDraft({- draft,- send_time: sendTime?.toISOString() ?? null,- });- if (createRes.isErr()) {- logger.error(new Error('Failed to save draft', { cause: createRes.error }));- return false;- }- if (!createRes.value.draft.db_id) {- logger.error(new Error('Draft save success but no draft id returned'));- return false;- }- return createRes.value.draft.db_id;-}--export async function deleteEmailDraft(draftId: string): Promise<boolean> {- const deleteRes = await emailClient.deleteDraft({ id: draftId });- if (deleteRes.isErr()) {- logger.error(- new Error('Failed to delete draft', {- cause: new Error(`Failed to delete draft: ${deleteRes.error}`),- })- );- return false;- }- return true;-}diff --git a/js/app/packages/block-email/util/emailHotkeys.ts b/js/app/packages/block-email/util/emailHotkeys.tsindex c0b8b2e0fa..f768549694 100644--- a/js/app/packages/block-email/util/emailHotkeys.ts+++ b/js/app/packages/block-email/util/emailHotkeys.ts@@ -1,7 +1,7 @@import { TOKENS } from '@core/hotkey/tokens';import { registerHotkey } from 'core/hotkey/hotkeys';-export interface EmailHotkeyHandlers {+interface EmailHotkeyHandlers {blockSender: () => boolean;markSenderSignal: () => boolean;markSenderNoise: () => boolean;diff --git a/js/app/packages/block-email/util/emailUser.ts b/js/app/packages/block-email/util/emailUser.tsindex 7a797557ec..e5ae38261b 100644--- a/js/app/packages/block-email/util/emailUser.ts+++ b/js/app/packages/block-email/util/emailUser.ts@@ -5,7 +5,7 @@ import { getFirstName } from './name';/*** Check if a message is from the current user*/-export function isMessageFromCurrentUser(+function isMessageFromCurrentUser(message: ApiMessage,currentUserEmail?: string): boolean {diff --git a/js/app/packages/block-email/util/handleFileUpload.ts b/js/app/packages/block-email/util/handleFileUpload.tsdeleted file mode 100644index 74486a74d5..0000000000--- a/js/app/packages/block-email/util/handleFileUpload.ts+++ /dev/null@@ -1,66 +0,0 @@-import { toast } from '@core/component/Toast/Toast';-import { fileTypeToBlockName } from '@core/constant/allBlocks';-import { forceDssRuleset, uploadFile } from '@core/util/upload';-import type { DocumentMentionInfo } from '@lexical-core';-import { waitBulkUploadStatus } from '@service-connection/bulkUpload';-import { filenameWithoutExtension } from '@service-storage/util/filename';-import type { Setter } from 'solid-js';--export async function handleFileUpload(- files: File[],- setIsPending: Setter<boolean>,- onUploaded: (items: DocumentMentionInfo[]) => void-) {- setIsPending(true);- let mentionItems: DocumentMentionInfo[] = [];- for (const file of files) {- try {- // TODO (seamus): For now, we force all uploads to DSS so that macro links work correctly as attachments.- const result = await uploadFile(file, forceDssRuleset, {- hideProgressIndicator: true,- });-- if (!result.failed) {- let mentionItem: DocumentMentionInfo | undefined;-- if (result.destination === 'static') {- // TODO if user uploads static file... we shouldn't mention it, but instead should be inlining it into the body- } else if (result.destination === 'dss' && result.type === 'document') {- mentionItem = {- documentId: result.documentId,- documentName: filenameWithoutExtension(file.name) || file.name,- blockName: fileTypeToBlockName(result.fileType, true) ?? 'unknown',- };- } else if (result.destination === 'dss' && result.type === 'folder') {- // Wait for the websocket event to get the projectId- const projectId = await waitBulkUploadStatus(result.requestId);- if (!projectId) {- throw new Error('Folder upload failed or timed out');- }-- mentionItem = {- documentId: projectId,- documentName: result.name,- blockName: 'project',- };- } else {- throw new Error('Unexpected upload result');- }-- setIsPending(false);-- if (mentionItem) {- mentionItems.push(mentionItem);- }- } else {- setIsPending(false);- toast.failure(`Failed to upload ${file.name}: ${result.error}`);- }- } catch (error) {- setIsPending(false);- toast.failure(`Failed to upload ${file.name}: ${error}`);- }- }-- onUploaded(mentionItems);-}diff --git a/js/app/packages/block-email/util/prepareEmailBody.ts b/js/app/packages/block-email/util/prepareEmailBody.tsindex abcf08921c..4af764a94b 100644--- a/js/app/packages/block-email/util/prepareEmailBody.ts+++ b/js/app/packages/block-email/util/prepareEmailBody.ts@@ -237,7 +237,7 @@ export function registerToggleAppendedThread(editor: LexicalEditor) {);}-export async function appendItemsAsMacroMentions(+async function _appendItemsAsMacroMentions(editor: LexicalEditor | undefined,items: DocumentMentionInfo[]) {diff --git a/js/app/packages/block-email/util/scrollToMessage.ts b/js/app/packages/block-email/util/scrollToMessage.tsindex d823d5ead4..14d9c6e17b 100644--- a/js/app/packages/block-email/util/scrollToMessage.ts+++ b/js/app/packages/block-email/util/scrollToMessage.ts@@ -46,7 +46,7 @@ export function scrollToMessage(* @param messagesContainer - The DOM container holding the message elements* @param behavior - Scroll behavior ('smooth' | 'instant' | 'auto')*/-export function scrollToLastMessage(+function _scrollToLastMessage(messagesContainer: HTMLDivElement,behavior: ScrollBehavior | 'instant' = 'instant'): void {@@ -66,7 +66,7 @@ export function scrollToLastMessage(* @param messages - Array of messages in the current thread* @returns The db_id of the last message, or undefined if no messages*/-export function getLastMessageId(messages: ApiMessage[]): string | undefined {+function _getLastMessageId(messages: ApiMessage[]): string | undefined {const lastMessage = messages[messages.length - 1];return lastMessage?.db_id?.toString();}diff --git a/js/app/packages/core/auth/channel.ts b/js/app/packages/core/auth/channel.tsindex a82b84f88d..a3cd83f536 100644--- a/js/app/packages/core/auth/channel.ts+++ b/js/app/packages/core/auth/channel.ts@@ -12,7 +12,7 @@ const LOGIN_SUCCESS = 'login-success';** @returns The broadcast channel.*/-export function getOrCreateAuthChannel(): BroadcastChannel {+function getOrCreateAuthChannel(): BroadcastChannel {let channel = broadcastChannels().get(AUTH_CHANNEL);if (!channel) {channel = new BroadcastChannel(AUTH_CHANNEL);@@ -21,7 +21,7 @@ export function getOrCreateAuthChannel(): BroadcastChannel {return channel;}-export function waitForAuthSuccess(channel: BroadcastChannel): Promise<void> {+function _waitForAuthSuccess(channel: BroadcastChannel): Promise<void> {return new Promise((resolve) => {channel.onmessage = (event) => {if (event.data.type === LOGIN_SUCCESS) {@@ -41,7 +41,7 @@ export type TimeoutError = { tag: 'TimeoutError'; message: string };* @param timeout The timeout in milliseconds.* @returns A promise that resolves when the auth success message is received.*/-export function waitForAuthSuccessOrTimeout(+function waitForAuthSuccessOrTimeout(channel: BroadcastChannel,timeout: number): ResultAsync<void, TimeoutError> {diff --git a/js/app/packages/core/auth/sso.ts b/js/app/packages/core/auth/sso.tsindex a0e1385ab2..d61d9ee9e1 100644--- a/js/app/packages/core/auth/sso.ts+++ b/js/app/packages/core/auth/sso.ts@@ -8,7 +8,7 @@ import { authServiceClient } from '@service-auth/client';import { invoke } from '@tauri-apps/api/core';import { GOOGLE_GMAIL_IDP } from './email';-export type StartSsoLoginParams = {+type StartSsoLoginParams = {idpName?: string;/** Where to redirect after auth on web. Ignored on native mobile. */returnPath?: string;diff --git a/js/app/packages/core/block.ts b/js/app/packages/core/block.tsindex dbe6d1062b..2fe724c068 100644--- a/js/app/packages/core/block.ts+++ b/js/app/packages/core/block.ts@@ -97,7 +97,7 @@ export const NonDocumentBlockTypes = [* The key is block on the left of the the split and the value is a set of* allowed blocks on the right.*/-export type BlockCombinationRules = {+type BlockCombinationRules = {[Key in BlockName | BlockAlias]: Set<BlockName>;};@@ -124,7 +124,7 @@ function exclude(excludeSet: BlockName[]) {/*** Defines the block combinations that are valid.*/-export const ValidBlockCombinations: BlockCombinationRules = {+const _ValidBlockCombinations: BlockCombinationRules = {call: allBlockNames,chat: allBlockNames,pdf: ENABLE_PDF_MULTISPLIT ? allBlockNames : exclude(['pdf']),@@ -188,7 +188,7 @@ type LoadErrorCodes = keyof typeof LoadErrors;* @param {Result<T, ResultError<string>[]>} result - The result to convert.* @returns {Result<T, ResultError<keyof typeof LoadErrors>[]>} A new Result with a load error code.*/-export function toLoadResult<E extends string, T extends ObjectLike>(+function toLoadResult<E extends string, T extends ObjectLike>(result: Result<T, ResultError<E>[]>): Result<T, ResultError<keyof typeof LoadErrors>[]> {if (result.isErr() && result.error.some((error) => error.code === 'GONE')) {@@ -234,7 +234,7 @@ export async function loadResult<* @param {(value: T) => U} fn - The function to apply to the ok value.* @returns {Result<U, ResultError<LoadErrorCodes>[]>} A new Result with the mapped value or a load error.*/-export function mapLoadResult<T extends ObjectLike, U extends ObjectLike>(+function _mapLoadResult<T extends ObjectLike, U extends ObjectLike>(result: Result<T, ResultError<string>[]>,fn: (value: T) => U): Result<U, ResultError<LoadErrorCodes>[]> {@@ -415,7 +415,7 @@ export function defineBlock</*** Represents a function that can be used as a block effect.*/-export type BlockEffect = (...args: any[]) => any;+type BlockEffect = (...args: any[]) => any;/*** After the the render phase, automatically reruns the function whenever the block's signal and@@ -742,7 +742,7 @@ If you are calling a block signal directly in an async method, you need to destr};}-export type BlockSignal<T> = [get: Accessor<T>, set: Setter<T>] & {+type BlockSignal<T> = [get: Accessor<T>, set: Setter<T>] & {(): T;get: Accessor<T>;set: Setter<T>;@@ -856,7 +856,7 @@ export function createBlockStore<T extends object>(return createBlockEntity(createStore, structuredClone(initialValue)) as any;}-export type BlockInitializedResource<T, R = unknown> = [+type BlockInitializedResource<T, R = unknown> = [get: InitializedResource<T>,set: ResourceActions<T, R>,] & {@@ -865,7 +865,7 @@ export type BlockInitializedResource<T, R = unknown> = [set: ResourceActions<T, R>;};-export type BlockResource<T, R = unknown> = [+type BlockResource<T, R = unknown> = [get: Resource<T>,set: ResourceActions<T, R>,] & {@@ -951,7 +951,7 @@ export function createBlockResource<T, S, R>() as any;}-export type BlockMemo<T> = Accessor<T>;+type BlockMemo<T> = Accessor<T>;/*** Creates a block-scoped memo that derives a value from other reactive dependencies.@@ -1077,7 +1077,7 @@ export const blockDataSignalAs = <T extends Record<string, any>>(* @param args Block signals or stores* @returns New function with bound getters*/-export function withBlock<A extends any[], B extends any[], R>(+function _withBlock<A extends any[], B extends any[], R>(fn: (...args: [...A, ...B]) => R,...args: A): (...args: B) => R {diff --git a/js/app/packages/core/blockMethodRegistry.ts b/js/app/packages/core/blockMethodRegistry.tsindex 2b31029d67..b059120424 100644--- a/js/app/packages/core/blockMethodRegistry.ts+++ b/js/app/packages/core/blockMethodRegistry.ts@@ -4,10 +4,7 @@ import type { MarkdownBlockSpec } from '../block-md/definition';import type { BlockName } from './block';// Base type for all block method specs-export type BlockMethodSpec = Record<- string,- (...args: any[]) => any | Promise<any>->;+type BlockMethodSpec = Record<string, (...args: any[]) => any | Promise<any>>;export type SharedBlockSpec = {goToLocationFromParams: (params: Record<string, any>) => Promise<void>;diff --git a/js/app/packages/core/client/zipWorkerClient.ts b/js/app/packages/core/client/zipWorkerClient.tsindex 2f11850f07..94b8949a0a 100644--- a/js/app/packages/core/client/zipWorkerClient.ts+++ b/js/app/packages/core/client/zipWorkerClient.ts@@ -93,28 +93,28 @@ export class DirectoryFileSizeExceededError extends Error {}// Types for the worker communication-export interface ZipTaskMessage {+interface ZipTaskMessage {action: 'zipFiles';files: File[];fileDetails: FileDetail[];taskId?: string; // Added by the pool}-export interface ZipProgressData {+interface ZipProgressData {percentage?: number;message: string;}-export interface ZipCompleteData {+interface ZipCompleteData {zipBlob: Blob;tempFilename: string;}-export interface ZipErrorData {+interface ZipErrorData {message: string;}-export interface WorkerMessage {+interface WorkerMessage {taskId: string;type: 'progress' | 'complete' | 'error' | 'status';data: ZipProgressData | ZipCompleteData | ZipErrorData;@@ -124,7 +124,7 @@ export interface FileDetail {path: string;}-export interface Task {+interface Task {id: string;message: ZipTaskMessage;onProgress?: (data: ZipProgressData) => void;@@ -157,7 +157,7 @@ class ZipWorkerWrapper {const MIN_WORKERS = 2;const MAX_WORKERS = 6;-export class ZipWorkerPool {+class ZipWorkerPool {private workerConstructor: new () => Worker;private size: number;private workers: ZipWorkerWrapper[];diff --git a/js/app/packages/core/collab/awareness.ts b/js/app/packages/core/collab/awareness.tsindex 1a289ea357..aafb80251e 100644--- a/js/app/packages/core/collab/awareness.ts+++ b/js/app/packages/core/collab/awareness.ts@@ -11,7 +11,7 @@ import type { RawUpdate } from './shared';/** The default timeout for a user's awareness is 10 seconds */const DEFAULT_AWARENESS_TIMEOUT = 10_000;-export type PeerAwarenessRaw<EncodedSelection extends Value = Value> = {+type PeerAwarenessRaw<EncodedSelection extends Value = Value> = {user: { userId: string | undefined; color: string; peerId: PeerID };selection: EncodedSelection | undefined;};diff --git a/js/app/packages/core/collab/engine.ts b/js/app/packages/core/collab/engine.tsindex bae829f8cd..6e4d1c5478 100644--- a/js/app/packages/core/collab/engine.ts+++ b/js/app/packages/core/collab/engine.ts@@ -10,7 +10,7 @@ import type { GenericRootSchema, LoroRawUpdate, RawUpdate } from './shared';import type { SyncSource, TimeoutError } from './source';import { compareLoroDocVersions, loroDocFromSnapshot } from './utils';-export type EngineBindings<S extends GenericRootSchema, D> = {+type EngineBindings<S extends GenericRootSchema, D> = {/*** Callback for handling state updates from the remote* @param state - The serialized state@@ -24,7 +24,7 @@ export type EngineBindings<S extends GenericRootSchema, D> = {syncFromAwareness?: (awareness: D) => void;};-export type Engine<S extends GenericRootSchema, D> = {+type Engine<S extends GenericRootSchema, D> = {/** Is the engine running ¯\_(ツ)_/¯ */readonly isRunning: Accessor<boolean>;/**diff --git a/js/app/packages/core/collab/manager.ts b/js/app/packages/core/collab/manager.tsindex 0399e5de32..60ecb20531 100644--- a/js/app/packages/core/collab/manager.ts+++ b/js/app/packages/core/collab/manager.ts@@ -573,7 +573,7 @@ export function createLoroDoc(): LoroDoc {return doc;}-export function createMirror<S extends GenericRootSchema>(+function createMirror<S extends GenericRootSchema>(doc: LoroDoc,schema: S): Mirror<S> {diff --git a/js/app/packages/core/collab/shared.ts b/js/app/packages/core/collab/shared.tsindex 80cdd8bbe6..e09ac04355 100644--- a/js/app/packages/core/collab/shared.ts+++ b/js/app/packages/core/collab/shared.ts@@ -1,6 +1,5 @@import type {ContainerSchemaType,- InferType,RootSchemaType,} from '@loro-mirror/packages/core/src';@@ -8,13 +7,6 @@ export type RawUpdate = Uint8Array;export type LoroRawUpdate = Uint8Array;-export type SyncState<S extends GenericRootSchema = GenericRootSchema> =- InferType<S>;-export type GenericRootSchema = RootSchemaType<Record<string, ContainerSchemaType>>;--export type SubscriptionCallback<T> = (message: T) => void;--export type Subscription = () => void;diff --git a/js/app/packages/core/collab/source.ts b/js/app/packages/core/collab/source.tsindex e7ea8575e4..2f86d5c777 100644--- a/js/app/packages/core/collab/source.ts+++ b/js/app/packages/core/collab/source.ts@@ -4,7 +4,7 @@ import type { ResultAsync } from 'neverthrow';import type { Accessor } from 'solid-js';import type { RawUpdate } from './shared';-export const SYNC_SOURCE_EVENT_TYPES = {+const _SYNC_SOURCE_EVENT_TYPES = {Connect: 'connect',Awareness: 'awareness',Reconnect: 'reconnect',@@ -28,8 +28,6 @@ export type SyncSourceEvent =| { type: 'update'; update: RawUpdate }| { type: 'error'; error: Error };-export type SyncSourceEventType = SyncSourceEvent['type'];-export type AuthorizationError = {type: 'authorization_error';reason: string;diff --git a/js/app/packages/core/collab/time-travel.ts b/js/app/packages/core/collab/time-travel.tsindex b637308e39..3ec462aa32 100644--- a/js/app/packages/core/collab/time-travel.ts+++ b/js/app/packages/core/collab/time-travel.ts@@ -1,13 +1,5 @@import { syncServiceClient } from '@service-sync/client';-import {- type Change,- type JsonOp,- type ListOp,- LoroDoc,- type MapOp,- type TextOp,- type TreeOp,-} from 'loro-crdt';+import { type Change, LoroDoc } from 'loro-crdt';export type BaseHistory = {readonly userId: string;@@ -16,16 +8,6 @@ export type BaseHistory = {readonly change: Change;};-export type HistoryWithDiff<T> = BaseHistory & {- readonly diff: T;-};--export type Op = ListOp | MapOp | TreeOp | TextOp | JsonOp;--export interface OpSerializer<T> {- serialize(ops: Op[], doc: LoroDoc): T;-}-type UnixTimestamp = number;type Milliseconds = number;@@ -56,7 +38,7 @@ const DEFAULT_GROUPING_CONFIG: GroupingConfig = {minChanges: 1,};-export type DocumentHistoryOptions = {+type DocumentHistoryOptions = {readonly grouping?: GroupingConfig;};@@ -100,7 +82,7 @@ function changeInWindow(change: BaseHistory, window: TimeWindow): boolean {* Two changes belong to the same session if they're within `pauseThreshold` of each other.* Uses interval merging: treat each change as a time window, merge overlapping windows.*/-export function groupHistory(+function groupHistory(history: readonly BaseHistory[],config: GroupingConfig = DEFAULT_GROUPING_CONFIG): HistoryGroup[] {@@ -191,7 +173,7 @@ async function fetchRawHistory(documentId: string): Promise<BaseHistory[]> {return history.sort((a, b) => a.timestamp - b.timestamp);}-export function applyGrouping(+function applyGrouping(history: readonly BaseHistory[],config?: GroupingConfig): GroupedHistory[] {diff --git a/js/app/packages/core/comments/Inputs.tsx b/js/app/packages/core/comments/Inputs.tsxindex 35ddb0b058..f5e102fde6 100644--- a/js/app/packages/core/comments/Inputs.tsx+++ b/js/app/packages/core/comments/Inputs.tsx@@ -6,7 +6,7 @@ import { Button, cn } from '@ui';import { batch, createEffect, createSignal, Show, useContext } from 'solid-js';import { CommentsContext, ThreadContext } from './Thread';-export function EditBottomRow(props: {+function EditBottomRow(props: {handleCancel: (e: MouseEvent) => void;handleSend: () => void;hideHorizontalPadding?: boolean;diff --git a/js/app/packages/core/comments/MessageTopRow.tsx b/js/app/packages/core/comments/MessageTopRow.tsxindex bcc428a58d..b5ad6a436c 100644--- a/js/app/packages/core/comments/MessageTopRow.tsx+++ b/js/app/packages/core/comments/MessageTopRow.tsx@@ -19,22 +19,7 @@ const NewTag = () => {);};-export enum Color {- gray,- red,- amber,- yellow,- green,- teal,- sky,- blue,- indigo,- purple,- pink,- rose,-}--export function MessageRow(+function MessageRow(props: ParentProps<{authorId: string | null;date?: DateValue | null;@@ -55,7 +40,7 @@ export function MessageRow();}-export function MessageRowUI(+function MessageRowUI(props: ParentProps<{authorId: string;date?: DateValue | null;diff --git a/js/app/packages/core/component/AI/component/InlineAi.tsx b/js/app/packages/core/component/AI/component/InlineAi.tsxindex 4fd3439376..465e94890a 100644--- a/js/app/packages/core/component/AI/component/InlineAi.tsx+++ b/js/app/packages/core/component/AI/component/InlineAi.tsx@@ -5,18 +5,7 @@ import { createSignal, onMount } from 'solid-js';const defaultPlaceholder = 'Generate with AI...';-export enum AiState {- // pressing enter causes state transition- Ready,- // pressing enter show spinner, transition on event- Processing,- // do nothing- Disabled,- // loading but can be stopped- Stopable,-}--export type InlineInputReadyProps = {+type InlineInputReadyProps = {// send message to chatsendCallback: (input: string) => void;closeInput?: () => void;@@ -24,7 +13,7 @@ export type InlineInputReadyProps = {options?: InlineInputOptions;};-export type InlineInputOptions = {+type InlineInputOptions = {defaultLines?: number;placeholderText?: string;focusOnMount?: boolean;@@ -112,7 +101,7 @@ export function InlineInputReady(props: InlineInputReadyProps) {);}-export type InlineInputLoadingProps = {+type InlineInputLoadingProps = {options?: InlineInputOptions;};diff --git a/js/app/packages/core/component/AI/component/debug/mockData.ts b/js/app/packages/core/component/AI/component/debug/mockData.tsindex c193464177..345702d62e 100644--- a/js/app/packages/core/component/AI/component/debug/mockData.ts+++ b/js/app/packages/core/component/AI/component/debug/mockData.ts@@ -6,7 +6,6 @@ import { createEffect } from 'solid-js';export { mockMessages } from '@core/component/AI/util/mockMessage';export * from '@core/component/AI/util/stream';-export { limitStream } from '@core/component/AI/util/stream';const TABLE = `Here's a comparison table:@@ -66,7 +65,7 @@ export function table() {]);}-export function test() {+function _test() {const stream = poem();createEffect(() => {const data = stream.data();diff --git a/js/app/packages/core/component/AI/component/input/ChatInput.tsx b/js/app/packages/core/component/AI/component/input/ChatInput.tsxindex ac7c012895..901f498f29 100644--- a/js/app/packages/core/component/AI/component/input/ChatInput.tsx+++ b/js/app/packages/core/component/AI/component/input/ChatInput.tsx@@ -21,7 +21,7 @@ import { AttachmentList } from './Attachment';import { ChatAttachMenu } from './ChatAttachMenu';import { useAiDataConsentGate } from './useAiDataConsent';-export type ChatInputProps = {+type ChatInputProps = {onSend: (args: ChatSendInput) => void;onStop?: () => void;onEscape?: (e: KeyboardEvent) => boolean;@@ -31,7 +31,7 @@ export type ChatInputProps = {chatId?: string;};-export type ChatInputComponentProps = {+type ChatInputComponentProps = {editor: EditorConfigBuilder;initialValue?: string;onChange?: (markdown: string) => void;diff --git a/js/app/packages/core/component/AI/component/input/ModelSelector.tsx b/js/app/packages/core/component/AI/component/input/ModelSelector.tsxindex 3a18d2c526..9334a7fd2a 100644--- a/js/app/packages/core/component/AI/component/input/ModelSelector.tsx+++ b/js/app/packages/core/component/AI/component/input/ModelSelector.tsx@@ -12,7 +12,7 @@ import { Button } from '@ui';import type { Accessor } from 'solid-js';import { For } from 'solid-js';-export type ModelSelectorProps = {+type ModelSelectorProps = {selectedModel?: TModel;availableModels?: Accessor<TModel[]>;onSelect: (model: TModel) => void;diff --git a/js/app/packages/core/component/AI/component/input/SendMessageButton.tsx b/js/app/packages/core/component/AI/component/input/SendMessageButton.tsxdeleted file mode 100644index 107eb4e2f8..0000000000--- a/js/app/packages/core/component/AI/component/input/SendMessageButton.tsx+++ /dev/null@@ -1,31 +0,0 @@-import StopIcon from '@phosphor-icons/core/bold/stop-bold.svg?component-solid';-import PaperPlaneRight from '@phosphor-icons/core/fill/paper-plane-right-fill.svg?component-solid';-import type { Accessor } from 'solid-js';--export function SendMessageButton(props: {- // not your chat or empty input- isDisabled: Accessor<boolean>;- onClick: () => void;-}) {- return (- <button- disabled={props.isDisabled()}- onClick={() => {- if (!props.isDisabled()) props.onClick();- }}- class="text-ink-muted bg-transparent rounded-full hover:scale-110! transition ease-in-out delay-150 flex flex-col justify-center items-center"- >- <div class="group hover:bg-accent transition ease-in-out size-6 border border-accent rounded-full flex items-center justify-center">- <PaperPlaneRight class="group-hover:text-surface! group-hover:fill-surface! text-accent! fill-accent! size-4 transition ease-in-out" />- </div>- </button>- );-}--export function StopButton(props: { onClick: () => void }) {- return (- <button onClick={(_) => props.onClick()}>- <StopIcon class="text-ink-muted hover:scale-110" width={20} height={20} />- </button>- );-}diff --git a/js/app/packages/core/component/AI/component/input/ToolsetSelector.tsx b/js/app/packages/core/component/AI/component/input/ToolsetSelector.tsxdeleted file mode 100644index 7ff50cb545..0000000000--- a/js/app/packages/core/component/AI/component/input/ToolsetSelector.tsx+++ /dev/null@@ -1,55 +0,0 @@-import type { ToolSet } from '@service-cognition/generated/schemas';-import { Dropdown, SegmentedControl } from '@ui';-import { Show, type Signal } from 'solid-js';--export type Source = 'chat' | 'channel' | 'document' | 'email' | 'everything';--const SOURCES = [- { value: 'everything' as const, label: 'ALL' },- { value: 'chat' as const, label: 'CHATS' },- { value: 'channel' as const, label: 'CHANNELS' },- { value: 'document' as const, label: 'DOCUMENTS' },- { value: 'email' as const, label: 'EMAILS' },-] as const;--const SOURCE_TO_DISPLAY = Object.fromEntries(- SOURCES.map((s) => [s.value, s.label])-) as Record<Source, string>;--export function ToolsetSelector(props: {- toolset: Signal<ToolSet>;- sources: Signal<Source>;-}) {- const [toolset, _setToolset] = props.toolset;- const [source, setSource] = props.sources;-- return (- <div class="flex items-center gap-x-1">- <Show when={toolset().type === 'all'}>- <div class="flex">- <Dropdown>- <Dropdown.Trigger size="sm">- <span>SOURCE</span>- </Dropdown.Trigger>- <Dropdown.Portal>- <Dropdown.Content>- <SegmentedControl- size="sm"- value={source()}- onChange={(s) => setSource(s)}- options={SOURCES.map((s) => ({- value: s.value,- label: s.label,- }))}- />- </Dropdown.Content>- </Dropdown.Portal>- </Dropdown>- <span class="bg-edge-muted text-ink font-mono text-xs font-medium px-1 flex items-center">- {SOURCE_TO_DISPLAY[source()]}- </span>- </div>- </Show>- </div>- );-}diff --git a/js/app/packages/core/component/AI/component/input/buildRequest.ts b/js/app/packages/core/component/AI/component/input/buildRequest.tsindex 3fb0b0a07d..6a3885d02e 100644--- a/js/app/packages/core/component/AI/component/input/buildRequest.ts+++ b/js/app/packages/core/component/AI/component/input/buildRequest.ts@@ -16,7 +16,7 @@ export type ChatSendInput = {metaKey?: boolean;};-export type SendChatMessageResult =+type SendChatMessageResult =| { stream: ChatMessageStream; chat_id: string }| { error: true; paymentError?: boolean };diff --git a/js/app/packages/core/component/AI/component/input/index.ts b/js/app/packages/core/component/AI/component/input/index.tsdeleted file mode 100644index 09a3d7b2ce..0000000000--- a/js/app/packages/core/component/AI/component/input/index.ts+++ /dev/null@@ -1,5 +0,0 @@-export {- ChatInput,- type ChatInputComponentProps,- type ChatInputProps,-} from './ChatInput';diff --git a/js/app/packages/core/component/AI/component/input/sendMode.ts b/js/app/packages/core/component/AI/component/input/sendMode.tsindex 0e2732ca28..682603c5f2 100644--- a/js/app/packages/core/component/AI/component/input/sendMode.ts+++ b/js/app/packages/core/component/AI/component/input/sendMode.ts@@ -1,4 +1,4 @@-export type ChatSendMode = 'foreground' | 'background';+type ChatSendMode = 'foreground' | 'background';export function getSendModeFromEnterKeyEvent(event: {shiftKey: boolean;diff --git a/js/app/packages/core/component/AI/component/message/AssistantMessage.tsx b/js/app/packages/core/component/AI/component/message/AssistantMessage.tsxindex f373c93e05..585cd82f09 100644--- a/js/app/packages/core/component/AI/component/message/AssistantMessage.tsx+++ b/js/app/packages/core/component/AI/component/message/AssistantMessage.tsx@@ -35,7 +35,7 @@ function messageContentIsEmpty(content: ChatMessageContent) {}}-export function extractMessageText(content: ChatMessageContent) {+function extractMessageText(content: ChatMessageContent) {if (typeof content === 'string') {return content;} else if (Array.isArray(content)) {diff --git a/js/app/packages/core/component/AI/component/message/AssistantMessageActionMenu.tsx b/js/app/packages/core/component/AI/component/message/AssistantMessageActionMenu.tsxdeleted file mode 100644index 203e2eb641..0000000000--- a/js/app/packages/core/component/AI/component/message/AssistantMessageActionMenu.tsx+++ /dev/null@@ -1,124 +0,0 @@-import {- DEFAULT_MODEL,- MODEL_PRETTYNAME,- MODEL_PROVIDER_ICON,-} from '@core/component/AI/constant/model';-import { replaceCitations } from '@core/component/LexicalMarkdown/citationsUtils';-import { createMarkdownFile } from '@core/util/create';-import CheckIcon from '@phosphor-icons/core/bold/check-bold.svg?component-solid';-import ClipboardIcon from '@phosphor-icons/core/bold/clipboard-bold.svg?component-solid';-import NotesIcon from '@phosphor-icons/core/bold/file-md-bold.svg?component-solid';-import LoadingIcon from '@phosphor-icons/core/bold/spinner-gap-bold.svg?component-solid';-import { generateTitle } from '@service-cognition/client';-import type { ChatMessageWithAttachments } from '@service-cognition/generated/schemas/chatMessageWithAttachments';-import { createCallback } from '@solid-primitives/rootless';-import { useSplitLayout } from 'app/component/split-layout/layout';-import { createSignal, Match, Show, Switch } from 'solid-js';-import { Dynamic } from 'solid-js/web';-import { extractMessageText } from './AssistantMessage';--type AssistantActionProps = {- message: ChatMessageWithAttachments;-};--export function AssistantMessageActionAndMetadata(props: AssistantActionProps) {- const modelName = () => {- return MODEL_PRETTYNAME[DEFAULT_MODEL];- };-- const modelIcon = () => {- return MODEL_PROVIDER_ICON[DEFAULT_MODEL];- };-- const handleCopy = async () => {- const text = extractMessageText(props.message.content);- const cleanedText = text.replace(/\[\[.*?\]\]/g, '');-- const clipboardItem = new ClipboardItem({- 'text/plain': new Blob([cleanedText], { type: 'text/plain' }),- });- let written = false;- // try rich and plain first. Not avail in all browsers and contexts.- try {- await navigator.clipboard.write([clipboardItem]);- written = true;- setCopied(true);- setTimeout(() => setCopied(false), 2000);- } catch {}-- if (!written) {- try {- await navigator.clipboard.writeText(cleanedText);- written = true;- setCopied(true);- setTimeout(() => setCopied(false), 2000);- } catch {}- }- };-- const [copied, setCopied] = createSignal(false);- const [isLoading, setIsLoading] = createSignal(false);- const { insertSplit } = useSplitLayout();- const handleEditInMarkdown = createCallback(async () => {- setIsLoading(true);- const content: string = await replaceCitations(- extractMessageText(props.message.content)- );-- const title = await generateTitle(content.replace(/\[\[.*?\]\]/g, ''));-- const documentId = await createMarkdownFile({- content,- title: title ?? `AI Message`,- });-- if (!documentId) {- console.error('Error opening AI message in Notes');- setIsLoading(false);- return;- }-- insertSplit({- type: 'md',- id: documentId,- });- setIsLoading(false);- });-- return (- <div class="flex flex-row w-full justify-start items-center h-8 px-2 space-x-2">- <div class="flex flex-row space-x-2 items-center text-xs text-ink-muted">- <Dynamic component={modelIcon()} width={12} height={12} />- <p>{modelName()}</p>-- <Switch>- <Match when={!isLoading()}>- <button- class="flex flex-row items-center space-x-1 hover:bg-hover hover-transition-bg rounded-md p-1 text-xs font-sans"- onClick={handleEditInMarkdown}- >- <NotesIcon class="size-3 text-note" />- </button>- </Match>- <Match when={isLoading()}>- <LoadingIcon class="size-3 animate-spin" />- </Match>- </Switch>- <div class="w-fit">- <button- class="flex flex-row items-center space-x-1 hover:bg-hover hover-transition-bg rounded-md p-1 text-xs font-sans"- onClick={handleCopy}- >- <Show- when={!copied()}- fallback={<CheckIcon class="size-3 text-success" />}- >- <ClipboardIcon class="size-3" />- </Show>- <p>{copied() ? 'Copied!' : 'Copy'}</p>- </button>- </div>- </div>- </div>- );-}diff --git a/js/app/packages/core/component/AI/component/message/ChatMessages.tsx b/js/app/packages/core/component/AI/component/message/ChatMessages.tsxindex e4f2d70056..4c24612454 100644--- a/js/app/packages/core/component/AI/component/message/ChatMessages.tsx+++ b/js/app/packages/core/component/AI/component/message/ChatMessages.tsx@@ -25,7 +25,7 @@ import { AssistantMessage } from './AssistantMessage';import { EmptyChatState } from './EmptyChatState';import { UserMessage } from './UserMessage';-export type MessageActions = {};+type MessageActions = {};function OnMount(props: {onShow: (ref: HTMLDivElement) => void;@@ -38,7 +38,7 @@ function OnMount(props: {return <div ref={ref}>{props.children}</div>;}-export type ChatMessagesProps = {+type ChatMessagesProps = {messageActions?: MessageActions;editDisabled?: boolean;pendingLocationParams?: Accessor<Record<string, string> | undefined>;diff --git a/js/app/packages/core/component/AI/component/message/MessageActionMenu.tsx b/js/app/packages/core/component/AI/component/message/MessageActionMenu.tsxdeleted file mode 100644index 9a7dba048e..0000000000--- a/js/app/packages/core/component/AI/component/message/MessageActionMenu.tsx+++ /dev/null@@ -1,29 +0,0 @@-import Copy from '@phosphor-icons/core/regular/copy.svg?component-solid';-import Pencil from '@phosphor-icons/core/regular/pencil.svg?component-solid';--import { type Accessor, Show } from 'solid-js';--export function MessageActionMenu(props: {- isLastmessage: Accessor<boolean>;- onCopy: () => void;- onEdit: () => void;-}) {- return (- <div class="flex items-center gap-1">- <Show when={props.isLastmessage()}>- <div- class="rounded-full hover:bg-hover hover-transition-bg p-1 text-ink-muted"- onClick={props.onEdit}- >- <Pencil class="size-5" />- </div>- </Show>- <div- class="rounded-full hover:bg-hover hover-transition-bg p-1 text-ink-muted"- onClick={props.onCopy}- >- <Copy class="size-5" />- </div>- </div>- );-}diff --git a/js/app/packages/core/component/AI/component/message/index.ts b/js/app/packages/core/component/AI/component/message/index.tsdeleted file mode 100644index f5a70381b5..0000000000--- a/js/app/packages/core/component/AI/component/message/index.ts+++ /dev/null@@ -1 +0,0 @@-export { ChatMessages, type ChatMessagesProps } from './ChatMessages';diff --git a/js/app/packages/core/component/AI/component/tool/ToolRenderer.tsx b/js/app/packages/core/component/AI/component/tool/ToolRenderer.tsxindex 4b6fcc0036..ab731b6d2d 100644--- a/js/app/packages/core/component/AI/component/tool/ToolRenderer.tsx+++ b/js/app/packages/core/component/AI/component/tool/ToolRenderer.tsx@@ -46,7 +46,7 @@ export interface ToolHandler<TName extends ToolName, TRenderContext> {render: Component<ToolRenderContext<TName> & TRenderContext>;}-export interface ToolRendererConfig<TName extends ToolName, TRenderContext> {+interface ToolRendererConfig<TName extends ToolName, TRenderContext> {name: TName;render: Component<ToolRenderContext<TName> & TRenderContext>;handleCall?: (diff --git a/js/app/packages/core/component/AI/constant/fileType.ts b/js/app/packages/core/component/AI/constant/fileType.tsindex 3d214d6999..c28bab3744 100644--- a/js/app/packages/core/component/AI/constant/fileType.ts+++ b/js/app/packages/core/component/AI/constant/fileType.ts@@ -28,7 +28,7 @@ export const SUPPORTED_IMAGE_ATTACHMENT_EXTENSIONS = [...CONVERSION_SUPPORTED_IMAGE_EXTENSIONS,];-export const SUPPORTED_DOCUMENT_ATTACHMENT_EXTENSIONS = [+const SUPPORTED_DOCUMENT_ATTACHMENT_EXTENSIONS = ['pdf','docx','md',diff --git a/js/app/packages/core/component/AI/constant/model.ts b/js/app/packages/core/component/AI/constant/model.tsindex 0a164900b3..c5d3625126 100644--- a/js/app/packages/core/component/AI/constant/model.ts+++ b/js/app/packages/core/component/AI/constant/model.ts@@ -5,7 +5,6 @@ import type { Model } from '@core/component/AI/types';// import OpenAiLogoIcon from '@phosphor-icons/core/regular/open-ai-logo.svg?component-solid';export { Model } from '@core/component/AI/types';-export { AllModels } from '@service-cognition/generated/schemas/model';type ExhaustiveMap = {[K in Model]: any;@@ -25,6 +24,6 @@ export const MODEL_PROVIDER_ICON: ExhaustiveMap = {'claude-opus-4-6': AnthropicIcon,};-export const SMART_MODE_MODEL: Model = 'claude-opus-4-6';+const _SMART_MODE_MODEL: Model = 'claude-opus-4-6';export const DEFAULT_MODEL: Model = 'claude-opus-4-6';diff --git a/js/app/packages/core/component/AI/context/ChatContext.tsx b/js/app/packages/core/component/AI/context/ChatContext.tsxindex bcacff2fa7..9b182bf256 100644--- a/js/app/packages/core/component/AI/context/ChatContext.tsx+++ b/js/app/packages/core/component/AI/context/ChatContext.tsx@@ -18,7 +18,7 @@ import { createContext, createSignal, useContext } from 'solid-js';// ---- Uncreated state (always present) -----export type ChatInputState = {+type ChatInputState = {model: Accessor<Model>;setModel: (model?: Model) => void;isGenerating: Accessor<boolean>;@@ -74,7 +74,7 @@ export function useChatInputContext(): ChatInputState {// ---- Created state (only when chat exists) -----export type ChatState = ChatController;+type ChatState = ChatController;const ChatCtx = createContext<ChatState>();@@ -104,6 +104,6 @@ export function useChatContext(): ChatState {return ctx;}-export function useChatContextOptional(): ChatState | undefined {+function _useChatContextOptional(): ChatState | undefined {return useContext(ChatCtx);}diff --git a/js/app/packages/core/component/AI/context/index.ts b/js/app/packages/core/component/AI/context/index.tsindex f9c31686c0..3b4cd64dbd 100644--- a/js/app/packages/core/component/AI/context/index.ts+++ b/js/app/packages/core/component/AI/context/index.ts@@ -1,11 +1,6 @@-export type { ChatEvent, ChatPhase } from '@core/component/AI/state/chatState';-export type { ChatController } from '@core/component/AI/state/createChatController';export {ChatInputProvider,- type ChatInputState,ChatProvider,- type ChatState,useChatContext,- useChatContextOptional,useChatInputContext,} from './ChatContext';diff --git a/js/app/packages/core/component/AI/state/chatState.ts b/js/app/packages/core/component/AI/state/chatState.tsindex 89dba7f2d2..efd48f07ee 100644--- a/js/app/packages/core/component/AI/state/chatState.ts+++ b/js/app/packages/core/component/AI/state/chatState.ts@@ -39,7 +39,7 @@ export type SideEffect =// --- Transition result ----export type TransitionResult = {+type TransitionResult = {phase: ChatPhase;messages?: (prev: ChatMessageWithAttachments[]diff --git a/js/app/packages/core/component/AI/types/util.ts b/js/app/packages/core/component/AI/types/util.tsdeleted file mode 100644index fca7516187..0000000000--- a/js/app/packages/core/component/AI/types/util.ts+++ /dev/null@@ -1 +0,0 @@-// Edit request utilities - currently unused, edit flow handled inline in ChatMessages.tsxdiff --git a/js/app/packages/core/component/AI/util/stream/extendedStream.ts b/js/app/packages/core/component/AI/util/stream/extendedStream.tsindex 4a03121010..f502591040 100644--- a/js/app/packages/core/component/AI/util/stream/extendedStream.ts+++ b/js/app/packages/core/component/AI/util/stream/extendedStream.ts@@ -6,7 +6,7 @@ type StreamLike = { data: Accessor<ChatStream[]> };type Extended<T, U> = T & U;-export interface TimedStream {+interface TimedStream {timeToFirstMessageMs: () => undefined | number;}@@ -28,7 +28,7 @@ export function timeStream<T extends StreamLike>(};}-export interface IddStream {+interface IddStream {messageId: () => undefined | string;}diff --git a/js/app/packages/core/component/AI/util/stream/mockStream.ts b/js/app/packages/core/component/AI/util/stream/mockStream.tsindex 83a9d91c23..0407bd82d7 100644--- a/js/app/packages/core/component/AI/util/stream/mockStream.ts+++ b/js/app/packages/core/component/AI/util/stream/mockStream.ts@@ -88,7 +88,7 @@ export function delayStream(}// stop a stream at chunk n-export function limitStream(+function _limitStream(stream: ChatMessageStream,itemLimit: number): ChatMessageStream {@@ -117,7 +117,7 @@ export function blockDone(stream: ChatMessageStream): ChatMessageStream {};}-export function splitStream(+function splitStream(stream: ChatMessageStream,split: Splitter): ChatMessageStream {diff --git a/js/app/packages/core/component/AI/util/stream/networkProfile.ts b/js/app/packages/core/component/AI/util/stream/networkProfile.tsindex 1e9652b1f8..c9048b70d8 100644--- a/js/app/packages/core/component/AI/util/stream/networkProfile.ts+++ b/js/app/packages/core/component/AI/util/stream/networkProfile.ts@@ -4,6 +4,6 @@ export const slowFirst: NetworkDelay = (i) => {if (i === 0) return 3500;else return 15;};-export const constantDelay: NetworkDelay = () => 15;+const _constantDelay: NetworkDelay = () => 15;export const noDelay: NetworkDelay = () => 0;-export const smallDelay: NetworkDelay = () => 1;+const _smallDelay: NetworkDelay = () => 1;diff --git a/js/app/packages/core/component/AI/util/stream/pausableStream.ts b/js/app/packages/core/component/AI/util/stream/pausableStream.tsindex 1180552250..49b363942d 100644--- a/js/app/packages/core/component/AI/util/stream/pausableStream.ts+++ b/js/app/packages/core/component/AI/util/stream/pausableStream.ts@@ -4,7 +4,7 @@ import { createEffect, createSignal, on, onCleanup } from 'solid-js';import type { StreamItem } from '.';import { MOCK_ID } from './mockStream';-export interface PausableStreamOptions {+interface PausableStreamOptions {isPaused: Accessor<boolean>;isSlow: Accessor<boolean>;onChunk?: (text: string) => void;diff --git a/js/app/packages/core/component/AI/util/stream/splitStream.ts b/js/app/packages/core/component/AI/util/stream/splitStream.tsindex e4a5eee682..1ddd375efb 100644--- a/js/app/packages/core/component/AI/util/stream/splitStream.ts+++ b/js/app/packages/core/component/AI/util/stream/splitStream.ts@@ -1,7 +1,7 @@import type { StreamItem } from '.';import type { Splitter } from './types';-export const noSplit: Splitter = (items) => items;+const _noSplit: Splitter = (items) => items;export const characters: (n: number) => Splitter = (n) => (items) => {const splitItems: StreamItem[] = [];diff --git a/js/app/packages/core/component/BetaBadge.tsx b/js/app/packages/core/component/BetaBadge.tsxdeleted file mode 100644index 41f6d72416..0000000000--- a/js/app/packages/core/component/BetaBadge.tsx+++ /dev/null@@ -1,12 +0,0 @@-export function BetaBadge() {- return (- <div class="hidden sm:flex px-2 rounded-lg border border-accent/50 py-0.5 bg-accent/10 justify-center items-center">- <p- class="text-accent text-xs font-medium whitespace-nowrap"- aria-label="Beta Badge"- >- Beta- </p>- </div>- );-}diff --git a/js/app/packages/core/component/BlockContainer.tsx b/js/app/packages/core/component/BlockContainer.tsxindex 2d504af81d..add6634b70 100644--- a/js/app/packages/core/component/BlockContainer.tsx+++ b/js/app/packages/core/component/BlockContainer.tsx@@ -17,7 +17,7 @@ import {} from '../signal/blockElement';// TODO: handle nested state-export const getBlockElementId = (blockId: string) => `block-${blockId}`;+const getBlockElementId = (blockId: string) => `block-${blockId}`;/** 20 seconds ping interval */const PING_INTERVAL = 20_000;diff --git a/js/app/packages/core/component/DatePicker/DatePickerUI.tsx b/js/app/packages/core/component/DatePicker/DatePickerUI.tsxindex 1bcbf85cd8..37f11f3f99 100644--- a/js/app/packages/core/component/DatePicker/DatePickerUI.tsx+++ b/js/app/packages/core/component/DatePicker/DatePickerUI.tsx@@ -7,7 +7,7 @@ import { isBefore } from 'date-fns/isBefore';import { startOfDay } from 'date-fns/startOfDay';import { createEffect, createSignal, For, on, Show } from 'solid-js';-export type DatePickerUIProps = {+type DatePickerUIProps = {value: Date;onChange: (date: Date) => void;disablePriorToDate?: Date;diff --git a/js/app/packages/core/component/DatePicker/index.tsx b/js/app/packages/core/component/DatePicker/index.tsxindex 0491c4eb3f..afc97bdad5 100644--- a/js/app/packages/core/component/DatePicker/index.tsx+++ b/js/app/packages/core/component/DatePicker/index.tsx@@ -5,7 +5,7 @@ import { DatePickerUI } from './DatePickerUI';false && floatWithElement;false && clickOutside;-export type DatePickerProps = {+type DatePickerProps = {value: Date;onChange: (date: Date) => void;onClose: () => void;diff --git a/js/app/packages/core/component/DeleteConfimationDialog.tsx b/js/app/packages/core/component/DeleteConfimationDialog.tsxdeleted file mode 100644index 4ce093f49a..0000000000--- a/js/app/packages/core/component/DeleteConfimationDialog.tsx+++ /dev/null@@ -1,36 +0,0 @@-import { Dialog } from '@kobalte/core/dialog';-import { Button } from '@ui';--type DeleteConfimationDialogProps = {- open: boolean;- setOpen: (open: boolean) => void;- onDelete: () => void;- deleteConfirmationText: () => string;-};--export function DeleteConfimationDialog(props: DeleteConfimationDialogProps) {- return (- <Dialog open={props.open} onOpenChange={props.setOpen}>- <Dialog.Portal>- <Dialog.Overlay class="fixed flex inset-0 z-modal bg-modal-overlay items-center justify-content" />- <Dialog.Content class="fixed left-1/2 top-1/2 z-modal -translate-1/2 bg-surface rounded-xl p-4 shadow-lg w-80">- <Dialog.Title class="font-bold mb-2 text-ink">- Delete Items?- </Dialog.Title>- <Dialog.Description- class="text-sm text-ink mb-4"- innerHTML={props.deleteConfirmationText()}- />- <div class="flex justify-end gap-3 mt-4">- <Dialog.CloseButton>- <Button variant="ghost">Cancel</Button>- </Dialog.CloseButton>- <Button variant="danger" onClick={props.onDelete}>- Delete- </Button>- </div>- </Dialog.Content>- </Dialog.Portal>- </Dialog>- );-}diff --git a/js/app/packages/core/component/Editable.tsx b/js/app/packages/core/component/Editable.tsxindex 2d155d8789..069e4fc67b 100644--- a/js/app/packages/core/component/Editable.tsx+++ b/js/app/packages/core/component/Editable.tsx@@ -25,9 +25,9 @@ interface EditableLabelState {size?: FileListSize;}-export type EditableLabelProps = ComponentProps<'input'> & EditableLabelState;+type EditableLabelProps = ComponentProps<'input'> & EditableLabelState;-export function EditableLabel(props: EditableLabelProps) {+function _EditableLabel(props: EditableLabelProps) {const [editableLabelProps, inputProps] = splitProps(props, ['handleSubmitEdit','handleCancelEdit',@@ -181,7 +181,7 @@ export function EditableLabel(props: EditableLabelProps) {);}-export type EditableComponentProps = {+type EditableComponentProps = {editingComponent: JSX.Element;isEditing?: boolean;} & (@@ -189,7 +189,7 @@ export type EditableComponentProps = {| { component?: never; children: JSX.Element });-export function EditableProvider(props: EditableComponentProps) {+function _EditableProvider(props: EditableComponentProps) {const [isEditing, setIsEditing] = createSignal(props.isEditing ?? false);return (<EditingContext.Provider value={[isEditing, setIsEditing]}>diff --git a/js/app/packages/core/component/Emoji/EmojiButton.tsx b/js/app/packages/core/component/Emoji/EmojiButton.tsxdeleted file mode 100644index b2a3711b55..0000000000--- a/js/app/packages/core/component/Emoji/EmojiButton.tsx+++ /dev/null@@ -1,28 +0,0 @@-import { cn } from '@ui';-import type { Component } from 'solid-js';-import { renderEmoji } from './EmojiSelector';-import type { SimpleEmoji } from './emojis';--interface EmojiButtonProps {- emoji: SimpleEmoji;- size?: 'sm' | 'md' | 'lg';-}--const sizeClasses = {- sm: 'w-4 h-4',- md: 'w-6 h-6',- lg: 'w-8 h-8',-} as const;--export const EmojiButton: Component<EmojiButtonProps> = (props) => {- return (- <span- class={cn(- 'inline-flex items-center justify-center',- sizeClasses[props.size ?? 'md']- )}- >- {renderEmoji(props.emoji?.emoji)}- </span>- );-};diff --git a/js/app/packages/core/component/Emoji/EmojiSelector.tsx b/js/app/packages/core/component/Emoji/EmojiSelector.tsxindex 1a368ecbf8..665d334700 100644--- a/js/app/packages/core/component/Emoji/EmojiSelector.tsx+++ b/js/app/packages/core/component/Emoji/EmojiSelector.tsx@@ -12,7 +12,7 @@ import {} from 'solid-js';import { type SimpleEmoji, useEmojiData } from './emojis';-export function renderEmoji(emoji: string, size?: string): JSX.Element {+function renderEmoji(emoji: string, size?: string): JSX.Element {return (<pclass={`emoji flex items-center justify-center`}@@ -27,21 +27,13 @@ export function renderEmoji(emoji: string, size?: string): JSX.Element {);}-export type EmojiEventHandler<T extends Event> = (- emoji: string,- event: T & {- currentTarget: HTMLButtonElement;- target: Element;- }-) => void;--export interface EmojiPickerProps {+interface EmojiPickerProps {nameFilter?: string;onEmojiClick: (emoji: SimpleEmoji) => void;columns?: number;}-export interface EmojiOptionProps {+interface EmojiOptionProps {emoji: SimpleEmoji;onEmojiClick: (emoji: SimpleEmoji) => void;isSelected: boolean;diff --git a/js/app/packages/core/component/Emoji/emojis.ts b/js/app/packages/core/component/Emoji/emojis.tsindex 7f211583d2..c880a82911 100644--- a/js/app/packages/core/component/Emoji/emojis.ts+++ b/js/app/packages/core/component/Emoji/emojis.ts@@ -30,17 +30,15 @@ function resolveEmojiTerms(emoji: string): string[] {return EmojiLib[emoji] ?? [];}-export const ORDERED_EMOJI_DATA: SimpleEmoji[] = OrderedEmojiData.map(- (emoji) => {- return {- emoji: emoji,- slug: resolveEmojiSlug(emoji) ?? emoji,- terms: resolveEmojiTerms(emoji),- };- }-);+const ORDERED_EMOJI_DATA: SimpleEmoji[] = OrderedEmojiData.map((emoji) => {+ return {+ emoji: emoji,+ slug: resolveEmojiSlug(emoji) ?? emoji,+ terms: resolveEmojiTerms(emoji),+ };+});-export const EMOJI_DATA_GROUPED = GroupedEmojiData.map((group) => {+const EMOJI_DATA_GROUPED = GroupedEmojiData.map((group) => {return {name: group.name,emojis: group.emojis.map((emoji) => {@@ -53,9 +51,7 @@ export const EMOJI_DATA_GROUPED = GroupedEmojiData.map((group) => {};});-export function resolveEmojiFromUnicode(- emoji: string-): SimpleEmoji | undefined {+function _resolveEmojiFromUnicode(emoji: string): SimpleEmoji | undefined {return ORDERED_EMOJI_DATA.find(({ emoji: emoji_ }) => emoji_ === emoji);}diff --git a/js/app/packages/core/component/EntityIcon.tsx b/js/app/packages/core/component/EntityIcon.tsxindex 88aa7dc1bc..bf484f130e 100644--- a/js/app/packages/core/component/EntityIcon.tsx+++ b/js/app/packages/core/component/EntityIcon.tsx@@ -281,7 +281,7 @@ function validateEntity(entity: string): EntityWithValidIcon {}}-export const WIDE_ICONS: Record<EntityWithValidIcon, Component> = {+const WIDE_ICONS: Record<EntityWithValidIcon, Component> = {call: PhoneCall,canvas: WideDiagram,html: WideFileCode,@@ -312,7 +312,7 @@ export const WIDE_ICONS: Record<EntityWithValidIcon, Component> = {automation: Robot,};-export const ICON_SIZES = {+const ICON_SIZES = {xs: 'w-4 h-4',sm: 'w-4.5 h-4.5',md: 'w-8 h-8',diff --git a/js/app/packages/core/component/FileDropZone.tsx b/js/app/packages/core/component/FileDropZone.tsxdeleted file mode 100644index f51fb2a749..0000000000--- a/js/app/packages/core/component/FileDropZone.tsx+++ /dev/null@@ -1,123 +0,0 @@-import {- type ComponentProps,- createSignal,- type JSX,- splitProps,-} from 'solid-js';--type FileDropZoneProps = ComponentProps<'div'> & {- acceptedMimeTypes: string[];- acceptedExtensions: string[];- onFilesDrop: (files: File[]) => void;- disableClick?: boolean;-};--export function FileDropZone(props_: FileDropZoneProps) {- const [props, rest] = splitProps(props_, [- 'acceptedMimeTypes',- 'acceptedExtensions',- 'onFilesDrop',- 'children',- 'disableClick',- ]);- const [isDragging, setIsDragging] = createSignal(false);- const [isValidDrop, setIsValidDrop] = createSignal(false);- let inputRef: HTMLInputElement | undefined;-- const isFileTypeValid = (file: File) => {- // check mimeType- if (file.type && props.acceptedMimeTypes.includes(file.type)) {- return true;- }-- // check extension- const extension = file.name.split('.').pop()?.toLowerCase();- if (extension && props.acceptedExtensions.includes(extension)) {- return true;- }- return false;- };-- const handleDragEnter = (e: DragEvent) => {- e.preventDefault();- e.stopPropagation();- setIsDragging(true);- };-- const handleDragLeave = (e: DragEvent) => {- e.preventDefault();- e.stopPropagation();- setIsDragging(false);- };-- const handleDragOver = (e: DragEvent) => {- e.preventDefault();- e.stopPropagation();- setIsDragging(true);-- if (e.dataTransfer) {- const isValid = Array.from(e.dataTransfer.items).every((item) =>- isFileTypeValid({ type: item.type } as File)- );- setIsValidDrop(isValid);- }- };-- const handleDrop = (e: DragEvent) => {- e.preventDefault();- e.stopPropagation();- setIsDragging(false);-- const files = Array.from(e.dataTransfer?.files || []);- const validFiles = files.filter(isFileTypeValid);-- if (validFiles.length > 0) {- props.onFilesDrop(validFiles);- }- };-- const handleFileInputChange: JSX.ChangeEventHandlerUnion<- HTMLInputElement,- Event- > = (e) => {- const files = Array.from(e.target.files || []);- const validFiles = files.filter(isFileTypeValid);-- if (validFiles.length > 0) {- props.onFilesDrop(validFiles);- }- };-- const handleMouseDown = () => {- if (props.disableClick || !inputRef) return;-- inputRef.click();- };-- return (- <div- {...rest}- data-drop-valid={isDragging() && isValidDrop() ? true : undefined}- data-drop-invalid={isDragging() && !isValidDrop() ? true : undefined}- onmousedown={handleMouseDown}- on:dragenter={handleDragEnter}- on:dragleave={handleDragLeave}- on:dragover={handleDragOver}- on:drop={handleDrop}- >- <input- type="file"- ref={inputRef}- style={{ display: 'none' }}- onChange={handleFileInputChange}- accept={- props.acceptedMimeTypes.join(',') +- ',.' +- props.acceptedExtensions.join(',.')- }- multiple- />- {props.children}- </div>- );-}diff --git a/js/app/packages/core/component/FileList/ExplorerSpacer.tsx b/js/app/packages/core/component/FileList/ExplorerSpacer.tsxindex db53a8286b..61f42da9df 100644--- a/js/app/packages/core/component/FileList/ExplorerSpacer.tsx+++ b/js/app/packages/core/component/FileList/ExplorerSpacer.tsx@@ -8,7 +8,7 @@ import {type FileListSize,} from './constants';-export function FileLevelSpacer(props: { size: FileListSize }) {+function FileLevelSpacer(props: { size: FileListSize }) {return (<divclass={cn(@@ -21,7 +21,7 @@ export function FileLevelSpacer(props: { size: FileListSize }) {);}-export function CaretSpacer(props: { size: FileListSize }) {+function _CaretSpacer(props: { size: FileListSize }) {return (<divclass={cn('caret-spacer min-h-full', FILE_LIST_CARET_WIDTH[props.size])}@@ -29,7 +29,7 @@ export function CaretSpacer(props: { size: FileListSize }) {);}-export function Caret(props: { isExpanded: boolean; size: FileListSize }) {+function _Caret(props: { isExpanded: boolean; size: FileListSize }) {return (<divclass={cn(diff --git a/js/app/packages/core/component/FileList/HoverButtonWrapper.tsx b/js/app/packages/core/component/FileList/HoverButtonWrapper.tsxdeleted file mode 100644index 2dc309d1c5..0000000000--- a/js/app/packages/core/component/FileList/HoverButtonWrapper.tsx+++ /dev/null@@ -1,36 +0,0 @@-import { cn } from '@ui';-import type { JSX, ParentProps } from 'solid-js';-import { ICON_SIZES } from '../EntityIcon';--interface ButtonWrapperProps extends ParentProps {- onClick: JSX.EventHandler<HTMLButtonElement, MouseEvent>;- size?: keyof typeof ICON_SIZES;- // If true, button will be hidden until a parent element with class "group/item" is hovered.- showOnHover?: boolean;- class?: string;-}--export function HoverButtonWrapper(props: ButtonWrapperProps) {- return (- <button- class={cn(- props.showOnHover ? 'hidden' : 'ring-1 ring-edge bg-surface',- ICON_SIZES[props.size ?? 'sm'],- 'flex flex-none',- props.size === 'sm' ? 'p-px' : 'p-1.5',- 'rounded-full justify-center items-center',- 'text-ink-muted',- 'transition-scale duration-200',- 'hover:text-ink hover:scale-105 hover:bg-surface hover-transition-bg',- 'group-hover/item:flex group-hover/item:bg-surface/50 group-hover/item:ring-1',- 'group-hover/item:ring-edge group-hover/item:shadow',- 'group-focus-within/item:flex group-focus-within/item:bg-surface/50 group-focus-within/item:ring-1',- 'group-focus-within/item:ring-edge group-focus-within/item:shadow',- props.class- )}- onclick={props.onClick}- >- {props.children}- </button>- );-}diff --git a/js/app/packages/core/component/FileList/buildFileTree.ts b/js/app/packages/core/component/FileList/buildFileTree.tsindex 89af0d9829..ab2b79fc69 100644--- a/js/app/packages/core/component/FileList/buildFileTree.ts+++ b/js/app/packages/core/component/FileList/buildFileTree.ts@@ -28,10 +28,7 @@ export function buildFileTree(items: Item[]) {* @param allItems - The set of all items.* @returns The file tree.*/-export function buildFileTreeWithAncestors(- filteredItems: Item[],- allItems: Item[]-) {+function _buildFileTreeWithAncestors(filteredItems: Item[], allItems: Item[]) {const ancestorProjects = new Set<Item>();const itemsById = new Map(allItems.map((item) => [item.id, item]));const relevantItemMap: { [key: string]: { item: Item; children: Item[] } } =diff --git a/js/app/packages/core/component/FileList/constants.tsx b/js/app/packages/core/component/FileList/constants.tsxindex c0c3ce74f7..2875ff5917 100644--- a/js/app/packages/core/component/FileList/constants.tsx+++ b/js/app/packages/core/component/FileList/constants.tsx@@ -31,7 +31,7 @@ export const FILE_LIST_SPACER_WIDTH = {[FILE_LIST_SIZE.lg]: 'min-w-[12px]',} as const;-export const FILE_LIST_TEXT_SIZE = {+const _FILE_LIST_TEXT_SIZE = {[FILE_LIST_SIZE.sm]: 'text-sm',[FILE_LIST_SIZE.md]: 'text-md',[FILE_LIST_SIZE.lg]: 'text-lg',@@ -47,19 +47,16 @@ export const TEXT_SIZE_CLASSES = {} as const;// These are deprecated, only in use until we migrate Item.tsx and ProjectItem.tsx to use the new ListViewRow system, with size.ts-export const SMALL_ITEM_HEIGHT = 'h-[37px] ';-export const LARGE_ITEM_HEIGHT = 'h-[54px] ';+const _SMALL_ITEM_HEIGHT = 'h-[37px] ';+const _LARGE_ITEM_HEIGHT = 'h-[54px] ';-export const SMALL_BLOCK_ICON = 'sm';-export const LARGE_BLOCK_ICON = 'md';+const _SMALL_BLOCK_ICON = 'sm';+const _LARGE_BLOCK_ICON = 'md';// Enumerate the background styles for selected-state items.-export const defaultFileColor = 'bg-hover/20 group/item';+const defaultFileColor = 'bg-hover/20 group/item';-export const fileTypeColors: Record<- BlockName | BlockAlias | 'default',- string-> = {+const _fileTypeColors: Record<BlockName | BlockAlias | 'default', string> = {write: 'bg-write/20 group/item',pdf: 'bg-pdf/20 group/item',md: 'bg-note/20 group/item',diff --git a/js/app/packages/core/component/FileList/fileTree.ts b/js/app/packages/core/component/FileList/fileTree.tsdeleted file mode 100644index 5b447322bb..0000000000--- a/js/app/packages/core/component/FileList/fileTree.ts+++ /dev/null@@ -1,28 +0,0 @@-import type { Item } from '@service-storage/generated/schemas/item';-import type { SetStoreFunction, Store } from 'solid-js/store';--export type FileTreeNode = {- item: Item;- children: Item[];-};--export type FileTree = {- rootItems: FileTreeNode[];- itemMap: { [key: string]: FileTreeNode };-};--// A function to set the expanded state of an individual project-export const setExpandedProject = (- projectId: string,- isExpanded: boolean,- expandedProjectsStore: [- Store<{ [key: string]: boolean }>,- SetStoreFunction<{ [key: string]: boolean }>,- ]-) => {- const [_, setExpandedProjects] = expandedProjectsStore;- setExpandedProjects((otherProjects) => ({- ...otherProjects,- [`${projectId}`]: isExpanded,- }));-};diff --git a/js/app/packages/core/component/FileList/viewTypes.ts b/js/app/packages/core/component/FileList/viewTypes.tsdeleted file mode 100644index 42b8101f7b..0000000000--- a/js/app/packages/core/component/FileList/viewTypes.ts+++ /dev/null@@ -1,3 +0,0 @@-export const viewTypes = ['flatList', 'treeList', 'grid', 'column'] as const;--export type ViewType = (typeof viewTypes)[number];diff --git a/js/app/packages/core/component/FindBar.tsx b/js/app/packages/core/component/FindBar.tsxindex f3fbdeff97..b70bde202a 100644--- a/js/app/packages/core/component/FindBar.tsx+++ b/js/app/packages/core/component/FindBar.tsx@@ -20,7 +20,7 @@ import type { FindBarController } from './createFindBarController';* ArrowUp/Shift+Enter retreat. `'desc'` — flipped, for surfaces where the* natural reading direction is bottom-to-top (e.g. a chat channel).*/-export type FindBarDirection = 'asc' | 'desc';+type FindBarDirection = 'asc' | 'desc';type FindBarContextValue = {controller: FindBarController;@@ -36,7 +36,7 @@ function useFindBarContext(): FindBarContextValue {return ctx;}-export type FindBarProps = {+type FindBarProps = {controller: FindBarController;direction?: FindBarDirection;placeholder?: string;diff --git a/js/app/packages/core/component/GeneralizedPopup/AskAI.tsx b/js/app/packages/core/component/GeneralizedPopup/AskAI.tsxdeleted file mode 100644index c961148a0a..0000000000--- a/js/app/packages/core/component/GeneralizedPopup/AskAI.tsx+++ /dev/null@@ -1,517 +0,0 @@-/**- date: 02/19/2026- note: Temporarily disabled pending port to connection-gateway- guy: Eric Hayes-*/-// import { useGlobalBlockOrchestrator } from "@app/component/GlobalAppState";-// import { useOpenChatForAttachment } from "@block-chat/client";-// import { withAnalytics } from "@coparse/analytics";-// import type { BlockName } from "@core/block";-// import { type Completion, streamCompletion } from "@core/client/completion";-// import { DropdownMenu } from "@kobalte/core/dropdown-menu";-// import BulletPointsIcon from "@phosphor-icons/core/regular/list-bullets.svg?component-solid";-// import PencilIcon from "@phosphor-icons/core/regular/pencil.svg?component-solid";-// import QuoteIcon from "@phosphor-icons/core/regular/quotes.svg?component-solid";-// import SparkleIcon from "@phosphor-icons/core/regular/sparkle.svg?component-solid";-// import TranslateIcon from "@phosphor-icons/core/regular/translate.svg?component-solid";-// import type { ExtractionStatusType } from "@service-cognition/types";-// import { createCallback } from "@solid-primitives/rootless";-// import { toast } from "core/component/Toast/Toast";-// import {-// type Accessor,-// type Component,-// createEffect,-// createMemo,-// createSignal,-// For,-// type JSX,-// Show,-// } from "solid-js";-// import { createStore } from "solid-js/store";-// import { CircleSpinner } from "../CircleSpinner";-// import { DeprecatedTextButton } from "../DeprecatedTextButton";-// import {-// DropdownMenuContent,-// MenuItem,-// MenuSeparator,-// SubTrigger,-// } from "../Menu";--// const SUPPORTED_LANGUAGES = [-// "English",-// "Spanish",-// "French",-// "German",-// "Chinese",-// "Japanese",-// "Russian",-// "Portuguese",-// "Italian",-// "Arabic",-// "Dutch",-// "Korean",-// "Turkish",-// "Hindi",-// ];--// export const PROMPT_OPTIONS = {-// explain: (selectedText: string) =>-// `Explain the following text: "${selectedText}", in 2-3 sentences.`,-// bullet: (selectedText: string) =>-// `Generate bullet points for the following text: "${selectedText}", generate max 7 bullet points.`,-// translate: (selectedText: string, language: string) =>-// `Translate the following text to ${language}: "${selectedText}".`,-// rewrite: (instructions: string | undefined, selectedText: string) =>-// `${-// instructions-// ? `Rewrite the text in the following manner: ${instructions}.`-// : `Fix grammatical and spelling errors ONLY. `-// }-// This rewritten text will directly replace the selected text, so only provide the rewritten text with no introduction, explanation, or quotation marks.-// The provided text is written in Markdown syntax, maintain the markdown syntax.-// Respect the XML components when possible, except for tables.-// Only paragraphs and styled texts are allowed within lists. No complex objects should live within lists.-// Rewrite the following text: "${selectedText}".`,-// };--// export type PromptType = keyof typeof PROMPT_OPTIONS;--// type PromptTypeDisplay = {-// icon: Component<JSX.SvgSVGAttributes<SVGSVGElement>>;-// text: string;-// };--// const PromptTypeDisplay: Record<PromptType, PromptTypeDisplay> = {-// explain: {-// icon: SparkleIcon,-// text: "Explain",-// },-// bullet: {-// icon: BulletPointsIcon,-// text: "Bullet points",-// },-// rewrite: {-// icon: PencilIcon,-// text: "Rewrite",-// },-// translate: {-// icon: TranslateIcon,-// text: "Translate",-// },-// } as const;--// type DefaultAction = {-// type: PromptType;-// language?: string;-// };--// type UserPreferences = {-// defaultAction: DefaultAction;-// autoRun: boolean;-// };--// const defaultPreferences: UserPreferences = {-// defaultAction: { type: "explain", language: "English" },-// autoRun: false,-// };--// function getPreferencesKey(blockName: BlockName) {-// return `ask-ai-preferences-${blockName}`;-// }--// function loadPreferences(blockName: BlockName): UserPreferences {-// const key = getPreferencesKey(blockName);-// const raw = localStorage.getItem(key);-// if (raw) {-// try {-// return { ...defaultPreferences, ...JSON.parse(raw) };-// } catch {-// console.error(`${key} does not exist in local storage.`);-// }-// }-// return { ...defaultPreferences };-// }--// function savePreferences(blockName: BlockName, prefs: UserPreferences) {-// const key = getPreferencesKey(blockName);-// localStorage.setItem(key, JSON.stringify(prefs));-// }--// function useAskAiPreferences(blockName: BlockName) {-// const [preferences, setPreferences] = createStore<UserPreferences>(-// loadPreferences(blockName),-// );-// createEffect(() => {-// savePreferences(blockName, preferences);-// });-// return [preferences, setPreferences] as const;-// }--// export function AskAi(props: {-// attachmentId: string;-// blockName: BlockName;-// setCompletion: (completion: Completion | undefined) => void;-// setCompletionType?: (-// type: "explain" | "bullet" | "translate" | "rewrite" | undefined,-// ) => void;-// selectedText: string;-// canEdit?: boolean;-// contentSize?: () => number;-// selectedNodesText?: string;-// registerRewriteMethod?: (method: (instructions: string) => void) => void;-// }) {-// const blockOrchestrator = useGlobalBlockOrchestrator();-// const [preferences, setPreferences] = useAskAiPreferences(props.blockName);--// const BlockAllowedPrompts = Object.keys(PromptTypeDisplay).filter(-// (_key: string) => {-// switch (_key) {-// case "rewrite":-// return ["md"].includes(props.blockName) && props.canEdit;-// default:-// return true;-// }-// },-// );--// const isPlainText = () => {-// return ["md", "canvas", "code"].includes(props.blockName);-// };--// // TODO-// const attachmentStatus: Accessor<ExtractionStatusType> = () => "complete";--// createEffect(() => {-// if (-// preferences.autoRun &&-// attachmentStatus() !== "incomplete" &&-// attachmentStatus() !== "empty"-// ) {-// executeDefaultAction();-// }-// });--// const updatePreferences = (newPrefs: Partial<UserPreferences>) => {-// setPreferences((prev) => ({ ...prev, ...newPrefs }));-// };--// const updateDefaultAction = (newDefault: DefaultAction) => {-// updatePreferences({ defaultAction: newDefault });-// };--// const { track, TrackingEvents } = withAnalytics();--// const sendCompletion = (-// prompt: string,-// attachmentId?: string,-// selectedText?: string,-// ) => {-// streamCompletion(-// {-// prompt,-// attachmentId,-// selectedText,-// },-// props.setCompletion,-// );-// };--// const hasSufficientContent = () => {-// // plain text (md, canvas, code)-// if (isPlainText() && props.contentSize) {-// return props.contentSize() >= 500;-// }--// // text extractions (pdf, docx)-// return attachmentStatus() === "complete";-// };--// const sendBasicCompletion = (type: "bullet" | "explain" | "rewrite") => {-// track(TrackingEvents.POPUP.ASKAI.SELECT, {-// option: type,-// });-// if (type === "rewrite") {-// handleRewrite();-// } else {-// const prompt: string = PROMPT_OPTIONS[type](props.selectedText!);-// sendCompletion(prompt, props.attachmentId, props.selectedText);-// props.setCompletionType?.(type);-// }-// if (!hasSufficientContent()) {-// toast.alert(-// "Document contains insufficient content. AI explanations may be limited.",-// );-// }-// };--// const sendTranslationCompletion = (language: string) => {-// const prompt = PROMPT_OPTIONS.translate(props.selectedText!, language);-// track(TrackingEvents.POPUP.ASKAI.SELECT, {-// option: "translate",-// language,-// });-// sendCompletion(prompt, undefined, undefined);-// props.setCompletionType?.("translate");-// };--// const _askAIicon = () => {-// if (isPlainText()) {-// return QuoteIcon;-// }-// if (attachmentStatus() === "incomplete") {-// return CircleSpinner;-// }-// return QuoteIcon;-// };--// const actionIcon = () => {-// if (!isPlainText() && attachmentStatus() === "incomplete") {-// return CircleSpinner;-// }-// switch (preferences.defaultAction.type) {-// case "explain":-// return SparkleIcon;-// case "bullet":-// return BulletPointsIcon;-// case "translate":-// return TranslateIcon;-// default:-// return SparkleIcon;-// }-// };--// const openChatForAttachment = useOpenChatForAttachment();-// const _openWithQuote = async () => {-// const selectedText = props.selectedText!;-// track(TrackingEvents.POPUP.ASKAI.REFERENCE_IN_CHAT);--// await openChatForAttachment({-// attachmentId: props.attachmentId,-// });-// if (!selectedText) return;--// const chatId = getChatId();-// if (!chatId) return;--// const blockHandle = await blockOrchestrator.getBlockHandle(chatId, "chat");--// if (!blockHandle) {-// console.log("NO BLOCK HANDLE FOUND");-// return;-// }--// await blockHandle.setQuote(selectedText);--// if (!hasSufficientContent()) {-// toast.alert(-// "Document contains insufficient content. AI responses may be limited.",-// );-// }-// };--// const executeDefaultAction = () => {-// if (!BlockAllowedPrompts.includes(preferences.defaultAction.type)) {-// sendBasicCompletion("explain");-// return;-// }--// if (-// preferences.defaultAction.type === "translate" &&-// preferences.defaultAction.language-// ) {-// sendTranslationCompletion(preferences.defaultAction.language);-// } else {-// sendBasicCompletion(-// preferences.defaultAction.type as "bullet" | "explain" | "rewrite",-// );-// }-// };--// const defaultActionLabel = () => {-// if (!BlockAllowedPrompts.includes(preferences.defaultAction.type)) {-// return "Explain";-// }--// if (preferences.defaultAction.type === "translate") {-// return `Translate to ${preferences.defaultAction.language ?? "English"}`;-// }-// switch (preferences.defaultAction.type) {-// case "explain":-// return "Explain";-// case "bullet":-// return "Bullet Points";-// case "rewrite":-// return "Rewrite";-// }-// };--// const [triggerRef, setTriggerRef] = createSignal<HTMLDivElement>();-// const [open, setOpen] = createSignal(false);--// // prevents Document.tsx handlers from interfering-// let ref!: HTMLDivElement;--// const hasAttachment = createMemo(() => {-// if (isPlainText()) {-// return true;-// }-// return (-// attachmentStatus() === "insufficient" || attachmentStatus() === "complete"-// );-// });--// const handleRewrite = () => {-// props.setCompletionType?.("rewrite");-// props.setCompletion(undefined);-// };--// if (props.registerRewriteMethod) {-// props.registerRewriteMethod(-// createCallback((input: string) => {-// const selectedText = props.selectedNodesText ?? props.selectedText;-// const prompt: string = PROMPT_OPTIONS["rewrite"](selectedText, input);-// sendCompletion(prompt, props.attachmentId, selectedText);-// }),-// );-// }--// return (-// <div-// ref={ref}-// class="flex gap-1"-// // prevents Document.tsx handlers from interfering-// on:mousemove={(e) => {-// e.stopPropagation();-// }}-// on:mouseup={(e) => {-// e.stopPropagation();-// }}-// >-// {/* TODO: implement ask ai button (M-4765) */}-// {/* <TextButton */}-// {/* theme="clear" */}-// {/* icon={askAIicon()} */}-// {/* onClick={openWithQuote} */}-// {/* disabled={!hasAttachment()} */}-// {/* text="Ask AI" */}-// {/* /> */}-// <DropdownMenu-// gutter={7}-// shift={-5}-// open={open()}-// onOpenChange={setOpen}-// getAnchorRect={() => triggerRef()?.getBoundingClientRect()}-// >-// <DeprecatedTextButton-// theme="clear"-// icon={actionIcon()}-// onClick={executeDefaultAction}-// disabled={!hasAttachment()}-// text={defaultActionLabel()}-// onOptionClick={() => setOpen((prev) => !prev)}-// ref={setTriggerRef}-// showChevron-// />-// <DropdownMenu.Portal>-// <DropdownMenuContent class="w-72">-// <Show when={props.canEdit && props.blockName === "md"}>-// <MenuItem-// text="Rewrite"-// icon={PencilIcon}-// onClick={() => handleRewrite()}-// />-// </Show>-// <MenuItem-// text="Explain"-// icon={SparkleIcon}-// onClick={() => sendBasicCompletion("explain")}-// />-// <MenuItem-// text="Bullet Points"-// icon={BulletPointsIcon}-// onClick={() => sendBasicCompletion("bullet")}-// />-// <MenuItem-// text="Translate"-// icon={TranslateIcon}-// onClick={() =>-// sendTranslationCompletion(-// preferences.defaultAction.language ?? "English",-// )-// }-// />-// <MenuSeparator />-// <MenuItem-// text="Run automatically"-// selectorType="checkbox"-// checked={preferences.autoRun}-// onClick={() =>-// updatePreferences({ autoRun: !preferences.autoRun })-// }-// closeOnSelect={false}-// />-// <MenuSeparator />-// <DropdownMenu.Sub gutter={4}>-// <SubTrigger text="Set default action" />-// <DropdownMenu.Portal>-// <DropdownMenuContent submenu class="w-44">-// <DropdownMenu.RadioGroup-// value={preferences.defaultAction.type}-// class="w-full"-// >-// <For each={BlockAllowedPrompts}>-// {(key) => (-// <MenuItem-// value={key}-// selectorType="radio"-// text={PromptTypeDisplay[key as PromptType].text}-// groupValue={preferences.defaultAction.type}-// onClick={() =>-// updateDefaultAction({-// type: key as PromptType,-// language: preferences.defaultAction.language,-// })-// }-// />-// )}-// </For>-// </DropdownMenu.RadioGroup>-// </DropdownMenuContent>-// </DropdownMenu.Portal>-// </DropdownMenu.Sub>-// <DropdownMenu.Sub gutter={4}>-// <SubTrigger text="Set translation language" />-// <DropdownMenu.Portal>-// <DropdownMenuContent submenu class="w-44">-// <DropdownMenu.RadioGroup-// value={preferences.defaultAction.language}-// class="w-full"-// >-// <For each={SUPPORTED_LANGUAGES}>-// {(language) => (-// <MenuItem-// value={language}-// selectorType="radio"-// text={language}-// groupValue={-// preferences.defaultAction.language ?? "English"-// }-// onClick={() =>-// updateDefaultAction({-// type: preferences.defaultAction.type,-// language: language,-// })-// }-// />-// )}-// </For>-// </DropdownMenu.RadioGroup>-// </DropdownMenuContent>-// </DropdownMenu.Portal>-// </DropdownMenu.Sub>-// </DropdownMenuContent>-// </DropdownMenu.Portal>-// </DropdownMenu>-// </div>-// );-// }diff --git a/js/app/packages/core/component/GlobalNotificationBell.tsx b/js/app/packages/core/component/GlobalNotificationBell.tsxdeleted file mode 100644index 9fddc799be..0000000000--- a/js/app/packages/core/component/GlobalNotificationBell.tsx+++ /dev/null@@ -1,72 +0,0 @@-import { useGlobalNotificationSource } from '@app/component/GlobalAppState';-import { globalSplitManager } from '@app/signal/splitLayout';-import { NotificationRenderer } from '@core/component/NotificationRenderer';-import { compareDateDesc } from '@core/util/date';-import {- type NotificationSource,- openNotification,- useUnreadNotifications,-} from '@notifications';-import Bell from '@phosphor/bell.svg';-import { Show } from 'solid-js';--export type GlobalNotificationBellProps = {- notificationSource: NotificationSource;- onClick?: () => void;-};--export function GlobalNotificationBell(props: GlobalNotificationBellProps) {- const allUnreadNotifications = useUnreadNotifications(- props.notificationSource- );- const notificationSource = useGlobalNotificationSource();-- const unreadNotifications = () =>- allUnreadNotifications().filter((n) => !n.done);-- const unreadCount = () => unreadNotifications().length;-- const mostRecent = () =>- unreadNotifications().sort((a, b) =>- compareDateDesc(a.created_at, b.created_at)- )[0];-- const handleNotificationClick = async () => {- const notification = mostRecent();-- if (!notification) return;-- const layoutManager = globalSplitManager();- if (!layoutManager) return;-- openNotification(notification, layoutManager);-- notificationSource.markAsRead(notification);-- props.onClick?.();- };-- return (- <Show when={unreadCount() > 0}>- <button class="flex items-center group" onClick={handleNotificationClick}>- <div class="relative shrink-0 border border-ink-muted group-hover:border-accent flex items-center justify-center text-xs bg-ink-muted group-hover:bg-accent text-surface p-1">- <Bell class="size-4 text-surface" />- <Show when={unreadCount() > 0}>- <p>{unreadCount() > 99 ? '99+' : unreadCount()}</p>- </Show>- </div>-- <div class="border border-ink-muted group-hover:border-accent px-2 py-1">- <Show when={mostRecent()}>- {(notification) => (- <NotificationRenderer- notification={notification()}- mode="preview"- />- )}- </Show>- </div>- </button>- </Show>- );-}diff --git a/js/app/packages/core/component/HoverCard.tsx b/js/app/packages/core/component/HoverCard.tsxindex 84c40ec6bb..1b55808c1a 100644--- a/js/app/packages/core/component/HoverCard.tsx+++ b/js/app/packages/core/component/HoverCard.tsx@@ -26,7 +26,7 @@ const HoverCardPortalNestedPreviewOpenContext = createContext<// and a missed pointerleave (common during scroll) can leave multiple stranded.const openTopLevelHoverCards = new Set<() => void>();-export type HoverCardComponentProps = {+type HoverCardComponentProps = {/** The trigger content to hover over */trigger: JSX.Element;/** The content to show in the hover card */diff --git a/js/app/packages/core/component/IconSelectorMenu.tsx b/js/app/packages/core/component/IconSelectorMenu.tsxdeleted file mode 100644index f4dbde768e..0000000000--- a/js/app/packages/core/component/IconSelectorMenu.tsx+++ /dev/null@@ -1,189 +0,0 @@-import { OldMenu, OldMenuItem } from '@core/component/OldMenu';-import AcornIcon from '@phosphor-icons/core/regular/acorn.svg?component-solid';-import ArrowDownIcon from '@phosphor-icons/core/regular/arrow-down.svg?component-solid';-import ArrowLeftIcon from '@phosphor-icons/core/regular/arrow-left.svg?component-solid';-import ArrowRightIcon from '@phosphor-icons/core/regular/arrow-right.svg?component-solid';-import ArrowUpIcon from '@phosphor-icons/core/regular/arrow-up.svg?component-solid';-import ArrowsClockwiseIcon from '@phosphor-icons/core/regular/arrows-clockwise.svg?component-solid';-import BookOpenIcon from '@phosphor-icons/core/regular/book-open.svg?component-solid';-import BrainIcon from '@phosphor-icons/core/regular/brain.svg?component-solid';-import BriefcaseIcon from '@phosphor-icons/core/regular/briefcase.svg?component-solid';-import CalculatorIcon from '@phosphor-icons/core/regular/calculator.svg?component-solid';-import CalendarIcon from '@phosphor-icons/core/regular/calendar.svg?component-solid';-import CameraIcon from '@phosphor-icons/core/regular/camera.svg?component-solid';-import ChartBarIcon from '@phosphor-icons/core/regular/chart-bar.svg?component-solid';-import ChartLineUpIcon from '@phosphor-icons/core/regular/chart-line-up.svg?component-solid';-import ChatIcon from '@phosphor-icons/core/regular/chat.svg?component-solid';-import ClipboardTextIcon from '@phosphor-icons/core/regular/clipboard-text.svg?component-solid';-import ClockIcon from '@phosphor-icons/core/regular/clock.svg?component-solid';-import CloudIcon from '@phosphor-icons/core/regular/cloud.svg?component-solid';-import CodeIcon from '@phosphor-icons/core/regular/code.svg?component-solid';-import CubeIcon from '@phosphor-icons/core/regular/cube.svg?component-solid';-import DatabaseIcon from '@phosphor-icons/core/regular/database.svg?component-solid';-import EnvelopeIcon from '@phosphor-icons/core/regular/envelope.svg?component-solid';-import FileTextIcon from '@phosphor-icons/core/regular/file-text.svg?component-solid';-import FolderOpenIcon from '@phosphor-icons/core/regular/folder-open.svg?component-solid';-import FunnelIcon from '@phosphor-icons/core/regular/funnel.svg?component-solid';-import FunnelXIcon from '@phosphor-icons/core/regular/funnel-x.svg?component-solid';-import GearIcon from '@phosphor-icons/core/regular/gear.svg?component-solid';-import GlobeIcon from '@phosphor-icons/core/regular/globe.svg?component-solid';-import HashIcon from '@phosphor-icons/core/regular/hash.svg?component-solid';-import HeartIcon from '@phosphor-icons/core/regular/heart.svg?component-solid';-import KeyIcon from '@phosphor-icons/core/regular/key.svg?component-solid';-import LightbulbIcon from '@phosphor-icons/core/regular/lightbulb.svg?component-solid';-import LightningIcon from '@phosphor-icons/core/regular/lightning.svg?component-solid';-import LinkIcon from '@phosphor-icons/core/regular/link.svg?component-solid';-import ListChecksIcon from '@phosphor-icons/core/regular/list-checks.svg?component-solid';-import MagicWandIcon from '@phosphor-icons/core/regular/magic-wand.svg?component-solid';-import MagnifyingGlassIcon from '@phosphor-icons/core/regular/magnifying-glass.svg?component-solid';-import MapPinIcon from '@phosphor-icons/core/regular/map-pin.svg?component-solid';-import MicrophoneIcon from '@phosphor-icons/core/regular/microphone.svg?component-solid';-import MusicNoteIcon from '@phosphor-icons/core/regular/music-note.svg?component-solid';-import PaletteIcon from '@phosphor-icons/core/regular/palette.svg?component-solid';-import PencilIcon from '@phosphor-icons/core/regular/pencil.svg?component-solid';-import PhoneIcon from '@phosphor-icons/core/regular/phone.svg?component-solid';-import PresentationChartIcon from '@phosphor-icons/core/regular/presentation-chart.svg?component-solid';-import PuzzlePieceIcon from '@phosphor-icons/core/regular/puzzle-piece.svg?component-solid';-import RocketIcon from '@phosphor-icons/core/regular/rocket.svg?component-solid';-import ShieldCheckIcon from '@phosphor-icons/core/regular/shield-check.svg?component-solid';-import SmileyIcon from '@phosphor-icons/core/regular/smiley.svg?component-solid';-import SparkleIcon from '@phosphor-icons/core/regular/sparkle.svg?component-solid';-import StackIcon from '@phosphor-icons/core/regular/stack.svg?component-solid';-import TagIcon from '@phosphor-icons/core/regular/tag.svg?component-solid';-import TargetIcon from '@phosphor-icons/core/regular/target.svg?component-solid';-import TranslateIcon from '@phosphor-icons/core/regular/translate.svg?component-solid';-import TreeStructureIcon from '@phosphor-icons/core/regular/tree-structure.svg?component-solid';-import TrendUpIcon from '@phosphor-icons/core/regular/trend-up.svg?component-solid';-import TrophyIcon from '@phosphor-icons/core/regular/trophy.svg?component-solid';-import UsersIcon from '@phosphor-icons/core/regular/users.svg?component-solid';-import WrenchIcon from '@phosphor-icons/core/regular/wrench.svg?component-solid';-import {- type Accessor,- type Component,- type ComponentProps,- For,- onCleanup,- onMount,- Show,-} from 'solid-js';-import { Dynamic } from 'solid-js/web';-import colors from 'tailwindcss/colors';-import type { FilteredTailwindColors } from './TailwindColorPicker';--export const iconMap: Record<string, Component<ComponentProps<'svg'>>> = {- AcornIcon,- ArrowsClockwiseIcon,- BookOpenIcon,- BrainIcon,- BriefcaseIcon,- CalculatorIcon,- CalendarIcon,- CameraIcon,- ChartBarIcon,- ChartLineUpIcon,- ChatIcon,- ClipboardTextIcon,- ClockIcon,- CloudIcon,- CodeIcon,- CubeIcon,- DatabaseIcon,- EnvelopeIcon,- FileTextIcon,- FolderOpenIcon,- FunnelIcon,- FunnelXIcon,- GearIcon,- GlobeIcon,- HashIcon,- HeartIcon,- KeyIcon,- LightbulbIcon,- LightningIcon,- LinkIcon,- ListChecksIcon,- MagicWandIcon,- MagnifyingGlassIcon,- MapPinIcon,- MicrophoneIcon,- MusicNoteIcon,- PaletteIcon,- PencilIcon,- PhoneIcon,- PresentationChartIcon,- PuzzlePieceIcon,- RocketIcon,- ShieldCheckIcon,- SmileyIcon,- SparkleIcon,- StackIcon,- TagIcon,- TargetIcon,- TranslateIcon,- TreeStructureIcon,- TrendUpIcon,- TrophyIcon,- UsersIcon,- WrenchIcon,- ArrowDownIcon,- ArrowLeftIcon,- ArrowRightIcon,- ArrowUpIcon,-};--export const icons = Object.values(iconMap);--export function IconSelectorMenu(props: {- onIconSelect: (icon: Component) => void;- show: Accessor<boolean>;- setShow: (show: boolean) => void;- color?: FilteredTailwindColors;- text?: string;-}) {- let menuRef: HTMLDivElement | undefined;-- function handleOutsideClick(event: MouseEvent) {- if (menuRef && !menuRef.contains(event.target as Node)) {- props.setShow(false);- }- }-- onMount(() => {- document.addEventListener('mousedown', handleOutsideClick);- onCleanup(() => {- document.removeEventListener('mousedown', handleOutsideClick);- });- });-- function handleIconSelect(icon: Component) {- props.onIconSelect(icon);- props.setShow(false);- }-- return (- <Show when={props.show()}>- <div class="max-h-72.5 overflow-y-auto" ref={menuRef}>- <OldMenu class="max-h-72.5 overflow-y-auto">- <For each={icons}>- {(icon) => (- <OldMenuItem- icon={() => (- <Dynamic- component={icon}- style={- props.color- ? { color: colors[props.color][500] }- : undefined- }- />- )}- text={props.text ?? ''}- onClick={() => handleIconSelect(icon)}- />- )}- </For>- </OldMenu>- </div>- </Show>- );-}diff --git a/js/app/packages/core/component/ImageGalleryPreview.tsx b/js/app/packages/core/component/ImageGalleryPreview.tsxindex ecd80a3186..b56d258e8b 100644--- a/js/app/packages/core/component/ImageGalleryPreview.tsx+++ b/js/app/packages/core/component/ImageGalleryPreview.tsx@@ -30,7 +30,7 @@ type ImageData = {* @deprecated Prefer the composable media primitives in `@channel/Media`.* Keep this only for legacy callers until they are migrated.*/-export type ImageGalleryPreviewProps = {+type ImageGalleryPreviewProps = {images: ImageData[];initialIndex?: number;variant: 'small' | 'dynamic';diff --git a/js/app/packages/core/component/ImagePreview.tsx b/js/app/packages/core/component/ImagePreview.tsxindex f3221a4304..29255d7580 100644--- a/js/app/packages/core/component/ImagePreview.tsx+++ b/js/app/packages/core/component/ImagePreview.tsx@@ -36,7 +36,7 @@ type ImageData = {* @deprecated Prefer the composable media primitives in `@channel/Media`.* Keep this only for legacy callers until they are migrated.*/-export type ImagePreviewProps = {+type ImagePreviewProps = {image: ImageData;variant: 'small' | 'dynamic';square?: boolean;diff --git a/js/app/packages/core/component/ItemPreview.tsx b/js/app/packages/core/component/ItemPreview.tsxindex 9801a22849..440e14b0cd 100644--- a/js/app/packages/core/component/ItemPreview.tsx+++ b/js/app/packages/core/component/ItemPreview.tsx@@ -213,7 +213,7 @@ function InlineLoading() {);}-export type ItemPreviewProps = ItemEntity & {+type ItemPreviewProps = ItemEntity & {/** Custom class for the button wrapper */class?: string;/** Custom class for the icon container */diff --git a/js/app/packages/core/component/LexicalMarkdown/citationsUtils.ts b/js/app/packages/core/component/LexicalMarkdown/citationsUtils.tsindex 8dec6acef7..a2946ba4e5 100644--- a/js/app/packages/core/component/LexicalMarkdown/citationsUtils.ts+++ b/js/app/packages/core/component/LexicalMarkdown/citationsUtils.ts@@ -100,7 +100,7 @@ const createProjectMentionXML = (projectId: string) => {});};-export const createDateMentionXML = (+const _createDateMentionXML = (date: Date,displayFormat: string,mentionUuid?: stringdiff --git a/js/app/packages/core/component/LexicalMarkdown/collaboration/LexicalAwareness.ts b/js/app/packages/core/component/LexicalMarkdown/collaboration/LexicalAwareness.tsindex 0dd40eb474..b6d4960071 100644--- a/js/app/packages/core/component/LexicalMarkdown/collaboration/LexicalAwareness.ts+++ b/js/app/packages/core/component/LexicalMarkdown/collaboration/LexicalAwareness.ts@@ -17,23 +17,6 @@ type NodeCursorRaw = {cursor: Uint8Array;};-type UserAwareness = {- userId: string | undefined;- color: string;-};--export type PeerLexicalAwarenessRaw = {- anchor: NodeCursorRaw;- focus: NodeCursorRaw;- user: UserAwareness;-};--export type PeerLexicalAwareness = {- anchor: NodeCursor;- focus: NodeCursor;- user: UserAwareness;-};-/** Conver a Lexical node cursor to a raw node cursor */function toRaw(cursor: NodeCursor): NodeCursorRaw {return {@@ -50,7 +33,7 @@ function fromRaw(raw: NodeCursorRaw): NodeCursor {};}-export type LexicalSelectionAwarenessRaw = {+type LexicalSelectionAwarenessRaw = {anchor: NodeCursorRaw;focus: NodeCursorRaw;};diff --git a/js/app/packages/core/component/LexicalMarkdown/collaboration/cursor.ts b/js/app/packages/core/component/LexicalMarkdown/collaboration/cursor.tsindex 3f9853a9da..fe290bd7b2 100644--- a/js/app/packages/core/component/LexicalMarkdown/collaboration/cursor.ts+++ b/js/app/packages/core/component/LexicalMarkdown/collaboration/cursor.ts@@ -338,7 +338,7 @@ export function $cursorToLexicalPoint(return $createPointFromKeyAndOffset(nodeKey, pos.offset);}-export function $createPointFromKeyAndOffset(+function $createPointFromKeyAndOffset(nodeKey: NodeKey,offset: number): Point | null {diff --git a/js/app/packages/core/component/LexicalMarkdown/collaboration/mapping.ts b/js/app/packages/core/component/LexicalMarkdown/collaboration/mapping.tsindex a2e8e24066..f7becfdf1c 100644--- a/js/app/packages/core/component/LexicalMarkdown/collaboration/mapping.ts+++ b/js/app/packages/core/component/LexicalMarkdown/collaboration/mapping.ts@@ -15,7 +15,7 @@ const warn = (...args: any[]) => {* @param mappings The [LoroLexicalNodeMappings] to search* @param containerId The [ContainerID] to search*/-export function $findLexicalNodeForLoroContainer(+function _$findLexicalNodeForLoroContainer(loroManager: LoroManager,mappings: NodeIdMappings,containerId: ContainerIDdiff --git a/js/app/packages/core/component/LexicalMarkdown/collaboration/remote-cursor.tsx b/js/app/packages/core/component/LexicalMarkdown/collaboration/remote-cursor.tsxindex 44074fe088..4559de314b 100644--- a/js/app/packages/core/component/LexicalMarkdown/collaboration/remote-cursor.tsx+++ b/js/app/packages/core/component/LexicalMarkdown/collaboration/remote-cursor.tsx@@ -33,13 +33,13 @@ const warn = (...args: any[]) => {const SMALLEST_RECT_WIDTH = 1.5;const SMALLEST_SELECTION_WIDTH = 5;-export type RemoteCursorWithStyle = {+type RemoteCursorWithStyle = {user: string | undefined;style: FloatingStyle[];};/** Processes the remote cursor updates and returns a list of RemoteCursorWithStyle */-export function $processRemoteCursorUpdates(+function $processRemoteCursorUpdates(editor: LexicalEditor,loroManager: LoroManager,mapping: NodeIdMappings,@@ -184,14 +184,14 @@ function $getRemoteCursorStyle(});}-export type UseRemoteCursorsProps = {+type UseRemoteCursorsProps = {loroManager: LoroManager;mapping: NodeIdMappings;editor: LexicalEditor;awareness: Awareness<LexicalSelectionAwareness>;};-export type UseRemoteCursors = {+type UseRemoteCursors = {remoteCursors: Accessor<RemoteCursorWithStyle[]>;setRemoteCursors: Setter<RemoteCursorWithStyle[]>;refreshRemoteCursors: () => void;diff --git a/js/app/packages/core/component/LexicalMarkdown/collaboration/utils.ts b/js/app/packages/core/component/LexicalMarkdown/collaboration/utils.tsdeleted file mode 100644index acb3608057..0000000000--- a/js/app/packages/core/component/LexicalMarkdown/collaboration/utils.ts+++ /dev/null@@ -1,99 +0,0 @@-import { $updateAllNodeIds, type NodeIdMappings } from '@lexical-core';-import type { LexicalEditor, SerializedEditorState } from 'lexical';-import { createLexicalWrapper } from '../context/LexicalWrapperContext';-import {- initializeEditorEmpty,- initializeEditorWithState,- setEditorStateFromMarkdown,-} from '../utils';--function tryParseJson(raw: string): Object | undefined {- try {- return JSON.parse(raw);- } catch (_) {- return undefined;- }-}--type InitializationValue = SerializedEditorState | string | undefined;-type StateSetter = (- editor: LexicalEditor,- state: InitializationValue,- ...args: any[]-) => any;--function setAndGetStateWithNodeIds(- setter: StateSetter,- editor: LexicalEditor,- state: InitializationValue,- mapping: NodeIdMappings-): SerializedEditorState | undefined {- setter(editor, state);- editor.update(- () => {- $updateAllNodeIds(mapping);- },- {- discrete: true,- }- );-- const serialized = editor.getEditorState().toJSON();-- return serialized;-}--/**- * Parse a blob into a serialized editor state.- */-export async function serializedStateFromBlob(- blob: Blob-): Promise<SerializedEditorState | undefined> {- const raw = new TextDecoder().decode(await blob.arrayBuffer());-- const ephemeralLexicalWrapper = createLexicalWrapper({- type: 'markdown-sync',- namespace: 'ephemeral-block-md',- isInteractable: () => false,- withIds: true,- });-- let state: SerializedEditorState | undefined;-- let maybeJson = tryParseJson(raw);-- let value = (maybeJson as SerializedEditorState) ?? raw;- let setter = maybeJson- ? initializeEditorWithState- : setEditorStateFromMarkdown;-- state = setAndGetStateWithNodeIds(- setter,- ephemeralLexicalWrapper.editor,- value,- ephemeralLexicalWrapper.mapping- );-- return state;-}--export async function createMarkdownStateFromContent(- content: string | undefined-) {- const ephemeralLexicalWrapper = createLexicalWrapper({- type: 'markdown-sync',- namespace: 'ephemeral-block-md',- isInteractable: () => false,- withIds: true,- });-- if (content) {- setEditorStateFromMarkdown(ephemeralLexicalWrapper.editor, content);- } else {- initializeEditorEmpty(ephemeralLexicalWrapper.editor);- }-- const serialized = ephemeralLexicalWrapper.editor.getEditorState().toJSON();-- return serialized;-}diff --git a/js/app/packages/core/component/LexicalMarkdown/component/accessory/CodeBoxAccessory.tsx b/js/app/packages/core/component/LexicalMarkdown/component/accessory/CodeBoxAccessory.tsxindex 38681d2014..0f55645ec9 100644--- a/js/app/packages/core/component/LexicalMarkdown/component/accessory/CodeBoxAccessory.tsx+++ b/js/app/packages/core/component/LexicalMarkdown/component/accessory/CodeBoxAccessory.tsx@@ -81,7 +81,7 @@ function StaticLabel(props: { language: SupportedLanguage }) {);}-export function CodeLanguageSelector(props: {+function CodeLanguageSelector(props: {language: Accessor<string | null>;setLanguage: (language: string) => void;editor?: LexicalEditor;diff --git a/js/app/packages/core/component/LexicalMarkdown/component/core/BlockLink.tsx b/js/app/packages/core/component/LexicalMarkdown/component/core/BlockLink.tsxindex b2d834ec4a..56740bf3d6 100644--- a/js/app/packages/core/component/LexicalMarkdown/component/core/BlockLink.tsx+++ b/js/app/packages/core/component/LexicalMarkdown/component/core/BlockLink.tsx@@ -6,7 +6,7 @@ import { useSplitNavigationHandler } from '@core/util/useSplitNavigationHandler'import { createCallback } from '@solid-primitives/rootless';import type { ParentProps } from 'solid-js';-export const blockNamesWithLocations = [+const blockNamesWithLocations = ['pdf','canvas','channel',@@ -16,7 +16,7 @@ export const blockNamesWithLocations = ['chat','task',] as const;-export type BlockNameWithLocations = (typeof blockNamesWithLocations)[number];+type BlockNameWithLocations = (typeof blockNamesWithLocations)[number];export function isBlockNameWithLocation(name: BlockName | BlockAlias@@ -24,7 +24,7 @@ export function isBlockNameWithLocation(return blockNamesWithLocations.includes(name as BlockNameWithLocations);}-export async function openLocation<T extends BlockNameWithLocations>(+async function openLocation<T extends BlockNameWithLocations>(_blockName: T,id: string,params?: Record<string, string>diff --git a/js/app/packages/core/component/LexicalMarkdown/component/core/Highlights.tsx b/js/app/packages/core/component/LexicalMarkdown/component/core/Highlights.tsxindex ff290f0c23..5297d8a24d 100644--- a/js/app/packages/core/component/LexicalMarkdown/component/core/Highlights.tsx+++ b/js/app/packages/core/component/LexicalMarkdown/component/core/Highlights.tsx@@ -39,7 +39,7 @@ type PaddingValue =* - [x, y]: horizontal and vertical padding* - [top, right, bottom, left]: individual side padding (CSS-style)*/-export function getHighlightStyle(+function getHighlightStyle(targetRect: DOMRect | null,anchorElem: HTMLElement,padding: PaddingValue = 0@@ -229,7 +229,7 @@ function createRectsFromDOMRange(/*** Get the highlight rects for a selection.*/-export function getSelectionRects(+function _getSelectionRects(editor: LexicalEditor,selection: BaseSelection | null): DOMRect[] {diff --git a/js/app/packages/core/component/LexicalMarkdown/component/core/MarkdownTextarea.tsx b/js/app/packages/core/component/LexicalMarkdown/component/core/MarkdownTextarea.tsxindex 9d439682c0..1e7c4b47a3 100644--- a/js/app/packages/core/component/LexicalMarkdown/component/core/MarkdownTextarea.tsx+++ b/js/app/packages/core/component/LexicalMarkdown/component/core/MarkdownTextarea.tsx@@ -73,7 +73,7 @@ import { NodeAccessoryRenderer } from './NodeAccessoryRenderer';* @param onEscape - A callback function that is called when the user presses Escape in the textarea. If the function* returns true Lexical's default behavior will be prevented.*/-export interface MarkdownTextareaProps {+interface MarkdownTextareaProps {editable: Accessor<boolean>;onChange?: (value: string, editor?: LexicalEditor) => void;initialValue?: string;diff --git a/js/app/packages/core/component/LexicalMarkdown/component/decorator/DocumentMention.tsx b/js/app/packages/core/component/LexicalMarkdown/component/decorator/DocumentMention.tsxindex 3b54e824f0..9477e9cbf6 100644--- a/js/app/packages/core/component/LexicalMarkdown/component/decorator/DocumentMention.tsx+++ b/js/app/packages/core/component/LexicalMarkdown/component/decorator/DocumentMention.tsx@@ -346,7 +346,7 @@ function DocumentMentionStatic(props: DocumentMentionDecoratorProps) {);}-export function DocumentMentionInner(props: DocumentMentionDecoratorProps) {+function DocumentMentionInner(props: DocumentMentionDecoratorProps) {const currentBlockId = useMaybeBlockId();const currentBlockName = useMaybeBlockName();diff --git a/js/app/packages/core/component/LexicalMarkdown/component/decorator/MediaButtons.tsx b/js/app/packages/core/component/LexicalMarkdown/component/decorator/MediaButtons.tsxindex 6238b2e4c2..eb481b2a61 100644--- a/js/app/packages/core/component/LexicalMarkdown/component/decorator/MediaButtons.tsx+++ b/js/app/packages/core/component/LexicalMarkdown/component/decorator/MediaButtons.tsx@@ -18,7 +18,7 @@ false && clickOutside;const COLLAPSE_WIDTH = 120;-export interface MediaButtonsProps {+interface MediaButtonsProps {delete?: () => void;enlarge?: () => void;newTab?: () => void;diff --git a/js/app/packages/core/component/LexicalMarkdown/component/menu/ActionsMenu.tsx b/js/app/packages/core/component/LexicalMarkdown/component/menu/ActionsMenu.tsxindex d96293d789..c0f2aedd85 100644--- a/js/app/packages/core/component/LexicalMarkdown/component/menu/ActionsMenu.tsx+++ b/js/app/packages/core/component/LexicalMarkdown/component/menu/ActionsMenu.tsx@@ -35,7 +35,7 @@ false && floatWithElement;// Surface's p-px border (2px) + py-2 padding (16px)const PANEL_DECORATION_HEIGHT = 18;-export function ActionsMenuItem(props: {+function ActionsMenuItem(props: {action: Action;index: number;selected: boolean;diff --git a/js/app/packages/core/component/LexicalMarkdown/component/menu/EmojiMenu.tsx b/js/app/packages/core/component/LexicalMarkdown/component/menu/EmojiMenu.tsxindex 45c99e2fd0..fc88aaaa97 100644--- a/js/app/packages/core/component/LexicalMarkdown/component/menu/EmojiMenu.tsx+++ b/js/app/packages/core/component/LexicalMarkdown/component/menu/EmojiMenu.tsx@@ -30,7 +30,7 @@ false && floatWithSelection;// py-2 on the menu container = 8px top + 8px bottomconst MENU_DECORATION_HEIGHT = 16;-export type EmojiMenuProps = {+type EmojiMenuProps = {menu: MenuOperations;editor: LexicalEditor;/** whether the menu checks against block boundary in floating middleware. uses floating-ui default if false. */@@ -38,7 +38,7 @@ export type EmojiMenuProps = {portalScope?: PortalScope;};-export function EmojiItem(props: {+function EmojiItem(props: {emoji: string;name: string;selected: boolean;diff --git a/js/app/packages/core/component/LexicalMarkdown/component/menu/GenerateMenu.tsx b/js/app/packages/core/component/LexicalMarkdown/component/menu/GenerateMenu.tsxindex 081279ea74..28304a8c5c 100644--- a/js/app/packages/core/component/LexicalMarkdown/component/menu/GenerateMenu.tsx+++ b/js/app/packages/core/component/LexicalMarkdown/component/menu/GenerateMenu.tsx@@ -32,7 +32,7 @@ import {} from '../../plugins/generate/generatePlugin';export type generateCallback = (userRequest: string) => void;-export type GenerateMenuProps = {+type GenerateMenuProps = {menuOpen: GenerateMenuOpen;generateCallback: generateCallback;completionSignal: Accessor<Completion | undefined>;diff --git a/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu/MentionsMenu.tsx b/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu/MentionsMenu.tsxindex 344794c330..66e6d3a218 100644--- a/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu/MentionsMenu.tsx+++ b/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu/MentionsMenu.tsx@@ -56,7 +56,7 @@ const VIRTUAL_ITEM_HEIGHT = 36;// Height consumed by Surface's p-px border (2px) + py-2 padding (16px)const PANEL_DECORATION_HEIGHT = 18;-export type MentionsMenuProps = {+type MentionsMenuProps = {editor: LexicalEditor;menu: MenuOperations;/** pass in a custom users list if necessary */diff --git a/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu/MentionsMenuController.ts b/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu/MentionsMenuController.tsindex b2742730ad..6b8faf9f9e 100644--- a/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu/MentionsMenuController.ts+++ b/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu/MentionsMenuController.ts@@ -24,15 +24,15 @@ export interface BucketConfig<T extends MentionItem = MentionItem> {* - null: show all categories with limited items* - string: show all items for the specified category*/-export type ViewAllMode = string | null;+type ViewAllMode = string | null;/** the currently selected category id, or null if in view-all mode */-export type SelectedCategory = string | null;+type SelectedCategory = string | null;/** result of bin computation - how many items to show per bucket */-export type MentionBins = Record<string, number>;+type MentionBins = Record<string, number>;-export class MentionsMenuController {+class MentionsMenuController {private buckets: Accessor<BucketConfig[]>;private maxItems: number;private ignoredIds: Accessor<string[]> = () => [];diff --git a/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu/hooks/useEmailSearchMention.ts b/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu/hooks/useEmailSearchMention.tsindex ed212b6d4b..d272b92f45 100644--- a/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu/hooks/useEmailSearchMention.ts+++ b/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu/hooks/useEmailSearchMention.ts@@ -8,12 +8,12 @@ import {import { createLazyMemo } from '@solid-primitives/memo';import type { Accessor } from 'solid-js';-export type UseEmailSearchMentionOptions = {+type UseEmailSearchMentionOptions = {searchTerm: Accessor<string>;enabled?: Accessor<boolean | undefined>;};-export type UseEmailSearchMentionResult = {+type UseEmailSearchMentionResult = {emails: Accessor<EntityItem[]>;emailSearchQuery: ReturnType<typeof useSearchSoupQuery>;};diff --git a/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu/hooks/useEntityMention.ts b/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu/hooks/useEntityMention.tsindex 22ea563d3b..9712145dbb 100644--- a/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu/hooks/useEntityMention.ts+++ b/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu/hooks/useEntityMention.ts@@ -7,12 +7,12 @@ import { createFreshSearch } from '@core/util/freshSort';import { createLazyMemo } from '@solid-primitives/memo';import type { Accessor } from 'solid-js';-export type UseEntityMentionOptions = {+type UseEntityMentionOptions = {searchTerm: Accessor<string>;buckets: EntityBucket[];};-export type UseEntityMentionResult = {+type UseEntityMentionResult = {searchedEntities: Accessor<EntityItem[]>;allEntities: Accessor<EntityItem[]>;};@@ -50,7 +50,7 @@ export function useEntityMention(};}-export type UseEntityMentionFromListOptions = {+type UseEntityMentionFromListOptions = {items: Accessor<EntityItem[]>;searchTerm: Accessor<string>;buckets: EntityBucket[];diff --git a/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu/hooks/useUsersMention.ts b/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu/hooks/useUsersMention.tsindex d9e618bc89..d886206278 100644--- a/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu/hooks/useUsersMention.ts+++ b/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu/hooks/useUsersMention.ts@@ -6,7 +6,7 @@ import { createLazyMemo } from '@solid-primitives/memo';import type { Accessor } from 'solid-js';import type { GroupMentionItem } from '../../../../utils/mentionsUtils';-export type UseUsersMentionOptions = {+type UseUsersMentionOptions = {/** Custom users list if necessary */users?: Accessor<IUser[]>;searchTerm: Accessor<string>;@@ -14,7 +14,7 @@ export type UseUsersMentionOptions = {blockId?: string;};-export type UseUsersMentionResult = {+type UseUsersMentionResult = {users: Accessor<UserItem[]>;currentUserDomain: Accessor<string | undefined>;groups: Accessor<GroupMentionItem[]>;diff --git a/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu/utils/mentionHandlers.ts b/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu/utils/mentionHandlers.tsindex f8648f71b8..62268d77cf 100644--- a/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu/utils/mentionHandlers.ts+++ b/js/app/packages/core/component/LexicalMarkdown/component/menu/MentionsMenu/utils/mentionHandlers.ts@@ -18,7 +18,7 @@ import { getBlockNameFromEntity } from './entityUtils';/*** Handle entity mention (documents, channels, emails, etc.).*/-export async function handleEntityMention(+async function handleEntityMention(item: EntityItem,dependencies: HandlerDependencies): Promise<void> {@@ -71,7 +71,7 @@ export async function handleEntityMention(/*** Handle date mention from DateOption.*/-export async function handleDateMentionFromOption(+async function handleDateMentionFromOption(dateOption: DateOption,dependencies: HandlerDependencies): Promise<void> {@@ -85,7 +85,7 @@ export async function handleDateMentionFromOption(/*** Handle group mention (e.g., @here).*/-export async function handleGroupMentionItem(+async function handleGroupMentionItem(group: { id: string; groupAlias: string },dependencies: HandlerDependencies): Promise<void> {diff --git a/js/app/packages/core/component/LexicalMarkdown/component/menu/useMenuKeyboardNavigation.ts b/js/app/packages/core/component/LexicalMarkdown/component/menu/useMenuKeyboardNavigation.tsindex 1e6210e97f..70ceca4946 100644--- a/js/app/packages/core/component/LexicalMarkdown/component/menu/useMenuKeyboardNavigation.ts+++ b/js/app/packages/core/component/LexicalMarkdown/component/menu/useMenuKeyboardNavigation.ts@@ -1,6 +1,6 @@import { onCleanup, onMount } from 'solid-js';-export type MenuKeyboardHandlers = {+type MenuKeyboardHandlers = {/** Called when the user navigates up (ArrowUp, Ctrl+K, Ctrl+P, Shift+Tab) */onUp?: (e: KeyboardEvent) => void;@@ -73,7 +73,7 @@ export type MenuKeyboardHandlers = {* });* ```*/-export function createMenuKeyboardNavigation(handlers: MenuKeyboardHandlers): {+function createMenuKeyboardNavigation(handlers: MenuKeyboardHandlers): {handleKeyDown: (e: KeyboardEvent) => void;} {const {diff --git a/js/app/packages/core/component/LexicalMarkdown/component/misc/MentionsTextarea.tsx b/js/app/packages/core/component/LexicalMarkdown/component/misc/MentionsTextarea.tsxdeleted file mode 100644index 2437a008e0..0000000000--- a/js/app/packages/core/component/LexicalMarkdown/component/misc/MentionsTextarea.tsx+++ /dev/null@@ -1,206 +0,0 @@-import type { PortalScope } from '@core/component/ScopedPortal';-import { cn } from '@ui';-import {- COMMAND_PRIORITY_HIGH,- KEY_ENTER_COMMAND,- KEY_TAB_COMMAND,- type LexicalEditor,-} from 'lexical';-import {- createEffect,- createSignal,- onCleanup,- onMount,- type Setter,- Show,-} from 'solid-js';-import {- type LexicalWrapperBase,- LexicalWrapperContext,-} from '../../context/LexicalWrapperContext';-import {- codePlugin,- createAccessoryStore,- type ItemMention,- mentionsPlugin,- selectionDataPlugin,- tabIndentationPlugin,-} from '../../plugins';-import { createMenuOperations } from '../../shared/inlineMenu';-import {- editorIsEmpty,- initializeEditorEmpty,- setEditorStateFromMarkdown,-} from '../../utils';-import type { UserMentionRecord } from '../../utils/mentionsUtils';-import { DecoratorRenderer } from '../core/DecoratorRenderer';-import { MentionsMenu } from '../menu/MentionsMenu';--// Version of MarkdownTextArea modified for email to/cc/bcc input fields--export interface MentionsTextareaProps {- wrapper: LexicalWrapperBase;- onChange?: (value: string, editor?: LexicalEditor) => void;- initialValue?: string;- focusOnMount?: boolean;- class?: string;- anchor?: HTMLElement | null;- onContactMention?: (mention: UserMentionRecord) => void;- onRemoveMention?: (mention: ItemMention) => void;- setMentions?: Setter<ItemMention[]>;- ref?: (el: HTMLDivElement) => void;- onTab?: () => void;- portalScope?: PortalScope;- placeholder?: string;-}--export function MentionsTextarea(props: MentionsTextareaProps) {- let mountRef!: HTMLDivElement;- const { editor, plugins, cleanup: cleanupLexical } = props.wrapper;-- const [markdownState, setMarkdownState] = createSignal<string>('');-- onMount(() => {- // Prevent these from stealing focus on load/refresh- mountRef.inert = true;- setTimeout(() => {- mountRef.inert = false;- }, 0);-- if (!props.focusOnMount) return;- setTimeout(() => {- mountRef.focus();- });- });-- createEffect(() => {- props.onChange?.(markdownState(), editor);- });-- if (props.initialValue) {- setEditorStateFromMarkdown(editor, props.initialValue);- } else {- initializeEditorEmpty(editor);- }-- const [showPlaceholder, setShowPlaceholder] = createSignal(- !!props.placeholder- );-- const mentionsMenuOperations = createMenuOperations();-- plugins- .richText()- .list()- .markdownShortcuts()- .delete()- .state<string>(setMarkdownState, 'markdown')- .history(400)- .use(selectionDataPlugin(props.wrapper))- .use(tabIndentationPlugin())- .use(- mentionsPlugin({- menu: mentionsMenuOperations,- onRemoveMention: props.onRemoveMention,- setMentions: props.setMentions,- })- );-- const [accessoryStore, setAccessoryStore] = createAccessoryStore();- plugins.use(- codePlugin({- setAccessories: setAccessoryStore,- accessories: accessoryStore,- })- );-- let cleanupEnterListener: () => void = () => {};- createEffect(() => {- cleanupEnterListener();- cleanupEnterListener = editor.registerCommand(- KEY_ENTER_COMMAND,- (e) => {- e?.preventDefault();- return true;- },- // Run at HIGH here so that the mentions menu can run at CRITICAL- COMMAND_PRIORITY_HIGH- );- });-- // Assign ref to parent if provided- createEffect(() => {- if (props.ref) props.ref(mountRef);- });-- let cleanupTabListener: () => void = () => {};- createEffect(() => {- cleanupTabListener();- cleanupTabListener = editor.registerCommand(- KEY_TAB_COMMAND,- (e: KeyboardEvent) => {- e.preventDefault();- if (props.onTab) {- props.onTab();- }- return true;- },- // Run at HIGH here so that the mentions menu can run at CRITICAL- COMMAND_PRIORITY_HIGH- );- });-- onMount(() => {- editor.setRootElement(mountRef);- });-- onCleanup(() => {- cleanupLexical();- });-- if (props.placeholder) {- createEffect(() => {- markdownState();- setShowPlaceholder(editorIsEmpty(editor));- });- }-- return (- <LexicalWrapperContext.Provider value={props.wrapper}>- <div- class={cn('relative size-full overflow-auto min-h-8', props.class)}- on:keydown={(e) => {- e.stopPropagation();- }}- on:click={(e) => {- e.stopPropagation();- }}- on:mousedown={(e) => {- e.stopPropagation();- }}- on:mouseup={(e) => {- e.stopPropagation();- }}- >- <div- class="h-full min-h-8 max-h-24 overflow-y-auto"- ref={mountRef}- contentEditable- />- <Show when={showPlaceholder()}>- <div class="pointer-events-none text-ink-placeholder absolute top-0">- <p class="my-1.5">{props.placeholder}</p>- </div>- </Show>- <DecoratorRenderer editor={editor} />- <MentionsMenu- editor={editor}- menu={mentionsMenuOperations}- anchor={props.anchor}- onUserMention={props.onContactMention}- portalScope={props.portalScope}- />- </div>- </LexicalWrapperContext.Provider>- );-}diff --git a/js/app/packages/core/component/LexicalMarkdown/component/misc/TableCellResizer.tsx b/js/app/packages/core/component/LexicalMarkdown/component/misc/TableCellResizer.tsxindex 3a56c939ca..a27716e566 100644--- a/js/app/packages/core/component/LexicalMarkdown/component/misc/TableCellResizer.tsx+++ b/js/app/packages/core/component/LexicalMarkdown/component/misc/TableCellResizer.tsx@@ -18,7 +18,7 @@ import { createMemo, createSignal, type JSX, onCleanup, Show } from 'solid-js';import { registerEditorWidthObserver } from '../../plugins/shared/utils';// Constants-export const MIN_ROW_HEIGHT = 35;+const MIN_ROW_HEIGHT = 35;export const MIN_COLUMN_WIDTH = 120;// Typesdiff --git a/js/app/packages/core/component/LexicalMarkdown/constants.ts b/js/app/packages/core/component/LexicalMarkdown/constants.tsindex e235fffeee..b5690ae003 100644--- a/js/app/packages/core/component/LexicalMarkdown/constants.ts+++ b/js/app/packages/core/component/LexicalMarkdown/constants.ts@@ -14,10 +14,7 @@ export enum MarkdownEditorErrors {STAGING_VERSION_MISMATCH_ERROR = 'STAGING_VERSION_MISMATCH_ERROR',}-export const MarkdownEditorErrorDescriptions: Record<- MarkdownEditorErrors,- string-> = {+const MarkdownEditorErrorDescriptions: Record<MarkdownEditorErrors, string> = {[MarkdownEditorErrors.EMPTY_SOURCE]: 'No document content could be found.',[MarkdownEditorErrors.JSON_PARSE_ERROR]:'Parse error. Invalid document JSON.',diff --git a/js/app/packages/core/component/LexicalMarkdown/context/FloatingMenuContext.tsx b/js/app/packages/core/component/LexicalMarkdown/context/FloatingMenuContext.tsxindex 1f8ab6c227..544200cb2c 100644--- a/js/app/packages/core/component/LexicalMarkdown/context/FloatingMenuContext.tsx+++ b/js/app/packages/core/component/LexicalMarkdown/context/FloatingMenuContext.tsx@@ -23,7 +23,7 @@ interface IFloatingMenuContext {isMenuOpen: (id: string) => boolean;}-export const FloatingMenuContext = createContext<IFloatingMenuContext>();+const FloatingMenuContext = createContext<IFloatingMenuContext>();export function FloatingMenuGroup(props: ParentProps) {const [currentMenu, setCurrentMenu] = createSignal<{diff --git a/js/app/packages/core/component/LexicalMarkdown/context/LexicalWrapperContext.tsx b/js/app/packages/core/component/LexicalMarkdown/context/LexicalWrapperContext.tsxindex c34b2ee15f..3f313bd37c 100644--- a/js/app/packages/core/component/LexicalMarkdown/context/LexicalWrapperContext.tsx+++ b/js/app/packages/core/component/LexicalMarkdown/context/LexicalWrapperContext.tsx@@ -26,7 +26,7 @@ import {} from '../plugins';import { theme as baseTheme } from '../theme';-export type LexicalWrapperProps = {+type LexicalWrapperProps = {type: EditorType;namespace: string;isInteractable: () => boolean;diff --git a/js/app/packages/core/component/LexicalMarkdown/directive/floatWithElement.ts b/js/app/packages/core/component/LexicalMarkdown/directive/floatWithElement.tsindex fd882379a5..721f9cff20 100644--- a/js/app/packages/core/component/LexicalMarkdown/directive/floatWithElement.ts+++ b/js/app/packages/core/component/LexicalMarkdown/directive/floatWithElement.ts@@ -14,7 +14,7 @@ import type { Accessor, JSX } from 'solid-js';import { createEffect, onCleanup } from 'solid-js';import { iosSafePadding } from './iosFloatingMiddleware';-export type FloatWithElementOptions = {+type FloatWithElementOptions = {element: () => Element | undefined | null;spacing?: number;useBlockBoundary?: boolean;diff --git a/js/app/packages/core/component/LexicalMarkdown/directive/glueToElement.ts b/js/app/packages/core/component/LexicalMarkdown/directive/glueToElement.tsindex 1ff94bf0af..a9b9969651 100644--- a/js/app/packages/core/component/LexicalMarkdown/directive/glueToElement.ts+++ b/js/app/packages/core/component/LexicalMarkdown/directive/glueToElement.ts@@ -3,7 +3,7 @@ import type { LexicalEditor } from 'lexical';import type { Accessor, JSX } from 'solid-js';import { createEffect, onCleanup } from 'solid-js';-export type GlueToElementProps = {+type GlueToElementProps = {editor: LexicalEditor;element: Accessor<HTMLElement | undefined | null>;};diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/actions/actionsPlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/actions/actionsPlugin.tsindex 2e075095be..f50ec6650e 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/actions/actionsPlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/actions/actionsPlugin.ts@@ -23,7 +23,7 @@ import {} from 'lexical';import type { MenuOperations } from '../../shared/inlineMenu';-export const TYPE_SLASH_COMMAND: LexicalCommand<void> =+const TYPE_SLASH_COMMAND: LexicalCommand<void> =createCommand('TYPE_SLASH_COMMAND');export const CLOSE_ACTION_SEARCH_COMMAND: LexicalCommand<void> = createCommand(@@ -33,17 +33,11 @@ export const REMOVE_ACTION_SEARCH_COMMAND: LexicalCommand<void> = createCommand('REMOVE_ACTION_SEARCH_COMMAND');-export type ActionInfo = {- id: string;- name: string;- action: () => void;-};-// Validators for the position of the / trigger.const beforeRegex = /\s$/;const afterRegex = /^\s/;-export type ActionsPluginProps = {+type ActionsPluginProps = {menu?: MenuOperations;peerIdValidator?: PeerIdValidator;};diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/actions/types.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/actions/types.tsindex 73a2962a89..b43209745e 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/actions/types.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/actions/types.ts@@ -1,8 +1,6 @@import type { KlassConstructor, LexicalEditor, LexicalNode } from 'lexical';import type { Component } from 'solid-js';-export type ActionIcon = string;-export type Action = {id: string;name: string;@@ -16,9 +14,7 @@ export type Action = {// TODO (seamus): Actually organize the items based on category.export enum ActionCategory {- BASIC = 'Basic',FORMAT = 'Formatting',ELEMENT = 'Elements',MEDIA = 'Media',- ADVANCED = 'Advanced',}diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/await/awaitPlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/await/awaitPlugin.tsindex fa23c3fc08..595770283f 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/await/awaitPlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/await/awaitPlugin.ts@@ -15,7 +15,7 @@ import {} from 'lexical';import { $collapseSelection, $traverseNodes } from '../../utils';-export type InsertAwaitPayload = {+type InsertAwaitPayload = {awaitId: string;text?: string;inline?: boolean;@@ -29,7 +29,7 @@ export const INSERT_AWAIT_NODE_COMMAND = createCommand<InsertAwaitPayload>('INSERT_AWAIT_NODE_COMMAND');-export type ReplaceAwaitPayload = {+type ReplaceAwaitPayload = {awaitId: string;/*** Run inside `editor.update`. Return node(s) to replace the await with, ordiff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/checkbox-to-task/checkboxDetection.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/checkbox-to-task/checkboxDetection.tsindex 592c0654a7..7e407ccc42 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/checkbox-to-task/checkboxDetection.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/checkbox-to-task/checkboxDetection.ts@@ -6,7 +6,7 @@ import { $getRoot, type LexicalNode, type RangeSelection } from 'lexical';* ListItemNodes in checklists have getChecked() returning a boolean,* while regular list items return undefined.*/-export function $isCheckboxNode(node: LexicalNode): node is ListItemNode {+function $isCheckboxNode(node: LexicalNode): node is ListItemNode {if (!$isListItemNode(node)) return false;return typeof node.getChecked() === 'boolean';}diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/checkbox-to-task/checkboxParsing.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/checkbox-to-task/checkboxParsing.tsindex 6d162c632c..404f0fe070 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/checkbox-to-task/checkboxParsing.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/checkbox-to-task/checkboxParsing.ts@@ -102,7 +102,7 @@ function $collectTextContent(node: LexicalNode): string {* Must be called within Lexical update context (not read) because* $elementNodeToMarkdown requires update context.*/-export function $parseCheckboxNode(node: ListItemNode): ParsedCheckbox {+function $parseCheckboxNode(node: ListItemNode): ParsedCheckbox {const rawMarkdown = $elementNodeToMarkdown(node, 'internal');return {diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/code/codePlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/code/codePlugin.tsindex a67c74d3a4..6842246535 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/code/codePlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/code/codePlugin.ts@@ -151,7 +151,7 @@ type CodePluginProps = {setAccessories: SetStoreFunction<AccessoryStore>;};-export type CodePreviewInfo = {+type CodePreviewInfo = {language: string;code: string;};diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/comments/commentPlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/comments/commentPlugin.tsindex 026f710f9c..cdac45ff14 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/comments/commentPlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/comments/commentPlugin.ts@@ -66,7 +66,7 @@ export const SET_COMMENT_THREAD_ID_COMMAND = createCommand<{threadId: number;}>('SET_COMMENT_THREAD_ID_COMMAND');-export const CLEANUP_COMMENTS_COMMAND = createCommand<string[]>(+const CLEANUP_COMMENTS_COMMAND = createCommand<string[]>('CLEANUP_COMMENTS_COMMAND');@@ -74,7 +74,7 @@ const generateMarkId = () => v7();export const markNodeKeysToIDs: Map<NodeKey, Array<string>> = new Map();-export type CommentPluginProps = {+type CommentPluginProps = {ops: CommentOperations;peerId: () => string | undefined;};@@ -424,7 +424,7 @@ export function commentPlugin(props: CommentPluginProps) {};}-export function $disposeLocalDraftComments() {+function _$disposeLocalDraftComments() {$traverseNodes($getRoot(), (node) => {if ($isCommentNode(node)) {if (node.getIsDraft() && node.getIsLocal()) {@@ -434,7 +434,7 @@ export function $disposeLocalDraftComments() {});}-export function $disposeExternalDraftComments(validPeerIds: string[]) {+function $disposeExternalDraftComments(validPeerIds: string[]) {$traverseNodes($getRoot(), (node) => {if ($isCommentNode(node)) {const nodePeerId = $getPeerId(node);@@ -449,7 +449,7 @@ export function $disposeExternalDraftComments(validPeerIds: string[]) {});}-export function $unwrapOrRemovePeer(node: CommentNode, currentPeerId: string) {+function $unwrapOrRemovePeer(node: CommentNode, currentPeerId: string) {const noRemainingOwner = $removePeerId(node, currentPeerId);if (noRemainingOwner) {$unwrapMarkNode(node);diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/custom-caret/customCaretPlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/custom-caret/customCaretPlugin.tsindex 73edd4c7b3..a05c7d7684 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/custom-caret/customCaretPlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/custom-caret/customCaretPlugin.ts@@ -29,7 +29,7 @@ function matchCaret(caretElement: HTMLDivElement, selection: Selection | null) {caretElement.style.top = `${rect.top}px`;}-export function customCursorPlugin() {+function _customCursorPlugin() {return () => {const caretElement = document.createElement('div');caretElement.className = 'fixed w-[2px] h-[10px] bg-accent';@@ -59,3 +59,5 @@ export function customCursorPlugin() {};};}++export {};diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/custom-delete/customDeletePlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/custom-delete/customDeletePlugin.tsindex bf0ad7fa07..f278e6b407 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/custom-delete/customDeletePlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/custom-delete/customDeletePlugin.ts@@ -18,7 +18,7 @@ import {* position of a list item node.* @returns true if a ParagraphNode was inserted successfully, false otherwise*/-export function $handleDeleteListItemAtStart(): boolean {+function $handleDeleteListItemAtStart(): boolean {// this is the lexical handler for hitting 'ENTER' from an empty list item.// if that returns true, we are already done.const selection = $getSelection();diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/diff/diffPlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/diff/diffPlugin.tsindex 2371208cfb..3f7bd2e8de 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/diff/diffPlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/diff/diffPlugin.ts@@ -25,7 +25,7 @@ interface Diff {markdown_text: string;}-export type DiffPluginArgs = {+type DiffPluginArgs = {revisionsSignal: ReturnType<typeof createBlockSignal<Diff[] | undefined>>;nodeIdMap: NodeIdMappings;};diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/document-metadata/documentMetadataPlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/document-metadata/documentMetadataPlugin.tsindex 426b6358b6..3231c98cd2 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/document-metadata/documentMetadataPlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/document-metadata/documentMetadataPlugin.ts@@ -13,7 +13,7 @@ import {import { MarkdownEditorErrors } from '../../constants';import { MARKDOWN_VERSION_COUNTER } from '../../version';-export type DocumentMetadata = {+type DocumentMetadata = {version: number;environmentTags?: string[];};@@ -51,16 +51,14 @@ export function $getDocumentMetadata(): DocumentMetadata {return $getState(root, documentMetadataState);}-export function $setDocumentMetadata(- metadata: Partial<DocumentMetadata>-): void {+function $setDocumentMetadata(metadata: Partial<DocumentMetadata>): void {const root = $getRoot();const currentMetadata = $getState(root, documentMetadataState);const newMetadata = { ...currentMetadata, ...metadata };$setState(root, documentMetadataState, newMetadata);}-export function $addEnvironmentTags(tags: string[]): void {+function _$addEnvironmentTags(tags: string[]): void {const currentMetadata = $getDocumentMetadata();const existingTags = currentMetadata.environmentTags || [];const newTags = [...new Set([...existingTags, ...tags])];@@ -70,7 +68,7 @@ export function $addEnvironmentTags(tags: string[]): void {});}-export function $removeEnvironmentTags(tags: string[]): void {+function _$removeEnvironmentTags(tags: string[]): void {const currentMetadata = $getDocumentMetadata();const existingTags = currentMetadata.environmentTags || [];const filteredTags = existingTags.filter((tag) => !tags.includes(tag));@@ -80,11 +78,11 @@ export function $removeEnvironmentTags(tags: string[]): void {});}-export function $setDocumentVersion(version: number): void {+function $setDocumentVersion(version: number): void {$setDocumentMetadata({ version });}-export function $hasEnvironmentTag(tag: string): boolean {+function _$hasEnvironmentTag(tag: string): boolean {const metadata = $getDocumentMetadata();return metadata.environmentTags?.includes(tag) ?? false;}@@ -92,7 +90,7 @@ export function $hasEnvironmentTag(tag: string): boolean {/*** Get document version*/-export function $getDocumentVersion(): number {+function _$getDocumentVersion(): number {const metadata = $getDocumentMetadata();return metadata.version;}diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/drag-insert/dragInsertPlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/drag-insert/dragInsertPlugin.tsindex 4cf7ab438b..9c838b591b 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/drag-insert/dragInsertPlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/drag-insert/dragInsertPlugin.ts@@ -43,7 +43,7 @@ export const createDragInsertStore = () => {* @param dragListenerRef - A ref to a div that will listen for drag events.* If not provided, the plugin will listen to the root element.*/-export type DragInsertPluginProps = {+type DragInsertPluginProps = {onDrop?: (key: NodeKey, position: InsertionMarker, event: DragEvent) => void;onDragOver?: (key: NodeKey,diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/draggable-block/draggableBlockPlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/draggable-block/draggableBlockPlugin.tsindex 8f34664048..dcf19cadad 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/draggable-block/draggableBlockPlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/draggable-block/draggableBlockPlugin.ts@@ -215,7 +215,7 @@ export function $collectNestedGroup(item: ListItemNode): ListItemNode[] {return group;}-export type DraggableBlockPluginProps = {+type DraggableBlockPluginProps = {setState: SetStoreFunction<DraggableBlockState>;/*** Element to listen for mouse / drag events on.diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/element-event/elementEventPlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/element-event/elementEventPlugin.tsindex 0f49fc6cf8..e2f8c8f341 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/element-event/elementEventPlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/element-event/elementEventPlugin.ts@@ -6,7 +6,7 @@ import {type NodeKey,} from 'lexical';-export type ElementEventProps<T extends LexicalNode, E extends Event> = {+type ElementEventProps<T extends LexicalNode, E extends Event> = {eventName: string;guard: (node: LexicalNode) => node is T;callback: (event: E, node: T, key: NodeKey) => void;@@ -60,7 +60,7 @@ function registerElementEventPlugin<T extends LexicalNode, E extends Event>(** plugins.use(linkClickPlugin);*/-export function elementEventPlugin<T extends LexicalNode, E extends Event>(+function _elementEventPlugin<T extends LexicalNode, E extends Event>(props: ElementEventProps<T, E>) {return (editor: LexicalEditor) => registerElementEventPlugin(editor, props);diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/emojis/emojisPlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/emojis/emojisPlugin.tsindex 33cfebfebf..7771532284 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/emojis/emojisPlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/emojis/emojisPlugin.ts@@ -23,7 +23,7 @@ import {} from 'lexical';import type { MenuOperations } from '../../shared/inlineMenu';-export const TYPE_EMOJI_SYMBOL_COMMAND: LexicalCommand<void> = createCommand(+const TYPE_EMOJI_SYMBOL_COMMAND: LexicalCommand<void> = createCommand('EMOJI_SYMBOL_COMMAND');@@ -35,7 +35,7 @@ export const REMOVE_EMOJI_SEARCH_COMMAND: LexicalCommand<void> = createCommand('REMOVE_EMOJI_SEARCH_COMMAND');-export type EmojiPluginProps = {+type EmojiPluginProps = {menu: MenuOperations;peerIdValidator?: PeerIdValidator;};diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/find-and-replace/findAndReplacePlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/find-and-replace/findAndReplacePlugin.tsindex 1242bcf671..48ac11e09d 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/find-and-replace/findAndReplacePlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/find-and-replace/findAndReplacePlugin.ts@@ -61,7 +61,7 @@ interface NoneBreakNode {realLocations: MatchedAndLocations[];}-export type FindAndReplaceProps = {+type FindAndReplaceProps = {setListOffset: (listOffset: NodekeyOffset[]) => void;};diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/generate/generatePlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/generate/generatePlugin.tsindex 083801064c..2c947c9ebf 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/generate/generatePlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/generate/generatePlugin.ts@@ -31,12 +31,7 @@ import { createEffect, createSignal, on, type Setter } from 'solid-js';import { theme } from '../../theme';import { $traverseNodes, setEditorStateFromMarkdown } from '../../utils';-export {- $createCompletionNode,- $isCompletionNode,- COMPLETION_NODE_TYPE,- CompletionNode,-} from '@lexical-core';+export {} from '@lexical-core';import type { createBlockSignal } from '@core/block';import type { SetStoreFunction } from 'solid-js/store';@@ -60,31 +55,25 @@ export type Completion = {};// ai generated content-export type CompletionSignal = ReturnType<- typeof createSignal<Completion | undefined>->;+type CompletionSignal = ReturnType<typeof createSignal<Completion | undefined>>;// where is this openexport type GenerateMenuOpen = ReturnType<typeof createSignal<boolean | undefined>>;// done generating and waiting-export type BooleanSignal = ReturnType<typeof createBlockSignal<boolean>>;+type BooleanSignal = ReturnType<typeof createBlockSignal<boolean>>;-export const IGNORE_COMPLETION_TYPES = ['inline-search'];-export const MAKE_COMPLETION: LexicalCommand<Completion> =+const _IGNORE_COMPLETION_TYPES = ['inline-search'];+const MAKE_COMPLETION: LexicalCommand<Completion> =createCommand('MAKE_COMPLETION');export const ACCEPT_COMPLETION: LexicalCommand<void> =createCommand('ACCEPT_COMPLETION');export const REJECT_COMPLETION: LexicalCommand<void> =createCommand('REJECT_COMPLETION');-export const SET_CONTEXT: LexicalCommand<RangeSelection> =+const SET_CONTEXT: LexicalCommand<RangeSelection> =createCommand('SET_CONTEXT');-export interface MenuArgs {- context: string;-}--export type GeneratePluginArgs = {+type GeneratePluginArgs = {// called when the selection changescompletionSignal: CompletionSignal;isGeneratingSignal: BooleanSignal;diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/katex/katexPlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/katex/katexPlugin.tsindex ddabd91ef0..8a5f4535ba 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/katex/katexPlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/katex/katexPlugin.ts@@ -23,7 +23,7 @@ type UpdateCommandPayload = {equation: string;};-export type KatexPluginProps = {+type KatexPluginProps = {onClickEquation?: (nodeKey: string) => void;onCreateEquation?: () => void;};diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/keyboard-focus/keyboardFocusPlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/keyboard-focus/keyboardFocusPlugin.tsindex 571a211bde..bac6bcca88 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/keyboard-focus/keyboardFocusPlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/keyboard-focus/keyboardFocusPlugin.ts@@ -15,7 +15,7 @@ import {import type { Accessor } from 'solid-js';import { $getCaretRect, isRectFlushWith } from '../../utils';-export type KeyboardFocusPluginProps = {+type KeyboardFocusPluginProps = {onFocusLeaveStart?: (e: KeyboardEvent) => void;onFocusLeaveEnd?: (e: KeyboardEvent) => void;ignoreKeys: Accessor<boolean>;diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/keyboard-shortcuts/keyboardShortcutsPlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/keyboard-shortcuts/keyboardShortcutsPlugin.tsindex aea6d38f4a..6cf3405644 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/keyboard-shortcuts/keyboardShortcutsPlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/keyboard-shortcuts/keyboardShortcutsPlugin.ts@@ -32,14 +32,14 @@ const metaOrCtrl = (meta: boolean, ctrl: boolean) => {return IS_MAC ? meta : ctrl;};-export type Shortcut = {+type Shortcut = {test: (e: KeyboardEvent) => boolean;handler: (editor: LexicalEditor) => void;label: string;priority: number;};-export type KeyboardShortcutPluginProps = {+type KeyboardShortcutPluginProps = {shortcuts: Shortcut[];};diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/links/linksPlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/links/linksPlugin.tsindex 8b60e29beb..ef723ef4bd 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/links/linksPlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/links/linksPlugin.ts@@ -329,7 +329,7 @@ function $tryInsertLink(}}-export type LinkPluginProps = {+type LinkPluginProps = {onHoverLink?: (link?: ILinkInfo) => void;onClickLink?: (link?: ILinkInfo) => void;onCreateLink?: (link?: ILinkInfo) => void;diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/location/locationPlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/location/locationPlugin.tsindex ebdf0c6f49..196321fa05 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/location/locationPlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/location/locationPlugin.ts@@ -47,7 +47,7 @@ export type EphemeralLocation = {export type MarkdownLocation = PersistentLocation | EphemeralLocation;-export function $selectionToEphemeralLocation(+function _$selectionToEphemeralLocation(selection: BaseSelection | null): EphemeralLocation | null {if (!$isRangeSelection(selection) || selection.isCollapsed()) {@@ -66,7 +66,7 @@ export function $selectionToEphemeralLocation(};}-export function getNodesFromEphemeralLocation(+function _getNodesFromEphemeralLocation(editor: LexicalEditor,loc: EphemeralLocation): [LexicalNode, LexicalNode] | null {@@ -154,9 +154,7 @@ function persistentLocationToSearchParams(location: PersistentLocation) {* @param location - The highlight location to serialize* @returns A string in the format `anchor=<id>::<offset>&focus=<id>::<offset>`*/-export function gerPersistentLocationString(- location: PersistentLocation-): string {+function _gerPersistentLocationString(location: PersistentLocation): string {return persistentLocationToSearchParams(location).toString();}@@ -171,7 +169,7 @@ export function parsePersistentLocation(return deserializePersistentLocation(serialized);}-export function locationCompare(a: PersistentLocation, b: PersistentLocation) {+function _locationCompare(a: PersistentLocation, b: PersistentLocation) {for (const key in a) {const k = key as keyof PersistentLocation;if (b[k] !== a[k]) return false;@@ -190,7 +188,7 @@ export const GO_TO_NODE_ID_COMMAND = createCommand<string>('GO_TO_NODE_ID_COMMAND');-export type LocationPluginProps = {+type LocationPluginProps = {mapping: NodeIdMappings;onGotoLocation?: (location: PersistentLocation) => void;revokeOptions?: {diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/markdown-shortcuts/markdownShortcutsPlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/markdown-shortcuts/markdownShortcutsPlugin.tsindex 695e1296dd..0c551c4954 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/markdown-shortcuts/markdownShortcutsPlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/markdown-shortcuts/markdownShortcutsPlugin.ts@@ -23,7 +23,7 @@ function getRegExp(transformer: Transformer) {}}-export type MarkdownShortcutsPluginProps = {+type MarkdownShortcutsPluginProps = {transformers: Transformer[];triggerOnEnterTransformers: Transformer[];};diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/media/mediaPlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/media/mediaPlugin.tsindex 8ad515bf0d..4cfd48a16b 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/media/mediaPlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/media/mediaPlugin.ts@@ -39,30 +39,30 @@ import { ok, type Result } from 'neverthrow';import { $insertNodesAndSplitList } from '../../utils';import { mapRegisterDelete } from '../shared';-export type DSSMedia = {+type DSSMedia = {type: 'dss';id: string;};-export type SFSMedia = {+type SFSMedia = {type: 'sfs';id: string;};-export type LocalMedia = {+type LocalMedia = {type: 'local';url: string;file: File;};-export type URLMedia = {+type URLMedia = {type: 'url';url: string;};-export type MediaSource = DSSMedia | SFSMedia | LocalMedia | URLMedia;-export type MediaSourceType = MediaSource['type'];-export type MediaCreationPayload = Exclude<MediaSource, 'file'> & {+type MediaSource = DSSMedia | SFSMedia | LocalMedia | URLMedia;++type MediaCreationPayload = Exclude<MediaSource, 'file'> & {alt?: string;mediaType: MediaType;constrainedMediaDimensions?: { width: number; height: number };@@ -94,7 +94,7 @@ export const TRY_INSERT_MEDIA_UPLOAD_COMMAND: LexicalCommand<MediaType | 'all'> = createCommand('TRY_INSERT_MEDIA_UPLOAD_COMMAND');-export function validateMediaFile(file: File, mediaType: MediaType): boolean {+function validateMediaFile(file: File, mediaType: MediaType): boolean {const ext = fileExtension(file.name);return ext != null && blockNameToFileExtensionSet[mediaType].has(ext);}@@ -195,7 +195,7 @@ function $staticUploadSuccess(key: NodeKey, id: string, mediaType: MediaType) {/*** Delete any media nodes that are part of the current node selection.*/-export function $deleteSelectedMedia() {+function $deleteSelectedMedia() {const sel = $getSelection();if (!$isNodeSelection(sel)) return false;let foundNodesToBeDeleted = false;@@ -214,7 +214,7 @@ export function $deleteSelectedMedia() {/*** Safely insert media node handling various selection states.*/-export function $safeInsertMediaNode(node: ImageNode | VideoNode) {+function $safeInsertMediaNode(node: ImageNode | VideoNode) {const selection = $getSelection();if (!selection) {diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/mentions/mentionsPlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/mentions/mentionsPlugin.tsindex 0146b87ee9..dd477636b5 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/mentions/mentionsPlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/mentions/mentionsPlugin.ts@@ -70,7 +70,7 @@ import { mapRegisterDelete } from '../shared';export const INSERT_DOCUMENT_MENTION_COMMAND: LexicalCommand<DocumentMentionInfo> =createCommand('INSERT_DOCUMENT_MENTION_COMMAND');-export const INSERT_SNAPSHOT_NODE_COMMAND: LexicalCommand<SnapshotNodeInfo> =+const INSERT_SNAPSHOT_NODE_COMMAND: LexicalCommand<SnapshotNodeInfo> =createCommand('INSERT_SNAPSHOT_NODE_COMMAND');export const INSERT_CONTACT_MENTION_COMMAND: LexicalCommand<ContactMentionInfo> =@@ -79,7 +79,7 @@ export const INSERT_CONTACT_MENTION_COMMAND: LexicalCommand<ContactMentionInfo>export const INSERT_DATE_MENTION_COMMAND: LexicalCommand<DateMentionInfo> =createCommand('INSERT_DATE_MENTION_COMMAND');-export const OPEN_INLINE_SEARCH_COMMAND: LexicalCommand<void> = createCommand(+const _OPEN_INLINE_SEARCH_COMMAND: LexicalCommand<void> = createCommand('OPEN_INLINE_SEARCH_COMMAND');@@ -87,7 +87,7 @@ export const CLOSE_INLINE_SEARCH_COMMAND: LexicalCommand<void> = createCommand('CLOSE_INLINE_SEARCH_COMMAND');-export const TYPE_AT_SYMBOL_COMMAND: LexicalCommand<void> = createCommand(+const TYPE_AT_SYMBOL_COMMAND: LexicalCommand<void> = createCommand('TYPE_AT_SYMBOL_COMMAND');@@ -131,7 +131,7 @@ export type ItemMention = {groupAlias?: string;};-export function $isMentionNode(+function $isMentionNode(node: LexicalNode): node is| UserMentionNode@@ -148,7 +148,7 @@ export function $isMentionNode();}-export function $mentionItemFromNode(node: MentionNode): ItemMention {+function $mentionItemFromNode(node: MentionNode): ItemMention {if ($isDocumentMentionNode(node)) {let fileType = '';let itemType: ItemMention['itemType'] = 'document';@@ -257,7 +257,7 @@ const getDocumentMentionItemType = (.exhaustive();};-export type MentionsPluginProps = {+type MentionsPluginProps = {menu?: MenuOperations;onCreateMention?: (mention: ItemMention) => void;onRemoveMention?: (mention: ItemMention) => void;diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/node-accessory/nodeAccessoryPlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/node-accessory/nodeAccessoryPlugin.tsindex a518ce5efa..8793e01ece 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/node-accessory/nodeAccessoryPlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/node-accessory/nodeAccessoryPlugin.ts@@ -36,7 +36,7 @@ export function createAccessoryStore() {return createStore<Record<NodeKey, AccessoryItem>>({});}-export type NodeAccessoryPluginProps<T extends LexicalNode> = {+type NodeAccessoryPluginProps<T extends LexicalNode> = {klass: Klass<T>;component: NodeAccessory;store: AccessoryStore;diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/normalize-enter/normalizeEnterPlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/normalize-enter/normalizeEnterPlugin.tsindex 044d362ae4..7049fb9681 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/normalize-enter/normalizeEnterPlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/normalize-enter/normalizeEnterPlugin.ts@@ -32,7 +32,7 @@ function $testSelectionPosition(* Returns true if the selection is at the start of an empty paragraph or is* directly preceded by a line break.*/-export function $isAtStartOfEmptyParagraph(): boolean {+function $isAtStartOfEmptyParagraph(): boolean {const selection = $getSelection();if (!$isRangeSelection(selection) || !selection.isCollapsed()) {return false;diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/pinned-properties/pinnedPropertiesPlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/pinned-properties/pinnedPropertiesPlugin.tsindex 9a6c59321a..a3b34d9f1e 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/pinned-properties/pinnedPropertiesPlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/pinned-properties/pinnedPropertiesPlugin.ts@@ -39,7 +39,7 @@ export function $getPinnedProperties(): string[] {* Set property IDs on the root node* Must be called within an editor.update() callback*/-export function $setPinnedProperties(propertyIds: string[]): void {+function $setPinnedProperties(propertyIds: string[]): void {const root = $getRoot();$setState(root, pinnedPropertyIdsState, propertyIds);}@@ -49,7 +49,7 @@ export function $setPinnedProperties(propertyIds: string[]): void {* Must be called within an editor.update() callback* @param propertyId - Property ID to add*/-export function $addPinnedProperty(propertyId: string): void {+function $addPinnedProperty(propertyId: string): void {const currentIds = $getPinnedProperties();if (!currentIds.includes(propertyId)) {$setPinnedProperties([...currentIds, propertyId]);@@ -61,7 +61,7 @@ export function $addPinnedProperty(propertyId: string): void {* Must be called within an editor.update() callback* @param propertyId - Property ID to remove*/-export function $removePinnedProperty(propertyId: string): void {+function $removePinnedProperty(propertyId: string): void {const currentIds = $getPinnedProperties();const filteredIds = currentIds.filter((id) => id !== propertyId);$setPinnedProperties(filteredIds);@@ -72,7 +72,7 @@ export function $removePinnedProperty(propertyId: string): void {* Must be called within an editor.read() or editor.update() callback* @param propertyId - Property ID to check*/-export function $hasPinnedProperty(propertyId: string): boolean {+function _$hasPinnedProperty(propertyId: string): boolean {const currentIds = $getPinnedProperties();return currentIds.includes(propertyId);}@@ -81,7 +81,7 @@ export function $hasPinnedProperty(propertyId: string): boolean {* Clear all property IDs from the root node* Must be called within an editor.update() callback*/-export function $clearPinnedProperties(): void {+function _$clearPinnedProperties(): void {$setPinnedProperties([]);}@@ -90,7 +90,7 @@ export function $clearPinnedProperties(): void {* @param editor - The Lexical editor instance* @returns Promise that resolves to array of property IDs*/-export function getPinnedProperties(editor: LexicalEditor): Promise<string[]> {+function _getPinnedProperties(editor: LexicalEditor): Promise<string[]> {return new Promise((resolve) => {editor.getEditorState().read(() => {resolve($getPinnedProperties());diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/selection-data/selectionDataPlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/selection-data/selectionDataPlugin.tsindex 57db7a421e..11e2770812 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/selection-data/selectionDataPlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/selection-data/selectionDataPlugin.ts@@ -15,14 +15,11 @@ import {type ElementNode,type LexicalEditor,type NodeKey,- type NodeSelection,type RangeSelection,} from 'lexical';import { createStore, type SetStoreFunction } from 'solid-js/store';import type { LexicalWrapper } from '../../context/LexicalWrapperContext';-export type Selection = NodeSelection | RangeSelection | null;-/*** Useful data about Lexical's current selection. If the selection is Lexical* RangeSelection then the elementsInRange set will be populated with the names@@ -65,13 +62,11 @@ function resetSelectionData(setSelectionData: SetStoreFunction<SelectionData>) {setSelectionData(structuredClone(defaultSelectionData));}-export function createSelectionData() {+function createSelectionData() {return createStore<SelectionData>(structuredClone(defaultSelectionData));}-export function $getSelectionData(- selection: BaseSelection | null-): SelectionData {+function $getSelectionData(selection: BaseSelection | null): SelectionData {const data = structuredClone(defaultSelectionData);if (selection === null) return data;@@ -122,7 +117,7 @@ export function nodeType(node: ElementNode): ElementName {return t as ElementName;}-export function $extractNodeTypes(selection: RangeSelection): Set<ElementName> {+function $extractNodeTypes(selection: RangeSelection): Set<ElementName> {const anchorParent = selection.anchor.getNode().getTopLevelElement();const focusParent = selection.focus.getNode().getTopLevelElement();const nodeTypes = new Set<ElementName>();diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/tables/tableActionMenuPlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/tables/tableActionMenuPlugin.tsindex a8bf7b9979..4446ea0605 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/tables/tableActionMenuPlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/tables/tableActionMenuPlugin.ts@@ -23,7 +23,7 @@ import type { Accessor } from 'solid-js';import { nodeByKey } from '../../utils';import { registerEditorWidthObserver } from '../shared/utils';-export interface TableActionsMenuPluginProps {+interface TableActionsMenuPluginProps {menuButtonRef: Accessor<HTMLDivElement | undefined>;anchorElem: Accessor<HTMLElement | undefined>;tableCellNodeKey: Accessor<string | undefined>;diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/tables/tablePlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/tables/tablePlugin.tsindex 02e3b441fd..a36ebb21c7 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/tables/tablePlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/tables/tablePlugin.ts@@ -8,7 +8,7 @@ import {import { mergeRegister } from '@lexical/utils';import type { LexicalEditor } from 'lexical';-export interface TablePluginProps {+interface TablePluginProps {// When `false` (default `true`), merged cell support (colspan and rowspan) will be disabled and all// tables will be forced into a regular grid with 1x1 table cells.hasCellMerge?: boolean;diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/userPrompt/index.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/userPrompt/index.tsindex 613485a781..5128efcfc6 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/userPrompt/index.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/userPrompt/index.ts@@ -1,4 +1 @@-export {- type UserPromptPluginProps,- useUserPromptPlugin,-} from './userPromptPlugin';+export { useUserPromptPlugin } from './userPromptPlugin';diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/userPrompt/userPromptPlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/userPrompt/userPromptPlugin.tsindex 26d0a45441..0df7820245 100644--- a/js/app/packages/core/component/LexicalMarkdown/plugins/userPrompt/userPromptPlugin.ts+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/userPrompt/userPromptPlugin.ts@@ -6,7 +6,7 @@ import { $getRoot, type LexicalEditor, type UpdateListener } from 'lexical';const DEFAULT_DEBOUNCE_TIME = 300;-export type UserPromptPluginProps = {+type UserPromptPluginProps = {documentId: string;debounceTime?: number;storageKey?: string;diff --git a/js/app/packages/core/component/LexicalMarkdown/utils.ts b/js/app/packages/core/component/LexicalMarkdown/utils.tsindex ddf09213cb..ef498c4692 100644--- a/js/app/packages/core/component/LexicalMarkdown/utils.ts+++ b/js/app/packages/core/component/LexicalMarkdown/utils.ts@@ -84,7 +84,7 @@ import { MARKDOWN_VERSION_COUNTER } from './version';/*** Type guard to check if the object is a LexicalEditor*/-export function isLexicalEditor(+function _isLexicalEditor(editor: LexicalEditor | EditorState): editor is LexicalEditor {return 'getEditorState' in editor;@@ -106,7 +106,7 @@ export function forceSetTextContent(editor: LexicalEditor, text: string) {editor.dispatchCommand(CLEAR_HISTORY_COMMAND, undefined);}-export function insertText(editor: LexicalEditor, text: string) {+function _insertText(editor: LexicalEditor, text: string) {editor.update(() => {const root = $getRoot();const selection = $getSelection();@@ -133,15 +133,13 @@ export function isStateEmpty(state: SerializedEditorState) {);}-export function isSerializedParagraphNode(+function isSerializedParagraphNode(node: SerializedLexicalNode): node is SerializedParagraphNode {return node.type === 'paragraph';}-export function stateHasOnlyEmptyParagraphs(- state: SerializedEditorState-): boolean {+function _stateHasOnlyEmptyParagraphs(state: SerializedEditorState): boolean {const { root } = state;if (!root || !root.children) return true;@@ -394,7 +392,7 @@ export function setEditorStateFromHtml(}}-export function $isEmpty() {+function $isEmpty() {const root = $getRoot();const children = root.getChildren();if (children.length === 0) return true;@@ -553,7 +551,7 @@ export function isRectFlushWith(* @param selection The selection to check* @param editor The editor to check*/-export function $isCaretAtContainingElementBottom(+function _$isCaretAtContainingElementBottom(selection: BaseSelection | null,editor: LexicalEditor) {@@ -583,7 +581,7 @@ export function $isCaretAtContainingElementBottom(* @param selection The selection to check* @param editor The editor to check*/-export function $isCaretAtContainingElementTop(+function _$isCaretAtContainingElementTop(slection: BaseSelection | null,editor: LexicalEditor) {@@ -616,10 +614,7 @@ export function nodeByKey(editor: LexicalEditor | EditorState, key: NodeKey) {return editor.read(() => $getNodeByKey(key));}-export function nodeTextByKey(- editor: LexicalEditor | EditorState,- key: NodeKey-) {+function _nodeTextByKey(editor: LexicalEditor | EditorState, key: NodeKey) {return editor.read(() => $getNodeByKey(key)?.getTextContent());}@@ -653,12 +648,10 @@ export function editorFocusSignal(export const isEmptyOrMatches = (str: string, regex: RegExp) =>str === '' || regex.test(str);-export const isEmptyOrEndsWithSpace = (str: string) =>- isEmptyOrMatches(str, /\s$/);-export const isEmptyOrStartsWithSpace = (str: string) =>- isEmptyOrMatches(str, /^\s/);+const _isEmptyOrEndsWithSpace = (str: string) => isEmptyOrMatches(str, /\s$/);+const _isEmptyOrStartsWithSpace = (str: string) => isEmptyOrMatches(str, /^\s/);-export function $setCodeLangauge(language: string) {+function _$setCodeLangauge(language: string) {const selection = $getSelection();if (!$isRangeSelection(selection)) return;@@ -673,7 +666,7 @@ export function $setCodeLangauge(language: string) {}}-export function $getCodeLanguage(): string | null {+function _$getCodeLanguage(): string | null {const selection = $getSelection();if (!$isRangeSelection(selection)) return null;@@ -714,7 +707,7 @@ export function $getCodeLanguage(): string | null {/*** Set the selection to a collapsed caret bases on a client position.*/-export function $setCaretSelecitonFromClientPos(+function _$setCaretSelecitonFromClientPos(clientX: number,clientY: number): RangeSelection | null {@@ -802,10 +795,7 @@ export function $insertWrappedAfter(* Moving from this to the cleanState functionality as the bottom of this file.* This will work pre-stringification both for current save and coming LORO.*/-export function stringifyEditorState(- editor: LexicalEditor,- filters?: string[]-) {+function _stringifyEditorState(editor: LexicalEditor, filters?: string[]) {if (!filters) return JSON.stringify(editor.getEditorState().toJSON());const filter = (key: string, value: any) => {@@ -882,7 +872,7 @@ function transformNode<T extends SerializedLexicalNode>(/*** Walk a serialized editor state and apply **IN PLACE** transforms on nodes.*/-export function transformSerializedEditorState(+function transformSerializedEditorState(state: SerializedEditorState,transforms: Array<SerializedNodeTransform<SerializedLexicalNode>>): SerializedEditorState {@@ -899,9 +889,7 @@ export function transformSerializedEditorState(* Transform a serialized editor state into one that is safe to the LORO sync plugin.* NOTE: this is no longer true for loro. but is being used for legacy DSS save.*/-export function cleanState(- state: SerializedEditorState-): SerializedEditorState {+function cleanState(state: SerializedEditorState): SerializedEditorState {return transformSerializedEditorState(state, [// custom code nodes must have no children.(node) => {@@ -945,7 +933,7 @@ export function loroSyncState(state: EditorState): SerializedEditorState {]);}-export function serializedSateWithSearchText(+function serializedSateWithSearchText(state: EditorState): SerializedEditorState {const nodeIdToSearchText = new Map<string, string>();@@ -982,7 +970,7 @@ export function getSaveState(state: EditorState): SerializedEditorState {/*** Get the top most list parent for a list item or something inside a list item.*/-export function $getTopListNode(listItem: LexicalNode): ListNode {+function $getTopListNode(listItem: LexicalNode): ListNode {let list = listItem.getParent<ListNode>();if (!$isListNode(list)) {throw new Error('Expected list node to be a parent of list item');@@ -1006,7 +994,7 @@ export function $getTopListNode(listItem: LexicalNode): ListNode {* @returns A tuple of the parent node and the offset where the new node can be inserted.* To be used with `parent.splice(offset, 0, [newNode])`*/-export function $splitListNodeToRoot(+function $splitListNodeToRoot(startNode: ElementNode,offset: number): [ElementNode, number] {@@ -1284,7 +1272,7 @@ export function forceSingleLine(editor: LexicalEditor) {* This is used to determine if a document mention should be converted to a card* before sending in channels.*/-export function $isSingleDocumentMention(): boolean {+function _$isSingleDocumentMention(): boolean {const root = $getRoot();const rootChildren = root.getChildren();@@ -1312,9 +1300,7 @@ export function $isSingleDocumentMention(): boolean {* Useful when you're already inside an implicit update (e.g. command handler)* and need the post-commit state.*/-export function pendingEditorState(- editor: LexicalEditor-): Promise<EditorState> {+function _pendingEditorState(editor: LexicalEditor): Promise<EditorState> {return new Promise<EditorState>((resolve) => {const unregister = editor.registerUpdateListener(({ editorState }) => {unregister();diff --git a/js/app/packages/core/component/LexicalMarkdown/utils/fileUploadUtils.ts b/js/app/packages/core/component/LexicalMarkdown/utils/fileUploadUtils.tsindex 254618737f..4e2ea2541b 100644--- a/js/app/packages/core/component/LexicalMarkdown/utils/fileUploadUtils.ts+++ b/js/app/packages/core/component/LexicalMarkdown/utils/fileUploadUtils.ts@@ -74,7 +74,7 @@ export const getDragDropPosition = (return { key, position };};-export async function onFilesReady(+async function onFilesReady(editor: LexicalEditor,uploadEntries: UploadInput[],blockId?: string,diff --git a/js/app/packages/core/component/LexicalMarkdown/utils/mentionsUtils.ts b/js/app/packages/core/component/LexicalMarkdown/utils/mentionsUtils.tsindex 2308f97963..71e7af8266 100644--- a/js/app/packages/core/component/LexicalMarkdown/utils/mentionsUtils.ts+++ b/js/app/packages/core/component/LexicalMarkdown/utils/mentionsUtils.ts@@ -19,7 +19,7 @@ import {INSERT_USER_MENTION_COMMAND,} from '../plugins/mentions';-export type GroupItem = {+type GroupItem = {id: string;groupAlias: string;};@@ -28,7 +28,7 @@ export type GroupItem = {* Creates a group mention entity from an alias.* Use this to define new group aliases (e.g., @here, @team, @online).*/-export function createGroupAlias(alias: string): Entity<'group'> {+function _createGroupAlias(alias: string): Entity<'group'> {return {kind: 'group',id: alias,@@ -39,7 +39,7 @@ export function createGroupAlias(alias: string): Entity<'group'> {};}-export type EntityMap = {+type EntityMap = {item: Item;user: IUser;channel: ChannelWithParticipants;@@ -48,7 +48,7 @@ export type EntityMap = {group: GroupItem;};-export type Entity<T extends keyof EntityMap> = {+type Entity<T extends keyof EntityMap> = {kind: T;id: EntityMap[T]['id'];data: EntityMap[T];@@ -58,7 +58,7 @@ type PickEntity<K extends keyof EntityMap> = {[P in K]: Entity<P>;}[K];-export type CombinedEntity<K extends keyof EntityMap = keyof EntityMap> =+type CombinedEntity<K extends keyof EntityMap = keyof EntityMap> =PickEntity<K>;// mapper fn that converts entity data to its entity type@@ -66,13 +66,11 @@ type EntityMapper<K extends keyof EntityMap> = (data: EntityMap[K]) => PickEntity<K>;-export function entityMapper<K extends keyof EntityMap>(- kind: K-): EntityMapper<K> {+function entityMapper<K extends keyof EntityMap>(kind: K): EntityMapper<K> {return (data: EntityMap[K]) => ({ kind, data, id: data.id });}-export type DateItem = ParsedDate & {+type DateItem = ParsedDate & {id: string;};@@ -83,7 +81,7 @@ export type UserMentionRecord = {metadata: DocumentMentionMetadata;};-export const getCombinedEntityBlockName = (+const getCombinedEntityBlockName = (item: CombinedEntity<'item' | 'channel' | 'email'>,icon?: boolean): BlockName | BlockAlias => {@@ -110,7 +108,7 @@ const getUserName = (item: IUser): string => {return `${name} | ${email}`;};-export const getItemName = (item: CombinedEntity): string => {+const getItemName = (item: CombinedEntity): string => {switch (item.kind) {case 'item':return item.data.name;@@ -184,7 +182,7 @@ export async function handleUserMention(* @param date* @param dependencies*/-export async function handleDateMention(+async function _handleDateMention(date: DateItem,dependencies: HandlerDependencies) {@@ -195,7 +193,7 @@ export async function handleDateMention(});}-export async function handleGroupMention(+async function _handleGroupMention(group: GroupItem,dependencies: HandlerDependencies) {@@ -205,7 +203,7 @@ export async function handleGroupMention(});}-export async function handleEmailMention(+async function _handleEmailMention(email: EmailEntity,dependencies: HandlerDependencies) {@@ -313,7 +311,7 @@ export async function handleBasicMention(* @param channel* @param dependencies*/-export async function handleChannelMention(+async function _handleChannelMention(channel: ChannelWithParticipants,dependencies: HandlerDependencies) {@@ -384,15 +382,13 @@ export type MentionItem = QuickAccessItem | DateMentionItem | GroupMentionItem;/*** Type guard for DateMentionItem.*/-export function isDateMentionItem(item: MentionItem): item is DateMentionItem {+function _isDateMentionItem(item: MentionItem): item is DateMentionItem {return item.kind === 'date';}/*** Type guard for GroupMentionItem.*/-export function isGroupMentionItem(- item: MentionItem-): item is GroupMentionItem {+function _isGroupMentionItem(item: MentionItem): item is GroupMentionItem {return item.kind === 'group';}diff --git a/js/app/packages/core/component/LexicalMarkdown/utils/snapshotMention.ts b/js/app/packages/core/component/LexicalMarkdown/utils/snapshotMention.tsdeleted file mode 100644index f5fcdc6441..0000000000--- a/js/app/packages/core/component/LexicalMarkdown/utils/snapshotMention.ts+++ /dev/null@@ -1,225 +0,0 @@-import type { BlockAlias, BlockName } from '@core/block';-import { entityPropertyFromApi } from '@core/component/Properties/api/converters';-import type { Property } from '@core/component/Properties/types';-import { trackMention } from '@core/signal/mention';--import type { HistoryItem as Item } from '@queries/history/history';-import { fetchDocumentAsMarkdown } from '@queries/sync/markdownText';-import { propertiesServiceClient } from '@service-properties/client';-import { EntityType } from '@service-properties/generated/schemas/entityType';-import { storageServiceClient } from '@service-storage/client';-import { INSERT_SNAPSHOT_NODE_COMMAND } from '../plugins/mentions';-import {- entityMapper,- getCombinedEntityBlockName,- getItemName,- type HandlerDependencies,- handleBasicMention,-} from './mentionsUtils';--/** Document types that support SnapshotNode (text-based content) */-// TODO-const SNAPSHOT_SUPPORTED_BLOCK_NAMES: Set<BlockName | BlockAlias> = new Set([- 'task',- 'write',- 'md',- 'code',-]);--/**- * Maps block name to properties service EntityType.- * Returns null for block types that don't support properties.- */-function blockNameToEntityType(blockName: string): EntityType | null {- switch (blockName) {- case 'md':- return EntityType.DOCUMENT;- case 'task':- return EntityType.TASK;- default:- return null;- }-}--/**- * Formats a property value to a string representation.- */-function formatPropertyValue(property: Property): string | null {- if (property.value === null) {- return null;- }-- switch (property.valueType) {- case 'STRING':- return property.value;- case 'NUMBER':- return String(property.value);- case 'BOOLEAN':- return property.value ? 'true' : 'false';- case 'DATE':- return property.value.toISOString().split('T')[0];- case 'SELECT_STRING':- case 'SELECT_NUMBER': {- if (!property.value || property.value.length === 0) {- return null;- }- // Map option IDs to display values- const selectedLabels = property.value- .map((optionId) => {- const option = property.options?.find((opt) => opt.id === optionId);- return option?.value?.value ?? optionId;- })- .filter(Boolean);- return selectedLabels.length > 0 ? selectedLabels.join(', ') : null;- }- case 'ENTITY': {- if (!property.value || property.value.length === 0) {- return null;- }- // Format entity references as type:id pairs- return property.value- .map((ref) => `${ref.entity_type}:${ref.entity_id}`)- .join(', ');- }- case 'LINK': {- if (!property.value || property.value.length === 0) {- return null;- }- return property.value.join(', ');- }- default: {- const _exhaustive: never = property;- return null;- }- }-}--/**- * Formats properties as YAML front matter.- * Returns empty string if no properties have values.- */-function formatPropertiesAsYamlFrontMatter(properties: Property[]): string {- const lines: string[] = [];-- for (const property of properties) {- const value = formatPropertyValue(property);- if (value !== null) {- // Escape special YAML characters in the value if needed- const needsQuoting = value.includes(':') || value.includes('#');- const formattedValue = needsQuoting ? `"${value}"` : value;- lines.push(`${property.displayName}: ${formattedValue}`);- }- }-- if (lines.length === 0) {- return '';- }-- return `---\n${lines.join('\n')}\n---\n\n`;-}--/**- * Check if a block name supports SnapshotNode insertion.- * SnapshotNode is used for text-based documents where content can be displayed inline.- */-export function supportsSnapshotNode(- blockName: BlockName | BlockAlias-): boolean {- return SNAPSHOT_SUPPORTED_BLOCK_NAMES.has(blockName);-}--/**- * Insert a SnapshotNode with document content for supported document types.- * Falls back to handleBasicMention for unsupported types or errors.- * @param item The document item to mention- * @param dependencies Handler dependencies- */-export async function handleSnapshotMention(- item: Item,- dependencies: HandlerDependencies-) {- const {- editor,- blockName: parentBlockName,- blockId,- onDocumentMention,- disableMentionTracking,- } = dependencies;-- const itemEntity = entityMapper('item')(item);- const itemBlock = getCombinedEntityBlockName(itemEntity);- const itemName = getItemName(itemEntity);-- // Check if this document type supports SnapshotNode- if (!supportsSnapshotNode(itemBlock)) {- return handleBasicMention(item, dependencies);- }-- let text: string;- let propertiesFrontMatter = '';-- if (itemBlock === 'md' || itemBlock === 'task') {- const entityType = blockNameToEntityType(itemBlock);-- // Fetch content and properties in parallel- const [contentResult, propsResult] = await Promise.all([- fetchDocumentAsMarkdown(item.id, 'internal'),- entityType- ? propertiesServiceClient.getEntityProperties({- entity_type: entityType,- entity_id: item.id,- query: { include_metadata: true },- })- : Promise.resolve(null),- ]);-- if (!contentResult) {- console.error('failed to fetch md');- return;- }- text = contentResult;-- if (propsResult && propsResult.isOk()) {- const properties = propsResult.value.properties.map(- entityPropertyFromApi- );- propertiesFrontMatter = formatPropertiesAsYamlFrontMatter(properties);- }- } else {- // Fetch document content- const result = await storageServiceClient.getTextDocument({- documentId: item.id,- });-- if (result.isErr()) {- // Fall back to regular mention on error- console.error(- 'Failed to fetch document content for SnapshotNode:',- result- );- return;- }- text = result.value.text;- }-- let mentionId: string | undefined;- if (- blockId &&- parentBlockName !== 'channel' &&- parentBlockName !== 'chat' &&- !disableMentionTracking- ) {- mentionId = await trackMention(blockId, 'document', item.id);- }-- onDocumentMention?.(item);-- editor.dispatchCommand(INSERT_SNAPSHOT_NODE_COMMAND, {- documentId: item.id,- documentName: itemName,- blockName: itemBlock,- content: propertiesFrontMatter + text,- snapshotDate: new Date().toISOString(),- mentionUuid: mentionId,- });-}diff --git a/js/app/packages/core/component/Link.tsx b/js/app/packages/core/component/Link.tsxindex 98a9dc9af9..4d47916d77 100644--- a/js/app/packages/core/component/Link.tsx+++ b/js/app/packages/core/component/Link.tsx@@ -18,7 +18,7 @@ function extractDomain(url: string) {}const [badLinks, setBadLinks] = createStore<Record<string, true>>({});-export type UnfurlLinkProps = { unfurled: GetUnfurlResponse };+type UnfurlLinkProps = { unfurled: GetUnfurlResponse };export function UnfurlLink(props: UnfurlLinkProps) {const domain = extractDomain(props.unfurled.url);@@ -68,7 +68,7 @@ interface UnfurledLinkCollection {links: GetUnfurlResponse[];}-export function UnfurledLinkCollection(props: UnfurledLinkCollection) {+function _UnfurledLinkCollection(props: UnfurledLinkCollection) {const [isCollapsed, setIsCollapsed] = createSignal(props.collapsed ?? true);return (diff --git a/js/app/packages/core/component/Menu.tsx b/js/app/packages/core/component/Menu.tsxindex 15fad11f9d..14c641a8be 100644--- a/js/app/packages/core/component/Menu.tsx+++ b/js/app/packages/core/component/Menu.tsx@@ -24,7 +24,7 @@ import { EditingContext } from './Editable';false && clickOutside;-export const MENU_ITEM_HEIGHT = 28;+const _MENU_ITEM_HEIGHT = 28;type BaseMenuItemWrapperProps = {children: JSX.Element;@@ -91,7 +91,7 @@ function MenuItemWrapper(props: MenuItemWrapperProps) {);}-export type BaseMenuItemProps = {+type BaseMenuItemProps = {text?: string | JSX.Element;icon?: Component<JSX.SvgSVGAttributes<SVGSVGElement>> | JSX.Element;iconClass?: string;@@ -102,14 +102,14 @@ export type BaseMenuItemProps = {hotkeyToken?: HotkeyToken;};-export type CheckboxMenuItemProps = BaseMenuItemProps & {+type CheckboxMenuItemProps = BaseMenuItemProps & {selectorType: 'checkbox';checked: boolean;onChange?: (value: boolean) => void;value?: undefined;};-export type RadioMenuItemProps = BaseMenuItemProps & {+type RadioMenuItemProps = BaseMenuItemProps & {selectorType: 'radio';value: string;groupValue: string;@@ -117,14 +117,14 @@ export type RadioMenuItemProps = BaseMenuItemProps & {onChange?: undefined;};-export type GenericMenuItemProps = BaseMenuItemProps & {+type GenericMenuItemProps = BaseMenuItemProps & {selectorType?: undefined;onChange?: undefined;checked?: undefined;value?: undefined;};-export type MenuItemProps =+type MenuItemProps =| GenericMenuItemProps| CheckboxMenuItemProps| RadioMenuItemProps;@@ -322,7 +322,7 @@ type MenuItemRenameTriggerProps = Omit<GenericMenuItemProps, 'onClick'> & {sideEffect?: () => void;};-export function MenuItemRenameTrigger(props: MenuItemRenameTriggerProps) {+function _MenuItemRenameTrigger(props: MenuItemRenameTriggerProps) {const [_, setIsRenaming] = useContext(EditingContext);return (<MenuItemdiff --git a/js/app/packages/core/component/Message.tsx b/js/app/packages/core/component/Message.tsxindex 9d5ce9fd07..17a27641ea 100644--- a/js/app/packages/core/component/Message.tsx+++ b/js/app/packages/core/component/Message.tsx@@ -24,7 +24,7 @@ import { UserIcon } from './UserIcon';false && observedSize;-export type MessageRootProps = {+type MessageRootProps = {id?: string;focused: boolean;unfocusable?: boolean;@@ -70,7 +70,7 @@ type MessageContextValue = {};const MessageContext = createContext<MessageContextValue>();-export function useMessageContext(): MessageContextValue {+function useMessageContext(): MessageContextValue {const ctx = useContext(MessageContext);if (!ctx) throw new Error('Message.* must be used within <Message>');return ctx;@@ -78,20 +78,18 @@ export function useMessageContext(): MessageContextValue {/* TopBar */-export type MessageTopBarSimpleProps = {+type MessageTopBarSimpleProps = {name: string;timestamp?: DateValue | null;tagLabel?: string;tagIcon?: Component<JSX.SvgSVGAttributes<SVGSVGElement>> | undefined;};-export type MessageTopBarChildrenProps = {+type MessageTopBarChildrenProps = {children: JSX.Element;};-export type MessageTopBarProps =- | MessageTopBarSimpleProps- | MessageTopBarChildrenProps;+type MessageTopBarProps = MessageTopBarSimpleProps | MessageTopBarChildrenProps;function isTopBarChildrenProps(props: MessageTopBarProps@@ -143,7 +141,7 @@ const TopBar: Component<MessageTopBarProps> = (props) => {/* Body */-export type MessageBodyProps = {+type MessageBodyProps = {children: JSX.Element;isDeleted?: boolean;};@@ -166,9 +164,7 @@ type NestedConnectorLinesProps = {isParentNewMessage?: boolean;};-export const NestedConnectorLines: Component<NestedConnectorLinesProps> = (- props-) => {+const NestedConnectorLines: Component<NestedConnectorLinesProps> = (props) => {const NestedLines: JSX.Element[] = [];for (let i = 0; i < (props.threadDepth ?? 0); i++) {NestedLines.push(diff --git a/js/app/packages/core/component/Notifications.tsx b/js/app/packages/core/component/Notifications.tsxindex 45b15a1b36..da5b3be888 100644--- a/js/app/packages/core/component/Notifications.tsx+++ b/js/app/packages/core/component/Notifications.tsx@@ -4,7 +4,7 @@ import { NotificationRow } from '@entity';import type { NotificationSource } from '@notifications';import { createMemo, For, Show } from 'solid-js';-export type NotificationsProps = {+type NotificationsProps = {entity: EntityRef;notificationSource: NotificationSource;};diff --git a/js/app/packages/core/component/NotificationsModal.tsx b/js/app/packages/core/component/NotificationsModal.tsxindex bea3003d4b..b692fd60a8 100644--- a/js/app/packages/core/component/NotificationsModal.tsx+++ b/js/app/packages/core/component/NotificationsModal.tsx@@ -12,9 +12,9 @@ import { createMemo, Show, Suspense } from 'solid-js';import { Notifications } from './Notifications';false && clickOutside;-export const NOTIFICATIONS_DRAWER_ID = 'notifications';+const NOTIFICATIONS_DRAWER_ID = 'notifications';-export function NotificationsButton(props: {+function _NotificationsButton(props: {entity: Entity;notificationSource: NotificationSource;buttonSize?: 'sm';diff --git a/js/app/packages/core/component/OldMenu.tsx b/js/app/packages/core/component/OldMenu.tsxindex b5f7a96960..cb26962d89 100644--- a/js/app/packages/core/component/OldMenu.tsx+++ b/js/app/packages/core/component/OldMenu.tsx@@ -44,7 +44,7 @@ function OldBaseItem(props: ParentProps<OldBaseItemProps>) {);}-export interface OldMenuItemProps extends OldBaseItemProps {+interface OldMenuItemProps extends OldBaseItemProps {text: string | JSX.Element;icon?: Component<JSX.SvgSVGAttributes<SVGSVGElement>>;iconClass?: string;diff --git a/js/app/packages/core/component/Properties/api/converters.ts b/js/app/packages/core/component/Properties/api/converters.tsindex e9c8960053..0c2d929bc4 100644--- a/js/app/packages/core/component/Properties/api/converters.ts+++ b/js/app/packages/core/component/Properties/api/converters.ts@@ -14,7 +14,7 @@ import { isEntityReferenceArray, isStringArray } from '../utils/typeGuards';* Normalized flat value type for PropertyApiValues conversion* Contains the actual value with proper TypeScript typing based on the PropertyApiValues type*/-export type NormalizedPropertyValue =+type NormalizedPropertyValue =| { type: 'STRING'; value: string }| { type: 'NUMBER'; value: number }| { type: 'BOOLEAN'; value: boolean }diff --git a/js/app/packages/core/component/Properties/api/index.ts b/js/app/packages/core/component/Properties/api/index.tsdeleted file mode 100644index 59e7503e27..0000000000--- a/js/app/packages/core/component/Properties/api/index.ts+++ /dev/null@@ -1 +0,0 @@-export { entityPropertyFromApi, propertyValueToApi } from './converters';diff --git a/js/app/packages/core/component/Properties/component/modal/index.ts b/js/app/packages/core/component/Properties/component/modal/index.tsindex d1fc93097d..0681c9b8c7 100644--- a/js/app/packages/core/component/Properties/component/modal/index.ts+++ b/js/app/packages/core/component/Properties/component/modal/index.ts@@ -2,29 +2,6 @@// physically moved into @property/editors/selectors; this barrel re-exports// the public-facing helpers so callers that pulled them from the modal// barrel keep working. Long-term, import directly from '@property'.-export {- type CombinedEntity,- createEntitySearchConfig,- Dropdown,- type DropdownOption,- type EntityTypeItemMap,- entityDataToEntity,- entityTypeToBuckets,- getEntityName,- getEntitySearchText,- getEntityTimestampedItem,- getEntityType,- isChannelEntity,- PropertyDateSelector,- PropertyEntitySelector,- PropertyOptionSelector,- quickAccessItemToEntity,- sortEntitiesWithSelfFirst,- threadMapper,- useQuickAccessEntities,- userToEntity,-} from '@property';-export { CreatePropertyModal } from './CreatePropertyModal';-export { EditPropertyValueModal } from './EditPropertyValueModal';+export {} from '@property';+export { Modals } from './Modals';-export { SelectPropertyModal } from './SelectPropertyModal';diff --git a/js/app/packages/core/component/Properties/component/panel/index.ts b/js/app/packages/core/component/Properties/component/panel/index.tsindex bd337e8272..9993f693e3 100644--- a/js/app/packages/core/component/Properties/component/panel/index.ts+++ b/js/app/packages/core/component/Properties/component/panel/index.ts@@ -1,5 +1,2 @@-export { AddPropertyButton } from './AddPropertyButton';export { PanelContainer } from './PanelContainer';export { PropertyGrid } from './PropertyGrid';-export { PropertyLabel } from './PropertyLabel';-export { PropertyRow } from './PropertyRow';diff --git a/js/app/packages/core/component/Properties/component/propertyValue/index.ts b/js/app/packages/core/component/Properties/component/propertyValue/index.tsindex 6b9ab24029..d97750f71d 100644--- a/js/app/packages/core/component/Properties/component/propertyValue/index.ts+++ b/js/app/packages/core/component/Properties/component/propertyValue/index.ts@@ -1,4 +1 @@-export { EntityIcon } from './EntityIcon';-export { PropertyTooltip } from './PropertyTooltip';export { PropertyValueIcon } from './PropertyValueIcon';-export { UserGroup } from './UserGroup';diff --git a/js/app/packages/core/component/Properties/constants.ts b/js/app/packages/core/component/Properties/constants.tsindex c156d8c015..8c4d8c2721 100644--- a/js/app/packages/core/component/Properties/constants.ts+++ b/js/app/packages/core/component/Properties/constants.ts@@ -36,7 +36,7 @@ export const SYSTEM_PROPERTY_IDS = {* These properties are automatically attached to entities of this block type* and cannot be removed. Order matches backend (display order).*/-export const BUILTIN_PROPERTIES_BY_BLOCK: Partial<+const BUILTIN_PROPERTIES_BY_BLOCK: Partial<Record<BlockName | BlockAlias, readonly string[]>> = {task: [@@ -57,7 +57,7 @@ export const BUILTIN_PROPERTIES_BY_BLOCK: Partial<* Default pinned properties by block type.* These are automatically pinned when a new entity of this block type is created.*/-export const DEFAULT_PINNED_PROPERTIES_BY_BLOCK: Partial<+const DEFAULT_PINNED_PROPERTIES_BY_BLOCK: Partial<Record<BlockName | BlockAlias, readonly string[]>> = {task: [@@ -91,7 +91,7 @@ export const FOCUS_CONFIG = {DELAY: 100, // Delay before focusing element after it's connected to DOM} as const;-export const MODAL_DIMENSIONS = {+const _MODAL_DIMENSIONS = {DEFAULT_WIDTH: 448, // 28remDEFAULT_HEIGHT: 384, // 24remPROPERTY_EDITOR_HEIGHT: 384,diff --git a/js/app/packages/core/component/Properties/context/PropertiesContext.tsx b/js/app/packages/core/component/Properties/context/PropertiesContext.tsxindex c5a77678c1..cca2278a94 100644--- a/js/app/packages/core/component/Properties/context/PropertiesContext.tsx+++ b/js/app/packages/core/component/Properties/context/PropertiesContext.tsx@@ -11,21 +11,21 @@ import {import type { Property, PropertyApiValues } from '../types';// Specific modal state types with proper typing-export interface PropertySelectorModalState {+interface PropertySelectorModalState {isOpen: boolean;}-export interface PropertyEditorModalState {+interface PropertyEditorModalState {property: Property;anchor?: HTMLElement;}-export interface DatePickerModalState {+interface DatePickerModalState {property: Property & { valueType: 'DATE' };anchor?: HTMLElement;}-export interface CreatePropertyModalState {+interface CreatePropertyModalState {isOpen: boolean;autoPinOnCreate?: boolean;}@@ -35,7 +35,7 @@ export interface PropertySaveHandler {saveDate: (property: Property, date: Date) => Promise<void>;}-export interface PropertiesContextValue {+interface PropertiesContextValue {entityType: EntityType;canEdit: boolean;documentName?: string;@@ -74,7 +74,7 @@ export interface PropertiesContextValue {closeAllModals: () => void;}-export interface PropertiesProviderProps extends ParentProps {+interface PropertiesProviderProps extends ParentProps {entityType: EntityType;canEdit: boolean;documentName?: string;@@ -88,7 +88,7 @@ export interface PropertiesProviderProps extends ParentProps {saveHandler: PropertySaveHandler;}-export const PropertiesContext = createContext<PropertiesContextValue>();+const PropertiesContext = createContext<PropertiesContextValue>();export function PropertiesProvider(props: PropertiesProviderProps) {// Modal state signalsdiff --git a/js/app/packages/core/component/Properties/context/index.ts b/js/app/packages/core/component/Properties/context/index.tsdeleted file mode 100644index d1a7fcc7a9..0000000000--- a/js/app/packages/core/component/Properties/context/index.ts+++ /dev/null@@ -1,5 +0,0 @@-export type {- PropertiesContextValue,- PropertySaveHandler,-} from './PropertiesContext';-export { PropertiesProvider, usePropertiesContext } from './PropertiesContext';diff --git a/js/app/packages/core/component/Properties/hooks/index.ts b/js/app/packages/core/component/Properties/hooks/index.tsindex 8a2fcc2d27..0d9382270b 100644--- a/js/app/packages/core/component/Properties/hooks/index.ts+++ b/js/app/packages/core/component/Properties/hooks/index.ts@@ -1,4 +1,4 @@export { useEntityProperties } from './useEntityProperties';-export { usePropertyEditor } from './usePropertyEditor';+export { usePropertyEntityDisplay } from './usePropertyEntityDisplay';export { usePropertySelection } from './usePropertySelection';diff --git a/js/app/packages/core/component/Properties/hooks/usePropertyEditor.ts b/js/app/packages/core/component/Properties/hooks/usePropertyEditor.tsindex 6f87a2aa37..b8c5228687 100644--- a/js/app/packages/core/component/Properties/hooks/usePropertyEditor.ts+++ b/js/app/packages/core/component/Properties/hooks/usePropertyEditor.ts@@ -8,7 +8,7 @@ type LocalState = {hasChanges: boolean;};-export interface PropertyEditorReturn {+interface PropertyEditorReturn {selectedOptions: Accessor<Set<string>>;hasChanges: Accessor<boolean>;initializeSelectedOptions: () => void;diff --git a/js/app/packages/core/component/Properties/styles/index.ts b/js/app/packages/core/component/Properties/styles/index.tsdeleted file mode 100644index 15c73a4500..0000000000--- a/js/app/packages/core/component/Properties/styles/index.ts+++ /dev/null@@ -1 +0,0 @@-export * from './styles';diff --git a/js/app/packages/core/component/Properties/styles/styles.ts b/js/app/packages/core/component/Properties/styles/styles.tsdeleted file mode 100644index 0275c736fe..0000000000--- a/js/app/packages/core/component/Properties/styles/styles.ts+++ /dev/null@@ -1,33 +0,0 @@-/**- * Centralized style constants for Properties components- * Only includes actively used styles- */--export const PROPERTY_STYLES = {- input: {- search:- 'w-full pl-10 pr-3 py-1 border border-edge text-sm focus:outline-none focus:ring-2 focus:ring-accent/50 focus:border-accent bg-surface text-ink placeholder-ink-muted',- },-- button: {- base: 'px-3 py-1.5 text-sm border',- secondary: 'text-ink-muted hover:text-ink border-edge hover:bg-hover',- accent: 'text-accent hover:text-accent/80 border-accent hover:bg-accent/10',- },-- value: {- multiButton:- 'text-right text-ink px-2 py-0.5 inline-flex items-center gap-2 shrink-0 max-w-[140px] wrap-break-word rounded-sm',- },-- checkbox: {- base: 'w-4 h-4 border flex items-center justify-center',- },-} as const;--/**- * Utility to combine class names, filtering out falsy values- */-export function cx(...classes: (string | false | undefined | null)[]): string {- return classes.filter(Boolean).join(' ');-}diff --git a/js/app/packages/core/component/Properties/types.ts b/js/app/packages/core/component/Properties/types.tsindex c28046c055..ab311ff11f 100644--- a/js/app/packages/core/component/Properties/types.ts+++ b/js/app/packages/core/component/Properties/types.ts@@ -153,14 +153,13 @@ export type PropertySelectorProps = {// Re-export generated API types from service-properties// Note: EntityType is NOT re-exported to avoid type conflicts with @service-connection// Files that need EntityType should import it directly from @service-properties/generated/schemas/entityType-export type { DataType } from '@service-properties/generated/schemas/dataType';-export type { EntityPropertiesResponse } from '@service-properties/generated/schemas/entityPropertiesResponse';+export type { EntityPropertyWithDefinition } from '@service-properties/generated/schemas/entityPropertyWithDefinition';export type { EntityReference } from '@service-properties/generated/schemas/entityReference';-export type { PropertyDefinitionResponse } from '@service-properties/generated/schemas/propertyDefinitionResponse';+export type { PropertyOption } from '@service-properties/generated/schemas/propertyOption';export type { PropertyOptionValue } from '@service-properties/generated/schemas/propertyOptionValue';-export type { PropertyValue } from '@service-properties/generated/schemas/propertyValue';+export type { SetPropertyValue } from '@service-properties/generated/schemas/setPropertyValue';/**@@ -180,7 +179,7 @@ export type PropertyApiValues =| { valueType: 'LINK'; values: string[] | null };// Result type for API responses-export type ApiError = {+type ApiError = {code: string;message: string;};diff --git a/js/app/packages/core/component/Properties/utils/PropertyDataTypeIcon.tsx b/js/app/packages/core/component/Properties/utils/PropertyDataTypeIcon.tsxindex 9432d4d9b3..271181d1ec 100644--- a/js/app/packages/core/component/Properties/utils/PropertyDataTypeIcon.tsx+++ b/js/app/packages/core/component/Properties/utils/PropertyDataTypeIcon.tsx@@ -19,7 +19,7 @@ import { twMerge } from 'tailwind-merge';import { match } from 'ts-pattern';import type { Property } from '../types';-export const EntityDataTypeIcon: Component<{+const EntityDataTypeIcon: Component<{property: Pick<Property, 'specificEntityType'>;class?: string;}> = (props) => {diff --git a/js/app/packages/core/component/Properties/utils/display.ts b/js/app/packages/core/component/Properties/utils/display.tsindex 9c76bea8de..3b3450f834 100644--- a/js/app/packages/core/component/Properties/utils/display.ts+++ b/js/app/packages/core/component/Properties/utils/display.ts@@ -84,7 +84,7 @@ export const getPropertyDefinitionTypeDisplay = (property: {* Get display name for a property's value type* For entity types with specificEntityType, returns the specific type (e.g., "User", "Document")*/-export const getValueTypeDisplay = (+const _getValueTypeDisplay = (property: Pick<Property, 'valueType' | 'specificEntityType'>): string => {// For entity types, use the specific entity type if availablediff --git a/js/app/packages/core/component/Properties/utils/errorHandling.ts b/js/app/packages/core/component/Properties/utils/errorHandling.tsindex f927c22635..3df0da1411 100644--- a/js/app/packages/core/component/Properties/utils/errorHandling.ts+++ b/js/app/packages/core/component/Properties/utils/errorHandling.ts@@ -35,7 +35,7 @@ export const ERROR_MESSAGES = {* @param context - Context for error logging (e.g., function name)* @returns true if operation succeeded, false otherwise*/-export function handlePropertyError(+function _handlePropertyError(result: Result<unknown>,errorMessage: string,context: stringdiff --git a/js/app/packages/core/component/Properties/utils/focus.ts b/js/app/packages/core/component/Properties/utils/focus.tsindex b35a0685d6..ef1f5447e4 100644--- a/js/app/packages/core/component/Properties/utils/focus.ts+++ b/js/app/packages/core/component/Properties/utils/focus.ts@@ -5,7 +5,7 @@ import { FOCUS_CONFIG } from '../constants';* Consolidated hook for auto-focusing elements with reliable focus handling.* Uses IntersectionObserver to detect when element becomes visible, then focuses after delay.*/-export function useAutoFocus(+function useAutoFocus(inputRef: () => HTMLElement | undefined,shouldFocus: () => boolean = () => true,delay: number = FOCUS_CONFIG.DELAYdiff --git a/js/app/packages/core/component/Properties/utils/formatting.ts b/js/app/packages/core/component/Properties/utils/formatting.tsindex 31a3875d10..708fc82094 100644--- a/js/app/packages/core/component/Properties/utils/formatting.ts+++ b/js/app/packages/core/component/Properties/utils/formatting.ts@@ -103,7 +103,7 @@ export const formatPropertyValue = (* @param options - The property's options array (from property.options)* @returns Formatted display value or the ID if not found*/-export const formatOptionValueById = (+const formatOptionValueById = (optionId: string,options: Array<{ id: string; value: PropertyOptionValue }> | undefined): string => {@@ -138,9 +138,7 @@ export const formatOptionValue = (option: {* Get the raw option value (for comparison/selection)* Takes a PropertyOption object and extracts its raw value*/-export const getOptionValue = (option: {- value: PropertyOptionValue;-}): string => {+const _getOptionValue = (option: { value: PropertyOptionValue }): string => {const optionValue = option.value;if ('type' in optionValue && 'value' in optionValue) {if (optionValue.type === 'string') {diff --git a/js/app/packages/core/component/Properties/utils/position.ts b/js/app/packages/core/component/Properties/utils/position.tsindex 9ed1a49f2d..c5b42aedf1 100644--- a/js/app/packages/core/component/Properties/utils/position.ts+++ b/js/app/packages/core/component/Properties/utils/position.ts@@ -7,7 +7,7 @@ import { type Accessor, createMemo } from 'solid-js';* @param anchor - Accessor for the anchor HTMLElement (or null/undefined)* @returns Position object with top and left coordinates, or undefined*/-export function useModalPosition(+function _useModalPosition(anchor: Accessor<HTMLElement | null | undefined>): Accessor<{ top: number; left: number } | undefined> {return createMemo(() => {diff --git a/js/app/packages/core/component/Properties/utils/suggestedProperties.ts b/js/app/packages/core/component/Properties/utils/suggestedProperties.tsindex c5876456f8..5456cbfa63 100644--- a/js/app/packages/core/component/Properties/utils/suggestedProperties.ts+++ b/js/app/packages/core/component/Properties/utils/suggestedProperties.ts@@ -10,7 +10,7 @@ import type { PropertyDefinitionDomain } from '../types';* @param entityTypes - Array of entity types from the filter (e.g., ['document', 'chat'])* @returns Array of PropertyDefinitionDomain objects for quick selection*/-export function getSuggestedProperties(+function _getSuggestedProperties(_entityTypes: ExpandedEntityType[]): PropertyDefinitionDomain[] {return [];diff --git a/js/app/packages/core/component/Properties/utils/transforms.ts b/js/app/packages/core/component/Properties/utils/transforms.tsindex e58f706434..9200b22804 100644--- a/js/app/packages/core/component/Properties/utils/transforms.ts+++ b/js/app/packages/core/component/Properties/utils/transforms.ts@@ -32,7 +32,7 @@ export function toPropertyDefinitionDomain(};}-export function propertyDefinitionDomainToProperty(+function _propertyDefinitionDomainToProperty(propertyDefinition: PropertyDefinitionDomain): Property {return {diff --git a/js/app/packages/core/component/Properties/utils/typeGuards.ts b/js/app/packages/core/component/Properties/utils/typeGuards.tsindex 5c681d0871..9e58fe9306 100644--- a/js/app/packages/core/component/Properties/utils/typeGuards.ts+++ b/js/app/packages/core/component/Properties/utils/typeGuards.ts@@ -43,13 +43,13 @@ export const isDateProperty = (return property.valueType === 'DATE';};-export const isSelectStringProperty = (+const _isSelectStringProperty = (property: Property): property is SelectStringProperty => {return property.valueType === 'SELECT_STRING';};-export const isSelectNumberProperty = (+const _isSelectNumberProperty = (property: Property): property is SelectNumberProperty => {return property.valueType === 'SELECT_NUMBER';@@ -76,7 +76,7 @@ export const isLinkProperty = (return property.valueType === 'LINK';};-export const isSingleValueProperty = (+const _isSingleValueProperty = (property: Property): property is SingleValueProperty => {return (@@ -87,7 +87,7 @@ export const isSingleValueProperty = ();};-export const isMultiValueProperty = (+const _isMultiValueProperty = (property: Property): property is MultiValueProperty => {return (@@ -98,29 +98,29 @@ export const isMultiValueProperty = ();};-export const getStringValue = (property: StringProperty): string | null => {+const _getStringValue = (property: StringProperty): string | null => {return property.value;};-export const getNumberValue = (property: NumberProperty): number | null => {+const _getNumberValue = (property: NumberProperty): number | null => {return property.value;};-export const getBooleanValue = (property: BooleanProperty): boolean | null => {+const _getBooleanValue = (property: BooleanProperty): boolean | null => {return property.value;};-export const getDateValue = (property: DateProperty): Date | null => {+const _getDateValue = (property: DateProperty): Date | null => {return property.value;};-export const getSelectStringValues = (+const _getSelectStringValues = (property: SelectStringProperty): string[] | null => {return property.value;};-export const getSelectNumberValues = (+const _getSelectNumberValues = (property: SelectNumberProperty): string[] | null => {return property.value;@@ -189,7 +189,7 @@ export function isEntityReferenceArray(* PropertyDefinitionWithOptions has { definition, property_options } structure* PropertyDefinition has { id, data_type, ... } directly*/-export function isPropertyDefinition(+function _isPropertyDefinition(p: PropertyDefinitionResponse): p is PropertyDefinition {return !('definition' in p);@@ -213,11 +213,11 @@ export const hasValue = (property: Property): boolean => {return true;};-export const hasSingleValue = (property: MultiValueProperty): boolean => {+const _hasSingleValue = (property: MultiValueProperty): boolean => {return property.value !== null && property.value.length === 1;};-export const hasMultiValue = (property: MultiValueProperty): boolean => {+const _hasMultiValue = (property: MultiValueProperty): boolean => {return property.value !== null && property.value.length > 1;};diff --git a/js/app/packages/core/component/Properties/utils/validation.ts b/js/app/packages/core/component/Properties/utils/validation.tsindex 5f4298cd84..18e6fc20ae 100644--- a/js/app/packages/core/component/Properties/utils/validation.ts+++ b/js/app/packages/core/component/Properties/utils/validation.ts@@ -1,7 +1,7 @@/*** Normalize a URL by adding https:// if no protocol is present*/-export function normalizeUrl(url: string): string {+function _normalizeUrl(url: string): string {const trimmed = url.trim();if (!trimmed) return '';@@ -17,7 +17,7 @@ export function normalizeUrl(url: string): string {* Validate if a string is a valid URL* Requires a proper domain with TLD (e.g., example.com)*/-export function isValidUrl(url: string): boolean {+function _isValidUrl(url: string): boolean {try {const urlObj = new URL(url);@@ -43,3 +43,5 @@ export function isValidUrl(url: string): boolean {return false;}}++export {};diff --git a/js/app/packages/core/component/References.tsx b/js/app/packages/core/component/References.tsxindex a94dd6c6e3..e8cc5039a7 100644--- a/js/app/packages/core/component/References.tsx+++ b/js/app/packages/core/component/References.tsx@@ -24,7 +24,7 @@ import { StaticMarkdown } from './LexicalMarkdown/component/core/StaticMarkdown'import { twoLineClampMarkdownTheme } from './LexicalMarkdown/theme';import { UserIcon } from './UserIcon';-export type ReferenceProps = {+type ReferenceProps = {documentId: string;entityType?: ItemType;};diff --git a/js/app/packages/core/component/ReferencesModal.tsx b/js/app/packages/core/component/ReferencesModal.tsxindex 12f9e8d20d..7030dba27c 100644--- a/js/app/packages/core/component/ReferencesModal.tsx+++ b/js/app/packages/core/component/ReferencesModal.tsx@@ -73,14 +73,14 @@ export function ReferencesDrawer(props: {);}-export type ReferencesModalProps = {+type ReferencesModalProps = {documentId: string;documentName?: string;buttonSize?: 'sm';entityType?: ItemType;};-export function ReferencesModal(props: ReferencesModalProps) {+function _ReferencesModal(props: ReferencesModalProps) {const drawerControl = useDrawerControl(REFERENCES_DRAWER_ID);const [referenceCount] = createResource(() => props.documentId,diff --git a/js/app/packages/core/component/Resize/solver.ts b/js/app/packages/core/component/Resize/solver.tsindex 4e62866a8b..2f6d069a26 100644--- a/js/app/packages/core/component/Resize/solver.ts+++ b/js/app/packages/core/component/Resize/solver.ts@@ -8,7 +8,7 @@ import {} from 'solid-js';import type { LayoutResult, Panel, PanelConfig, PanelId } from './types';-export type ResizeSolver = {+type ResizeSolver = {readonly direction: 'horizontal' | 'vertical';addPanel: (panel: PanelConfig, index?: number) => void;dropPanel: (id: PanelId) => void;diff --git a/js/app/packages/core/component/Resize/types.ts b/js/app/packages/core/component/Resize/types.tsindex c332db6798..b553111e03 100644--- a/js/app/packages/core/component/Resize/types.ts+++ b/js/app/packages/core/component/Resize/types.ts@@ -1,7 +1,7 @@export type PanelId = string;-export const HORIZONTAL = 'horizontal' as const;-export const VERTICAL = 'vertical' as const;+const _HORIZONTAL = 'horizontal' as const;+const _VERTICAL = 'vertical' as const;// TODO (seamus): next version should use these to as default sizes instead of// current behavior which is hard-coded "1fr"diff --git a/js/app/packages/core/component/Resize/util.ts b/js/app/packages/core/component/Resize/util.tsdeleted file mode 100644index 5fe27d57c1..0000000000--- a/js/app/packages/core/component/Resize/util.ts+++ /dev/null@@ -1,29 +0,0 @@-import type { PanelSizeSpec } from './types';--/**- * Convert a string to a PanelSizeSpec.- * @param input a string like "1fr" or "300px" or "25%" or "auto"- */-export function stringToSizeSpec(input?: string): PanelSizeSpec {- if (!input) return { kind: 'auto' };-- const inputLc = input.trim().toLowerCase();- if (inputLc === 'auto') return { kind: 'auto' };-- if (inputLc.endsWith('fr')) {- const num = parseFloat(inputLc.slice(0, -2));- if (!Number.isNaN(num) && num > 0) return { kind: 'fr', fr: num };- }-- if (inputLc.endsWith('%')) {- const num = parseFloat(inputLc.slice(0, -1));- if (!Number.isNaN(num)) return { kind: 'percent', percent: num };- }-- if (inputLc.endsWith('px')) {- const num = parseFloat(inputLc.slice(0, -2));- if (!Number.isNaN(num)) return { kind: 'px', px: num };- }-- return { kind: 'auto' };-}diff --git a/js/app/packages/core/component/ScrollContainer.tsx b/js/app/packages/core/component/ScrollContainer.tsxdeleted file mode 100644index 7f0463b62e..0000000000--- a/js/app/packages/core/component/ScrollContainer.tsx+++ /dev/null@@ -1,56 +0,0 @@-import { createSignal, type JSX, onMount } from 'solid-js';--interface ScrollContainerProps {- children: JSX.Element;- thumbSize?: number;-}--export function ScrollContainer(props: ScrollContainerProps) {- const [scrollHeight, setScrollHeight] = createSignal(0);- const [clientHeight, setClientHeight] = createSignal(0);- const [scrollTop, setScrollTop] = createSignal(0);-- const thumbSize = 80;- let scrollContainerRef!: HTMLDivElement;-- function handleScroll(e: Event) {- const target = e.target as HTMLDivElement;- setScrollTop(target.scrollTop);- setScrollHeight(target.scrollHeight);- setClientHeight(target.clientHeight);- }-- onMount(() => {- setScrollHeight(scrollContainerRef.scrollHeight);- setClientHeight(scrollContainerRef.clientHeight);- });-- function thumbTop() {- const maxScroll = scrollHeight() - clientHeight();- const maxThumbTop = clientHeight() - thumbSize;- return maxScroll > 0 ? (scrollTop() / maxScroll) * maxThumbTop : 0;- }-- return (- <div class="relative w-200 h-100">- <div- class="w-200 h-100 border border-[#666] overflow-y-auto overflow-x-hidden scrollbar-hide"- style={{ 'scrollbar-width': 'none' }}- ref={scrollContainerRef}- onScroll={handleScroll}- >- {props.children}- </div>- {/* SCUFFED: how do we want to handle this color? */}- <div class="absolute top-0 right-0 w-px h-full bg-transparent">- <div- class="absolute right-0 w-px bg-[oklch(0.577_0.245_27.325)]"- style={{- height: `${thumbSize}px`,- top: `${thumbTop()}px`,- }}- />- </div>- </div>- );-}diff --git a/js/app/packages/core/component/SegmentedControl.tsx b/js/app/packages/core/component/SegmentedControl.tsxdeleted file mode 100644index 3d37a2a053..0000000000--- a/js/app/packages/core/component/SegmentedControl.tsx+++ /dev/null@@ -1,51 +0,0 @@-import {- SegmentedControl as KSegmentedControl,- type SegmentedControlRootProps,-} from '@kobalte/core/segmented-control';-import { For, type ParentComponent } from 'solid-js';--export type SegmentedControlItem = {- value: string;- label: string;-};--export const SegmentedControl: ParentComponent<- {- list: SegmentedControlItem[];- value?: string;- defaultValue?: string;- } & Omit<SegmentedControlRootProps, 'defaultValue'>-> = (props) => {- const onChange = (newValue: string) => {- props.onChange?.(newValue);- };-- return (- <KSegmentedControl- class="h-full text-sm rounded-xs border border-edge-muted relative overflow-hidden"- value={props.value}- defaultValue={props.defaultValue ?? props.list[0]?.value}- onChange={onChange}- disabled={props.disabled}- >- <div class="relative" role="presentation">- <div class="flex" role="presentation">- <For each={props.list}>- {(item) => (- <KSegmentedControl.Item- value={item.value}- disabled={props.disabled}- class="border-r border-edge-muted last:border-r-0"- >- <KSegmentedControl.ItemInput class="absolute inset-0 pointer-events-none" />- <KSegmentedControl.ItemLabel class="relative text-ink-muted/70 size-full mobile:min-h-11 flex items-center justify-center px-2.5 py-1 text-xs font-medium data-checked:text-ink data-checked:bg-edge hover:text-ink hover:bg-ink/6 data-checked:hover:bg-edge transition-colors duration-150">- {item.label}- </KSegmentedControl.ItemLabel>- </KSegmentedControl.Item>- )}- </For>- </div>- </div>- </KSegmentedControl>- );-};diff --git a/js/app/packages/core/component/SharePermissions.tsx b/js/app/packages/core/component/SharePermissions.tsxindex 2358b03149..588af682eb 100644--- a/js/app/packages/core/component/SharePermissions.tsx+++ b/js/app/packages/core/component/SharePermissions.tsx@@ -23,7 +23,7 @@ export const getPermissions = (accessLevel?: UserAccessLevel) => {return Permissions.NO_ACCESS;};-export const comparePermissions = (a: Permissions, b: Permissions) => {+const comparePermissions = (a: Permissions, b: Permissions) => {const priorityMap: { [key in Permissions]: number } = {[Permissions.OWNER]: 5,[Permissions.CAN_EDIT]: 4,@@ -35,9 +35,7 @@ export const comparePermissions = (a: Permissions, b: Permissions) => {return priorityMap[a] - priorityMap[b];};-export const getAccessLevel = (- permissions?: Permissions-): UserAccessLevel | null => {+const _getAccessLevel = (permissions?: Permissions): UserAccessLevel | null => {switch (permissions) {case Permissions.OWNER:return UserAccessLevel.owner;diff --git a/js/app/packages/core/component/SlidableNumberInput.tsx b/js/app/packages/core/component/SlidableNumberInput.tsxindex a323f1b508..726c23a499 100644--- a/js/app/packages/core/component/SlidableNumberInput.tsx+++ b/js/app/packages/core/component/SlidableNumberInput.tsx@@ -54,7 +54,7 @@ const OptionalTooltipWrapper = (props: {return <>{props.children}</>;};-export type SlidableNumberInputProps = SlidableNumberInput;+type SlidableNumberInputProps = SlidableNumberInput;export function SlidableNumberInput(props: SlidableNumberInputProps) {const [dropdownOpen, setDropdownOpen] = createSignal<boolean>(false);diff --git a/js/app/packages/core/component/StackedAvatarsRow.tsx b/js/app/packages/core/component/StackedAvatarsRow.tsxindex dde74e5311..7f99f9d379 100644--- a/js/app/packages/core/component/StackedAvatarsRow.tsx+++ b/js/app/packages/core/component/StackedAvatarsRow.tsx@@ -25,10 +25,10 @@ const AVATAR_DIAMETER_PX: Record<StackedAvatarsSize, number> = {};/** Horizontal row shell: stacking context (`isolate`). */-export const STACKED_AVATARS_ROW_CLASS =+const STACKED_AVATARS_ROW_CLASS ='flex items-center h-full shrink-0 w-fit isolate leading-none min-w-0';-export type StackedAvatarsOverflowContext<T = unknown> = {+type StackedAvatarsOverflowContext<T = unknown> = {overflowItems: T[];overflowCount: number;};@@ -96,15 +96,11 @@ export function stackedAvatarInnerClass(size: StackedAvatarsSize = 'sm') {}/** Default +N chip shell (no text); pair with {@link stackedAvatarOverflowChipTextClass}. */-export function stackedAvatarOverflowChipClass(- size: StackedAvatarsSize = 'sm'-) {+function stackedAvatarOverflowChipClass(size: StackedAvatarsSize = 'sm') {return STACK_STYLE[size].overflowChip;}-export function stackedAvatarOverflowChipTextClass(- size: StackedAvatarsSize = 'sm'-) {+function stackedAvatarOverflowChipTextClass(size: StackedAvatarsSize = 'sm') {return STACK_STYLE[size].overflowChipText;}@@ -151,7 +147,7 @@ function OverflowTooltip(props: {);}-export type StackedAvatarsRowProps<T = unknown> = {+type StackedAvatarsRowProps<T = unknown> = {each: Accessor<T[]>;max: number | Accessor<number>;size?: StackedAvatarsSize;diff --git a/js/app/packages/core/component/TabContent.tsx b/js/app/packages/core/component/TabContent.tsxdeleted file mode 100644index 15360ba164..0000000000--- a/js/app/packages/core/component/TabContent.tsx+++ /dev/null@@ -1,51 +0,0 @@-import { cn } from '@ui';-import { type JSX, type ParentProps, Show } from 'solid-js';--interface TabContentProps {- title: string;- description?: string | JSX.Element;- header?: JSX.Element;- children: JSX.Element;-}--export function TabContent(props: TabContentProps) {- return (- <>- {props.header}- <div class="font-medium border-edge pb-3 mb-4 border-b text-ink p-2">- {props.title}- </div>- <Show when={props.description}>- <div class="text-xs pb-4 text-ink">{props.description}</div>- </Show>- {props.children}- </>- );-}--interface TabContentRowProps {- text: string;- subtext: string | JSX.Element;- subtext2?: string;- isLoading?: boolean;- class?: string;-}--export function TabContentRow(props: ParentProps<TabContentRowProps>) {- return (- <div class="mb-4.5">- <div class="text-sm">{props.text}</div>- <Show- when={!props.isLoading}- fallback={- <div class="animate-pulse bg-ink-extra-muted rounded max-w-25 min-h-5 leading-5"></div>- }- >- <div class={cn('text-ink-muted text-xs/5', props.class)}>- {props.subtext}- </div>- {props.children}- </Show>- </div>- );-}diff --git a/js/app/packages/core/component/TabsInset.tsx b/js/app/packages/core/component/TabsInset.tsxindex fe6c933019..042e301613 100644--- a/js/app/packages/core/component/TabsInset.tsx+++ b/js/app/packages/core/component/TabsInset.tsx@@ -6,12 +6,12 @@ import {import { cn, Layer } from '@ui';import { For, type JSX, splitProps } from 'solid-js';-export type TabItem = {+type TabItem = {value: string;label: string | JSX.Element;};-export type TabsInsetProps = {+type TabsInsetProps = {list: TabItem[];value?: string;defaultValue?: string;diff --git a/js/app/packages/core/component/TailSpinner.tsx b/js/app/packages/core/component/TailSpinner.tsxindex 4ec9ddd892..ae0ccd00c2 100644--- a/js/app/packages/core/component/TailSpinner.tsx+++ b/js/app/packages/core/component/TailSpinner.tsx@@ -10,7 +10,7 @@import type { Component, JSX } from 'solid-js';-export interface SpinnerProps extends JSX.SvgSVGAttributes<SVGSVGElement> {+interface SpinnerProps extends JSX.SvgSVGAttributes<SVGSVGElement> {width?: string | number;height?: string | number;class?: string;diff --git a/js/app/packages/core/component/TailwindColorPicker.tsx b/js/app/packages/core/component/TailwindColorPicker.tsxdeleted file mode 100644index 0f8dc25356..0000000000--- a/js/app/packages/core/component/TailwindColorPicker.tsx+++ /dev/null@@ -1,65 +0,0 @@-import { OldMenu, OldMenuItem } from '@core/component/OldMenu';-import Circle from '@phosphor-icons/core/regular/circle.svg?component-solid';-import { type Accessor, For, onCleanup, onMount } from 'solid-js';-import colors from 'tailwindcss/colors';--export const FilteredTailwindColors = {- gray: 'gray',- red: 'red',- orange: 'orange',- yellow: 'yellow',- green: 'green',- teal: 'teal',- blue: 'blue',- indigo: 'indigo',- purple: 'purple',- pink: 'pink',-} as const;--export type FilteredTailwindColors = keyof typeof FilteredTailwindColors;--export interface TailwindColorPickerProps {- onColorSelect: (color: FilteredTailwindColors) => void;- show: Accessor<boolean>;- setShow: (show: boolean) => void;-}--export const TailwindColorPicker = (props: TailwindColorPickerProps) => {- let menuRef: HTMLDivElement | undefined;-- function handleOutsideClick(event: MouseEvent) {- if (menuRef && !menuRef.contains(event.target as Node)) {- props.setShow(false);- }- }-- onMount(() => {- document.addEventListener('mousedown', handleOutsideClick);- onCleanup(() => {- document.removeEventListener('mousedown', handleOutsideClick);- });- });-- function handleColorSelect(color: FilteredTailwindColors) {- props.onColorSelect(color);- props.setShow(false);- }-- return (- <div ref={menuRef}>- <OldMenu width="sm">- <For each={Object.values(FilteredTailwindColors)}>- {(color) => (- <OldMenuItem- text={color}- icon={() => (- <Circle style={{ color: colors[color][500] }} class="w-full" />- )}- onClick={() => handleColorSelect(color)}- />- )}- </For>- </OldMenu>- </div>- );-};diff --git a/js/app/packages/core/component/Themes.tsx b/js/app/packages/core/component/Themes.tsxindex f1de0ca2ba..e6822ac7cb 100644--- a/js/app/packages/core/component/Themes.tsx+++ b/js/app/packages/core/component/Themes.tsx@@ -62,7 +62,7 @@ export const themeStyles: Record<Theme, string> = {reverse: 'bg-current hover:bg-current/90',};-export const themeSelectedColors: Record<Theme, string> = {+const _themeSelectedColors: Record<Theme, string> = {base: 'bg-hover!',accent: 'bg-accent/20!',accentFill: 'bg-acent/80',@@ -81,7 +81,7 @@ export const themeSelectedColors: Record<Theme, string> = {reverse: 'bg-current',};-export const shortcutBadgeStyles: Record<Theme, string> = {+const _shortcutBadgeStyles: Record<Theme, string> = {base: 'bg-surface border border-ink',accent: 'bg-accent/10',accentFill: 'bg-accent/90',diff --git a/js/app/packages/core/component/Toast/Toast.tsx b/js/app/packages/core/component/Toast/Toast.tsxindex 800f47ed64..c3baf5ae84 100644--- a/js/app/packages/core/component/Toast/Toast.tsx+++ b/js/app/packages/core/component/Toast/Toast.tsx@@ -108,7 +108,7 @@ const TOAST_STYLES: Record<ToastType, ToastStyle> = {};/** A single entry in the actions row — icon and label rendered as a button */-export interface ToastAction {+interface ToastAction {label: string;icon?: Component<{ class?: string }>;onClick: () => void;@@ -120,7 +120,7 @@ export interface ToastAction {* Note: by default, toasts do NOT render on mobile. Pass `mobile: true` to opt* in to the mobile-styled toast region (centered above the mobile dock).*/-export interface ToastOptions {+interface ToastOptions {subtext?: string;/** Auto-dismiss duration in ms. When omitted, the toast uses a default 3s timer. */duration?: number;@@ -128,7 +128,7 @@ export interface ToastOptions {mobile?: boolean;}-export interface ToastSuccessOptions extends ToastOptions {+interface ToastSuccessOptions extends ToastOptions {actions?: ToastAction[];/** When true, bypasses the 3s dedupe so repeated calls stack instead of replacing. */stack?: boolean;@@ -139,7 +139,7 @@ export interface ToastSuccessOptions extends ToastOptions {* Replaces the icon, title, and accent color of the standard layout while* still using the shared Surface chrome and progress/dismiss machinery.*/-export interface CustomToastConfig {+interface CustomToastConfig {title: string;content?: () => JSX.Element;icon?: Component<{ class?: string }>;diff --git a/js/app/packages/core/component/TopBar/Badge.tsx b/js/app/packages/core/component/TopBar/Badge.tsxdeleted file mode 100644index 53b3b7ab77..0000000000--- a/js/app/packages/core/component/TopBar/Badge.tsx+++ /dev/null@@ -1,26 +0,0 @@-export function ViewOnlyBadge() {- return (- <div class="hidden sm:flex px-2 rounded-lg border border-accent/30 py-0.5 bg-accent/10 justify-center items-center">- <p- class="text-accent text-xs font-medium whitespace-nowrap"- aria-label="View Only Badge"- >- View Only- </p>- </div>- );-}--// SCUFFED THEME: how should we define the comment only badge colors?-export function CommentOnlyBadge() {- return (- <div class="hidden sm:flex px-2 rounded-lg border border-[oklch(0.901_0.076_70.697)] py-0.5 bg-[oklch(0.98_0.016_73.684)] justify-center items-center">- <p- class="text-[oklch(0.705_0.213_47.604)] text-xs font-medium whitespace-nowrap"- aria-label="Comment Only Badge"- >- Comment Only- </p>- </div>- );-}diff --git a/js/app/packages/core/component/TopBar/Bar.tsx b/js/app/packages/core/component/TopBar/Bar.tsxindex 33a179c930..18410545cc 100644--- a/js/app/packages/core/component/TopBar/Bar.tsx+++ b/js/app/packages/core/component/TopBar/Bar.tsx@@ -40,9 +40,9 @@ type BarContext = {truncation: Accessor<{ stage: TruncationStage; index: number }>;};-export const BarContext = createContext<BarContext>();+const BarContext = createContext<BarContext>();-export type TruncationStage = {+type TruncationStage = {fileNameLength: number;hideBreadcrumb?: boolean;hideLabels?: boolean;diff --git a/js/app/packages/core/component/TopBar/Left.tsx b/js/app/packages/core/component/TopBar/Left.tsxdeleted file mode 100644index 31755e85d4..0000000000--- a/js/app/packages/core/component/TopBar/Left.tsx+++ /dev/null@@ -1,16 +0,0 @@-import { useIsAuthenticated } from '@core/auth';-import { type ParentProps, Show } from 'solid-js';-import { LoginButton } from './LoginButton';--export function Left(props: ParentProps) {- const isAuthed = useIsAuthenticated();-- return (- <div class="flex flex-row w-fit h-8 justify-start items-center gap-2">- <Show when={!isAuthed()}>- <LoginButton />- </Show>- {props.children}- </div>- );-}diff --git a/js/app/packages/core/component/TopBar/Right.tsx b/js/app/packages/core/component/TopBar/Right.tsxdeleted file mode 100644index 669c065bd2..0000000000--- a/js/app/packages/core/component/TopBar/Right.tsx+++ /dev/null@@ -1,9 +0,0 @@-import type { ParentProps } from 'solid-js';--export function Right(props: ParentProps) {- return (- <div class={` flex flex-row w-fit h-8 justify-end items-center gap-2`}>- {props.children}- </div>- );-}diff --git a/js/app/packages/core/component/UserGroup.tsx b/js/app/packages/core/component/UserGroup.tsxindex 8a439c7f11..d7d636d96f 100644--- a/js/app/packages/core/component/UserGroup.tsx+++ b/js/app/packages/core/component/UserGroup.tsx@@ -2,9 +2,9 @@ import { AvatarGroup, type AvatarGroupSize } from '@ui';import { createMemo, For, Show } from 'solid-js';import { UserIcon } from './UserIcon';-export type UserGroupSize = AvatarGroupSize;+type UserGroupSize = AvatarGroupSize;-export type UserGroupProps = {+type UserGroupProps = {userIds: string[];maxUsers?: number;size?: UserGroupSize;diff --git a/js/app/packages/core/component/UserTooltip.tsx b/js/app/packages/core/component/UserTooltip.tsxindex 6f8e7bbc4f..ccb68311cc 100644--- a/js/app/packages/core/component/UserTooltip.tsx+++ b/js/app/packages/core/component/UserTooltip.tsx@@ -11,7 +11,7 @@ import { Button, Surface } from '@ui';import { createSignal, Show } from 'solid-js';import { UserIcon } from './UserIcon';-export type UserTooltipProps = {+type UserTooltipProps = {displayName: string;email?: string;id?: string;diff --git a/js/app/packages/core/component/VideoPreview.tsx b/js/app/packages/core/component/VideoPreview.tsxindex ea0d177dd4..4441c445f9 100644--- a/js/app/packages/core/component/VideoPreview.tsx+++ b/js/app/packages/core/component/VideoPreview.tsx@@ -4,7 +4,7 @@ import { staticFileIdEndpoint } from '@core/constant/servers';* @deprecated Prefer the composable media primitives in `@channel/Media`.* Keep this only for legacy callers until they are migrated.*/-export type VideoPreviewProps = {+type VideoPreviewProps = {id: string;variant: 'small' | 'dynamic';width?: string | number | undefined | null;diff --git a/js/app/packages/core/component/Zoompinch.tsx b/js/app/packages/core/component/Zoompinch.tsxindex d8f366ab33..c7cfe7e47e 100644--- a/js/app/packages/core/component/Zoompinch.tsx+++ b/js/app/packages/core/component/Zoompinch.tsx@@ -6,7 +6,7 @@ export type ZoompinchHandle = {wrapperElement: HTMLDivElement;};-export type ZoompinchProps = {+type ZoompinchProps = {handleRef?: (handle: ZoompinchHandle | undefined) => void;minScale?: number;maxScale?: number;diff --git a/js/app/packages/core/component/createFindBarController.ts b/js/app/packages/core/component/createFindBarController.tsindex 49cb27b97b..7d64ab8e5f 100644--- a/js/app/packages/core/component/createFindBarController.ts+++ b/js/app/packages/core/component/createFindBarController.ts@@ -1,12 +1,12 @@import { type Accessor, createEffect, createSignal, on } from 'solid-js';-export type FindBarSourceContext = {+type FindBarSourceContext = {isOpen: Accessor<boolean>;submittedQuery: Accessor<string>;activeIndex: Accessor<number>;};-export type FindBarSource<T> = {+type FindBarSource<T> = {results: Accessor<T[]>;isFetching: Accessor<boolean>;navigate: (result: T) => void;@@ -37,7 +37,7 @@ export type FindBarController = {setInputEl: (el: HTMLInputElement | undefined) => void;};-export type FindBarControllerOptions = {+type FindBarControllerOptions = {/*** Fires synchronously inside `submit()` *before* `submittedQuery` updates.* Lets callers run side-effects (e.g. clearing an existing selection)diff --git a/js/app/packages/core/constant/PaywallState.tsx b/js/app/packages/core/constant/PaywallState.tsxindex 3cd666e145..ff7e260914 100644--- a/js/app/packages/core/constant/PaywallState.tsx+++ b/js/app/packages/core/constant/PaywallState.tsx@@ -1,6 +1,6 @@import { createSignal } from 'solid-js';-export const DAILY_LIMIT = 5;+const DAILY_LIMIT = 5;export enum PaywallKey {PROJECT_LIMIT = 'PROJECT_LIMIT',@@ -32,12 +32,10 @@ export const PaywallMessages: Record<PaywallKey, string> = {'Upgrade your plan to remove the Macro signature.',};-export const [paywallOpen, setPaywallOpen] = createSignal(false);+const [paywallOpen, setPaywallOpen] = createSignal(false);// export const [paywallOpen, setPaywallOpen] = createControlledOpenSignal(false);-export const [limitReached, setLimitReached] = createSignal(false);-export const [paywallKey, setPaywallKey] = createSignal<PaywallKey | null>(- null-);+const [limitReached, _setLimitReached] = createSignal(false);+const [paywallKey, setPaywallKey] = createSignal<PaywallKey | null>(null);export const usePaywallState = () => {const showPaywall = (errorKey?: PaywallKey | null) => {diff --git a/js/app/packages/core/constant/SettingsState.tsx b/js/app/packages/core/constant/SettingsState.tsxindex f6d9f12bc3..5b9edca229 100644--- a/js/app/packages/core/constant/SettingsState.tsx+++ b/js/app/packages/core/constant/SettingsState.tsx@@ -14,8 +14,7 @@ export type SettingsTab =| 'Account & Team'| 'Mobile & MCPs';-export const [activeTabId, setActiveTabId] =- createSignal<SettingsTab>('Appearance');+const [activeTabId, setActiveTabId] = createSignal<SettingsTab>('Appearance');export type AgentSettingsSubTab = 'connectors' | 'mcp_server';export const [agentSettingsSubTab, setAgentSettingsSubTab] =diff --git a/js/app/packages/core/constant/allBlocks.ts b/js/app/packages/core/constant/allBlocks.tsindex 8f1a8c1119..43f23432d4 100644--- a/js/app/packages/core/constant/allBlocks.ts+++ b/js/app/packages/core/constant/allBlocks.ts@@ -38,7 +38,7 @@ const fileTypeToBlockName_: Record<string, BlockName> = {};const aliasToBlockName_: Record<string, BlockName> = {};// Map from base block names to their aliases-export const blockNameToAliases: Partial<Record<BlockName, string[]>> = {};+const blockNameToAliases: Partial<Record<BlockName, string[]>> = {};export const blockAcceptedFileExtensionSet = new Set<string>();@@ -48,8 +48,8 @@ export const blockNameToFileExtensionSet: Record<Set<FileTypeString>> = {};// @ts-ignore This type is built below-export const blockNameToMimeTypeSet: Record<BlockName, Set<MimeType>> = {};-export const blockNameToDefaultFilename: Partial<+const blockNameToMimeTypeSet: Record<BlockName, Set<MimeType>> = {};+const blockNameToDefaultFilename: Partial<Record<BlockName | BlockAlias, string>> = {};@@ -87,7 +87,7 @@ for (const [name, block] of Object.entries(blocks)) {}}-export function blockAcceptsMimeType(blockName: BlockName, mimeType: MimeType) {+function _blockAcceptsMimeType(blockName: BlockName, mimeType: MimeType) {return blockNameToMimeTypeSet[blockName].has(mimeType);}@@ -112,13 +112,11 @@ export const blockNameToMimeTypes = Object.fromEntries(])) as Record<BlockName, string[]>;-export const blockAcceptedMimeTypes = Object.keys(+const _blockAcceptedMimeTypes = Object.keys(blockAcceptedMimetypeToFileExtension);-export const blockAcceptedFileExtensions = Array.from(- blockAcceptedFileExtensionSet-);+const _blockAcceptedFileExtensions = Array.from(blockAcceptedFileExtensionSet);/*** Check if a string is a block aliasdiff --git a/js/app/packages/core/constant/elementIds.ts b/js/app/packages/core/constant/elementIds.tsdeleted file mode 100644index c4f94591e1..0000000000--- a/js/app/packages/core/constant/elementIds.ts+++ /dev/null@@ -1,3 +0,0 @@-export const sideBarIds = {- right: 'side-bar-right',-};diff --git a/js/app/packages/core/constant/featureFlags.ts b/js/app/packages/core/constant/featureFlags.tsindex f8bc3ed7e7..369afc3fe8 100644--- a/js/app/packages/core/constant/featureFlags.ts+++ b/js/app/packages/core/constant/featureFlags.ts@@ -94,8 +94,8 @@ export const ENABLE_LIVE_INDICATORS = resolveFeatureFlag(true);-export const ENABLE_CONTACTS = resolveFeatureFlag('ENABLE_CONTACTS', true);-export const ENABLE_GMAIL_BASED_CONTACTS = resolveFeatureFlag(+const _ENABLE_CONTACTS = resolveFeatureFlag('ENABLE_CONTACTS', true);+const _ENABLE_GMAIL_BASED_CONTACTS = resolveFeatureFlag('ENABLE_GMAIL_BASED_CONTACTS',DEV_MODE_ENV);@@ -183,7 +183,7 @@ export const ENABLE_MENTION_TRACKING = resolveFeatureFlag(true);-export const ENABLE_SEARCH_PAGINATION = resolveFeatureFlag(+const _ENABLE_SEARCH_PAGINATION = resolveFeatureFlag('ENABLE_SEARCH_PAGINATION',true);@@ -205,21 +205,21 @@ export const ENABLE_ANIMATED_ICONS = resolveFeatureFlag(true);-export const ENABLE_PROPERTY_DISPLAY = resolveFeatureFlag(+const _ENABLE_PROPERTY_DISPLAY = resolveFeatureFlag('ENABLE_PROPERTY_DISPLAY',DEV_MODE_ENV);-export const ENABLE_PROPERTY_SORT = resolveFeatureFlag(+const _ENABLE_PROPERTY_SORT = resolveFeatureFlag('ENABLE_PROPERTY_SORT',DEV_MODE_ENV);-export const ENABLE_PROPERTY_FILTER = resolveFeatureFlag(+const _ENABLE_PROPERTY_FILTER = resolveFeatureFlag('ENABLE_PROPERTY_FILTER',DEV_MODE_ENV);// TODO: re-enable when supported in backend-export const ENABLE_SOUP_FROM_FILTER = resolveFeatureFlag(+const _ENABLE_SOUP_FROM_FILTER = resolveFeatureFlag('ENABLE_SOUP_FROM_FILTER',false);@@ -230,13 +230,13 @@ export const ENABLE_PROJECT_VIEW_PREVIEW = resolveFeatureFlag(true);-export const ENABLE_DOCK_NOTITIFCATIONS = resolveFeatureFlag(+const _ENABLE_DOCK_NOTITIFCATIONS = resolveFeatureFlag('ENABLE_DOCK_NOTITIFCATIONS',DEV_MODE_ENV);export const ENABLE_TTFT = resolveFeatureFlag('ENABLE_TTFT', DEV_MODE_ENV);-export const ENABLE_TASKS_TABS = resolveFeatureFlag('ENABLE_TASKS_TABS', true);+const _ENABLE_TASKS_TABS = resolveFeatureFlag('ENABLE_TASKS_TABS', true);export const ENABLE_EMAIL_SHARING = resolveFeatureFlag('ENABLE_EMAIL_SHARING',@@ -269,7 +269,7 @@ export const ENABLE_EMAIL_SCHEDULED_SEND = resolveFeatureFlag(true);-export const ENABLE_AI_AUTO_TAB_ATTACHMENTS = resolveFeatureFlag(+const _ENABLE_AI_AUTO_TAB_ATTACHMENTS = resolveFeatureFlag('ENABLE_AI_AUTO_TAB_ATTACHMENTS',true);@@ -279,14 +279,14 @@ export const ENABLE_FEATURED_SEARCH_RESULTS = resolveFeatureFlag(true);-export const ENABLE_SEARCH_QUERY_OPERATORS = resolveFeatureFlag(+const _ENABLE_SEARCH_QUERY_OPERATORS = resolveFeatureFlag('ENABLE_SEARCH_QUERY_OPERATORS',false);const ENABLE_NEW_CHANNELS_OVERRIDE = true;-export function ENABLE_NEW_CHANNELS(): boolean {+function _ENABLE_NEW_CHANNELS(): boolean {if (ENABLE_NEW_CHANNELS_OVERRIDE !== undefined) {return ENABLE_NEW_CHANNELS_OVERRIDE;}diff --git a/js/app/packages/core/context/quickAccess/index.ts b/js/app/packages/core/context/quickAccess/index.tsindex 8584932609..319d4ba96c 100644--- a/js/app/packages/core/context/quickAccess/index.ts+++ b/js/app/packages/core/context/quickAccess/index.ts@@ -1,24 +1,9 @@export { QuickAccessProvider, useQuickAccess } from './QuickAccessProvider';export type {Bucket,- BucketEntityMap,- BucketItemMap,EntityBucket,EntityItem,- ItemForBucket,- ItemsForBuckets,- QuickAccessContextValue,QuickAccessItem,- SearchOptions,- SearchResult,- SearchWeights,UserItem,} from './types';-export {- ALL_BUCKETS,- exclude,- isEntityItem,- isEntityOfType,- isFromBucket,- isUserItem,-} from './types';+export { exclude } from './types';diff --git a/js/app/packages/core/context/quickAccess/types.ts b/js/app/packages/core/context/quickAccess/types.tsindex 1a2edeb261..bab948d0bf 100644--- a/js/app/packages/core/context/quickAccess/types.ts+++ b/js/app/packages/core/context/quickAccess/types.ts@@ -28,7 +28,7 @@ export type Bucket =export type EntityBucket = Exclude<Bucket, 'person'>;-export const ALL_BUCKETS: Bucket[] = [+const ALL_BUCKETS: Bucket[] = ['channel','dm','person',@@ -48,7 +48,7 @@ export const BUCKET_COMBINATIONS: Record<BucketCombination, Bucket[]> = {documents: ['document', 'note', 'task', 'chat', 'project'],};-export type ItemTimestamps = {+type ItemTimestamps = {viewedAt?: DateValue | null;updatedAt?: DateValue | null;createdAt?: DateValue | null;@@ -77,41 +77,28 @@ export type UserItem = QuickAccessBase & {export type QuickAccessItem = EntityItem | UserItem;-export function isEntityItem(item: QuickAccessItem): item is EntityItem {+function _isEntityItem(item: QuickAccessItem): item is EntityItem {return item.kind === 'entity';}-export function isUserItem(item: QuickAccessItem): item is UserItem {+function _isUserItem(item: QuickAccessItem): item is UserItem {return item.kind === 'user';}-export function isEntityOfType<T extends EntityData['type']>(+function _isEntityOfType<T extends EntityData['type']>(item: QuickAccessItem,entityType: T): item is EntityItem<Extract<EntityData, { type: T }>> {return item.kind === 'entity' && item.data.type === entityType;}-export function isFromBucket<B extends Bucket>(+function _isFromBucket<B extends Bucket>(item: QuickAccessItem,bucket: B): boolean {return item.bucket === bucket;}-export type BucketEntityMap = {- channel: ChannelEntity;- dm: ChannelEntity;- document: DocumentEntity;- task: TaskEntity;- note: DocumentEntity;- chat: ChatEntity;- project: ProjectEntity;- email: EmailEntity;- person: never; // UserItem, not EntityItem- command: never; // CommandItem, not EntityItem-};-/*** Maps a bucket to its corresponding QuickAccessItem type*/@@ -136,29 +123,6 @@ export type ItemsForBuckets<Buckets extends Bucket[]> = Buckets extends [? ItemForBucket<First> | ItemsForBuckets<Rest>: never;-export type SearchWeights = {- fuzzy?: number;- time?: number;- brevity?: number;-};--export type SearchOptions = {- query: string;- limit?: number;- weights?: SearchWeights;- minScore?: number;-};--export type SearchResult<T extends QuickAccessItem = QuickAccessItem> = {- item: T;- score: number;- scoreDetails?: {- fuzzy: number;- time: number;- brevity: number;- };-};-export type QuickAccessContextValue = {/*** Get items from specific buckets, cached and reactive.diff --git a/js/app/packages/core/context/user.ts b/js/app/packages/core/context/user.tsindex f8732b2f0a..df3f0bb141 100644--- a/js/app/packages/core/context/user.ts+++ b/js/app/packages/core/context/user.ts@@ -2,9 +2,7 @@ import { type UserInfoData, useUserInfoQuery } from '@queries/auth/user-info';import { queryReadyGate } from '@queries/gate';import { type Accessor, createMemo } from 'solid-js';import { createAssertedContextProvider } from './createContext';-import { enableUserInfoQuery, shouldQueryUserInfo } from './user-info-gate';--export { enableUserInfoQuery };+import { shouldQueryUserInfo } from './user-info-gate';type UserContextValue = {userInfo: Accessor<UserInfoData | undefined>;@@ -100,15 +98,15 @@ export function useTutorialCompleted() {return useUserContext().tutorialCompleted;}-export function useGroup() {+function _useGroup() {return useUserContext().group;}-export function useHasChromeExt() {+function _useHasChromeExt() {return useUserContext().hasChromeExt;}-export function useHasTrialed() {+function _useHasTrialed() {return useUserContext().hasTrialed;}diff --git a/js/app/packages/core/directive/dnd.ts b/js/app/packages/core/directive/dnd.d.tssimilarity index 100%rename from js/app/packages/core/directive/dnd.tsrename to js/app/packages/core/directive/dnd.d.tsdiff --git a/js/app/packages/core/directive/focusInput.ts b/js/app/packages/core/directive/focusInput.tsindex 92771f247f..b5e5d39b62 100644--- a/js/app/packages/core/directive/focusInput.ts+++ b/js/app/packages/core/directive/focusInput.ts@@ -3,7 +3,7 @@ import { isPlatform } from '@core/util/platform';import { isIOS } from '@solid-primitives/platform';import { type Accessor, onCleanup } from 'solid-js';-export type FocusInputOptions = {+type FocusInputOptions = {getTarget: () => HTMLElement | null | undefined;positionNear?: HTMLElement;};diff --git a/js/app/packages/core/directive/longPressHighlight.ts b/js/app/packages/core/directive/longPressHighlight.tsindex 47f10b170b..057366c460 100644--- a/js/app/packages/core/directive/longPressHighlight.ts+++ b/js/app/packages/core/directive/longPressHighlight.ts@@ -1,7 +1,7 @@import { type Accessor, onCleanup } from 'solid-js';import { touchHandler } from './touchHandler';-export interface LongPressHighlightOptions {+interface LongPressHighlightOptions {onLongPress?: () => void;/** Delay (ms) before adding the `long-press-animation` class on touch start. If touch ends before this delay, no exit animation plays. Default: 100 */enterDelay?: number;diff --git a/js/app/packages/core/directive/observedSize.ts b/js/app/packages/core/directive/observedSize.tsindex 84cf0a1642..1a9825fd28 100644--- a/js/app/packages/core/directive/observedSize.ts+++ b/js/app/packages/core/directive/observedSize.ts@@ -34,7 +34,7 @@ export function observedSize(onCleanup(() => observer.disconnect());}-export function observedSizeBorderBox(+function _observedSizeBorderBox(element: Element,accessor: () => ObservedSizeDirectiveOptions) {diff --git a/js/app/packages/core/directive/touchHandler.ts b/js/app/packages/core/directive/touchHandler.tsindex d79f260dbf..81afcdb669 100644--- a/js/app/packages/core/directive/touchHandler.ts+++ b/js/app/packages/core/directive/touchHandler.ts@@ -1,7 +1,7 @@import { hapticImpact } from '@core/mobile/haptics';import { type Accessor, createSignal, onCleanup } from 'solid-js';-export interface TouchHandlerOptions {+interface TouchHandlerOptions {onLongPress?: (e: TouchEvent) => void;onTouchStart?: (e: TouchEvent) => void;onShortTouch?: (e: TouchEvent) => void;diff --git a/js/app/packages/core/email-link/index.ts b/js/app/packages/core/email-link/index.tsindex 5dd7e5be13..d253a6c6cd 100644--- a/js/app/packages/core/email-link/index.ts+++ b/js/app/packages/core/email-link/index.ts@@ -14,7 +14,7 @@ import type { UseQueryResult } from '@tanstack/solid-query';import { err, okAsync, ResultAsync } from 'neverthrow';import { createMemo, createSignal } from 'solid-js';-export const [emailRefetchInterval, setEmailRefetchInterval] = createSignal<+const [emailRefetchInterval, setEmailRefetchInterval] = createSignal<number | undefined>();diff --git a/js/app/packages/core/email/index.ts b/js/app/packages/core/email/index.tsindex 25a1c9bfd1..54c9e462f9 100644--- a/js/app/packages/core/email/index.ts+++ b/js/app/packages/core/email/index.ts@@ -1,12 +1,7 @@// Email body parsing utilities-export {- type ParsedEmailContent,- parseEmailContent,- trimTrailingBrs,-} from './parse-email-html';+export { parseEmailContent } from './parse-email-html';// Image proxy utilities-export { proxyEmailImages } from './proxy-email-images';// Color transformation utilitiesexport {diff --git a/js/app/packages/core/email/parse-email-html.ts b/js/app/packages/core/email/parse-email-html.tsindex 1431683079..3338172236 100644--- a/js/app/packages/core/email/parse-email-html.ts+++ b/js/app/packages/core/email/parse-email-html.ts@@ -122,7 +122,7 @@ function parseGmailSignature(htmlElement: Element) {};}-export interface ParsedEmailContent {+interface ParsedEmailContent {mainContent: string;signature: string | null;hasTable: boolean;diff --git a/js/app/packages/core/email/transform-email-colors.ts b/js/app/packages/core/email/transform-email-colors.tsindex 15b7a6ee08..3241b1a3f1 100644--- a/js/app/packages/core/email/transform-email-colors.ts+++ b/js/app/packages/core/email/transform-email-colors.ts@@ -1,4 +1,4 @@-export interface TextNodeContrast {+interface TextNodeContrast {text: string;fg: OKLCH | null;bg: OKLCH | null;@@ -205,7 +205,7 @@ export function normalizeRGBA(rgba: RGBA | null) {};}-export function computeTextNodeColor(root: Node): TextNodeContrast[] {+function computeTextNodeColor(root: Node): TextNodeContrast[] {const out: TextNodeContrast[] = [];const walker = document.createTreeWalker(root, NodeFilter.SHOW_TEXT, {diff --git a/js/app/packages/core/heic/constants.ts b/js/app/packages/core/heic/constants.tsindex 309b3c02c4..c05203489d 100644--- a/js/app/packages/core/heic/constants.ts+++ b/js/app/packages/core/heic/constants.ts@@ -10,7 +10,7 @@ export const IMAGE_FORMATS = {HEIF: 'image/heif',} as const;-export const IMAGE_EXTENSIONS = {+const IMAGE_EXTENSIONS = {PNG: 'png',JPEG: 'jpg',HEIC: 'heic',@@ -28,7 +28,7 @@ export const HEIC_EXTENSIONS = [] as const;// Conversion quality settings-export const CONVERSION_QUALITY = {+const CONVERSION_QUALITY = {HIGH: 0.95,STANDARD: 0.92,MEDIUM: 0.85,@@ -43,7 +43,7 @@ export const WORKER_POOL_CONFIG = {} as const;// Canvas context options-export const CANVAS_OPTIONS = {+const _CANVAS_OPTIONS = {WILL_READ_FREQUENTLY: false,} as const;diff --git a/js/app/packages/core/heic/index.ts b/js/app/packages/core/heic/index.tsindex 1e22008ac0..f546bdf007 100644--- a/js/app/packages/core/heic/index.ts+++ b/js/app/packages/core/heic/index.ts@@ -1,43 +1,8 @@-export {- CANVAS_OPTIONS,- CONVERSION_QUALITY,- DEFAULT_CONVERSION_SETTINGS,- ERROR_MESSAGES,- HEIC_EXTENSIONS,- HEIC_MIME_TYPES,- IMAGE_EXTENSIONS,- IMAGE_FORMATS,- LOG_MESSAGES,- TASK_ID_PREFIX,- WORKER_POOL_CONFIG,-} from './constants';-export { EnhancedHeicConversionError, HeicLogger } from './logger';-export {- calculateOptimalWorkerPoolSize,- chunkFiles,- estimateConversionTime,- getOptimizedCanvasOptions,- isFileSizeReasonable,- PerformanceMonitor,-} from './performance';-export { HeicConversionService, heicConversionService } from './service';-export type {- ConversionQuality,- ConversionResult,- EnhancedTask,- HeicConversionConfig,- SupportedImageFormat,- TaskStatus,- WorkerMessageType,-} from './types';-export {- checkWebCodecsSupport,- isHeicFile,-} from './utils';+export { HEIC_EXTENSIONS } from './constants';-export type {- HeicCompleteData,- HeicErrorData,- HeicProgressData,- HeicTaskMessage,-} from './workerPool';+export {} from './performance';++export type {} from './types';+export {} from './utils';++export type {} from './workerPool';diff --git a/js/app/packages/core/heic/performance.ts b/js/app/packages/core/heic/performance.tsindex b7bef0eb85..e9de854e61 100644--- a/js/app/packages/core/heic/performance.ts+++ b/js/app/packages/core/heic/performance.ts@@ -35,7 +35,7 @@ export function isFileSizeReasonable(file: File): boolean {/*** Estimate conversion time based on file size*/-export function estimateConversionTime(fileSizeBytes: number): number {+function _estimateConversionTime(fileSizeBytes: number): number {// Rough estimate: 1MB = 1 second on average hardwareconst sizeInMB = fileSizeBytes / (1024 * 1024);return Math.ceil(sizeInMB * 1000); // Return in milliseconds@@ -44,7 +44,7 @@ export function estimateConversionTime(fileSizeBytes: number): number {/*** Create optimized canvas context options based on use case*/-export function getOptimizedCanvasOptions(willReadPixels: boolean = false) {+function _getOptimizedCanvasOptions(willReadPixels: boolean = false) {return {willReadFrequently: willReadPixels,alpha: true,diff --git a/js/app/packages/core/heic/service.ts b/js/app/packages/core/heic/service.tsindex cf4c9e2d7f..88e46e5ee4 100644--- a/js/app/packages/core/heic/service.ts+++ b/js/app/packages/core/heic/service.ts@@ -16,7 +16,7 @@ import type { HeicConversionConfig } from './types';import { generateConvertedFilename, isHeicFile } from './utils';import { HeicWorkerPool } from './workerPool';-export class HeicConversionService {+class HeicConversionService {private static instance: HeicConversionService | null = null;private workerPool: HeicWorkerPool;diff --git a/js/app/packages/core/heic/types.ts b/js/app/packages/core/heic/types.tsindex 3b6aad36ae..8d01976636 100644--- a/js/app/packages/core/heic/types.ts+++ b/js/app/packages/core/heic/types.ts@@ -14,12 +14,10 @@ export type ConversionQuality = 0.7 | 0.85 | 0.92 | 0.95;/*** Task status in the worker pool*/-export type TaskStatus = 'pending' | 'processing' | 'completed' | 'failed';/*** Worker message types*/-export type WorkerMessageType = 'progress' | 'complete' | 'error' | 'status';/*** Configuration for HEIC conversion@@ -33,24 +31,7 @@ export interface HeicConversionConfig {/*** Result of a successful HEIC conversion*/-export interface ConversionResult {- readonly arrayBuffer: ArrayBuffer;- readonly width: number;- readonly height: number;- readonly format: SupportedImageFormat;- readonly originalFilename?: string;- readonly convertedFilename: string;-}/*** Enhanced task interface with better typing*/-export interface EnhancedTask {- readonly id: string;- readonly filename: string;- readonly status: TaskStatus;- readonly startTime: Date;- readonly config: HeicConversionConfig;- endTime?: Date;- error?: Error;-}diff --git a/js/app/packages/core/heic/workerPool.ts b/js/app/packages/core/heic/workerPool.tsindex 7e7deab736..acadb0dbf3 100644--- a/js/app/packages/core/heic/workerPool.ts+++ b/js/app/packages/core/heic/workerPool.ts@@ -3,7 +3,6 @@* Internal implementation detail, not exposed to consumers*/-import { analytics } from '@app/lib/analytics';import shortUUID from 'short-uuid';import {ERROR_MESSAGES,@@ -14,25 +13,8 @@ import {import { EnhancedHeicConversionError, HeicLogger } from './logger';import { checkWebCodecsSupport } from './utils';-export class HeicConversionError extends Error {- public originalFilename: string | undefined;-- constructor(originalFilename?: string, message?: string) {- const errorMessage =- message ||- `Failed to convert HEIC file${originalFilename ? ` ${originalFilename}` : ''} to PNG`;- super(errorMessage);- this.name = 'HeicConversionError';- this.originalFilename = originalFilename;-- analytics.track('upload_error', {- type: this.name,- });- }-}-// Types for internal worker communication-export interface HeicTaskMessage {+interface HeicTaskMessage {readonly action: 'convertHeic';readonly arrayBuffer: ArrayBuffer;readonly format?: string;@@ -42,23 +24,23 @@ export interface HeicTaskMessage {readonly webCodecsSupportedMimeTypes?: string[];}-export interface HeicProgressData {+interface HeicProgressData {percentage?: number;message: string;}-export interface HeicCompleteData {+interface HeicCompleteData {arrayBuffer: ArrayBuffer;width: number;height: number;format: string;}-export interface HeicErrorData {+interface HeicErrorData {message: string;}-export interface WorkerMessage {+interface WorkerMessage {taskId: string;type: 'progress' | 'complete' | 'error' | 'status';data: HeicProgressData | HeicCompleteData | HeicErrorData;diff --git a/js/app/packages/core/hotkey/constants.ts b/js/app/packages/core/hotkey/constants.tsindex b020987a40..53aca838c0 100644--- a/js/app/packages/core/hotkey/constants.ts+++ b/js/app/packages/core/hotkey/constants.ts@@ -153,7 +153,7 @@ export const macOptionReverse = {export const EVENT_MODIFIER_KEYS = new Set(['meta', 'control', 'alt', 'shift']);-export const CMD_OR_CTRL: 'meta' | 'control' = IS_MAC ? 'meta' : 'control';+const CMD_OR_CTRL: 'meta' | 'control' = IS_MAC ? 'meta' : 'control';export const HOTKEY_TO_EVENT_NAME_MAP = {ctrl: 'control',diff --git a/js/app/packages/core/hotkey/getCommands.ts b/js/app/packages/core/hotkey/getCommands.tsindex 7326497236..65f6177657 100644--- a/js/app/packages/core/hotkey/getCommands.ts+++ b/js/app/packages/core/hotkey/getCommands.ts@@ -18,7 +18,7 @@ type sortAndFilterOptions = {};// This is reactive on active scope (if scope not specified), activeElement, and commmand conditions.-export function useActiveCommands(+function _useActiveCommands(displayOptions?: sortAndFilterOptions,scope?: string) {diff --git a/js/app/packages/core/hotkey/tokens.ts b/js/app/packages/core/hotkey/tokens.tsindex ae1f2e7969..147cb0be27 100644--- a/js/app/packages/core/hotkey/tokens.ts+++ b/js/app/packages/core/hotkey/tokens.ts@@ -304,7 +304,7 @@ export type HotkeyToken = ExtractValues<typeof TOKENS>;* Builds a Map from token string values to their token references* e.g. 'channel.moveUp' -> TOKENS.channel.moveUp*/-export function buildTokenMap(tokens: typeof TOKENS): Map<string, HotkeyToken> {+function buildTokenMap(tokens: typeof TOKENS): Map<string, HotkeyToken> {const map = new Map<string, HotkeyToken>();function traverse(obj: any, path: string[] = []) {@@ -326,4 +326,4 @@ export function buildTokenMap(tokens: typeof TOKENS): Map<string, HotkeyToken> {return map;}-export const tokenMap = buildTokenMap(TOKENS);+const _tokenMap = buildTokenMap(TOKENS);diff --git a/js/app/packages/core/hotkey/types.ts b/js/app/packages/core/hotkey/types.tsindex 340e493b3b..56c3f712f2 100644--- a/js/app/packages/core/hotkey/types.ts+++ b/js/app/packages/core/hotkey/types.ts@@ -2,10 +2,10 @@ import type { Component, JSX } from 'solid-js';import type { HotkeyToken } from './tokens';export const HOTKEY_PRIORITY_DEFAULT = 0;-export const HOTKEY_PRIORITY_LOW = 1;-export const HOTKEY_PRIORITY_NORMAL = 2;+const HOTKEY_PRIORITY_LOW = 1;+const HOTKEY_PRIORITY_NORMAL = 2;export const HOTKEY_PRIORITY_HIGH = 3;-export const HOTKEY_PRIORITY_CRITICAL = 4;+const HOTKEY_PRIORITY_CRITICAL = 4;const HOTKEY_TYPE = [HOTKEY_PRIORITY_DEFAULT,diff --git a/js/app/packages/core/hotkey/utils.ts b/js/app/packages/core/hotkey/utils.tsindex 2f54fe74eb..eb14ca29d6 100644--- a/js/app/packages/core/hotkey/utils.ts+++ b/js/app/packages/core/hotkey/utils.ts@@ -92,7 +92,7 @@ type GetHotkeyCommandOptions = {* // Sort by displayPriority instead* const commands = getHotkeyCommands(scopeNode, 'h', { sortBy: 'displayPriority' });*/-export function getHotkeyCommands(+function getHotkeyCommands(scopeOrId: ScopeNode | string,hotkey: ValidHotkey,options: GetHotkeyCommandOptions = {}@@ -413,7 +413,7 @@ export function getActiveCommandByToken(/*** Returns a hotkey command for a given hotkey token. NOTE: this might not be THE command you are looking for, if there are hotkeys sharing the same token instantiated across different scopes. But this can be used in situations where you don't know or don't care about the scope you are in, e.g. when displaying hotkey metadata.*/-export function getHotkeyCommandByToken(token: HotkeyToken) {+function _getHotkeyCommandByToken(token: HotkeyToken) {const command = hotkeyTokenMap().get(token)?.at(0);return command;}@@ -638,7 +638,7 @@ export function registerScopeSignalHotkey(});}-export const useIsInCommandScope = () => {+const _useIsInCommandScope = () => {return createMemo(() => {const currentScopeId = activeScope();if (!currentScopeId) return false;diff --git a/js/app/packages/core/internal/BlockLoader.tsx b/js/app/packages/core/internal/BlockLoader.tsxindex c2b1cef5ab..ec837f9490 100644--- a/js/app/packages/core/internal/BlockLoader.tsx+++ b/js/app/packages/core/internal/BlockLoader.tsx@@ -32,7 +32,7 @@ import type { ObjectLike } from '../util/result';export const blockDataSignal = createBlockSignal<unknown>();export const blockLiveTrackingEnabledSignal = createBlockSignal<boolean>();-export type BlockLoaderProps<+type BlockLoaderProps<D extends ObjectLike | FileOrTextLike,P extends SourcePreload<ObjectLike>,L extends LoadFunction<D, P>,diff --git a/js/app/packages/core/layout.ts b/js/app/packages/core/layout.tsdeleted file mode 100644index 860dfd57bd..0000000000--- a/js/app/packages/core/layout.ts+++ /dev/null@@ -1,107 +0,0 @@-import { type Accessor, createSignal } from 'solid-js';-import type { BlockName } from './block';--type SplitContent = {- type: BlockName | 'component';- id: string;- params?: Record<string, string>;-};--type History<T extends object> = {- items: T[];- currentIndex: number;- push: (item: T) => void;- back: () => T | null;- forward: () => T | null;- canGoBack: () => boolean;- canGoForward: () => boolean;-};--function createHistory<T extends object>(): History<T> {- let items: T[] = [];- let currentIndex: number = 0;-- const canGoBack = () => {- return currentIndex > 0;- };-- const canGoForward = () => {- return currentIndex < items.length - 1;- };-- const isAtEnd = () => {- return currentIndex === items.length - 1;- };-- const push = (item: T) => {- if (!isAtEnd()) {- items = items.splice(currentIndex);- }- items.push(item);- currentIndex = currentIndex + 1;- };-- const back = () => {- if (!canGoBack()) return null;- currentIndex = currentIndex - 1;- return items[currentIndex];- };-- const forward = () => {- if (!canGoForward()) return null;- currentIndex = currentIndex + 1;- return items[currentIndex];- };-- return {- items,- currentIndex,- back,- push,- forward,- canGoBack,- canGoForward,- };-}--type LayoutSplit = {- position: number;- content: SplitContent;- history: History<SplitContent>;-};--function createLayoutSplit(position: number, initialContent: SplitContent) {- const history = createHistory<SplitContent>();- history.push(initialContent);- return {- position,- content: initialContent,- history,- };-}--export type SplitLayout = {- splits: Accessor<LayoutSplit[]>;- createSplit: (initialContent: SplitContent) => void;- closeSplit: (position: number) => void;-};--export function createSplitLayout(splits: LayoutSplit[]) {- const [splitsState, setSplits] = createSignal(splits);-- const createSplit = (initialContent: SplitContent) => {- const newSplit = createLayoutSplit(splitsState().length, initialContent);-- setSplits([...splitsState(), newSplit]);- };-- const closeSplit = (position: number) => {- setSplits(splitsState().filter((split) => split.position !== position));- };-- return {- splits: splitsState,- createSplit,- closeSplit,- };-}diff --git a/js/app/packages/core/orchestrator.tsx b/js/app/packages/core/orchestrator.tsxindex 05a1256ea2..0b6209b6be 100644--- a/js/app/packages/core/orchestrator.tsx+++ b/js/app/packages/core/orchestrator.tsx@@ -87,7 +87,7 @@ type BlockInstance = {handle: OwnedBlockHandle<any>;};-export type CreateBlockOptions<Name extends BlockName = BlockName> = {+type CreateBlockOptions<Name extends BlockName = BlockName> = {params?: BlockComponentProps[Name];location?: Location;nested?: NestedState<any>;@@ -234,7 +234,7 @@ export type BlockInstanceHandle = {** NOTE: This handle is meant to be consumed by other blocks*/-export type BlockHandle<S> = {+type BlockHandle<S> = {block: Block;isMethodAvailable: (methodName: string) => boolean;awaitMethodAvailable: (methodName: string, timeout?: number) => Promise<void>;diff --git a/js/app/packages/core/service.ts b/js/app/packages/core/service.tsindex b987afb0be..356aef2578 100644--- a/js/app/packages/core/service.ts+++ b/js/app/packages/core/service.ts@@ -12,7 +12,7 @@ type ErrorDef = {/*** Defines the types of actors that can interact with the service.*/-export const ACTORS = {+const ACTORS = {user: 'Human users of a service, acted upon through UI',ai: 'Chat or other AI users of a service that act on behalf of the user',producer: 'The block that produced the block can access these services',@@ -21,14 +21,14 @@ export const ACTORS = {/*** Represents the type of an actor in the system.*/-export type Actor = keyof typeof ACTORS;+type Actor = keyof typeof ACTORS;/*** Access controls should be used sparingly. If there are functions or services* that behave similarly but have different access, consider breaking up or* consolidating the functionality first.*/-export type Access =+type Access =| {/** access is solely denied to actors specified */exclude?: Actor[];@@ -111,7 +111,7 @@ export interface FunctionDefinition<access?: Access;}-export interface SvcDefinition {+interface SvcDefinition {/*** A description of the overall functionality this service represents.* Use cases by user/AI/blocks or examples of inter-service behavior should be@@ -273,7 +273,7 @@ type ClientFunctionResult<T> =: void: never;-export type ClientFunction<T extends FunctionDefinition<any, any, any, any>> =+type ClientFunction<T extends FunctionDefinition<any, any, any, any>> =ClientFunctionArgs<T> extends undefined? () => Promise<ClientFunctionResult<T>>: (args: ClientFunctionArgs<T>) => Promise<ClientFunctionResult<T>>;@@ -313,7 +313,7 @@ export const fetchErrorsSvc = new Svc('Common fetch errors')export type FetchError = keyof typeof fetchErrorsSvc.state.errors;-export const fetchErrors = Object.keys(fetchErrorsSvc.state.errors) as Array<+const fetchErrors = Object.keys(fetchErrorsSvc.state.errors) as Array<keyof typeof fetchErrorsSvc.state.errors>;diff --git a/js/app/packages/core/signal/globalDropSignal.ts b/js/app/packages/core/signal/globalDropSignal.tsdeleted file mode 100644index 429fa3a3db..0000000000--- a/js/app/packages/core/signal/globalDropSignal.ts+++ /dev/null@@ -1,66 +0,0 @@-import { createSignal, onCleanup, onMount } from 'solid-js';--function createGlobalDropSignal(acceptedTypes: string[]) {- const [isValidFileDragging, setIsValidFileDragging] = createSignal(false);-- const isFileTypeValid = (file: File | DataTransferItem) => {- return acceptedTypes.some((type) => file.type.match(type));- };-- const handleDragEnter = (e: DragEvent) => {- e.preventDefault();- e.stopPropagation();-- if (e.dataTransfer && e.dataTransfer.items.length > 0) {- const isValid = Array.from(e.dataTransfer.items).some(isFileTypeValid);- setIsValidFileDragging(isValid);- }- };-- const handleDragOver = (e: DragEvent) => {- e.preventDefault();- e.stopPropagation();- };-- const handleDragLeave = (e: DragEvent) => {- e.preventDefault();- e.stopPropagation();-- // Check if the mouse has left the window- if (- e.clientX <= 0 ||- e.clientY <= 0 ||- e.clientX >= window.innerWidth ||- e.clientY >= window.innerHeight- ) {- setIsValidFileDragging(false);- }- };-- const handleDrop = (e: DragEvent) => {- e.preventDefault();- e.stopPropagation();- setIsValidFileDragging(false);- };-- onMount(() => {- document.addEventListener('dragenter', handleDragEnter);- document.addEventListener('dragover', handleDragOver);- document.addEventListener('dragleave', handleDragLeave);- document.addEventListener('drop', handleDrop);-- onCleanup(() => {- document.removeEventListener('dragenter', handleDragEnter);- document.removeEventListener('dragover', handleDragOver);- document.removeEventListener('dragleave', handleDragLeave);- document.removeEventListener('drop', handleDrop);- });- });-- return isValidFileDragging;-}--export function useGlobalDropSignal(acceptedTypes: string[]) {- // TODO: memoize on accepted types- return createGlobalDropSignal(acceptedTypes);-}diff --git a/js/app/packages/core/signal/permissions.ts b/js/app/packages/core/signal/permissions.tsindex d7e8028559..73258feb28 100644--- a/js/app/packages/core/signal/permissions.ts+++ b/js/app/packages/core/signal/permissions.ts@@ -28,14 +28,14 @@ export const useGetPermissions = () => {return createMemo(() => getPermissions(accessLevel()));};-export const useHasAccess = (requestedPermissions: Permissions) => {+const useHasAccess = (requestedPermissions: Permissions) => {const userPermissions = useGetPermissions();return createMemo(() =>hasPermissions(userPermissions(), requestedPermissions));};-export const useIsEditable = () => {+const useIsEditable = () => {const source = blockSourceSignal.get;const syncSource = blockSyncSourceSignal.get;return createMemo(() => {@@ -52,7 +52,7 @@ export const useIsEditable = () => {});};-export const usePermissionCan = (requestedPermissions: Permissions) => {+const usePermissionCan = (requestedPermissions: Permissions) => {const isAuthenticated = useIsAuthenticated();const hasAccess = useHasAccess(requestedPermissions);const isEditable = useIsEditable();@@ -69,7 +69,7 @@ export const useCanComment = () => usePermissionCan(Permissions.CAN_COMMENT);export const useCanEdit = () => usePermissionCan(Permissions.CAN_EDIT);export const useIsDocumentOwner = () => useHasAccess(Permissions.OWNER);-export const useReadOnly = () => {+const _useReadOnly = () => {const canView = useCanView();const canComment = useCanComment();return createMemo(() => canView() && !canComment());diff --git a/js/app/packages/core/signal/profilePicture.ts b/js/app/packages/core/signal/profilePicture.tsindex 174efb3045..0a227d3f0e 100644--- a/js/app/packages/core/signal/profilePicture.ts+++ b/js/app/packages/core/signal/profilePicture.ts@@ -10,7 +10,7 @@ import {import { createStore } from 'solid-js/store';type ProfilePictureStore = Record<string, ProfilePictureItem>;-export const [userProfilePictures, setUserProfilePictures] =+const [userProfilePictures, setUserProfilePictures] =createStore<ProfilePictureStore>({});const DEFAULT_CACHE_TIME_SECONDS = 60 * 10;@@ -65,7 +65,7 @@ async function fetchProfilePictures(}));}-export type ProfilePictureUrlFetcher = [+type ProfilePictureUrlFetcher = [Accessor<string | undefined>,{refetch: () => void;diff --git a/js/app/packages/core/signal/tabFocus.ts b/js/app/packages/core/signal/tabFocus.tsindex 247d74f922..7fd950d292 100644--- a/js/app/packages/core/signal/tabFocus.ts+++ b/js/app/packages/core/signal/tabFocus.ts@@ -25,9 +25,7 @@ export const isTabFocused = createMemo(() => isTabFocused_(), {equalFn: (a: boolean | undefined, b: boolean | undefined) => a! === b!,});-export function createTabFocusEffect(- callback: (isTabFocused: boolean) => void-) {+function _createTabFocusEffect(callback: (isTabFocused: boolean) => void) {createEffect(on(isTabFocused, (curr, prev) => {if (curr === prev) return;diff --git a/js/app/packages/core/signal/token.ts b/js/app/packages/core/signal/token.tsindex a41a9482b5..2e04ced7d4 100644--- a/js/app/packages/core/signal/token.ts+++ b/js/app/packages/core/signal/token.ts@@ -82,7 +82,7 @@ export async function getPermissionToken(return storedToken;}-export function useBlockPermissionToken() {+function _useBlockPermissionToken() {const blockId = useBlockId();return createCallback(async () => await getPermissionToken('document', blockId)diff --git a/js/app/packages/core/signal/unfurl.ts b/js/app/packages/core/signal/unfurl.tsindex 3a59796866..8fc009e5ed 100644--- a/js/app/packages/core/signal/unfurl.ts+++ b/js/app/packages/core/signal/unfurl.ts@@ -21,7 +21,7 @@ type UnfurledLinkSuccess = {_createdAt: Date;};-export type UnfurledLinkData =+type UnfurledLinkData =| UnfurledLinkError| UnfurledLinkLoading| UnfurledLinkSuccess;@@ -116,7 +116,7 @@ function isCacheExpired(cached: UnfurledLinkData | undefined): boolean {);}-export type UnfurlFetcher = [+type UnfurlFetcher = [Accessor<UnfurledLinkData | undefined>,{refetch: () => void;@@ -168,7 +168,7 @@ export function useUnfurl(url: string | undefined): UnfurlFetcher {* Prefetch multiple URLs at once* Useful for preloading unfurls when you know multiple URLs will be needed*/-export function prefetchUnfurls(urls: string[]) {+function _prefetchUnfurls(urls: string[]) {const urlsToFetch = urls.filter((url) => isCacheExpired(unfurlStore[url]));if (urlsToFetch.length > 0) {@@ -179,6 +179,6 @@ export function prefetchUnfurls(urls: string[]) {/*** Get unfurl data from cache without triggering a fetch*/-export function getCachedUnfurl(url: string): UnfurledLinkData | undefined {+function _getCachedUnfurl(url: string): UnfurledLinkData | undefined {return unfurlStore[url];}diff --git a/js/app/packages/core/source.ts b/js/app/packages/core/source.tsindex 7b72bdc2e1..f4b1ecb3a6 100644--- a/js/app/packages/core/source.ts+++ b/js/app/packages/core/source.ts@@ -80,19 +80,15 @@ export type SourcePreload<T extends Record<string, any>> = {export type Source = SourceNotGenerated | SourceGenerated;-export function sourceName(- source: Source | SourcePreload<any>-): string | undefined {+function _sourceName(source: Source | SourcePreload<any>): string | undefined {return (source as WithName).name;}-export function sourceUpload(- source: Source | SourcePreload<any>-): File | undefined {+function _sourceUpload(source: Source | SourcePreload<any>): File | undefined {return (source as SourceDSSWithUpload).upload;}-export async function sourceToArrayBufferLike(+async function _sourceToArrayBufferLike(source: Source): Promise<ArrayBufferLike | undefined> {switch (source.type) {@@ -101,7 +97,7 @@ export async function sourceToArrayBufferLike(case 'buffer':return source.buffer;case 'gen': {- return sourceToArrayBufferLike(source.origin);+ return _sourceToArrayBufferLike(source.origin);}}return undefined;diff --git a/js/app/packages/core/state/liveIndicators.ts b/js/app/packages/core/state/liveIndicators.tsindex 1045bc1799..42247408dc 100644--- a/js/app/packages/core/state/liveIndicators.ts+++ b/js/app/packages/core/state/liveIndicators.ts@@ -7,9 +7,7 @@ import { z } from 'zod';type IndicatorStore = Record<string, string[]>;-export const [indicatorStore, setIndicatorStore] = createStore<IndicatorStore>(- {}-);+const [indicatorStore, setIndicatorStore] = createStore<IndicatorStore>({});type IncomingTrackingUpdate = {type: 'user_tracking_change';diff --git a/js/app/packages/core/store/cacheChannelInput.ts b/js/app/packages/core/store/cacheChannelInput.tsindex 939485ee7e..c0632b6f30 100644--- a/js/app/packages/core/store/cacheChannelInput.ts+++ b/js/app/packages/core/store/cacheChannelInput.ts@@ -6,9 +6,9 @@ import { createStore } from 'solid-js/store';export const STATIC_IMAGE = 'static/image' as const;export const STATIC_VIDEO = 'static/video' as const;-export type StaticImageType = typeof STATIC_IMAGE;-export type StaticVideoType = typeof STATIC_VIDEO;-export type StaticAttachmentType = StaticImageType | StaticVideoType;+type StaticImageType = typeof STATIC_IMAGE;+type StaticVideoType = typeof STATIC_VIDEO;+type StaticAttachmentType = StaticImageType | StaticVideoType;export function isStaticAttachmentType(value: any@@ -16,9 +16,9 @@ export function isStaticAttachmentType(return value === STATIC_IMAGE || value === STATIC_VIDEO;}-export type AttachmentType = BlockName | BlockAlias | StaticAttachmentType;+type AttachmentType = BlockName | BlockAlias | StaticAttachmentType;-export type InputAttachment = {+type InputAttachment = {id: string;name: string;blockName: AttachmentType;@@ -26,21 +26,20 @@ export type InputAttachment = {file?: File;};-export interface DraftMessage {+interface DraftMessage {content: string;attachments: InputAttachment[];lastModified: number;threadId?: string;}-export const [cachedChannelInputStore, setCachedChannelInputStore] =- makePersisted(- createStore<- Partial<{- [key: string]: DraftMessage | undefined;- }>- >({}),- {- name: 'cachedChannelInputStore',- }- );+const [_cachedChannelInputStore, _setCachedChannelInputStore] = makePersisted(+ createStore<+ Partial<{+ [key: string]: DraftMessage | undefined;+ }>+ >({}),+ {+ name: 'cachedChannelInputStore',+ }+);diff --git a/js/app/packages/core/store/userSession.ts b/js/app/packages/core/store/userSession.tsdeleted file mode 100644index 48222c8100..0000000000--- a/js/app/packages/core/store/userSession.ts+++ /dev/null@@ -1,3 +0,0 @@-import { createStore } from 'solid-js/store';--export const [userSession, setUserSession] = createStore();diff --git a/js/app/packages/core/types/index.ts b/js/app/packages/core/types/index.tsindex f0c45078c9..c374bf2a63 100644--- a/js/app/packages/core/types/index.ts+++ b/js/app/packages/core/types/index.ts@@ -16,12 +16,7 @@ export type Entity = {type: EntityType;};-export type { ApiPaginatedThreadCursor as ThreadPreview } from '@service-email/generated/schemas/apiPaginatedThreadCursor';-import type { NotifEvent } from '@service-notification/generated/schemas';export type NotificationType = NotifEvent['tag'] | 'call-started';-export type Nullable<T> = T | null;export type Maybe<T> = T | undefined;--export type MaybePromise<T> = T | Promise<T>;diff --git a/js/app/packages/core/types/utils.ts b/js/app/packages/core/types/utils.tsdeleted file mode 100644index f727f1dc0d..0000000000--- a/js/app/packages/core/types/utils.ts+++ /dev/null@@ -1,5 +0,0 @@-import { EntityType } from '@service-connection/generated/schemas';--export function isEntityType(type: string): type is EntityType {- return type in EntityType;-}diff --git a/js/app/packages/core/types/view.ts b/js/app/packages/core/types/view.tsindex 9b4d99a371..264243b409 100644--- a/js/app/packages/core/types/view.ts+++ b/js/app/packages/core/types/view.ts@@ -15,4 +15,3 @@ export type DefaultView = (typeof DEFAULT_VIEWS)[number];export type ViewId = DefaultView | string;/** equal to upper case View type for default view, otherwise a custom string label */-export type ViewLabel = string;diff --git a/js/app/packages/core/user/displayName.ts b/js/app/packages/core/user/displayName.tsindex 4ab337c33f..53b1adda98 100644--- a/js/app/packages/core/user/displayName.ts+++ b/js/app/packages/core/user/displayName.ts@@ -136,7 +136,7 @@ function useUserNameItem(id: MacroId) {return { getItem, refetch, mutate };}-export type DisplayNameParts = {+type DisplayNameParts = {firstName: () => string;lastName: () => string;fullName: () => string;diff --git a/js/app/packages/core/user/index.ts b/js/app/packages/core/user/index.tsindex 864d0247f7..7170db9697 100644--- a/js/app/packages/core/user/index.ts+++ b/js/app/packages/core/user/index.ts@@ -8,7 +8,6 @@ export {} from './combinedRecipient';export { useContacts } from './contactService';export {- type DisplayNameParts,seedMockDisplayNames,useDisplayName,useDisplayNameParts,@@ -16,7 +15,6 @@ export {export { useAugmentUserWithDmActivity } from './dmActivity';export {emailToMacroId,- isMacroId,type MacroId,macroIdToEmail,tryMacroId,diff --git a/js/app/packages/core/user/macroId.ts b/js/app/packages/core/user/macroId.tsindex a61e83f15e..df4f2e5fd8 100644--- a/js/app/packages/core/user/macroId.ts+++ b/js/app/packages/core/user/macroId.ts@@ -8,7 +8,7 @@ export type MacroId = string & { readonly [MacroIdBrand]: never };/*** Type guard to check if a string is a valid MacroId.*/-export function isMacroId(str: string): str is MacroId {+function isMacroId(str: string): str is MacroId {return str.startsWith('macro|') && str.slice(6).includes('@');}diff --git a/js/app/packages/core/user/types.ts b/js/app/packages/core/user/types.tsindex 41f840af14..164433139f 100644--- a/js/app/packages/core/user/types.ts+++ b/js/app/packages/core/user/types.ts@@ -4,12 +4,6 @@ import type { Accessor } from 'solid-js';export type { ChannelWithParticipants } from '@service-comms/generated/models';export type { ContactInfo } from '@service-email/generated/schemas';-export interface IOrganizationUser {- email: string;- id: string;- is_it_admin: boolean;-}-export type IUser = {id: string;email: string;diff --git a/js/app/packages/core/user/util.ts b/js/app/packages/core/user/util.tsindex 227867a49f..1c1b7e401f 100644--- a/js/app/packages/core/user/util.ts+++ b/js/app/packages/core/user/util.ts@@ -1,14 +1,7 @@import { useDisplayName } from './displayName';-import {- emailToMacroId,- type MacroId,- macroIdToEmail,- tryMacroId,-} from './macroId';+import { tryMacroId } from './macroId';import type { IUser } from './types';-export { emailToMacroId, type MacroId, macroIdToEmail, tryMacroId };-// TODO: consolidate idToEmail, see idToEmail in email.ts/*** Converts a user id to an email address.diff --git a/js/app/packages/core/util/authRedirect.ts b/js/app/packages/core/util/authRedirect.tsindex 3670a24990..5874be904e 100644--- a/js/app/packages/core/util/authRedirect.ts+++ b/js/app/packages/core/util/authRedirect.ts@@ -6,7 +6,7 @@ export interface RedirectLocation {import { useIsAuthenticated } from '@core/auth';import { createEffect } from 'solid-js';-export function useGotoLogin() {+function useGotoLogin() {const navigate = useNavigate();const location = useLocation<RedirectLocation>();@@ -24,7 +24,7 @@ export function useGotoLogin() {};}-export function useAuthRedirect() {+function _useAuthRedirect() {const isAuthenticated = useIsAuthenticated();const gotoLogin = useGotoLogin();diff --git a/js/app/packages/core/util/channels.ts b/js/app/packages/core/util/channels.tsindex 922d84a975..0df5124038 100644--- a/js/app/packages/core/util/channels.ts+++ b/js/app/packages/core/util/channels.ts@@ -23,12 +23,12 @@ type NavigationOptions = {mergeHistory?: boolean;};-export type SendToUsersArgs = SendContent & {+type SendToUsersArgs = SendContent & {users: string[];navigate?: NavigationOptions;};-export type SendToChannelArgs = SendContent & {+type SendToChannelArgs = SendContent & {channelId: string;navigate?: NavigationOptions;};diff --git a/js/app/packages/core/util/compareUtils.ts b/js/app/packages/core/util/compareUtils.tsindex 640351874b..ff2874a777 100644--- a/js/app/packages/core/util/compareUtils.ts+++ b/js/app/packages/core/util/compareUtils.ts@@ -19,7 +19,7 @@ export function arrayEquals(return true;}-export function mergeByKey<T extends Record<string, any>, K extends keyof T>(+function _mergeByKey<T extends Record<string, any>, K extends keyof T>(key: K,...lists: T[][]): T[] {@@ -33,7 +33,7 @@ export function mergeByKey<T extends Record<string, any>, K extends keyof T>(return Array.from(map.values());}-export function mapFromListsByKey<T extends Record<string, any>>(+function _mapFromListsByKey<T extends Record<string, any>>(extractor: (item: T) => string,...lists: T[][]): Map<string, T> {@@ -47,10 +47,7 @@ export function mapFromListsByKey<T extends Record<string, any>>(return map;}-export function uniqueByKey<T>(- items: readonly T[],- keyOf: (item: T) => string-): T[] {+function uniqueByKey<T>(items: readonly T[], keyOf: (item: T) => string): T[] {const map = new Map<string, T>();for (const item of items) {const key = keyOf(item);@@ -59,7 +56,7 @@ export function uniqueByKey<T>(return [...map.values()];}-export function uniqueByKeySorted<T>(+function _uniqueByKeySorted<T>(items: readonly T[],keyOf: (item: T) => string): T[] {diff --git a/js/app/packages/core/util/containedClientRect.ts b/js/app/packages/core/util/containedClientRect.tsdeleted file mode 100644index cd58ab0cc1..0000000000--- a/js/app/packages/core/util/containedClientRect.ts+++ /dev/null@@ -1,77 +0,0 @@-/**- * Now that blocks are css containers, they reset the fixed positioning context for- * their children. When we use getBoundingClientRect + fixed on elements inside a block,- * we get the wrong position. Bounding client rect is relative to the viewport. position: fixed top- * and bottom are realative to the block container. This function naievely does one layer- * of offsetParent tracking to get the correct rect- * TODO: seamus handled nested containers.- */--/**- * From MDN:- * If the position property is absolute or fixed, the containing block may also be formed by the- * edge of the padding box of the nearest ancestor element that has any of the following:- * - A filter, backdrop-filter, transform, or perspective value other than none.- * - A contain value of layout, paint, strict or content(e.g., contain: paint;).- * - A container-type value other than normal.- * - A will-change value containing a property for which a non-initial value would- * form a containing block(e.g., filter or transform).- * - A content-visibility value of auto.- */-function isFixedPositionReset(element: HTMLElement) {- const style = window.getComputedStyle(element);- if (- style.filter !== 'none' ||- style.backdropFilter !== 'none' ||- style.transform !== 'none' ||- style.perspective !== 'none' ||- style.contain === 'layout' ||- style.contain === 'paint' ||- style.contain === 'strict' ||- style.containerType !== 'normal' ||- style.willChange === 'transform' ||- style.willChange === 'perspective' ||- style.willChange === 'filter' ||- style.willChange === 'backdrop-filter' ||- style.contentVisibility === 'auto'- ) {- return true;- }- return false;-}--/**- * If a fixed-position component relies on getBoundingClientRect to determine its position- * and is mounted inside a block, it will return the wrong position. This function return a- * compensated rect.- */-export function containedClientRect(element: HTMLElement) {- const rect = element.getBoundingClientRect();- let parent = element.parentElement;- while (parent) {- if (isFixedPositionReset(parent)) {- const parentRect = parent.getBoundingClientRect();- const x = rect.x - parentRect.left;- const y = rect.y - parentRect.top;- const { width, height } = rect;- return DOMRect.fromRect({ x, y, width, height });- }- parent = parent.parentElement;- }- return rect;-}--/**- * Get the closest layout-fixed-breaking parent DOMRect of an element.- */-export function getContainerRect(element: HTMLElement) {- let parent = element.parentElement;- while (parent) {- if (isFixedPositionReset(parent)) {- const parentRect = parent.getBoundingClientRect();- return parentRect;- }- parent = parent.parentElement;- }- return document.body.getBoundingClientRect();-}diff --git a/js/app/packages/core/util/cookies.ts b/js/app/packages/core/util/cookies.tsindex 6c5c84fa3e..ffa2d9f5ed 100644--- a/js/app/packages/core/util/cookies.ts+++ b/js/app/packages/core/util/cookies.ts@@ -1,13 +1,13 @@-export const LOGIN_COOKIE_AGE = 2592000; // 1 month in seconds+const LOGIN_COOKIE_AGE = 2592000; // 1 month in seconds-export type CookieOptions = {+type CookieOptions = {expires?: Date;maxAge?: number;path?: string;sameSite?: string;};-export type LoginCookieOptions = {+type LoginCookieOptions = {value: 'true' | 'false';expires: Date;maxAge: number;diff --git a/js/app/packages/core/util/csv.ts b/js/app/packages/core/util/csv.tsindex 53a08174c4..cf88118738 100644--- a/js/app/packages/core/util/csv.ts+++ b/js/app/packages/core/util/csv.ts@@ -1,4 +1,4 @@-export type CsvParseResult<TRecord extends Record<string, string>> =+type CsvParseResult<TRecord extends Record<string, string>> =| {ok: true;headers: readonly string[];diff --git a/js/app/packages/core/util/date.ts b/js/app/packages/core/util/date.tsindex 46a513be11..85ec7645fa 100644--- a/js/app/packages/core/util/date.ts+++ b/js/app/packages/core/util/date.ts@@ -13,7 +13,7 @@ export type DateValue = Date | string;const EPOCH_ZERO = new Date(0);-export interface FormatDateOptions {+interface FormatDateOptions {/** IANA timezone string (e.g., 'America/New_York', 'UTC'). Defaults to system timezone. */timeZone?: string;/** If true, always include time in the output (e.g., 'Thursday at 4:53 PM' instead of 'Thursday'). */diff --git a/js/app/packages/core/util/dateParser.ts b/js/app/packages/core/util/dateParser.tsindex 167a7ce64b..d8aca92564 100644--- a/js/app/packages/core/util/dateParser.ts+++ b/js/app/packages/core/util/dateParser.ts@@ -48,7 +48,7 @@ const MONTH_ABBR = ['dec',];-export function parseDateString(input: string): ParsedDate | null {+function parseDateString(input: string): ParsedDate | null {const normalized = input.toLowerCase().trim();const today = new Date();today.setHours(0, 0, 0, 0);@@ -312,7 +312,7 @@ export function formatDate(date: Date): string {return date.toLocaleDateString('en-US', options);}-export function getDateSuggestions(input: string): ParsedDate[] {+function _getDateSuggestions(input: string): ParsedDate[] {const suggestions: ParsedDate[] = [];const normalized = input.toLowerCase().trim();diff --git a/js/app/packages/core/util/dateSearch/presets.ts b/js/app/packages/core/util/dateSearch/presets.tsindex 69eb79266f..68e93bfe1e 100644--- a/js/app/packages/core/util/dateSearch/presets.ts+++ b/js/app/packages/core/util/dateSearch/presets.ts@@ -1,6 +1,6 @@import { addDays, addWeeks, endOfDay, endOfWeek } from 'date-fns';-export interface DatePreset {+interface DatePreset {id: string;label: string;shortLabel?: string;@@ -9,7 +9,7 @@ export interface DatePreset {category?: 'quick' | 'week' | 'month' | 'year';}-export const DATE_PRESETS: DatePreset[] = [+const DATE_PRESETS: DatePreset[] = [{id: 'today',label: 'Today',diff --git a/js/app/packages/core/util/debounce.ts b/js/app/packages/core/util/debounce.tsindex aa47facbd8..8e4680d69b 100644--- a/js/app/packages/core/util/debounce.ts+++ b/js/app/packages/core/util/debounce.ts@@ -52,7 +52,7 @@ export function throttledDependent<T>(source: () => T, delay = 150): () => T {* @param delay the delay time in ms* @returns a derived signal*/-export function laggedGate(source: () => boolean, delay = 300): () => boolean {+function _laggedGate(source: () => boolean, delay = 300): () => boolean {const [follow, setFollow] = createSignal(source());const up = solidDebounce(() => setFollow(true), delay);createEffect(() => {@@ -81,10 +81,7 @@ export function laggedGate(source: () => boolean, delay = 300): () => boolean {* @param delay the delay time in ms* @returns a derived signal*/-export function deferredGate(- source: () => boolean,- delay = 300-): () => boolean {+function _deferredGate(source: () => boolean, delay = 300): () => boolean {const [follow, setFollow] = createSignal(false);const up = solidDebounce(() => setFollow(true), delay);createEffect(() => {@@ -110,7 +107,7 @@ export function deferredGate(* @param delay the delay time in ms* @returns a derived signal*/-export function stickyGate(source: () => boolean, delay = 300): () => boolean {+function _stickyGate(source: () => boolean, delay = 300): () => boolean {const [follow, setFollow] = createSignal(source());const down = solidDebounce(() => setFollow(false), delay);createEffect(() => {diff --git a/js/app/packages/core/util/estimateTextHeight.ts b/js/app/packages/core/util/estimateTextHeight.tsdeleted file mode 100644index 26e2b95e3a..0000000000--- a/js/app/packages/core/util/estimateTextHeight.ts+++ /dev/null@@ -1,129 +0,0 @@-interface TwStyle {- [key: string]: string | number | TwStyle;-}--const WIDEST_GLYPHS = ['W', 'M', '@'];-const TALLEST_GLPYHS = '/@#|]'; // judging height can be a contiguous string since the height will be based on the tallest--type Dim = [width: number, height: number];-type Dims = { heightPadding: number; glyph: Dim };--declare global {- var maxDimPx: Map<string, Dims>;-}--// key: fontClass, value: estimated glyph dimensions in px and associated padding in px-globalThis.maxDimPx = new Map<string, Dims>();--function calculatePxHeight(- textLength: number,- maxDimPx: Dims,- containerWidthPx: number-) {- const [width, height] = maxDimPx.glyph;- const lineCount = (textLength * width) / containerWidthPx;- return Math.ceil(lineCount * height) + maxDimPx.heightPadding;-}--function estimateTextHeight_(- text: string,- fontStyleName: string,- containerWidthPx: number,- fontStyle?: TwStyle,- fontCss?: string-) {- const cachedDims = globalThis.maxDimPx.get(fontStyleName);- if (cachedDims)- return calculatePxHeight(text.length, cachedDims, containerWidthPx);-- const el = document.createElement('div');- if (fontCss) el.className = fontCss;- el.style.position = 'absolute';- el.style.left = '-9999px';- el.style.whiteSpace = 'normal';- Object.assign(el.style, fontStyle);- document.body.appendChild(el);- const heightPadding = el.clientHeight;- const widthPadding = el.clientWidth;- el.innerText = TALLEST_GLPYHS;-- el.style.margin = '';- el.style.padding = '';- el.style.position = 'absolute';- el.style.left = '-9999px';- el.style.whiteSpace = 'normal';-- let maxWidth = 0;- for (const glpyh of WIDEST_GLYPHS) {- el.innerText = glpyh;- maxWidth = Math.max(- fontStyle ? el.clientWidth : el.clientWidth - widthPadding,- maxWidth- );- }-- el.style.position = 'absolute';- el.style.left = '-9999px';- el.style.whiteSpace = 'normal';- Object.assign(el.style, fontStyle);- el.style.margin = '';- el.style.padding = '';- el.style.width = `${containerWidthPx}px`;- el.innerText = TALLEST_GLPYHS;- const maxHeight = fontStyle- ? el.clientHeight- : el.clientHeight - heightPadding;- document.body.removeChild(el);-- const measuredDims: Dims = { glyph: [maxWidth, maxHeight], heightPadding };- globalThis.maxDimPx.set(fontStyleName, measuredDims);- return calculatePxHeight(text.length, measuredDims, containerWidthPx);-}--/**- * Estimates the height of a given text, considering the specified font name, font size, and container width.- * The results are cached within a margin of error, determined by the width of the widest/tallest character in the given font and size.- *- * @param text The string of text.- * @param fontStyleName unique name for style- * @param fontStyle The matching tw``- * @param containerWidth The width of the container for the text in pixels.- * @returns The estimated height of the text in pixels.- *- * @example Using twin.macro, estimateTextHeight('Macronauts assemble!', tw`text-sm font-bold`, 200)- */-export function estimateTextHeight(- text: string,- fontStyleName: string,- fontStyle: TwStyle,- containerWidthPx: number-): number {- return estimateTextHeight_(text, fontStyleName, containerWidthPx, fontStyle);-}--/**- * Estimates the height of a given text, considering the specified font name, font size, and container width.- * The results are cached within a margin of error, determined by the width of the widest/tallest character in the given font and size.- *- * @param text The string of text.- * @param fontStyleName unique name for style- * @param fontCss The CSS class- * @param containerWidth The width of the container for the text in pixels.- * @returns The estimated height of the text in pixels.- *- * @example Using twin.macro, estimateTextHeight('Macronauts assemble!', tw`text-sm font-bold`, 200)- */-export function estimateTextHeightCss(- text: string,- fontStyleName: string,- fontCss: string,- containerWidthPx: number-): number {- return estimateTextHeight_(- text,- fontStyleName,- containerWidthPx,- undefined,- fontCss- );-}diff --git a/js/app/packages/core/util/flatten.ts b/js/app/packages/core/util/flatten.tsindex 9d7cbc80e5..bc2e74f819 100644--- a/js/app/packages/core/util/flatten.ts+++ b/js/app/packages/core/util/flatten.ts@@ -11,4 +11,3 @@ export type FlattenObject<T> = T extends infer O* FlattenArray<string[]> = string* FlattenArray<string> = string**/-export type FlattenArray<Type> = Type extends Array<infer Item> ? Item : Type;diff --git a/js/app/packages/core/util/freshSort.ts b/js/app/packages/core/util/freshSort.tsindex d70fd90af2..43451fba07 100644--- a/js/app/packages/core/util/freshSort.ts+++ b/js/app/packages/core/util/freshSort.ts@@ -262,7 +262,7 @@ function freshSort<T>(return scoredResults;}-export interface CreateFreshSearchArgs<T> {+interface CreateFreshSearchArgs<T> {config?: FreshSortConfig<T>;getName: NameFn<T>;isChannelItem?: BooleanFn<T>;@@ -361,7 +361,7 @@ export function createFreshSearch<T>({* @param boost - The boost multiplier to apply (default: 0.5 for +50% boost)* @param getEmail - Function to extract email from item (default: assumes item.data.email)*/-export function createSameDomainBoostFn<T>(+function createSameDomainBoostFn<T>(currentUserDomain: Accessor<string | undefined>,boost: number = 0.5,getEmail: EmailFn<T>diff --git a/js/app/packages/core/util/fuzzy.ts b/js/app/packages/core/util/fuzzy.tsindex 20cab30974..189d5c76d3 100644--- a/js/app/packages/core/util/fuzzy.ts+++ b/js/app/packages/core/util/fuzzy.ts@@ -1,11 +1,6 @@import uFuzzy from '@leeoniya/ufuzzy';-export interface FuzzyNameMatchResult {- nameHighlight: string;- score: number;-}--export interface FuzzyNameMatchResultWithItem<T> {+interface FuzzyNameMatchResultWithItem<T> {item: T;nameHighlight: string;score: number;@@ -180,7 +175,7 @@ export function fuzzyFilter<T>(* Tests if text matches a fuzzy query.* Returns true if query is empty or matches.*/-export function fuzzyTest(query: string, text: string): boolean {+function fuzzyTest(query: string, text: string): boolean {if (!query) return true;const haystack = [text];diff --git a/js/app/packages/core/util/getActualTarget.ts b/js/app/packages/core/util/getActualTarget.tsdeleted file mode 100644index 1e4965246b..0000000000--- a/js/app/packages/core/util/getActualTarget.ts+++ /dev/null@@ -1,7 +0,0 @@-export function getActualTarget(e: KeyboardEvent): HTMLElement | null {- const path = e.composedPath();- for (const node of path) {- if (node instanceof HTMLElement) return node;- }- return null;-}diff --git a/js/app/packages/core/util/getMimeType.ts b/js/app/packages/core/util/getMimeType.tsdeleted file mode 100644index 19b4756466..0000000000--- a/js/app/packages/core/util/getMimeType.ts+++ /dev/null@@ -1,52 +0,0 @@-// Map file extension to MIME type-export const getMimeType = (ext: string) => {- switch (ext.toLowerCase()) {- case '.txt':- return 'text/plain';- case '.js':- return 'application/javascript';- case '.jsx':- return 'text/jsx';- case '.ts':- return 'application/typescript';- case '.tsx':- return 'text/tsx';- case '.json':- return 'application/json';- case '.html':- return 'text/html';- case '.css':- return 'text/css';- case '.md':- return 'text/markdown';- case '.py':- return 'text/x-python';- case '.java':- return 'text/x-java-source';- case '.c':- return 'text/x-c';- case '.cpp':- return 'text/x-c++';- case '.rs':- return 'text/rust';- case '.go':- return 'text/x-go';- case '.rb':- return 'text/ruby';- case '.php':- return 'application/x-httpd-php';- case '.sql':- return 'application/sql';- case '.xml':- return 'application/xml';- case '.yaml':- case '.yml':- return 'application/x-yaml';- case '.pdf':- return 'application/pdf';- case '.docx':- return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';- default:- return 'text/plain';- }-};diff --git a/js/app/packages/core/util/inViewport.ts b/js/app/packages/core/util/inViewport.tsdeleted file mode 100644index 8667925aa1..0000000000--- a/js/app/packages/core/util/inViewport.ts+++ /dev/null@@ -1,14 +0,0 @@-export function isElementInViewport(el: HTMLElement) {- const rect = el.getBoundingClientRect();-- return (- rect.top >= 0 &&- rect.left >= 0 &&- rect.bottom <=- (window.innerHeight ||- document.documentElement.clientHeight) /* or $(window).height() */ &&- rect.right <=- (window.innerWidth ||- document.documentElement.clientWidth) /* or $(window).width() */- );-}diff --git a/js/app/packages/core/util/isInteractiveElement.ts b/js/app/packages/core/util/isInteractiveElement.tsdeleted file mode 100644index eeafd65a1d..0000000000--- a/js/app/packages/core/util/isInteractiveElement.ts+++ /dev/null@@ -1,50 +0,0 @@-export function isInteractiveElement(el: Element | null): boolean {- if (!el) return false;-- // 1. Custom flags (your existing logic)- if ((el as any).$$click || (el as any).$$keydown) return true;-- const tag = el.tagName.toLowerCase();-- // 2. Native interactive HTML elements- const nativeInteractive = [- 'button',- 'input',- 'select',- 'textarea',- 'option',- 'summary',- 'details',- ];- if (nativeInteractive.includes(tag)) return true;-- // <a href="...">- if (tag === 'a' && (el as HTMLAnchorElement).href) return true;-- // 3. contenteditable- if ((el as HTMLElement).isContentEditable) return true;-- // 4. Tabindex-able elements (keyboard focusable)- const tabIndex = (el as HTMLElement).tabIndex;- if (tabIndex >= 0) return true;-- // 5. ARIA interactive roles- const ariaRole = el.getAttribute('role');- const interactiveRoles = new Set([- 'button',- 'link',- 'checkbox',- 'menuitem',- 'option',- 'radio',- 'slider',- 'spinbutton',- 'switch',- 'textbox',- 'combobox',- 'tab',- ]);- if (ariaRole && interactiveRoles.has(ariaRole)) return true;-- return false;-}diff --git a/js/app/packages/core/util/languageQuery.ts b/js/app/packages/core/util/languageQuery.tsindex 1b47fdceff..e2a2231536 100644--- a/js/app/packages/core/util/languageQuery.ts+++ b/js/app/packages/core/util/languageQuery.ts@@ -28,7 +28,7 @@ export function isCodeEditorExtensionSupported(extension: string): boolean {/*** Check if an extension is supported by markdown code-boxes.*/-export function isMarkdownExtensionSupported(extension: string): boolean {+function _isMarkdownExtensionSupported(extension: string): boolean {return lexicalExtensionSupported(extension);}@@ -42,7 +42,7 @@ export function isCodeEditorLanguageSupported(language: string): boolean {/*** Check if a language is supported by markdown code-boxes.*/-export function isMarkdownLanguageSupported(language: string): boolean {+function _isMarkdownLanguageSupported(language: string): boolean {return lexicalLanguageSupported(language);}diff --git a/js/app/packages/core/util/linearImport.ts b/js/app/packages/core/util/linearImport.tsindex 4f44003190..ba84950824 100644--- a/js/app/packages/core/util/linearImport.ts+++ b/js/app/packages/core/util/linearImport.ts@@ -5,7 +5,7 @@ import {import { EntityType } from '@service-storage/generated/schemas/entityType';import type { PropertyInput } from '@service-storage/generated/schemas/propertyInput';-export const LINEAR_CSV_HEADERS = {+const LINEAR_CSV_HEADERS = {title: 'Title',description: 'Description',status: 'Status',@@ -105,7 +105,7 @@ function parseLinearStatusOptionId(args: {return PROPERTY_OPTION_IDS.STATUS.NOT_STARTED;}-export type MacroTaskDraft = {+type MacroTaskDraft = {title: string;content: string;propertyValues: PropertyInput[];diff --git a/js/app/packages/core/util/list.ts b/js/app/packages/core/util/list.tsindex 661eebd2c9..b736e2f190 100644--- a/js/app/packages/core/util/list.ts+++ b/js/app/packages/core/util/list.ts@@ -29,11 +29,7 @@ export async function filterMapAsync<T, U>(return results;}-export function intersection<T>(- a: T[],- b: T[],- equal: (a: T, b: T) => boolean-): T[] {+function _intersection<T>(a: T[], b: T[], equal: (a: T, b: T) => boolean): T[] {return a.filter((item) => b.some((other) => equal(item, other)));}diff --git a/js/app/packages/core/util/modalUtils.ts b/js/app/packages/core/util/modalUtils.tsdeleted file mode 100644index 998f12aebf..0000000000--- a/js/app/packages/core/util/modalUtils.ts+++ /dev/null@@ -1,133 +0,0 @@-/**- * Modal positioning and viewport constraint utilities- */--export type ModalPosition = {- top: number;- left: number;-};--/**- * Constrains a modal position to stay within viewport bounds- * @param position The desired position- * @param modalWidth Width of the modal- * @param modalHeight Height of the modal- * @param margin Minimum margin from viewport edges (default: 16px)- * @returns Constrained position that fits within viewport- */-export const constrainModalToViewport = (- position: { top: number; left: number },- modalWidth: number,- modalHeight: number,- margin: number = 16-): { top: number; left: number } => {- const viewportWidth = window.innerWidth;- const viewportHeight = window.innerHeight;-- let { top, left } = position;-- // Constrain horizontally- if (left + modalWidth > viewportWidth - margin) {- left = viewportWidth - modalWidth - margin;- }- if (left < margin) {- left = margin;- }-- // Constrain vertically- if (top + modalHeight > viewportHeight - margin) {- top = viewportHeight - modalHeight - margin;- }- if (top < margin) {- top = margin;- }-- return { top: Math.max(margin, top), left: Math.max(margin, left) };-};--/**- * Calculates optimal modal position relative to a trigger element- * @param triggerElement The element that triggered the modal- * @param modalWidth Width of the modal- * @param modalHeight Height of the modal- * @param margin Minimum margin from viewport edges- * @returns Optimal position that avoids going off-screen- */-export const calculateModalPosition = (- triggerElement: HTMLElement,- modalWidth: number,- modalHeight: number,- margin: number = 16-): ModalPosition => {- const triggerRect = triggerElement.getBoundingClientRect();- const viewportWidth = window.innerWidth;- const viewportHeight = window.innerHeight;-- // Position to the left of the trigger button by default- let left = triggerRect.left - modalWidth - 8; // 8px gap to the left of trigger- let top = triggerRect.top;-- // If positioning to the left would go off-screen, try positioning to the right- if (left < margin) {- left = triggerRect.right + 8; // 8px gap to the right of trigger- }-- // If positioning to the right would still go off-screen, center horizontally- if (left + modalWidth > viewportWidth - margin) {- left = Math.max(margin, (viewportWidth - modalWidth) / 2);- }-- // Adjust vertical position if modal would go off-screen- if (top + modalHeight > viewportHeight - margin) {- // Try positioning above the trigger element- top = triggerRect.top - modalHeight - 8;-- // If that would go off-screen at the top, position at the bottom with margin- if (top < margin) {- top = viewportHeight - modalHeight - margin;- }- }-- // Use constraint utility for final bounds check- return constrainModalToViewport(- { top, left },- modalWidth,- modalHeight,- margin- );-};--/**- * CSS utility classes for ensuring modals stay within viewport- */-export const MODAL_VIEWPORT_CLASSES =- 'min-h-0 min-w-0 max-w-[calc(100vw-2rem)] max-h-[calc(100vh-2rem)]';--/**- * Creates a window resize handler that repositions a modal element- * @param modalElement The modal DOM element- * @param originalPosition The original calculated position- * @param modalWidth Width of the modal- * @param modalHeight Height of the modal- * @returns Cleanup function to remove the resize listener- */-export const createModalResizeHandler = (- modalElement: HTMLElement,- originalPosition: { top: number; left: number },- modalWidth: number,- modalHeight: number-): (() => void) => {- const handleResize = () => {- const constrainedPosition = constrainModalToViewport(- originalPosition,- modalWidth,- modalHeight- );-- modalElement.style.top = `${constrainedPosition.top}px`;- modalElement.style.left = `${constrainedPosition.left}px`;- };-- window.addEventListener('resize', handleResize);- return () => window.removeEventListener('resize', handleResize);-};diff --git a/js/app/packages/core/util/platform.ts b/js/app/packages/core/util/platform.tsindex 590d5deaf9..3fcdb731f0 100644--- a/js/app/packages/core/util/platform.ts+++ b/js/app/packages/core/util/platform.ts@@ -1,7 +1,7 @@import { type as osType } from '@tauri-apps/plugin-os';-export type MacroPlatform = 'web' | 'desktop' | 'ios' | 'android';-export type NativeMobilePlatform = Extract<MacroPlatform, 'ios' | 'android'>;+type MacroPlatform = 'web' | 'desktop' | 'ios' | 'android';+type NativeMobilePlatform = Extract<MacroPlatform, 'ios' | 'android'>;let cached: MacroPlatform | undefined;@@ -25,17 +25,15 @@ export function isPlatform(target: MacroPlatform | MacroPlatform[]): boolean {: platform === target;}-export function isMobilePlatform(): boolean;-export function isMobilePlatform(+function isMobilePlatform(): boolean;+function isMobilePlatform(platform: MacroPlatform): platform is NativeMobilePlatform;-export function isMobilePlatform(- platform: MacroPlatform = getPlatform()-): boolean {+function isMobilePlatform(platform: MacroPlatform = getPlatform()): boolean {return platform === 'ios' || platform === 'android';}-export function isDesktopPlatform(): boolean {+function _isDesktopPlatform(): boolean {return isPlatform('desktop');}diff --git a/js/app/packages/core/util/relativeTime.ts b/js/app/packages/core/util/relativeTime.tsdeleted file mode 100644index c888bd6f7f..0000000000--- a/js/app/packages/core/util/relativeTime.ts+++ /dev/null@@ -1,10 +0,0 @@-// this uses a shared instance of Intl.DateTimeFormat which is costly to create (100ms+)-// see: https://github.com/moment/luxon/issues/352-const relativeDateFormat = new Intl.DateTimeFormat('en-US', {- dateStyle: 'long',- timeStyle: 'short',-});-export function relativeTime(date: string) {- if (date.length === 0) return '';- return relativeDateFormat.format(new Date(date.split(',')[0]));-}diff --git a/js/app/packages/core/util/scroll-intent.ts b/js/app/packages/core/util/scroll-intent.tsindex b40a1a0b08..a46154a843 100644--- a/js/app/packages/core/util/scroll-intent.ts+++ b/js/app/packages/core/util/scroll-intent.ts@@ -7,7 +7,7 @@ const INTERACTION_TIMEOUT_MS = 300;export type ScrollDirection = 'up' | 'down';-export type ScrollIntentTracker = {+type ScrollIntentTracker = {/*** Signal that a user-initiated navigation is about to cause a* programmatic scroll (e.g. hotkey-driven `scrollToId`).diff --git a/js/app/packages/core/util/searchHighlight.tsx b/js/app/packages/core/util/searchHighlight.tsxindex f3d4f627c2..f7da719f18 100644--- a/js/app/packages/core/util/searchHighlight.tsx+++ b/js/app/packages/core/util/searchHighlight.tsx@@ -86,7 +86,7 @@ export function mergeAdjacentMacroEmTags(highlightedContent: string): string {}/** Escapes regex special characters in a string. */-export function escapeRegex(s: string): string {+function escapeRegex(s: string): string {return s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');}@@ -94,9 +94,7 @@ export function escapeRegex(s: string): string {* Builds a case-insensitive global RegExp that matches any of the given* terms as a single capture group. Returns `undefined` if `terms` is empty.*/-export function buildTermsPattern(- terms: readonly string[]-): RegExp | undefined {+function buildTermsPattern(terms: readonly string[]): RegExp | undefined {if (terms.length === 0) return undefined;return new RegExp(`(${terms.map(escapeRegex).join('|')})`, 'gi');}diff --git a/js/app/packages/core/util/sort.ts b/js/app/packages/core/util/sort.tsdeleted file mode 100644index b4093429b0..0000000000--- a/js/app/packages/core/util/sort.ts+++ /dev/null@@ -1,84 +0,0 @@-import { useUserId } from '@core/context/user';-import type { Item } from '@service-storage/generated/schemas/item';--export type SortType =- | 'name'- | 'updatedAt'- | 'createdAt'- | 'owner'- | 'deletedAt';-export type SortDirection = 'asc' | 'desc';-export type SortPair = [SortType, SortDirection];--export const sortEquals = (a: SortPair, b: SortPair) => {- return a[0] === b[0] && a[1] === b[1];-};--export const defaultFileSortPair: SortPair = ['updatedAt', 'desc'];--// NOTE: we have to use the array references for sortpair as it checks for reference equality-export const fileSortLabels: Map<SortPair, string> = new Map([- [['name', 'asc'], 'Name'],- [['updatedAt', 'desc'], 'Modified'],- [['createdAt', 'desc'], 'Created'],-]);--function getSortProperty(item: Item, sort: SortType) {- switch (sort) {- case 'name': {- return item.name.toLowerCase();- }- case 'updatedAt': {- return item.updatedAt;- }- case 'createdAt': {- return item.createdAt;- }- case 'deletedAt': {- return item.deletedAt;- }- case 'owner': {- return item.type === 'document' ? item.owner : item.userId;- }- default:- console.error('Invalid sort type', sort);- return 0;- }-}--export function sortItems(- a: Item,- b: Item,- sort: SortType,- direction: SortDirection,- options?: {- showProjectsFirst?: boolean;- }-) {- if (options?.showProjectsFirst) {- if (a.type === 'project' && b.type !== 'project') return -1;- if (a.type !== 'project' && b.type === 'project') return 1;- }-- const aProp = getSortProperty(a, sort);- const bProp = getSortProperty(b, sort);-- if (sort === 'owner') {- const userId = useUserId();- if (aProp === userId() && bProp !== userId())- return direction === 'asc' ? -1 : 1;- if (aProp !== userId() && bProp === userId())- return direction === 'asc' ? 1 : -1;- }-- let cmp;-- if (typeof aProp === 'string' && typeof bProp === 'string') {- cmp = aProp.localeCompare(bProp);- } else {- cmp = (aProp ?? 0) > (bProp ?? 0) ? 1 : -1;- }-- if (direction === 'desc') cmp *= -1;- return cmp;-}diff --git a/js/app/packages/core/util/string.ts b/js/app/packages/core/util/string.tsindex 002fb08bff..bf01bf13ce 100644--- a/js/app/packages/core/util/string.ts+++ b/js/app/packages/core/util/string.ts@@ -12,7 +12,7 @@ export function truncateString(str: string, maxLength: number) {return str.slice(0, maxLength) + '...';}-export const DEFAULT_LABEL_MAX_CHARS = 30;+const DEFAULT_LABEL_MAX_CHARS = 30;/*** Truncates a display label to a max character count, appending a singlediff --git a/js/app/packages/core/util/taskCreation.ts b/js/app/packages/core/util/taskCreation.tsindex b377e0aeda..78ce9837d7 100644--- a/js/app/packages/core/util/taskCreation.ts+++ b/js/app/packages/core/util/taskCreation.ts@@ -11,16 +11,16 @@ import { createTask } from './create';* Small buffer accounts for possible Unicode version differences between* JS Intl.Segmenter and Rust's unicode-segmentation crate.*/-export const MAX_TASK_NAME_LENGTH = 97;+const MAX_TASK_NAME_LENGTH = 97;-export type TaskData = {+type TaskData = {title: string;rawMarkdown: string;assigneeUserIds: string[];dueDate: Date | null;};-export type TaskCreationOptions = {+type TaskCreationOptions = {currentUserId?: string;parentTaskId?: string;};diff --git a/js/app/packages/core/util/taskExtraction.ts b/js/app/packages/core/util/taskExtraction.tsindex 409b185076..a001d7ae41 100644--- a/js/app/packages/core/util/taskExtraction.ts+++ b/js/app/packages/core/util/taskExtraction.ts@@ -9,14 +9,14 @@ import {extractUserMentions,} from '@core/component/LexicalMarkdown/plugins/checkbox-to-task/checkboxParsing';-export { extractDateMention, extractTitleFromMarkdown, extractUserMentions };+export { extractUserMentions };/*** Represents a potential task extracted from markdown text.* Unlike ParsedCheckbox (which requires Lexical node context),* this works with raw markdown strings.*/-export type PotentialTask = {+type PotentialTask = {/** Line index in the source markdown (0-based) */lineIndex: number;/** Cleaned title without mentions */diff --git a/js/app/packages/core/util/threeColumnLayout.ts b/js/app/packages/core/util/threeColumnLayout.tsindex 69ce8e0901..5b69560ca0 100644--- a/js/app/packages/core/util/threeColumnLayout.ts+++ b/js/app/packages/core/util/threeColumnLayout.ts@@ -8,7 +8,7 @@ export interface ThreeColumnLayout {marginWidth: number;}-export interface ThreeColumnConfig {+interface ThreeColumnConfig {gutterPx: number;minLeftColumnWidth: number;minRightColumnWidth: number;@@ -16,7 +16,7 @@ export interface ThreeColumnConfig {rightHandWidth: number;}-export const resizeColumns = (+const _resizeColumns = (centerWidth: number | undefined,windowWidth: number | undefined,oldColumns: ThreeColumnLayout,diff --git a/js/app/packages/core/util/time.ts b/js/app/packages/core/util/time.tsindex 03b83694e8..a6c5933862 100644--- a/js/app/packages/core/util/time.ts+++ b/js/app/packages/core/util/time.ts@@ -40,7 +40,7 @@ export function formatRelativeDate(value: DateValue): string {* @param value Date object or ISO date string to format* @returns Time string like "4:26 PM" or "12:30 PM"*/-export function formatTime(value: DateValue): string {+function _formatTime(value: DateValue): string {const date = value instanceof Date ? value : new Date(value);return date.toLocaleTimeString('en-US', {hour: 'numeric',diff --git a/js/app/packages/core/util/unwrapSignals.ts b/js/app/packages/core/util/unwrapSignals.tsdeleted file mode 100644index 5224fa263a..0000000000--- a/js/app/packages/core/util/unwrapSignals.ts+++ /dev/null@@ -1,43 +0,0 @@-import type { Signal } from 'solid-js';--/**- * Recursively unwraps SolidJS signals inside any object or array.- * Also renames keys ending in "Signal" → base name (e.g. "layoutSignal" → "layout").- */-export function unwrapSignals<T>(value: Record<string, any>): T {- if (value == null) return value;-- // Detect signal accessor form: function with .value (rare, internal)- if (typeof value === 'function' && 'value' in value) {- return (value as any)();- }-- // Detect signal tuple [getter, setter]- if (- Array.isArray(value) &&- value.length === 2 &&- value.every((v) => typeof v === 'function')- ) {- // @ts-ignore- return (value as Signal<unknown>)[0]();- }-- // If it's an array of data, unwrap each item- if (Array.isArray(value)) {- return value.map(unwrapSignals) as T;- }-- // If it's an object, unwrap each key- if (typeof value === 'object') {- const result: Record<string, any> = {};- for (const [key, val] of Object.entries(value)) {- const unwrapped = unwrapSignals(val);- const newKey = key.replace(/(Signal|Store)$/, '');- result[newKey] = unwrapped;- }- return result as T;- }-- // Primitive- return value;-}diff --git a/js/app/packages/core/util/upload.ts b/js/app/packages/core/util/upload.tsindex ac4df6694b..af7f7ac2b6 100644--- a/js/app/packages/core/util/upload.ts+++ b/js/app/packages/core/util/upload.ts@@ -94,7 +94,7 @@ function createHiddenFileInput(* Returns a cleanup function; you generally don't need it because the util* removes listeners and DOM nodes once a selection is made.*/-export function openUploadPicker(+function openUploadPicker(options: UploadPickerOptions,onSelect: (files: File[]) => void | Promise<void>): UploadPickerCleanup {@@ -205,7 +205,7 @@ const getDestination = (file: File, ruleset: DestinationRuleset) => {return ruleset instanceof Function ? ruleset(file) : ruleset;};-export const DEFAULT_DESTINATION_RULESET: DestinationRuleset = 'dss';+const DEFAULT_DESTINATION_RULESET: DestinationRuleset = 'dss';// Shared ruleset for chat input -> images/videos are static for inline display, everything else to DSSexport const chatRuleset: DestinationRuleset = (file: File) => {@@ -230,7 +230,7 @@ export const chatRuleset: DestinationRuleset = (file: File) => {// Ruleset that forces an upload to dss.export const forceDssRuleset: DestinationRuleset = (_: File) => 'dss';-export class FileSizeExceededError extends Error {+class FileSizeExceededError extends Error {public limit: number;public fileName: string;private sizeString: string;@@ -258,7 +258,7 @@ export class FileSizeExceededError extends Error {}}-export class UnsupportedFileTypeError extends Error {+class UnsupportedFileTypeError extends Error {public fileName: string;public fileType: string;@@ -275,7 +275,7 @@ export class UnsupportedFileTypeError extends Error {}}-export class UploadError extends Error {+class UploadError extends Error {constructor(file: File,destination?: UploadDestination,diff --git a/js/app/packages/core/util/uuid.ts b/js/app/packages/core/util/uuid.tsdeleted file mode 100644index ddeea79b0f..0000000000--- a/js/app/packages/core/util/uuid.ts+++ /dev/null@@ -1,2 +0,0 @@-export const UUID_REGEX =- /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/;diff --git a/js/app/packages/core/util/withRequired.ts b/js/app/packages/core/util/withRequired.tsindex 8d62064a90..16ce52a5bb 100644--- a/js/app/packages/core/util/withRequired.ts+++ b/js/app/packages/core/util/withRequired.ts@@ -2,14 +2,6 @@ export type WithRequired<T, K extends keyof T> = T & {[P in K]-?: NonNullable<T[P]>;};-export type DeepPartial<T> =- // Preserve function types- T extends (...args: any[]) => any- ? T- : T extends object- ? { [P in keyof T]?: DeepPartial<T[P]> }- : T;-export type NonNullableFields<T> = {[K in keyof T]: NonNullable<T[K]>;};diff --git a/js/app/packages/core/util/zod.ts b/js/app/packages/core/util/zod.tsindex e2d2ab2d96..d5fd32ef16 100644--- a/js/app/packages/core/util/zod.ts+++ b/js/app/packages/core/util/zod.ts@@ -2,10 +2,10 @@ import { z } from 'zod';const datelike = z.union([z.number(), z.string(), z.date()]);/** Safely coerces a date-like value to a Date object. */-export const toZodDate = datelike.pipe(z.coerce.date());+const _toZodDate = datelike.pipe(z.coerce.date());/** Safely coerces a number-like value to a number. */-export const toZodNumber = z.number().or(z.string()).pipe(z.coerce.number());+const _toZodNumber = z.number().or(z.string()).pipe(z.coerce.number());/** Safely coerces a number-like set to Set<number>. */export const toZodNumberSet = zdiff --git a/js/app/packages/document-processing-types/src/jobTypes/documentMetadata.ts b/js/app/packages/document-processing-types/src/jobTypes/documentMetadata.tsindex d6ca606182..448684c0ce 100644--- a/js/app/packages/document-processing-types/src/jobTypes/documentMetadata.ts+++ b/js/app/packages/document-processing-types/src/jobTypes/documentMetadata.ts@@ -33,8 +33,6 @@ export const DocxBomPartSchema = z.object({sha: z.string(),});-export type DocxBomPart = z.infer<typeof DocxBomPartSchema>;-export const DocxDocumentMetadataSchema = BaseDocumentMetadataSchema.extend({fileType: z.literal(FileType.Docx),documentBom: z.array(DocxBomPartSchema).optional(),diff --git a/js/app/packages/document-processing-types/src/jobTypes/docx/consolidate.ts b/js/app/packages/document-processing-types/src/jobTypes/docx/consolidate.tsindex f5f082cd71..3d6334180f 100644--- a/js/app/packages/document-processing-types/src/jobTypes/docx/consolidate.ts+++ b/js/app/packages/document-processing-types/src/jobTypes/docx/consolidate.ts@@ -58,7 +58,7 @@ export function consolidate_unzip_response(return ConsolidateResponseDataUploadUnzippedSchema.safeParse(data).success;}-export function consolidate_response_data_validate(+function _consolidate_response_data_validate(data: unknown): data is ConsolidateResponseData {return ConsolidateResponseData.safeParse(data).success;diff --git a/js/app/packages/document-processing-types/src/jobTypes/docx/docx_upload.ts b/js/app/packages/document-processing-types/src/jobTypes/docx/docx_upload.tsindex fe6d7268c6..b97bc0b252 100644--- a/js/app/packages/document-processing-types/src/jobTypes/docx/docx_upload.ts+++ b/js/app/packages/document-processing-types/src/jobTypes/docx/docx_upload.ts@@ -48,7 +48,7 @@ export function docx_upload_unzip_response(return DocxUploadResponseDataUploadUnzippedSchema.safeParse(data).success;}-export function docx_upload_response_data_validate(+function _docx_upload_response_data_validate(data: unknown): data is DocxUploadResponseData {return DocxUploadResponseData.safeParse(data).success;diff --git a/js/app/packages/document-processing-types/src/jobTypes/docx/index.ts b/js/app/packages/document-processing-types/src/jobTypes/docx/index.tsindex 3f0c6fe1e8..a8b94031a3 100644--- a/js/app/packages/document-processing-types/src/jobTypes/docx/index.ts+++ b/js/app/packages/document-processing-types/src/jobTypes/docx/index.ts@@ -1,6 +1,6 @@import { z } from 'zod';-export const ComparisionUploadDss = z.object({+const _ComparisionUploadDss = z.object({fileName: z.string(),author: z.string().optional(),color: z.string().optional(),diff --git a/js/app/packages/document-processing-types/src/jobTypes/docx/simple_compare.ts b/js/app/packages/document-processing-types/src/jobTypes/docx/simple_compare.tsindex 6f9519f028..8221050111 100644--- a/js/app/packages/document-processing-types/src/jobTypes/docx/simple_compare.ts+++ b/js/app/packages/document-processing-types/src/jobTypes/docx/simple_compare.ts@@ -59,7 +59,7 @@ export function simple_compare_unzip_response(return SimpleCompareResponseDataUploadUnzippedSchema.safeParse(data).success;}-export function simple_compare_response_data_validate(+function _simple_compare_response_data_validate(data: unknown): data is SimpleCompareResponseData {return SimpleCompareResponseData.safeParse(data).success;diff --git a/js/app/packages/document-processing-types/src/jobTypes/generic/ping.ts b/js/app/packages/document-processing-types/src/jobTypes/generic/ping.tsindex a7184c0ca8..3527ac4217 100644--- a/js/app/packages/document-processing-types/src/jobTypes/generic/ping.ts+++ b/js/app/packages/document-processing-types/src/jobTypes/generic/ping.ts@@ -17,7 +17,7 @@ const PingResponseDataSchema = z.object({pong: z.literal(true),});-export type PingResponseData = z.infer<typeof PingResponseDataSchema>;+type PingResponseData = z.infer<typeof PingResponseDataSchema>;const PingResponse = BaseResponse.extend({data: PingResponseDataSchema.optional(),diff --git a/js/app/packages/document-processing-types/src/jobTypes/pdf/convert.ts b/js/app/packages/document-processing-types/src/jobTypes/pdf/convert.tsindex d6a4bc715c..7dbfd5508a 100644--- a/js/app/packages/document-processing-types/src/jobTypes/pdf/convert.ts+++ b/js/app/packages/document-processing-types/src/jobTypes/pdf/convert.ts@@ -8,7 +8,7 @@ const Convert = z.object({toExtension: z.enum(['pdf', 'docx']),});-export function convert_validate(data: { [name: string]: unknown }) {+function _convert_validate(data: { [name: string]: unknown }) {return Convert.parse(data);}@@ -30,11 +30,11 @@ const ConvertResponse = BaseResponse.extend({data: ConvertResponseDataSchema.optional(),});-export function convert_response_validate(data: { [name: string]: unknown }) {+function _convert_response_validate(data: { [name: string]: unknown }) {return ConvertResponse.parse(data);}-export function convert_response_data_validate(+function _convert_response_data_validate(data: unknown): data is ConvertResponseData {return ConvertResponseDataSchema.safeParse(data).success;diff --git a/js/app/packages/entity/mocks/mockEntityData.ts b/js/app/packages/entity/mocks/mockEntityData.tsindex a01cc0a5fb..66aa433470 100644--- a/js/app/packages/entity/mocks/mockEntityData.ts+++ b/js/app/packages/entity/mocks/mockEntityData.ts@@ -11,7 +11,7 @@ import type {import type { Notification, WithNotification } from '../src/types/notification';import type { WithSearch } from '../src/types/search';-export const MOCK_USER_IDS = {+const MOCK_USER_IDS = {owner: 'macro|[email protected]',sharedUser: 'macro|[email protected]',teamMember1: 'macro|[email protected]',@@ -28,7 +28,7 @@ export const MOCK_USERS = [] as const;const now = new Date();-export const MOCK_TIMESTAMPS = {+const MOCK_TIMESTAMPS = {now,today: applyDurationToDate(now, { value: -30, unit: 'min' }),yesterday: applyDurationToDate(now, { value: -1, unit: 'd' }),@@ -37,7 +37,7 @@ export const MOCK_TIMESTAMPS = {lastYear: applyDurationToDate(now, { value: -365, unit: 'd' }),} as const;-export const MOCK_PROPERTIES: Property[] = [+const MOCK_PROPERTIES: Property[] = [{propertyId: 'prop_priority_1',propertyDefinitionId: 'def_priority',@@ -125,7 +125,7 @@ export const MOCK_PROPERTIES: Property[] = [},];-export const createMockNotification = (+const createMockNotification = (overrides?: Partial<Notification>): Notification => ({id: 'notif_123',@@ -185,7 +185,7 @@ export const MOCK_DOCUMENT_BASIC: DocumentEntity = {frecencyScore: 0.85,};-export const MOCK_DOCUMENT_WITH_PROJECT: DocumentEntity = {+const MOCK_DOCUMENT_WITH_PROJECT: DocumentEntity = {type: 'document',id: 'doc_project_1',name: 'Project Roadmap Q1 2025',@@ -197,7 +197,7 @@ export const MOCK_DOCUMENT_WITH_PROJECT: DocumentEntity = {frecencyScore: 0.92,};-export const MOCK_DOCUMENT_PDF: DocumentEntity = {+const MOCK_DOCUMENT_PDF: DocumentEntity = {type: 'document',id: 'doc_pdf_1',name: 'Design Specifications.pdf',@@ -208,7 +208,7 @@ export const MOCK_DOCUMENT_PDF: DocumentEntity = {frecencyScore: 0.65,};-export const MOCK_DOCUMENT_LONG_NAME: DocumentEntity = {+const MOCK_DOCUMENT_LONG_NAME: DocumentEntity = {type: 'document',id: 'doc_long_1',name: 'This is a very long document name that should test truncation behavior and how the UI handles overflow text in the entity component',@@ -219,7 +219,7 @@ export const MOCK_DOCUMENT_LONG_NAME: DocumentEntity = {frecencyScore: 0.45,};-export const MOCK_DOCUMENT_SPECIAL_CHARS: DocumentEntity = {+const MOCK_DOCUMENT_SPECIAL_CHARS: DocumentEntity = {type: 'document',id: 'doc_special_1',name: 'Test [Document] with "Special" & <Characters>!',@@ -230,7 +230,7 @@ export const MOCK_DOCUMENT_SPECIAL_CHARS: DocumentEntity = {frecencyScore: 0.75,};-export const MOCK_TASK_TODO: TaskEntity = {+const MOCK_TASK_TODO: TaskEntity = {type: 'document',id: 'task_todo_1',name: 'Review Q1 Budget',@@ -243,7 +243,7 @@ export const MOCK_TASK_TODO: TaskEntity = {frecencyScore: 0.88,};-export const MOCK_TASK_COMPLETED: TaskEntity = {+const MOCK_TASK_COMPLETED: TaskEntity = {type: 'document',id: 'task_done_1',name: 'Setup CI/CD Pipeline',@@ -256,7 +256,7 @@ export const MOCK_TASK_COMPLETED: TaskEntity = {frecencyScore: 0.95,};-export const MOCK_TASK_HIGH_PRIORITY: TaskEntity = {+const MOCK_TASK_HIGH_PRIORITY: TaskEntity = {type: 'document',id: 'task_urgent_1',name: 'Fix Critical Security Bug',@@ -268,7 +268,7 @@ export const MOCK_TASK_HIGH_PRIORITY: TaskEntity = {frecencyScore: 0.99,};-export const MOCK_CHANNEL_PUBLIC: ChannelEntity = {+const MOCK_CHANNEL_PUBLIC: ChannelEntity = {type: 'channel',id: 'channel_public_1',name: 'general',@@ -285,7 +285,7 @@ export const MOCK_CHANNEL_PUBLIC: ChannelEntity = {frecencyScore: 0.91,};-export const MOCK_CHANNEL_PRIVATE: ChannelEntity = {+const MOCK_CHANNEL_PRIVATE: ChannelEntity = {type: 'channel',id: 'channel_private_1',name: 'design-team',@@ -302,7 +302,7 @@ export const MOCK_CHANNEL_PRIVATE: ChannelEntity = {frecencyScore: 0.83,};-export const MOCK_CHANNEL_DIRECT_MESSAGE: ChannelEntity = {+const MOCK_CHANNEL_DIRECT_MESSAGE: ChannelEntity = {type: 'channel',id: 'channel_dm_1',name: 'Direct Message',@@ -320,7 +320,7 @@ export const MOCK_CHANNEL_DIRECT_MESSAGE: ChannelEntity = {frecencyScore: 0.87,};-export const MOCK_CHANNEL_ORGANIZATION: ChannelEntity = {+const MOCK_CHANNEL_ORGANIZATION: ChannelEntity = {type: 'channel',id: 'channel_org_1',name: 'company-announcements',@@ -337,7 +337,7 @@ export const MOCK_CHANNEL_ORGANIZATION: ChannelEntity = {frecencyScore: 0.72,};-export const MOCK_CHANNEL_EMPTY_MESSAGE: ChannelEntity = {+const MOCK_CHANNEL_EMPTY_MESSAGE: ChannelEntity = {type: 'channel',id: 'channel_attachment_1',name: 'project-files',@@ -354,7 +354,7 @@ export const MOCK_CHANNEL_EMPTY_MESSAGE: ChannelEntity = {frecencyScore: 0.68,};-export const MOCK_EMAIL_UNREAD: EmailEntity = {+const MOCK_EMAIL_UNREAD: EmailEntity = {type: 'email',id: 'email_unread_1',name: 'Q1 Planning Session',@@ -375,7 +375,7 @@ export const MOCK_EMAIL_UNREAD: EmailEntity = {frecencyScore: 0.94,};-export const MOCK_EMAIL_READ: EmailEntity = {+const MOCK_EMAIL_READ: EmailEntity = {type: 'email',id: 'email_read_1',name: 'Re: Project Update',@@ -393,7 +393,7 @@ export const MOCK_EMAIL_READ: EmailEntity = {frecencyScore: 0.76,};-export const MOCK_EMAIL_DRAFT: EmailEntity = {+const MOCK_EMAIL_DRAFT: EmailEntity = {type: 'email',id: 'email_draft_1',name: 'Draft: Team Announcement',@@ -409,7 +409,7 @@ export const MOCK_EMAIL_DRAFT: EmailEntity = {frecencyScore: 0.81,};-export const MOCK_EMAIL_THREAD: EmailEntity = {+const MOCK_EMAIL_THREAD: EmailEntity = {type: 'email',id: 'email_thread_1',name: 'Re: Design Review [4 messages]',@@ -431,7 +431,7 @@ export const MOCK_EMAIL_THREAD: EmailEntity = {frecencyScore: 0.89,};-export const MOCK_EMAIL_MULTIPLE_PARTICIPANTS: EmailEntity = {+const MOCK_EMAIL_MULTIPLE_PARTICIPANTS: EmailEntity = {type: 'email',id: 'email_multi_1',name: 'All Hands Meeting Next Week',@@ -466,7 +466,7 @@ export const MOCK_PROJECT_1: ProjectEntity = {frecencyScore: 0.91,};-export const MOCK_PROJECT_2: ProjectEntity = {+const MOCK_PROJECT_2: ProjectEntity = {type: 'project',id: 'proj_2',name: 'Mobile App Development',@@ -476,7 +476,7 @@ export const MOCK_PROJECT_2: ProjectEntity = {frecencyScore: 0.84,};-export const MOCK_PROJECT_SHARED: ProjectEntity = {+const MOCK_PROJECT_SHARED: ProjectEntity = {type: 'project',id: 'proj_shared_1',name: 'Marketing Campaign 2025',@@ -486,7 +486,7 @@ export const MOCK_PROJECT_SHARED: ProjectEntity = {frecencyScore: 0.79,};-export const MOCK_CHAT_BASIC: ChatEntity = {+const MOCK_CHAT_BASIC: ChatEntity = {type: 'chat',id: 'chat_1',name: 'Product Brainstorm',@@ -496,7 +496,7 @@ export const MOCK_CHAT_BASIC: ChatEntity = {frecencyScore: 0.86,};-export const MOCK_CHAT_WITH_PROJECT: ChatEntity = {+const MOCK_CHAT_WITH_PROJECT: ChatEntity = {type: 'chat',id: 'chat_project_1',name: 'Design Discussion',@@ -507,7 +507,7 @@ export const MOCK_CHAT_WITH_PROJECT: ChatEntity = {frecencyScore: 0.82,};-export const MOCK_SEARCH_DOCUMENT: WithSearch<DocumentEntity> = {+const MOCK_SEARCH_DOCUMENT: WithSearch<DocumentEntity> = {...MOCK_DOCUMENT_BASIC,search: {nameHighlight: 'Meeting **Notes**',@@ -528,7 +528,7 @@ export const MOCK_SEARCH_DOCUMENT: WithSearch<DocumentEntity> = {},};-export const MOCK_SEARCH_CHANNEL: WithSearch<ChannelEntity> = {+const MOCK_SEARCH_CHANNEL: WithSearch<ChannelEntity> = {...MOCK_CHANNEL_PUBLIC,search: {nameHighlight: '**general**',@@ -561,7 +561,7 @@ export const MOCK_SEARCH_CHANNEL: WithSearch<ChannelEntity> = {},};-export const MOCK_SEARCH_EMAIL: WithSearch<EmailEntity> = {+const MOCK_SEARCH_EMAIL: WithSearch<EmailEntity> = {...MOCK_EMAIL_THREAD,search: {nameHighlight: '**Design** Review',@@ -594,7 +594,7 @@ export const MOCK_SEARCH_EMAIL: WithSearch<EmailEntity> = {},};-export const MOCK_SEARCH_PDF: WithSearch<DocumentEntity> = {+const MOCK_SEARCH_PDF: WithSearch<DocumentEntity> = {...MOCK_DOCUMENT_PDF,search: {nameHighlight: '**Design** Specifications.pdf',@@ -624,39 +624,39 @@ export const createEntityWithNotifications = <T extends object>(notifications: () => notifications,});-export const MOCK_DOCUMENT_WITH_NOTIFICATIONS = createEntityWithNotifications(+const MOCK_DOCUMENT_WITH_NOTIFICATIONS = createEntityWithNotifications(MOCK_DOCUMENT_BASIC,[MOCK_NOTIFICATIONS[0]]);-export const MOCK_TASK_WITH_NOTIFICATIONS = createEntityWithNotifications(+const MOCK_TASK_WITH_NOTIFICATIONS = createEntityWithNotifications(MOCK_TASK_TODO,[MOCK_NOTIFICATIONS[1]]);-export const MOCK_CHANNEL_WITH_NOTIFICATIONS = createEntityWithNotifications(+const MOCK_CHANNEL_WITH_NOTIFICATIONS = createEntityWithNotifications(MOCK_CHANNEL_PUBLIC,[MOCK_NOTIFICATIONS[2]]);-export const MOCK_SHARED_DOCUMENT: DocumentEntity = {+const MOCK_SHARED_DOCUMENT: DocumentEntity = {...MOCK_DOCUMENT_BASIC,id: 'doc_shared_1',name: 'Shared Project Plan',ownerId: MOCK_USER_IDS.sharedUser,};-export const MOCK_SHARED_TASK: TaskEntity = {+const MOCK_SHARED_TASK: TaskEntity = {...MOCK_TASK_TODO,id: 'task_shared_1',name: 'Shared Task',ownerId: MOCK_USER_IDS.teamMember1,};-export const MOCK_TASK_WITH_PROPERTIES = MOCK_TASK_TODO;-export const MOCK_TASK_PROPERTIES = MOCK_PROPERTIES;+const _MOCK_TASK_WITH_PROPERTIES = MOCK_TASK_TODO;+const _MOCK_TASK_PROPERTIES = MOCK_PROPERTIES;-export const MOCK_ENTITY_MISSING_FIELDS: DocumentEntity = {+const MOCK_ENTITY_MISSING_FIELDS: DocumentEntity = {type: 'document',id: 'doc_minimal_1',name: 'Minimal Document',@@ -665,7 +665,7 @@ export const MOCK_ENTITY_MISSING_FIELDS: DocumentEntity = {// Missing optional fields like createdAt, updatedAt, frecencyScore};-export const MOCK_ENTITY_VERY_OLD: DocumentEntity = {+const MOCK_ENTITY_VERY_OLD: DocumentEntity = {type: 'document',id: 'doc_old_1',name: 'Archive Document 2020',@@ -676,7 +676,7 @@ export const MOCK_ENTITY_VERY_OLD: DocumentEntity = {frecencyScore: 0.12,};-export const MOCK_ENTITY_UNICODE: DocumentEntity = {+const MOCK_ENTITY_UNICODE: DocumentEntity = {type: 'document',id: 'doc_unicode_1',name: '🚀 Product Launch 2025 💡 Ideas & Notes ✨',@@ -687,7 +687,7 @@ export const MOCK_ENTITY_UNICODE: DocumentEntity = {frecencyScore: 0.88,};-export const ALL_DOCUMENT_ENTITIES = [+const ALL_DOCUMENT_ENTITIES = [MOCK_DOCUMENT_BASIC,MOCK_DOCUMENT_WITH_PROJECT,MOCK_DOCUMENT_PDF,@@ -699,14 +699,14 @@ export const ALL_DOCUMENT_ENTITIES = [MOCK_ENTITY_UNICODE,];-export const ALL_TASK_ENTITIES = [+const ALL_TASK_ENTITIES = [MOCK_TASK_TODO,MOCK_TASK_COMPLETED,MOCK_TASK_HIGH_PRIORITY,MOCK_SHARED_TASK,];-export const ALL_CHANNEL_ENTITIES = [+const ALL_CHANNEL_ENTITIES = [MOCK_CHANNEL_PUBLIC,MOCK_CHANNEL_PRIVATE,MOCK_CHANNEL_DIRECT_MESSAGE,@@ -714,7 +714,7 @@ export const ALL_CHANNEL_ENTITIES = [MOCK_CHANNEL_EMPTY_MESSAGE,];-export const ALL_EMAIL_ENTITIES = [+const ALL_EMAIL_ENTITIES = [MOCK_EMAIL_UNREAD,MOCK_EMAIL_READ,MOCK_EMAIL_DRAFT,@@ -722,28 +722,28 @@ export const ALL_EMAIL_ENTITIES = [MOCK_EMAIL_MULTIPLE_PARTICIPANTS,];-export const ALL_PROJECT_ENTITIES = [+const ALL_PROJECT_ENTITIES = [MOCK_PROJECT_1,MOCK_PROJECT_2,MOCK_PROJECT_SHARED,];-export const ALL_CHAT_ENTITIES = [MOCK_CHAT_BASIC, MOCK_CHAT_WITH_PROJECT];+const ALL_CHAT_ENTITIES = [MOCK_CHAT_BASIC, MOCK_CHAT_WITH_PROJECT];-export const ALL_SEARCH_ENTITIES = [+const _ALL_SEARCH_ENTITIES = [MOCK_SEARCH_DOCUMENT,MOCK_SEARCH_CHANNEL,MOCK_SEARCH_EMAIL,MOCK_SEARCH_PDF,];-export const ALL_ENTITIES_WITH_NOTIFICATIONS = [+const _ALL_ENTITIES_WITH_NOTIFICATIONS = [MOCK_DOCUMENT_WITH_NOTIFICATIONS,MOCK_TASK_WITH_NOTIFICATIONS,MOCK_CHANNEL_WITH_NOTIFICATIONS,];-export const ALL_SHARED_ENTITIES = [+const _ALL_SHARED_ENTITIES = [MOCK_SHARED_DOCUMENT,MOCK_SHARED_TASK,MOCK_PROJECT_SHARED,diff --git a/js/app/packages/entity/src/components/Badges.tsx b/js/app/packages/entity/src/components/Badges.tsxindex 8293fca903..3108864bc3 100644--- a/js/app/packages/entity/src/components/Badges.tsx+++ b/js/app/packages/entity/src/components/Badges.tsx@@ -95,7 +95,7 @@ export function DraftBadge() {return <Badge class="text-accent-30 border-edge-muted px-2">draft</Badge>;}-export function ImportantBadge() {+function _ImportantBadge() {return (<Badge class="text-accent bg-accent/10 px-2 border-accent/10">importantdiff --git a/js/app/packages/entity/src/components/MultiSelectCheckbox.tsx b/js/app/packages/entity/src/components/MultiSelectCheckbox.tsxindex 7702fc71c4..8df30c2683 100644--- a/js/app/packages/entity/src/components/MultiSelectCheckbox.tsx+++ b/js/app/packages/entity/src/components/MultiSelectCheckbox.tsx@@ -2,7 +2,7 @@ import CheckIcon from '@phosphor/check.svg';import { cn } from '@ui';import { Show } from 'solid-js';-export interface MultiSelectCheckboxProps {+interface MultiSelectCheckboxProps {checked?: boolean;onChecked?: (checked: boolean, shiftKey: boolean) => void;}diff --git a/js/app/packages/entity/src/components/PulsingStar.tsx b/js/app/packages/entity/src/components/PulsingStar.tsxindex f98abf32fa..2ac407ff5b 100644--- a/js/app/packages/entity/src/components/PulsingStar.tsx+++ b/js/app/packages/entity/src/components/PulsingStar.tsx@@ -1,11 +1,6 @@import { AnimatedStarIcon } from '@icon/wide-star';-import type { StreamEvent } from '@service-connection/generated/schemas';import { createSignal, onCleanup } from 'solid-js';-export type StreamIndicatorProps = {- streamState?: StreamEvent;-};-const kind = {listIcon: 'size-4 text-chat',streamIndicator: 'size-4 text-accent',diff --git a/js/app/packages/entity/src/composed/list-entity/shared.tsx b/js/app/packages/entity/src/composed/list-entity/shared.tsxindex 704e95000e..fa49fd4a59 100644--- a/js/app/packages/entity/src/composed/list-entity/shared.tsx+++ b/js/app/packages/entity/src/composed/list-entity/shared.tsx@@ -39,7 +39,7 @@ export interface BaseListEntityProps<E extends EntityData = EntityData> {entityRowConfig?: EntityRowConfig;}-export const WIDE_BREAKPOINT = 512; // @lg container query = 32rem+const WIDE_BREAKPOINT = 512; // @lg container query = 32remexport interface LayoutProps {entity: WithNotification<EntityData>;diff --git a/js/app/packages/entity/src/extractors-notification/index.ts b/js/app/packages/entity/src/extractors-notification/index.tsindex 8041d58ec4..facb1a8822 100644--- a/js/app/packages/entity/src/extractors-notification/index.ts+++ b/js/app/packages/entity/src/extractors-notification/index.ts@@ -4,10 +4,10 @@ export { NotificationContent } from './notification-content';export { NotificationCount } from './notification-count';export { NotificationDescription } from './notification-description';export { NotificationIcon } from './notification-icon';-export type { NotificationRowProps } from './notification-row';+export { NotificationRow } from './notification-row';export { NotificationSender } from './notification-sender';-export { NotificationSenderIcon } from './notification-sender-icon';+export {NotificationStackRow,NotificationStacks,diff --git a/js/app/packages/entity/src/extractors-notification/notification-description.tsx b/js/app/packages/entity/src/extractors-notification/notification-description.tsxindex 8aab92d199..2f60863789 100644--- a/js/app/packages/entity/src/extractors-notification/notification-description.tsx+++ b/js/app/packages/entity/src/extractors-notification/notification-description.tsx@@ -10,7 +10,6 @@ import {} from './notification-description-helpers';// Re-export helpers for backward compatibility and testing-export { getActionVerb, getTypeNoun, getTypePreposition, getUniqueSenderIds };interface NotificationDescriptionProps {notification?: Notification;diff --git a/js/app/packages/entity/src/extractors-notification/notification-row.tsx b/js/app/packages/entity/src/extractors-notification/notification-row.tsxindex 7667fd7397..9cde75d378 100644--- a/js/app/packages/entity/src/extractors-notification/notification-row.tsx+++ b/js/app/packages/entity/src/extractors-notification/notification-row.tsx@@ -106,9 +106,9 @@ function NotificationRowContent(props: {);}-export type NotificationRowVariant = 'compact' | 'expanded';+type NotificationRowVariant = 'compact' | 'expanded';-export interface NotificationRowProps {+interface NotificationRowProps {notification: UnifiedNotification;entity?: EntityData;onClick?: (e: PointerEvent | MouseEvent | KeyboardEvent) => void;diff --git a/js/app/packages/entity/src/extractors-property/entity-key-properties.tsx b/js/app/packages/entity/src/extractors-property/entity-key-properties.tsxindex f55f450d16..d8c3ecf8d8 100644--- a/js/app/packages/entity/src/extractors-property/entity-key-properties.tsx+++ b/js/app/packages/entity/src/extractors-property/entity-key-properties.tsx@@ -50,7 +50,7 @@ function getEntityType(entity: EntityData): EntityType {.exhaustive();}-export interface EntityKeyPropertiesProps {+interface EntityKeyPropertiesProps {/** Entity with properties attached */entity: EntityWithProperties<EntityData>;/** Callback when properties are refreshed */diff --git a/js/app/packages/entity/src/extractors-property/index.ts b/js/app/packages/entity/src/extractors-property/index.tsindex d162afbbdd..7d62784d63 100644--- a/js/app/packages/entity/src/extractors-property/index.ts+++ b/js/app/packages/entity/src/extractors-property/index.ts@@ -1,13 +1,3 @@-export {- EntityKeyProperties,- type EntityKeyPropertiesProps,-} from './entity-key-properties';+export { EntityKeyProperties } from './entity-key-properties';-export {- filterKeyProperties,- getSortedKeyProperties,- PROPERTY_SORT_ORDER,- sortProperties,- soupPropertiesToProperties,- soupPropertyToProperty,-} from './property-helpers';+export { soupPropertyToProperty } from './property-helpers';diff --git a/js/app/packages/entity/src/extractors-property/property-helpers.ts b/js/app/packages/entity/src/extractors-property/property-helpers.tsindex 7ba85c73fd..370acd56be 100644--- a/js/app/packages/entity/src/extractors-property/property-helpers.ts+++ b/js/app/packages/entity/src/extractors-property/property-helpers.ts@@ -17,7 +17,7 @@ const EPOCH_ZERO = new Date(0);/*** Sort order for key properties (status, priority, assignees)*/-export const PROPERTY_SORT_ORDER = [+const PROPERTY_SORT_ORDER = [SYSTEM_PROPERTY_IDS.STATUS,SYSTEM_PROPERTY_IDS.PRIORITY,SYSTEM_PROPERTY_IDS.ASSIGNEES,@@ -265,7 +265,7 @@ export function soupPropertyToProperty(soupProperty: SoupProperty): Property {/*** Convert array of SoupProperty to Property array*/-export function soupPropertiesToProperties(+function _soupPropertiesToProperties(soupProperties: SoupProperty[]): Property[] {return soupProperties.map(soupPropertyToProperty);@@ -274,7 +274,7 @@ export function soupPropertiesToProperties(/*** Sort properties by the defined sort order (status, priority, assignees first)*/-export function sortProperties(properties: Property[]): Property[] {+function sortProperties(properties: Property[]): Property[] {return [...properties].sort((a, b) => {const aIndex = PROPERTY_SORT_ORDER.indexOf(a.propertyDefinitionId as (typeof PROPERTY_SORT_ORDER)[number]@@ -299,7 +299,7 @@ export function sortProperties(properties: Property[]): Property[] {/*** Filter properties to only include key properties (status, priority, assignees)*/-export function filterKeyProperties(properties: Property[]): Property[] {+function filterKeyProperties(properties: Property[]): Property[] {return properties.filter((prop) =>PROPERTY_SORT_ORDER.includes(prop.propertyDefinitionId as (typeof PROPERTY_SORT_ORDER)[number]diff --git a/js/app/packages/entity/src/extractors-search/index.ts b/js/app/packages/entity/src/extractors-search/index.tsindex f92d2f49b8..d3e110df50 100644--- a/js/app/packages/entity/src/extractors-search/index.ts+++ b/js/app/packages/entity/src/extractors-search/index.ts@@ -1,7 +1 @@export { ContentHits } from './content-hits';-export { SearchContent } from './search-content';-export { SearchContentHitRow } from './search-content-hit-row';-export { SearchIcon } from './search-icon';-export { SearchLocation } from './search-location';-export { SearchSender } from './search-sender';-export { SearchTimestamp } from './search-timestamp';diff --git a/js/app/packages/entity/src/extractors-search/search-icon.tsx b/js/app/packages/entity/src/extractors-search/search-icon.tsxdeleted file mode 100644index d9b1eec293..0000000000--- a/js/app/packages/entity/src/extractors-search/search-icon.tsx+++ /dev/null@@ -1,22 +0,0 @@-import FileTextIcon from '@phosphor/file-text.svg';-import { cn } from '@ui';-import { Dynamic } from 'solid-js/web';-import type { ContentHitData } from '../types/search';-import { getSearchIcon } from './search-helpers';--interface SearchIconProps {- hit?: ContentHitData;- class?: string;-}--/**- * Displays the appropriate icon for a search content hit- */-export function SearchIcon(props: SearchIconProps) {- const icon = () => {- if (!props.hit) return FileTextIcon;- return getSearchIcon(props.hit);- };-- return <Dynamic component={icon()} class={cn('size-4', props.class)} />;-}diff --git a/js/app/packages/entity/src/extractors-search/snippet-entity.ts b/js/app/packages/entity/src/extractors-search/snippet-entity.tsindex 3d5fa7de0c..0c21fc1915 100644--- a/js/app/packages/entity/src/extractors-search/snippet-entity.ts+++ b/js/app/packages/entity/src/extractors-search/snippet-entity.ts@@ -13,7 +13,7 @@ import { type ContentHitData, isSearchEntity } from '../types/search';* windowSearchMatch + HighlightRender (as opposed to entity-derived previews* such as channel latest messages or task properties).*/-export type SnippetEntity = EmailEntity | CallEntity;+type SnippetEntity = EmailEntity | CallEntity;export const isSnippetEntity = (entity: EntityData): entity is SnippetEntity =>isEmailEntity(entity) || isCallEntity(entity);diff --git a/js/app/packages/entity/src/extractors/entity-email-participants.tsx b/js/app/packages/entity/src/extractors/entity-email-participants.tsxindex 819ff785a9..e4436ef183 100644--- a/js/app/packages/entity/src/extractors/entity-email-participants.tsx+++ b/js/app/packages/entity/src/extractors/entity-email-participants.tsx@@ -16,12 +16,12 @@ import type { EmailEntity, EmailThreadParticipants } from '../types/entity';import { isSearchEntity } from '../types/search';/** Checks if a value is likely an email address */-export function isLikelyEmail(value?: string): boolean {+function isLikelyEmail(value?: string): boolean {return typeof value === 'string' && value.includes('@');}/** Extracts the local part of an email address (before @) */-export function getEmailLocalPart(email: string): string {+function getEmailLocalPart(email: string): string {return email.split('@')[0];}@@ -29,7 +29,7 @@ export function getEmailLocalPart(email: string): string {* Resolves the best display name for a participant* Priority: macroDisplayName > participant.name > email local part*/-export function resolveParticipantName(+function resolveParticipantName(participant: EmailThreadParticipants[number],macroDisplayName?: string): string {diff --git a/js/app/packages/entity/src/index.ts b/js/app/packages/entity/src/index.tsindex 45c6e152b5..0772177871 100644--- a/js/app/packages/entity/src/index.ts+++ b/js/app/packages/entity/src/index.ts@@ -1,24 +1,17 @@// Export types-export { DraftBadge, SharedBadge } from './components/Badges';-export { DisplayName } from './components/DisplayName';export { MultiSelectCheckbox } from './components/MultiSelectCheckbox';export { ProjectBreadCrumb } from './components/ProjectBreadCrumb';export { UnreadIndicator } from './components/UnreadIndicator';export { InlineEntity } from './composed/InlineEntity';export { ListEntity, ListLayoutProvider } from './composed/ListEntity';-export { default as DebugEntityView } from './debug/DebugEntityView';+export { Entity } from './entity';export { NotificationRow } from './extractors-notification';-export type {- NotificationRowProps,- NotificationRowVariant,-} from './extractors-notification/notification-row';+export type {} from './extractors-notification/notification-row';export {getSnippetHit,- isHitSnippetComplete,isSnippetEntity,- type SnippetEntity,} from './extractors-search/snippet-entity';export * from './types/drag';export * from './types/entity';@@ -40,13 +33,8 @@ export {getPropertyOptionLabel,getTaskAssigneeIds,getTaskStatusOptionId,- isCurrentUserAssigned,- isTaskClosed,- TASK_PRIORITY_OPTIONS,- TASK_STATUS_OPTIONS,} from './utils/task-properties';export {formatDateAndTime,formatRelativeTimestamp,- formatTimestamp,} from './utils/timestamp';diff --git a/js/app/packages/entity/src/types/entity.ts b/js/app/packages/entity/src/types/entity.tsindex 8906fc3ec8..99e0fd73f1 100644--- a/js/app/packages/entity/src/types/entity.ts+++ b/js/app/packages/entity/src/types/entity.ts@@ -4,7 +4,6 @@ import type {SoupLabel,SoupProperty,} from '@service-storage/generated/schemas';-import type { JSX } from 'solid-js';export type EntityBase = {id: string;@@ -167,7 +166,7 @@ const ENTITY_TYPE_VALUES = new Set<EntityData['type']>(['automation',]);-export const isEntityData = (item: unknown): item is EntityData => {+const _isEntityData = (item: unknown): item is EntityData => {if (typeof item !== 'object') return false;if (!item) return false;@@ -199,7 +198,7 @@ export const isChannelMessageEntity = (return entity.type === 'channel_message';};-export const isChatEntity = (entity: EntityData): entity is ChatEntity => {+const _isChatEntity = (entity: EntityData): entity is ChatEntity => {return entity.type === 'chat';};@@ -207,9 +206,7 @@ export const isEmailEntity = (entity: EntityData): entity is EmailEntity => {return entity.type === 'email';};-export const isProjectEntity = (- entity: EntityData-): entity is ProjectEntity => {+const _isProjectEntity = (entity: EntityData): entity is ProjectEntity => {return entity.type === 'project';};@@ -229,15 +226,13 @@ export const isDocumentEntity = (return entity.type === 'document';};-export const isMarkdownEntity = (- entity: EntityData-): entity is MarkdownEntity => {+const _isMarkdownEntity = (entity: EntityData): entity is MarkdownEntity => {return (entity.type === 'document' && entity.fileType === 'md' && !entity.subType);};-export const isPureDocumentEntity = (+const _isPureDocumentEntity = (entity: EntityData): entity is DocumentEntity => {return entity.type === 'document' && entity.subType?.type !== 'task';@@ -253,27 +248,6 @@ export type EntityWithProperties<T extends EntityData> = T & {export type TaskEntityWithProperties = EntityWithProperties<TaskEntity>;-export type EntityOf<K extends EntityType> = Extract<EntityData, { type: K }>;--export type EntityMapper<T extends EntityData> = (entity: EntityData) => T;--export type EntityEnhancer<T extends EntityData> = (- entity: EntityData,- index?: number,- array?: EntityData[]-) => T;--export type EntityFilter<T extends EntityData> = (entity: T) => boolean;--export type EntitiesFilter<T extends EntityData> = (entities: T[]) => T[];--export type EntityComparator<T extends EntityData> = (a: T, b: T) => number;--export type EntityRenderer<T extends EntityData> = (props: {- entity: T;- index: number;-}) => JSX.Element;-export type ProjectContainedEntity<T extends EntityData = EntityData> = T & {projectId: string;};@@ -290,8 +264,3 @@ export const isProjectContainedEntity = <T extends EntityData>(* @example* type MinimalEntity = PartialEntity<'id' | 'name'>;*/-export type PartialEntity<K extends keyof EntityData = keyof EntityData> = Pick<- EntityData,- K-> &- Partial<Omit<EntityData, K>>;diff --git a/js/app/packages/entity/src/types/notification.ts b/js/app/packages/entity/src/types/notification.tsindex e5e503bebf..9bc8dcc90d 100644--- a/js/app/packages/entity/src/types/notification.ts+++ b/js/app/packages/entity/src/types/notification.ts@@ -12,7 +12,7 @@ export type WithNotification<T> = T & {* When clicking a stacked notification row, this array contains all notifications in the stack* so they can be bulk-marked as done.*/-export type WithStackedNotifications<T> = T & {+type WithStackedNotifications<T> = T & {stackedNotifications?: Notification[];};@@ -22,7 +22,7 @@ export const isWithNotification = <T extends {} = {}>(return 'notifications' in item && typeof item.notifications === 'function';};-export const isWithStackedNotifications = <T extends {} = {}>(+const _isWithStackedNotifications = <T extends {} = {}>(item: T): item is WithStackedNotifications<T> => {return (diff --git a/js/app/packages/entity/src/types/search.ts b/js/app/packages/entity/src/types/search.tsindex eda5ca035e..a45f887511 100644--- a/js/app/packages/entity/src/types/search.ts+++ b/js/app/packages/entity/src/types/search.ts@@ -117,7 +117,7 @@ export const isCallRecordHit = (): hit is CallRecordContentHitData => hit.type === 'call_record';/** Content hits that carry sender + sent_at (channel / email / call_record). */-export type HitWithSender =+type HitWithSender =| ChannelContentHitData| EmailContentHitData| CallRecordContentHitData;diff --git a/js/app/packages/entity/src/utils/task-properties.ts b/js/app/packages/entity/src/utils/task-properties.tsindex d8dc5a722c..cf1e3d84da 100644--- a/js/app/packages/entity/src/utils/task-properties.ts+++ b/js/app/packages/entity/src/utils/task-properties.ts@@ -12,7 +12,7 @@ export const TASK_STATUS_OPTIONS = [{ value: PROPERTY_OPTION_IDS.STATUS.CANCELED, label: 'Canceled' },] as const;-export const TASK_PRIORITY_OPTIONS = [+const TASK_PRIORITY_OPTIONS = [{ value: PROPERTY_OPTION_IDS.PRIORITY.URGENT, label: 'Urgent' },{ value: PROPERTY_OPTION_IDS.PRIORITY.HIGH, label: 'High' },{ value: PROPERTY_OPTION_IDS.PRIORITY.MEDIUM, label: 'Medium' },diff --git a/js/app/packages/entity/src/utils/timestamp.ts b/js/app/packages/entity/src/utils/timestamp.tsindex 67401f5582..1adc758adc 100644--- a/js/app/packages/entity/src/utils/timestamp.ts+++ b/js/app/packages/entity/src/utils/timestamp.ts@@ -69,11 +69,6 @@ export function formatRelativeTimestamp(return format(date, 'M/d/yy');}-export interface TimestampData {- formatted: string;- raw: number;-}-/*** Formats a date + time in a single concise line, e.g. "Apr 15, 2:30 PM" or* "1/27/24, 2:30 PM". Used when a row needs both pieces (e.g. automationdiff --git a/js/app/packages/filesystem/package.json b/js/app/packages/filesystem/package.jsonindex 6e2fe688ff..0cba3de449 100644--- a/js/app/packages/filesystem/package.json+++ b/js/app/packages/filesystem/package.json@@ -20,9 +20,7 @@"@types/wicg-file-system-access": "^2020.9.5","typedoc": "^0.22.18"},- "dependencies": {- "jszip": "^3.10.1"- },+ "dependencies": {},"bugs": {"url": "https://github.com/coparse-inc/filesystem/issues"},diff --git a/js/app/packages/filesystem/src/file/base.ts b/js/app/packages/filesystem/src/file/base.tsindex e3d0f0d63d..d4ed6e756e 100644--- a/js/app/packages/filesystem/src/file/base.ts+++ b/js/app/packages/filesystem/src/file/base.ts@@ -12,7 +12,7 @@ export enum FileSource {type DiskSource = FileSource.Path | FileSource.Browser;type ManagerSource = FileSource.DocumentStorageService;-export interface FileFromDisk extends File {+interface FileFromDisk extends File {source: DiskSource;filehandle: FileHandle;}diff --git a/js/app/packages/filesystem/src/file/browser.ts b/js/app/packages/filesystem/src/file/browser.tsdeleted file mode 100644index 8cffbb05b8..0000000000--- a/js/app/packages/filesystem/src/file/browser.ts+++ /dev/null@@ -1,19 +0,0 @@-import {- BaseFile,- BrowserHandle,- ConstructorArgs,- FileFromDisk,- FileSource,-} from './base';--export class BrowserFile- extends BaseFile<BrowserHandle>- implements FileFromDisk-{- readonly source: FileSource.Browser;-- constructor(args: ConstructorArgs<BrowserHandle>) {- super(args);- this.source = FileSource.Browser;- }-}diff --git a/js/app/packages/filesystem/src/file/documentStorageService.ts b/js/app/packages/filesystem/src/file/documentStorageService.tsindex 12b46db87f..139756ff87 100644--- a/js/app/packages/filesystem/src/file/documentStorageService.ts+++ b/js/app/packages/filesystem/src/file/documentStorageService.ts@@ -311,7 +311,7 @@ export const createDocumentStorageServiceHandle = (return { source: FileSource.DocumentStorageService, ref: documentKey };};-export const createHTMLDocumentStorageServiceHandle = (+const createHTMLDocumentStorageServiceHandle = (...args: Parameters<typeof makeDocumentKey>): DocumentStorageServiceHandle => {const documentKey = `${args[0].owner}/${args[0].documentId}/${args[0].documentVersionId}.${args[0].fileType}`;diff --git a/js/app/packages/filesystem/src/opfs.ts b/js/app/packages/filesystem/src/opfs.tsindex 81a54e49ca..03457579c9 100644--- a/js/app/packages/filesystem/src/opfs.ts+++ b/js/app/packages/filesystem/src/opfs.ts@@ -3,7 +3,7 @@ import { DocxExpandedPartList } from "@service-storage/util/getDocxFile";/** If making breaking changes to the OPFS structure / format, increment this */const OPFS_VERSION = 0;-export const OPFS_DIR_NAME = `macro-documents-v${OPFS_VERSION}`;+const OPFS_DIR_NAME = `macro-documents-v${OPFS_VERSION}`;let opfsHandle_: FileSystemDirectoryHandle | null = null;/** OPFS filesystem handle singleton */diff --git a/js/app/packages/filesystem/src/stringUtils.ts b/js/app/packages/filesystem/src/stringUtils.tsindex a89bb53399..8913073414 100644--- a/js/app/packages/filesystem/src/stringUtils.ts+++ b/js/app/packages/filesystem/src/stringUtils.ts@@ -1,7 +1,7 @@import { fileExtension } from '@service-storage/util/filename';import { FileSystemError } from './error';-export function filenameFromPath(path: string) {+function filenameFromPath(path: string) {const filename = path.split('\\')?.pop()?.split('/')?.pop();if (!filename) {throw new FileSystemError(`Unable to get filename from path: ${path}`);@@ -26,7 +26,7 @@ export function replaceExtension(path: string, newExt: string) {* @param omitIfExtensionMissing - if true, the extension will not be replaced if the filename does not have an extension* @returns the filename with the new extension*/-export const replaceFileExtension = ({+const replaceFileExtension = ({filename,toExtension,omitIfExtensionMissing,diff --git a/js/app/packages/filesystem/src/zip.ts b/js/app/packages/filesystem/src/zip.tsdeleted file mode 100644index 1684438ba4..0000000000--- a/js/app/packages/filesystem/src/zip.ts+++ /dev/null@@ -1,14 +0,0 @@-import { DocxExpandedPart, DocxExpandedPartWithoutSha } from '@service-storage/util/getDocxFile';--export async function zipDocxExpandedParts(- parts: Array<DocxExpandedPart | DocxExpandedPartWithoutSha>-) {- const { default: JsZip } = await import('jszip');- const zip = new JsZip();-- parts.forEach(({ path, content }) => {- zip.file(path, content);- });-- return zip.generateAsync({ type: 'blob', compression: 'DEFLATE' });-}diff --git a/js/app/packages/macro-entity/src/queries/auth.ts b/js/app/packages/macro-entity/src/queries/auth.tsindex c4c7f51d97..3cf6099502 100644--- a/js/app/packages/macro-entity/src/queries/auth.ts+++ b/js/app/packages/macro-entity/src/queries/auth.ts@@ -65,7 +65,7 @@ type ApiTokenQueryOptions = SolidQueryOptions<> & {initialData?: undefined;};-export function createApiTokenQueryOptions(): ApiTokenQueryOptions {+function createApiTokenQueryOptions(): ApiTokenQueryOptions {return queryOptions({queryKey: queryKeys.auth.apiToken,queryFn: fetchApiToken,diff --git a/js/app/packages/notifications/components/DebouncedNotificationReadMarker.tsx b/js/app/packages/notifications/components/DebouncedNotificationReadMarker.tsxindex 45f52a188b..d44cfab81d 100644--- a/js/app/packages/notifications/components/DebouncedNotificationReadMarker.tsx+++ b/js/app/packages/notifications/components/DebouncedNotificationReadMarker.tsx@@ -15,9 +15,7 @@ type DebouncedMarkerProps = {debounceTime?: number;};-export const makeDebouncedMarker = (- props: DebouncedMarkerProps-): VoidFunction => {+const makeDebouncedMarker = (props: DebouncedMarkerProps): VoidFunction => {const debounceTime = props.debounceTime ?? DEFAULT_DEBOUNCE_TIME;const trigger = debounce(props.debouncedFn, debounceTime);diff --git a/js/app/packages/notifications/components/PlatformNotificationProvider.tsx b/js/app/packages/notifications/components/PlatformNotificationProvider.tsxindex 4c70381ad3..19fc265df9 100644--- a/js/app/packages/notifications/components/PlatformNotificationProvider.tsx+++ b/js/app/packages/notifications/components/PlatformNotificationProvider.tsx@@ -95,7 +95,7 @@ const NotificationInterfaceContext = createContext</// this hook gives you access to the raw notification inteferface which is probably not what you want// you are probably looking for useNotificationState which handles UI disabled notifications-export function usePlatformNotifications():+function usePlatformNotifications():| PlatformNotificationInterface| NotificationUnsupported {const platformNotif = useContext(NotificationInterfaceContext);@@ -110,7 +110,7 @@ export function usePlatformNotifications():}type UiDisabled = 'disabled-in-ui';-export type UserSetting = 'allowed' | UiDisabled;+type UserSetting = 'allowed' | UiDisabled;export interface PlatformNotificationState {permission: Accessor<NotificationPermission | UiDisabled>;@@ -121,7 +121,7 @@ export interface PlatformNotificationState {) => Promise<PlatformNotificationHandle | NotGranted | UiDisabled>;}-export const NotificationStateContext = createContext<+const NotificationStateContext = createContext<PlatformNotificationState | NotificationUnsupported | undefined>(undefined);diff --git a/js/app/packages/notifications/notification-navigation.ts b/js/app/packages/notifications/notification-navigation.tsindex 5e7815ca65..cb7119ff71 100644--- a/js/app/packages/notifications/notification-navigation.ts+++ b/js/app/packages/notifications/notification-navigation.ts@@ -117,7 +117,7 @@ async function openChannelNotification(// Minimal entity shape — the live entity from the UI is authoritative when// available (notification metadata is a snapshot at notification time and may// lack `subType` for older events).-export type NotificationEntityOverride = {+type NotificationEntityOverride = {fileType?: string | null;subType?: { type: string } | null;};@@ -153,7 +153,7 @@ type NotFoundError = {notificationId: string;};-export type OpenNotificationFromIdError = NotSupportedError | NotFoundError;+type OpenNotificationFromIdError = NotSupportedError | NotFoundError;function getSupportedHandler(notification: UnifiedNotification,diff --git a/js/app/packages/notifications/utils/mock-websocket.ts b/js/app/packages/notifications/utils/mock-websocket.tsindex a63129eaed..5f2484cecd 100644--- a/js/app/packages/notifications/utils/mock-websocket.ts+++ b/js/app/packages/notifications/utils/mock-websocket.ts@@ -2,7 +2,7 @@ import type { ConnectionGatewayWebsocket } from '@service-connection/websocket';import { createSignal } from 'solid-js';import type { UnifiedNotification } from '../types';-export type MockWebsocketEmitter = (notification: UnifiedNotification) => void;+type MockWebsocketEmitter = (notification: UnifiedNotification) => void;export function createMockWebsocket(): {ws: ConnectionGatewayWebsocket;diff --git a/js/app/packages/observability/src/logger.ts b/js/app/packages/observability/src/logger.tsindex 1eb67c6168..0eed3eea8f 100644--- a/js/app/packages/observability/src/logger.ts+++ b/js/app/packages/observability/src/logger.ts@@ -34,7 +34,7 @@ interface ErrorContext extends Context {* @param message - The message to log.* @param context - The context of the log such as error, level, etc.*/-export function warn(message: string, context?: Context) {+function warn(message: string, context?: Context) {if (import.meta.hot || !isInitialized())return console.warn(message, context);diff --git a/js/app/packages/property/src/composed/PropertyDisplay.tsx b/js/app/packages/property/src/composed/PropertyDisplay.tsxindex 31dc00cacc..cc7eee2360 100644--- a/js/app/packages/property/src/composed/PropertyDisplay.tsx+++ b/js/app/packages/property/src/composed/PropertyDisplay.tsx@@ -19,7 +19,7 @@ import {hasValue,} from '../utils';-export type PropertyDisplayProps = {+type PropertyDisplayProps = {/*** Forwarded to PopoverEditor when the property is an ENTITY type — filters* the owning entity out of the picker.diff --git a/js/app/packages/property/src/constants.ts b/js/app/packages/property/src/constants.tsindex a85aadc94a..8633e093b8 100644--- a/js/app/packages/property/src/constants.ts+++ b/js/app/packages/property/src/constants.ts@@ -1,13 +1,3 @@// Re-export business-logic constants from @core/component/Properties.-export {- BUILTIN_PROPERTIES_BY_BLOCK,- DEFAULT_PINNED_PROPERTIES_BY_BLOCK,- FOCUS_CONFIG,- getBuiltinPropertyIds,- getDefaultPinnedProperties,- MODAL_DIMENSIONS,- NUMBER_DECIMAL_PLACES,- PROPERTY_OPTION_IDS,- SYSTEM_PROPERTY_IDS,-} from '@core/component/Properties/constants';+export { NUMBER_DECIMAL_PLACES } from '@core/component/Properties/constants';diff --git a/js/app/packages/property/src/core/Root.tsx b/js/app/packages/property/src/core/Root.tsxindex 4741b75964..64ecd1c331 100644--- a/js/app/packages/property/src/core/Root.tsx+++ b/js/app/packages/property/src/core/Root.tsx@@ -8,7 +8,7 @@ import {type PropertySaveFn,} from './context';-export interface PropertyRootProps+interface PropertyRootPropsextends Omit<JSX.HTMLAttributes<HTMLDivElement>, 'onSave' | 'property'> {property: Property;canEdit?: boolean;diff --git a/js/app/packages/property/src/core/context.ts b/js/app/packages/property/src/core/context.tsindex cf66cf8a27..fd0ec53b60 100644--- a/js/app/packages/property/src/core/context.ts+++ b/js/app/packages/property/src/core/context.ts@@ -34,6 +34,6 @@ export function useProperty(): PropertyRootContextValue {return ctx;}-export function useMaybeProperty(): PropertyRootContextValue | undefined {+function _useMaybeProperty(): PropertyRootContextValue | undefined {return useContext(PropertyRootContext);}diff --git a/js/app/packages/property/src/editors/PropertyEditor.tsx b/js/app/packages/property/src/editors/PropertyEditor.tsxindex 25b01625f6..6727095207 100644--- a/js/app/packages/property/src/editors/PropertyEditor.tsx+++ b/js/app/packages/property/src/editors/PropertyEditor.tsx@@ -4,7 +4,7 @@ import { useProperty } from '../core/context';import { InlineEditor } from './inline/InlineEditor';import { PopoverEditor } from './popover/PopoverEditor';-export type PropertyEditorProps = {+type PropertyEditorProps = {/*** Forwarded to entity popover editor. Has no effect for non-entity types.*/diff --git a/js/app/packages/property/src/editors/index.ts b/js/app/packages/property/src/editors/index.tsindex 824b7055c5..54127ed04d 100644--- a/js/app/packages/property/src/editors/index.ts+++ b/js/app/packages/property/src/editors/index.ts@@ -1,22 +1,9 @@-export { useBooleanEditor } from './hooks/useBooleanEditor';-export { useInlineEditor } from './hooks/useInlineEditor';export { InlineBooleanEditor } from './inline/InlineBooleanEditor';export { InlineEditor } from './inline/InlineEditor';export { InlineLinkEditor } from './inline/InlineLinkEditor';export { InlineNumberEditor } from './inline/InlineNumberEditor';export { InlineTextEditor } from './inline/InlineTextEditor';-export {- PropertyEditor,- type PropertyEditorProps,-} from './PropertyEditor';-export { DateEditor } from './popover/DateEditor';-export { EditorPopover } from './popover/EditorPopover';-export {- EntityEditor,- type EntityEditorProps,-} from './popover/EntityEditor';-export {- PopoverEditor,- type PopoverEditorProps,-} from './popover/PopoverEditor';-export { SelectEditor } from './popover/SelectEditor';+export { PropertyEditor } from './PropertyEditor';++export {} from './popover/EntityEditor';+export { PopoverEditor } from './popover/PopoverEditor';diff --git a/js/app/packages/property/src/editors/popover/EntityEditor.tsx b/js/app/packages/property/src/editors/popover/EntityEditor.tsxindex 139c4241b1..d14f8ed750 100644--- a/js/app/packages/property/src/editors/popover/EntityEditor.tsx+++ b/js/app/packages/property/src/editors/popover/EntityEditor.tsx@@ -11,7 +11,7 @@ import { isEntityProperty } from '../../utils';import { PropertyEntitySelector } from '../selectors/PropertyEntitySelector';import { EditorPopover } from './EditorPopover';-export type EntityEditorProps = {+type EntityEditorProps = {/*** Owning entity context for the property — used by PropertyEntitySelector* to filter the current entity out of the picker. Omit when no self-filterdiff --git a/js/app/packages/property/src/editors/popover/PopoverEditor.tsx b/js/app/packages/property/src/editors/popover/PopoverEditor.tsxindex 05cdb1598c..1ca25a28cd 100644--- a/js/app/packages/property/src/editors/popover/PopoverEditor.tsx+++ b/js/app/packages/property/src/editors/popover/PopoverEditor.tsx@@ -5,7 +5,7 @@ import { DateEditor } from './DateEditor';import { EntityEditor } from './EntityEditor';import { SelectEditor } from './SelectEditor';-export type PopoverEditorProps = {+type PopoverEditorProps = {/*** Forwarded to EntityEditor to filter the owning entity out of the picker.* Has no effect for non-entity properties.diff --git a/js/app/packages/property/src/editors/selectors/entityUtils.ts b/js/app/packages/property/src/editors/selectors/entityUtils.tsindex 407f74c77a..962e810b17 100644--- a/js/app/packages/property/src/editors/selectors/entityUtils.ts+++ b/js/app/packages/property/src/editors/selectors/entityUtils.ts@@ -34,7 +34,7 @@ export type EntityTypeItemMap = {/*** Maps EntityType to quickAccess buckets*/-export function entityTypeToBuckets(entityType: EntityType): readonly Bucket[] {+function entityTypeToBuckets(entityType: EntityType): readonly Bucket[] {const buckets = match(entityType).with('USER', () => ['person'] as const).with('CHANNEL', () => ['channel', 'dm'] as const)@@ -91,7 +91,7 @@ export function quickAccessItemToEntity(item: QuickAccessItem): CombinedEntity {}/** Maps an EntityData to a CombinedEntity */-export function entityDataToEntity(data: EntityData): CombinedEntity {+function entityDataToEntity(data: EntityData): CombinedEntity {return { kind: 'entity', id: data.id, data };}diff --git a/js/app/packages/property/src/editors/selectors/index.ts b/js/app/packages/property/src/editors/selectors/index.tsindex 5f7f4636a0..de7d8a0bd9 100644--- a/js/app/packages/property/src/editors/selectors/index.ts+++ b/js/app/packages/property/src/editors/selectors/index.ts@@ -4,8 +4,6 @@ export {type CombinedEntity,createEntitySearchConfig,type EntityTypeItemMap,- entityDataToEntity,- entityTypeToBuckets,getEntityName,getEntitySearchText,getEntityTimestampedItem,@@ -17,12 +15,5 @@ export {useQuickAccessEntities,userToEntity,} from './entityUtils';-export { PropertyDateSelector } from './PropertyDateSelector';-export { PropertyEntitySelector } from './PropertyEntitySelector';-export { PropertyOptionSelector } from './PropertyOptionSelector';-export type {- EntitySelectorConfig,- OptionSelectorConfig,- PinnedOption,- SelectableOption,-} from './types';++export type {} from './types';diff --git a/js/app/packages/property/src/extractors/PropertyChips.tsx b/js/app/packages/property/src/extractors/PropertyChips.tsxindex 8356fb44d5..7bca313a0a 100644--- a/js/app/packages/property/src/extractors/PropertyChips.tsx+++ b/js/app/packages/property/src/extractors/PropertyChips.tsx@@ -19,7 +19,7 @@ type Props = {renderChip?: (chip: ChipInfo) => JSX.Element;};-export type ChipInfo = {+type ChipInfo = {/** Stable identifier for the chip (option ID, entity ID, URL, etc.). */key: string;/** Human-readable label. */diff --git a/js/app/packages/property/src/extractors/index.ts b/js/app/packages/property/src/extractors/index.tsindex 919cda36d7..96578b98e6 100644--- a/js/app/packages/property/src/extractors/index.ts+++ b/js/app/packages/property/src/extractors/index.ts@@ -1,6 +1,6 @@export { PropertyAddButton } from './PropertyAddButton';export { PropertyCaret } from './PropertyCaret';-export { type ChipInfo, PropertyChips } from './PropertyChips';+export { PropertyChips } from './PropertyChips';export { PropertyEditTrigger } from './PropertyEditTrigger';export { PropertyEmpty } from './PropertyEmpty';export { PropertyIcon } from './PropertyIcon';diff --git a/js/app/packages/property/src/hooks/index.ts b/js/app/packages/property/src/hooks/index.tsindex 026f97387b..cb0ff5c3b5 100644--- a/js/app/packages/property/src/hooks/index.ts+++ b/js/app/packages/property/src/hooks/index.ts@@ -1,3 +1 @@-export { usePropertyClear } from './usePropertyClear';-export { type PropertyDisplay, usePropertyDisplay } from './usePropertyDisplay';-export { usePropertyEdit } from './usePropertyEdit';+export {};diff --git a/js/app/packages/property/src/hooks/usePropertyClear.ts b/js/app/packages/property/src/hooks/usePropertyClear.tsdeleted file mode 100644index 66be2bb949..0000000000--- a/js/app/packages/property/src/hooks/usePropertyClear.ts+++ /dev/null@@ -1,30 +0,0 @@-import { createSignal } from 'solid-js';-import { useProperty } from '../core/context';-import { toPropertyApiValue } from '../utils';--/**- * Clears a property's value (sets to null). Tracks an `isSaving` signal so- * UI can disable affordances during the call.- */-export function usePropertyClear() {- const ctx = useProperty();- const [isSaving, setIsSaving] = createSignal(false);-- const clear = async () => {- if (isSaving()) return;- const save = ctx.onSave;- if (!save) return;- const property = ctx.property();- if (!ctx.canEdit() || property.isMetadata) return;- setIsSaving(true);- try {- const next = toPropertyApiValue(property, null);- if (next) await save(property, next);- ctx.onRefresh?.();- } finally {- setIsSaving(false);- }- };-- return { clear, isSaving };-}diff --git a/js/app/packages/property/src/hooks/usePropertyDisplay.ts b/js/app/packages/property/src/hooks/usePropertyDisplay.tsdeleted file mode 100644index 010bd21777..0000000000--- a/js/app/packages/property/src/hooks/usePropertyDisplay.ts+++ /dev/null@@ -1,89 +0,0 @@-import { tryMacroId, useDisplayNameParts } from '@core/user';-import { createMemo } from 'solid-js';-import type { Property } from '../types';-import {- formatBoolean,- formatDate,- formatNumber,- formatPropertyValue,- getEntityValues,- getLinkValues,- getSelectValues,- hasValue,- isBooleanProperty,- isDateProperty,- isEntityProperty,- isLinkProperty,- isNumberProperty,- isSelectProperty,- isStringProperty,-} from '../utils';--export interface PropertyDisplay {- isEmpty: boolean;- isUser: boolean;- /** Best single-value representation as text. */- text: string;- /** For SELECT properties: the first option's id. */- firstOptionId: string | undefined;- /** For ENTITY+USER: the first user id. */- firstUserId: string | undefined;- /** Count of values for multi-value properties (0 for single). */- count: number;-}--/**- * Centralizes the "extract a displayable representation from a property"- * logic that today is duplicated across InlinePropertyValue / ListProperty /- * Condensed.- */-export function usePropertyDisplay(- property: () => Property-): () => PropertyDisplay {- return createMemo(() => {- const p = property();- const empty = !hasValue(p);- const isUser = isEntityProperty(p) && p.specificEntityType === 'USER';-- let text = '';- let firstOptionId: string | undefined;- let firstUserId: string | undefined;- let count = 0;-- if (isStringProperty(p)) {- text = p.value ?? '';- } else if (isNumberProperty(p)) {- text = p.value === null ? '' : formatNumber(p.value);- } else if (isBooleanProperty(p)) {- text = p.value === null ? '' : formatBoolean(p.value);- } else if (isDateProperty(p)) {- text = p.value === null ? '' : formatDate(p.value);- } else if (isSelectProperty(p)) {- const values = getSelectValues(p);- count = values.length;- firstOptionId = values[0];- text = firstOptionId ? formatPropertyValue(p, firstOptionId) : '';- } else if (isEntityProperty(p)) {- const entities = getEntityValues(p);- count = entities.length;- if (isUser) {- firstUserId = entities[0]?.entity_id;- if (entities.length === 1 && firstUserId) {- const parts = useDisplayNameParts(tryMacroId(firstUserId));- text = parts.firstName() || 'Unknown';- } else if (entities.length > 1) {- text =- entities.length === 2 ? '2 people' : `${entities.length} people`;- }- } else if (entities.length > 0) {- text = entities.length === 1 ? '1 item' : `${entities.length} items`;- }- } else if (isLinkProperty(p)) {- const links = getLinkValues(p);- count = links.length;- text = links[0] ?? '';- }-- return { isEmpty: empty, isUser, text, firstOptionId, firstUserId, count };- });-}diff --git a/js/app/packages/property/src/hooks/usePropertyEdit.ts b/js/app/packages/property/src/hooks/usePropertyEdit.tsdeleted file mode 100644index 37f43b9ac3..0000000000--- a/js/app/packages/property/src/hooks/usePropertyEdit.ts+++ /dev/null@@ -1,18 +0,0 @@-import { useProperty } from '../core/context';--/**- * Convenience hook around <Property.Root>'s edit affordance.- * - `open(anchor?)`: invokes the root's onEdit handler.- * - `isReadOnly()`: combines canEdit + isMetadata.- */-export function usePropertyEdit() {- const ctx = useProperty();- return {- open(anchor?: HTMLElement) {- const p = ctx.property();- if (!ctx.canEdit() || p.isMetadata) return;- ctx.onEdit?.(p, anchor);- },- isReadOnly: () => !ctx.canEdit() || ctx.property().isMetadata,- };-}diff --git a/js/app/packages/property/src/index.ts b/js/app/packages/property/src/index.tsindex 9feee09752..5fec72ce3d 100644--- a/js/app/packages/property/src/index.ts+++ b/js/app/packages/property/src/index.ts@@ -1,36 +1,19 @@// Public surface for @property. Built up incrementally as primitives land.export * from './constants';-export {- type PropertyEditFn,- type PropertyRootContextValue,- type PropertySaveFn,- useMaybeProperty,- useProperty,-} from './core/context';-export {- type EntityEditorProps,- type PopoverEditorProps,- type PropertyEditorProps,- useBooleanEditor,- useInlineEditor,-} from './editors';+export { useProperty } from './core/context';+export {} from './editors';export {type CombinedEntity,createEntitySearchConfig,Dropdown,type DropdownOption,type EntityTypeItemMap,- entityDataToEntity,- entityTypeToBuckets,getEntityName,getEntitySearchText,getEntityTimestampedItem,getEntityType,isChannelEntity,- PropertyDateSelector,- PropertyEntitySelector,- PropertyOptionSelector,quickAccessItemToEntity,sortEntitiesWithSelfFirst,threadMapper,diff --git a/js/app/packages/property/src/types.ts b/js/app/packages/property/src/types.tsindex 8f05cc5f84..17534a007f 100644--- a/js/app/packages/property/src/types.ts+++ b/js/app/packages/property/src/types.ts@@ -2,33 +2,9 @@// Source of truth lives there for now; a future PR will flip ownership to @property.export type {- ApiError,- BooleanProperty,- DataType,DateProperty,- EntityPropertiesResponse,EntityProperty,- EntityPropertyWithDefinition,- EntityReference,- LinkProperty,- MultiValueProperty,- NumberProperty,- PropertiesPanelProps,Property,PropertyApiValues,- PropertyDefinitionDomain,- PropertyDefinitionResponse,- PropertyEditorProps,- PropertyOption,- PropertyOptionValue,- PropertySelectorProps,- PropertyValue,- Result,- SelectNumberProperty,SelectProperty,- SelectStringProperty,- SetPropertyValue,- SingleValueProperty,- StringProperty,- ValueType,} from '@core/component/Properties/types';diff --git a/js/app/packages/property/src/utils/index.ts b/js/app/packages/property/src/utils/index.tsindex ea7542d2a2..260bdaad0d 100644--- a/js/app/packages/property/src/utils/index.ts+++ b/js/app/packages/property/src/utils/index.ts@@ -8,28 +8,20 @@ export {formatDate,formatNumber,formatOptionValue,- formatOptionValueById,formatPropertyValue,- getOptionValue,} from '@core/component/Properties/utils/formatting';export {getEntityValues,getLinkValues,getSelectValues,- hasMultiValue,- hasSingleValue,hasValue,isBooleanProperty,isDateProperty,isEntityProperty,isLinkProperty,- isMultiValueProperty,isNumberProperty,- isSelectNumberProperty,isSelectProperty,- isSelectStringProperty,- isSingleValueProperty,isStringProperty,toPropertyApiValue,} from '@core/component/Properties/utils/typeGuards';diff --git a/js/app/packages/queries/agent-schedule/schedules.ts b/js/app/packages/queries/agent-schedule/schedules.tsindex 169da7feb7..9f12401e19 100644--- a/js/app/packages/queries/agent-schedule/schedules.ts+++ b/js/app/packages/queries/agent-schedule/schedules.ts@@ -85,7 +85,7 @@ export function invalidateSchedules() {});}-export function invalidateScheduleHistory(scheduleId: string) {+function _invalidateScheduleHistory(scheduleId: string) {return queryClient.invalidateQueries({queryKey: scheduledActionKeys.history({ scheduleId }).queryKey,});@@ -136,7 +136,7 @@ export function useUpdateScheduleMutation(}));}-export function useDeleteScheduleMutation(+function _useDeleteScheduleMutation(callbacks?: MutationCallbacks<{ success: boolean },Error,diff --git a/js/app/packages/queries/ai/index.ts b/js/app/packages/queries/ai/index.tsdeleted file mode 100644index be8af65b56..0000000000--- a/js/app/packages/queries/ai/index.ts+++ /dev/null@@ -1,9 +0,0 @@-export {- AIObjectParseError,- AIObjectSchemaError,- type AIObjectSchemaViolation,- AIObjectValidationError,- type CreateAIObjectOptions,- type CreateAIObjectResult,- createAIObject,-} from './createAIObject';diff --git a/js/app/packages/queries/auth/index.ts b/js/app/packages/queries/auth/index.tsindex ce823d3189..cddd4d0b57 100644--- a/js/app/packages/queries/auth/index.ts+++ b/js/app/packages/queries/auth/index.ts@@ -1,33 +1,11 @@// Re-export user context hooks for backwards compatibilityexport {- useAuthor,- useEmail,- useGroup,- useHasChromeExt,- useHasTrialed,useIsAuthenticated,- useLicenseStatus,- usePermissions,- useTutorialCompleted,useUserId,useUserInfo,} from '@core/context/user';export { authKeys } from './keys';export { useSendMobileWelcomeEmail } from './mobile-welcome-email';-export {- useCompleteOnboardingMutation,- useSetGroupMutation,-} from './mutations';-export {- invalidateAllAfterLogin,- invalidateUserInfo,- type UserInfoData,- updateUserInfo,- useUserInfoQuery,-} from './user-info';-export {- invalidateUserQuota,- useInvalidateUserQuota,- useUpdateUserQuotaCache,- useUserQuotaQuery,-} from './user-quota';+export {} from './mutations';+export type { UserInfoData } from './user-info';+export { invalidateUserQuota } from './user-quota';diff --git a/js/app/packages/queries/auth/mutations.ts b/js/app/packages/queries/auth/mutations.tsdeleted file mode 100644index 39f8857d89..0000000000--- a/js/app/packages/queries/auth/mutations.ts+++ /dev/null@@ -1,57 +0,0 @@-import { throwOnErr } from '@core/util/result';-import { authServiceClient } from '@service-auth/client';-import type { PatchUserOnboardingRequest } from '@service-auth/generated/schemas/patchUserOnboardingRequest';-import { useMutation } from '@tanstack/solid-query';-import { queryClient } from '../client';-import { type MutationCallbacks, withCallbacks } from '../utils';-import { authKeys } from './keys';--type CompleteOnboardingCallbacks = MutationCallbacks<- void,- Error,- PatchUserOnboardingRequest->;--/** Mutation for completing user onboarding. */-export function useCompleteOnboardingMutation(- callbacks?: CompleteOnboardingCallbacks-) {- return useMutation(() => ({- mutationFn: async (args: PatchUserOnboardingRequest) => {- await throwOnErr(- async () => await authServiceClient.completeOnboarding(args)- );- },- ...withCallbacks<void, Error, PatchUserOnboardingRequest>(- {- onSuccess: () => {- queryClient.invalidateQueries({- queryKey: authKeys.userInfo.queryKey,- });- },- },- callbacks- ),- }));-}--type SetGroupCallbacks = MutationCallbacks<void, Error, { group: string }>;--/** Mutation for setting the user's group (for A/B testing). */-export function useSetGroupMutation(callbacks?: SetGroupCallbacks) {- return useMutation(() => ({- mutationFn: async (args: { group: string }) => {- await throwOnErr(async () => await authServiceClient.setGroup(args));- },- ...withCallbacks<void, Error, { group: string }>(- {- onSuccess: () => {- queryClient.invalidateQueries({- queryKey: authKeys.userInfo.queryKey,- });- },- },- callbacks- ),- }));-}diff --git a/js/app/packages/queries/auth/user-info.ts b/js/app/packages/queries/auth/user-info.tsindex 67f53b6419..30b408669d 100644--- a/js/app/packages/queries/auth/user-info.ts+++ b/js/app/packages/queries/auth/user-info.ts@@ -72,7 +72,7 @@ export async function prefetchUserInfo() {}/** Fetch user info and return the data. Use when you need the result. */-export async function fetchUserInfo() {+async function _fetchUserInfo() {return queryClient.fetchQuery({queryKey: authKeys.userInfo.queryKey,queryFn: async () =>@@ -85,4 +85,4 @@ export async function fetchUserInfo() {/*** @deprecated Use invalidateUserInfo() instead*/-export const updateUserInfo = invalidateUserInfo;+const _updateUserInfo = invalidateUserInfo;diff --git a/js/app/packages/queries/auth/user-quota.ts b/js/app/packages/queries/auth/user-quota.tsindex 76618092ef..328398842e 100644--- a/js/app/packages/queries/auth/user-quota.ts+++ b/js/app/packages/queries/auth/user-quota.ts@@ -39,7 +39,7 @@ function userQuotaQueryOptions() {* useQuery hook for retrieving the user's quota information.* Returns the current quota including documents, AI chat messages, and their limits.*/-export function useUserQuotaQuery() {+function _useUserQuotaQuery() {return useQuery(() => userQuotaQueryOptions());}@@ -57,7 +57,7 @@ export function invalidateUserQuota() {* Hook to get a function that invalidates the user quota query cache.* Useful for refreshing quota data after mutations that might affect it.*/-export function useInvalidateUserQuota() {+function _useInvalidateUserQuota() {return invalidateUserQuota;}@@ -65,7 +65,7 @@ export function useInvalidateUserQuota() {* Hook to get a function that updates the user quota in the query cache.* Useful for optimistic updates when quota changes are known.*/-export function useUpdateUserQuotaCache() {+function _useUpdateUserQuotaCache() {return (quota: UserQuota) => {queryClient.setQueryData(authKeys.userQuota.queryKey, quota);};diff --git a/js/app/packages/queries/cache.ts b/js/app/packages/queries/cache.tsindex 199a2a81bf..bebce2ed17 100644--- a/js/app/packages/queries/cache.ts+++ b/js/app/packages/queries/cache.ts@@ -1,6 +1,6 @@import type { QueryClient } from '@tanstack/solid-query';-export type CachePartition<Item, Data> = {+type CachePartition<Item, Data> = {readonly cached: ReadonlyMap<Item, Data>;readonly missing: readonly Item[];};diff --git a/js/app/packages/queries/call/call.ts b/js/app/packages/queries/call/call.tsindex 0076dc5f28..2103691e3a 100644--- a/js/app/packages/queries/call/call.ts+++ b/js/app/packages/queries/call/call.ts@@ -14,7 +14,7 @@ export function useActiveCallQuery(channelId: Accessor<string>) {}));}-export function useJoinCallMutation() {+function _useJoinCallMutation() {return useMutation(() => ({gcTime: 0,mutationFn: async (channelId: string) =>diff --git a/js/app/packages/queries/channel/channel-attachments.ts b/js/app/packages/queries/channel/channel-attachments.tsindex 97e3733369..3f48ee9bb3 100644--- a/js/app/packages/queries/channel/channel-attachments.ts+++ b/js/app/packages/queries/channel/channel-attachments.ts@@ -15,7 +15,7 @@ export type ChannelAttachmentsData = InfiniteData<string | null>;-export type ChannelAttachmentsQueryKey = ReturnType<+type ChannelAttachmentsQueryKey = ReturnType<typeof channelKeys.attachments>['queryKey'];@@ -50,7 +50,7 @@ export function channelAttachmentsQueryOptions(};}-export function useChannelAttachmentsQuery(+function useChannelAttachmentsQuery(channelId: Accessor<string>,attachmentType?: Accessor<ChannelAttachmentType | undefined>) {@@ -69,7 +69,7 @@ export function useChannelDocumentAttachmentsQuery(return useChannelAttachmentsQuery(channelId, () => 'dss');}-export function useChannelAttachmentsWithIndex(channelId: Accessor<string>) {+function _useChannelAttachmentsWithIndex(channelId: Accessor<string>) {const query = useChannelAttachmentsQuery(channelId);const byId = createMemo(() => {const flat = flattenAttachments(@@ -102,7 +102,7 @@ export function getChannelAttachmentsQueryKeyPrefix(channelId: string) {return [...channelKeys.attachments._def, channelId];}-export function softInvalidateChannelAttachments(channelId: string) {+function _softInvalidateChannelAttachments(channelId: string) {queryClient.invalidateQueries({queryKey: getChannelAttachmentsQueryKeyPrefix(channelId),refetchType: 'inactive',diff --git a/js/app/packages/queries/channel/channel-messages.ts b/js/app/packages/queries/channel/channel-messages.tsindex 25541ba84c..f57ffbac1f 100644--- a/js/app/packages/queries/channel/channel-messages.ts+++ b/js/app/packages/queries/channel/channel-messages.ts@@ -30,16 +30,10 @@ export type ChannelMessagesData = InfiniteData<ChannelMessagesPageParam | null>;-export type ChannelMessagesQueryKey = ReturnType<+type ChannelMessagesQueryKey = ReturnType<typeof channelKeys.messages>['queryKey'];-export type IndexedChannelMessages = {- items: ApiChannelMessage[];- keys: string[];- byId: Map<string, ApiChannelMessage>;-};-export type TopLevelMessageSnapshot = {itemIndex: number;message: ApiChannelMessage;@@ -171,7 +165,7 @@ export function setChannelMessagesData(}/** Returns all cached message query entries for a channel. */-export function getChannelMessagesEntries(channelId: string) {+function getChannelMessagesEntries(channelId: string) {return queryClient.getQueriesData<ChannelMessagesData>({queryKey: getChannelMessagesQueryKeyPrefix(channelId),});@@ -332,7 +326,7 @@ export function replaceTopLevelMessageStateInChannelMessages();}-export function getTopLevelMessageSnapshot(+function getTopLevelMessageSnapshot(data: ChannelMessagesData | undefined,messageId: string): TopLevelMessageSnapshot | undefined {@@ -518,7 +512,7 @@ export function replaceThreadReplyStateInChannelMessages(});}-export function getThreadPreviewReplySnapshot(+function getThreadPreviewReplySnapshot(data: ChannelMessagesData | undefined,threadId: string,replyId: string@@ -555,7 +549,7 @@ export function restoreThreadPreviewReplyInChannelMessages(}/** Finds a top-level message across all cached variants for a channel. */-export function findTopLevelMessageInChannelMessages(+function _findTopLevelMessageInChannelMessages(channelId: string,messageId: string): ApiChannelMessage | undefined {@@ -619,7 +613,7 @@ export function softInvalidateChannelMessages(channelId: string) {}/** Returns the shared prefix for all by-ids message queries in a channel. */-export function getChannelMessagesByIdsQueryKeyPrefix(channelId: string) {+function getChannelMessagesByIdsQueryKeyPrefix(channelId: string) {return [...channelKeys.messagesByIds._def, channelId];}diff --git a/js/app/packages/queries/channel/channel-participants.ts b/js/app/packages/queries/channel/channel-participants.tsindex 8b86729164..a0a59931a7 100644--- a/js/app/packages/queries/channel/channel-participants.ts+++ b/js/app/packages/queries/channel/channel-participants.ts@@ -8,7 +8,7 @@ import type { Accessor } from 'solid-js';import { queryClient } from '../client';import { channelKeys } from './keys';-export function channelParticipantsQueryOptions(channelId: string) {+function channelParticipantsQueryOptions(channelId: string) {return {queryKey: channelKeys.participants(channelId).queryKey,queryFn: async (): Promise<ApiChannelParticipant[]> => {diff --git a/js/app/packages/queries/channel/get-or-create-dm.ts b/js/app/packages/queries/channel/get-or-create-dm.tsindex 211458c3c4..0bc3d52bba 100644--- a/js/app/packages/queries/channel/get-or-create-dm.ts+++ b/js/app/packages/queries/channel/get-or-create-dm.ts@@ -5,7 +5,7 @@ import type { GetOrCreateDmResponse } from '@service-comms/generated/models';import { useMutation } from '@tanstack/solid-query';import { invalidateListChannels } from './channels';-export type GetOrCreateDirectMessageParams = {+type GetOrCreateDirectMessageParams = {recipient_id: string;};diff --git a/js/app/packages/queries/channel/mentions.ts b/js/app/packages/queries/channel/mentions.tsdeleted file mode 100644index 737a1178f0..0000000000--- a/js/app/packages/queries/channel/mentions.ts+++ /dev/null@@ -1,19 +0,0 @@-import { throwOnErr } from '@core/util/result';-import { commsServiceClient } from '@service-comms/client';-import { useQuery } from '@tanstack/solid-query';-import type { Accessor } from 'solid-js';-import { channelKeys } from './keys';--export function useMentionsQuery(channelId: Accessor<string>) {- return useQuery(() => {- return {- queryKey: channelKeys.mentions(channelId()).queryKey,- queryFn: () =>- throwOnErr(() =>- commsServiceClient.getMentions({ channel_id: channelId() })- ),- staleTime: Infinity,- refetchOnMount: false,- };- });-}diff --git a/js/app/packages/queries/channel/message.ts b/js/app/packages/queries/channel/message.tsindex 669c8d986c..84a74b0345 100644--- a/js/app/packages/queries/channel/message.ts+++ b/js/app/packages/queries/channel/message.ts@@ -61,12 +61,12 @@ type WithChannelId<T> = T & { channelId: string };type WithOptimisticId<T> = T & { optimisticId: string };type WithSenderId<T> = T & { senderId: string };-export type InsertMessageContext = {+type InsertMessageContext = {optimisticId: string;target: ReturnType<typeof resolveMessageTarget>;};-export type DeleteMessageContext = {+type DeleteMessageContext = {deletedMessage?: Message;deletedReactions: CountedReaction[];deletedAttachments: Attachment[];@@ -74,7 +74,7 @@ export type DeleteMessageContext = {targetSnapshot?: DeleteTargetSnapshot;};-export type UpdateMessageContext = {+type UpdateMessageContext = {messageId: string;target: ReturnType<typeof resolveMessageTarget>;previousContent: string;@@ -211,7 +211,7 @@ export function rollbackInsertChannelMessage(* Replace an optimistic message ID with the real server-assigned ID.* Called in mutation onSuccess after server returns the real message.*/-export function replaceOptimisticMessage(+function replaceOptimisticMessage(vars: WithChannelId<{optimisticId: string;realId: string;@@ -233,7 +233,7 @@ export function replaceOptimisticMessage(* Optimistically delete a message from the channel cache.* Returns minimal context: only the deleted message, reactions, and attachments.*/-export function optimisticDeleteChannelMessage(+function optimisticDeleteChannelMessage(vars: WithChannelId<Pick<ChannelMessage, 'message_id'> & { threadId?: string }>@@ -261,7 +261,7 @@ export function optimisticDeleteChannelMessage(/*** Rollback an optimistic message delete by restoring the deleted data.*/-export function rollbackDeleteChannelMessage(+function rollbackDeleteChannelMessage(channelId: string,context: DeleteMessageContext): void {diff --git a/js/app/packages/queries/channel/participants.ts b/js/app/packages/queries/channel/participants.tsindex 41aeee6860..ec56eaf238 100644--- a/js/app/packages/queries/channel/participants.ts+++ b/js/app/packages/queries/channel/participants.ts@@ -13,11 +13,11 @@ import type { ChannelParticipant } from './types';type WithChannelId<T> = T & { channelId: string };-export type AddParticipantsContext = {+type AddParticipantsContext = {addedUserIds: string[];};-export type RemoveParticipantsContext = {+type RemoveParticipantsContext = {removedParticipants: ChannelParticipant[];};@@ -25,7 +25,7 @@ export type RemoveParticipantsContext = {* Optimistically add participants to a channel.* Returns minimal context for rollback.*/-export function optimisticAddParticipants(+function optimisticAddParticipants(vars: WithChannelId<{ participants: string[] }>): AddParticipantsContext | undefined {const participantsQueryKey = channelKeys.participants(@@ -69,7 +69,7 @@ export function optimisticAddParticipants(/*** Rollback an optimistic add participants by removing them.*/-export function rollbackAddParticipants(+function rollbackAddParticipants(channelId: string,context: AddParticipantsContext): void {@@ -90,7 +90,7 @@ export function rollbackAddParticipants(* Optimistically remove participants from a channel.* Returns minimal context for rollback.*/-export function optimisticRemoveParticipants(+function optimisticRemoveParticipants(vars: WithChannelId<{ participants: string[] }>): RemoveParticipantsContext | undefined {const participantsQueryKey = channelKeys.participants(@@ -127,7 +127,7 @@ export function optimisticRemoveParticipants(/*** Rollback an optimistic remove participants by re-adding them.*/-export function rollbackRemoveParticipants(+function rollbackRemoveParticipants(channelId: string,context: RemoveParticipantsContext): void {diff --git a/js/app/packages/queries/channel/reaction.ts b/js/app/packages/queries/channel/reaction.tsindex ab9c3cbc48..827b3dbd44 100644--- a/js/app/packages/queries/channel/reaction.ts+++ b/js/app/packages/queries/channel/reaction.ts@@ -30,7 +30,7 @@ type WithReactionState<T> = T & {threadId?: string;};-export type AddReactionContext = {+type AddReactionContext = {messageId: string;emoji: string;userId: string;@@ -38,7 +38,7 @@ export type AddReactionContext = {target: MessageTarget;};-export type RemoveReactionContext = {+type RemoveReactionContext = {messageId: string;emoji: string;userId: string;diff --git a/js/app/packages/queries/channel/reconcile.ts b/js/app/packages/queries/channel/reconcile.tsindex cf30c907a9..690a15d6b3 100644--- a/js/app/packages/queries/channel/reconcile.ts+++ b/js/app/packages/queries/channel/reconcile.ts@@ -70,14 +70,14 @@ export type DeleteTargetSnapshot =preview?: ThreadPreviewReplySnapshot;};-export type TargetMessageState = {+type TargetMessageState = {content: string;editedAt: string | null | undefined;updatedAt: string;attachments: ApiMessageAttachment[];};-export function makeMessageTarget(args: {+function makeMessageTarget(args: {messageId: string;threadId?: string;}): MessageTarget {@@ -96,7 +96,7 @@ export function makeMessageTarget(args: {}/** Finds a reply's parent thread id from cached channel data. */-export function findThreadIdForMessage(+function findThreadIdForMessage(channelId: string,messageId: string): string | undefined {diff --git a/js/app/packages/queries/channel/thread-preview.ts b/js/app/packages/queries/channel/thread-preview.tsindex 1526b26dab..9f5b230154 100644--- a/js/app/packages/queries/channel/thread-preview.ts+++ b/js/app/packages/queries/channel/thread-preview.ts@@ -1,13 +1,13 @@import type { ApiThreadReply } from '@service-comms/client';import type { ApiCountedReaction } from '@service-storage/generated/schemas';-export type ThreadPreviewState = {+type ThreadPreviewState = {preview: ApiThreadReply[];reply_count: number;latest_reply_at?: string | null;};-export type ThreadPreviewReplySnapshot = {+type ThreadPreviewReplySnapshot = {previewIndex: number;reply: ApiThreadReply;};diff --git a/js/app/packages/queries/channel/thread-replies.ts b/js/app/packages/queries/channel/thread-replies.tsindex 41d3e03b8d..cf245b93d8 100644--- a/js/app/packages/queries/channel/thread-replies.ts+++ b/js/app/packages/queries/channel/thread-replies.ts@@ -12,7 +12,7 @@ export type ThreadReplySnapshot = {reply: ApiThreadReply;};-export type ThreadRepliesQueryKey = ReturnType<+type ThreadRepliesQueryKey = ReturnType<typeof channelKeys.threadReplies>['queryKey'];@@ -56,7 +56,7 @@ export function getThreadRepliesQueryKey(}/** Returns the shared prefix for all thread reply queries in a channel. */-export function getThreadRepliesQueryKeyPrefix(channelId: string) {+function getThreadRepliesQueryKeyPrefix(channelId: string) {return [...channelKeys.threadReplies._def, channelId];}diff --git a/js/app/packages/queries/contacts/contacts.ts b/js/app/packages/queries/contacts/contacts.tsindex dced84c171..29ccac8f93 100644--- a/js/app/packages/queries/contacts/contacts.ts+++ b/js/app/packages/queries/contacts/contacts.ts@@ -14,7 +14,7 @@ function contactsQueryOptions() {};}-export function useContactsQuery() {+function useContactsQuery() {return useQuery(() => contactsQueryOptions());}diff --git a/js/app/packages/queries/email/label.ts b/js/app/packages/queries/email/label.tsdeleted file mode 100644index 62a5f73a50..0000000000--- a/js/app/packages/queries/email/label.ts+++ /dev/null@@ -1,24 +0,0 @@-import { throwOnErr } from '@core/util/result';-import { queryClient } from '@queries/client';-import { emailClient } from '@service-email/client';-import { useQuery } from '@tanstack/solid-query';-import { emailKeys } from './keys';--const LABEL_STALE_TIME = 5 * 60 * 1000;--export function useEmailLabelsQuery() {- return useQuery(() => ({- queryKey: emailKeys.labels.queryKey,- queryFn: async () =>- throwOnErr(async () => await emailClient.getUserLabels()),- staleTime: LABEL_STALE_TIME,- refetchOnWindowFocus: 'always',- }));-}--export function invalidateEmailLabels() {- queryClient.cancelQueries({ queryKey: emailKeys.labels.queryKey });- queryClient.invalidateQueries({- queryKey: emailKeys.labels.queryKey,- });-}diff --git a/js/app/packages/queries/email/thread.ts b/js/app/packages/queries/email/thread.tsindex fbd738721e..cb2efb3b7f 100644--- a/js/app/packages/queries/email/thread.ts+++ b/js/app/packages/queries/email/thread.ts@@ -114,7 +114,7 @@ export async function fetchAndCacheThread(return ok({ thread: thread! });}-export type ThreadQueryData = {+type ThreadQueryData = {thread: Thread;hasMore: boolean;};@@ -310,7 +310,7 @@ type ScheduleMessageParams = {/*** Mutation to send an email message.*/-export function useScheduleMessageMutation(+function _useScheduleMessageMutation(callbacks?: MutationCallbacks<UpsertScheduledResponse,Error,diff --git a/js/app/packages/queries/entity/permissionUtils.ts b/js/app/packages/queries/entity/permissionUtils.tsindex 3ba1b38da6..307643a4ed 100644--- a/js/app/packages/queries/entity/permissionUtils.ts+++ b/js/app/packages/queries/entity/permissionUtils.ts@@ -21,19 +21,19 @@ export function hasEntityAccess(return response.status === 'access';}-export function isAccessLevelPermission(+function isAccessLevelPermission(permission: EntityPermission): permission is AccessLevelPermission {return permission.type === 'access_level';}-export function isChannelRolePermission(+function isChannelRolePermission(permission: EntityPermission): permission is ChannelRolePermission {return permission.type === 'channel_role';}-export function getEntityAccessLevel(+function _getEntityAccessLevel(response: EntityPermissionResponse): AccessLevel | null {if (!hasEntityAccess(response)) {@@ -47,7 +47,7 @@ export function getEntityAccessLevel(return response.permission.access_level;}-export function getEntityChannelRole(+function _getEntityChannelRole(response: EntityPermissionResponse): ParticipantRole | null {if (!hasEntityAccess(response)) {diff --git a/js/app/packages/queries/entity/permissions.ts b/js/app/packages/queries/entity/permissions.tsindex aad8e22ad8..bf8ea2e612 100644--- a/js/app/packages/queries/entity/permissions.ts+++ b/js/app/packages/queries/entity/permissions.ts@@ -29,7 +29,7 @@ export function useEntityPermissions();}-export async function fetchEntityPermissions(+async function _fetchEntityPermissions(entityType: string,entityId: string): Promise<Result<EntityPermissionResponse, ResultError<string>[]>> {diff --git a/js/app/packages/queries/history/history.ts b/js/app/packages/queries/history/history.tsindex cbeca27b08..2c762da979 100644--- a/js/app/packages/queries/history/history.ts+++ b/js/app/packages/queries/history/history.ts@@ -62,7 +62,7 @@ export function setHistoryItemFileType(itemId: string, fileType: string) {}));}-export const historyQueryOptions = queryOptions({+const historyQueryOptions = queryOptions({queryKey: historyKeys.list.queryKey,queryFn: async (): Promise<HistoryQueryFnResult> => {const result = await throwOnErr(@@ -225,7 +225,7 @@ export function getHistoryItems() {* Recursively fetches project content and adds all items to history.* NOTE: this is currently not used since the block loader only calls upsertItemToUserHistory*/-export async function insertProjectIntoHistory(projectId: string) {+async function _insertProjectIntoHistory(projectId: string) {const prevData = getHistoryItems();const newData: HistoryItem[] = [];const ids = [projectId];diff --git a/js/app/packages/queries/index.ts b/js/app/packages/queries/index.tsdeleted file mode 100644index e69de29bb2..0000000000diff --git a/js/app/packages/queries/keys.ts b/js/app/packages/queries/keys.tsdeleted file mode 100644index e69de29bb2..0000000000diff --git a/js/app/packages/queries/mcp-servers.ts b/js/app/packages/queries/mcp-servers.tsindex 8d2c309ca0..f2bf520aa6 100644--- a/js/app/packages/queries/mcp-servers.ts+++ b/js/app/packages/queries/mcp-servers.ts@@ -24,7 +24,7 @@ export function useMcpServersQuery() {}));}-export function invalidateMcpServers() {+function invalidateMcpServers() {return queryClient.invalidateQueries({ queryKey: KEYS.list });}diff --git a/js/app/packages/queries/notification/user-notifications.ts b/js/app/packages/queries/notification/user-notifications.tsindex 9d12cfb114..1783c398c8 100644--- a/js/app/packages/queries/notification/user-notifications.ts+++ b/js/app/packages/queries/notification/user-notifications.ts@@ -27,8 +27,6 @@ function stripOwnerId({return rest;}-export { notificationKeys } from './keys';-const DEFAULT_NOTIFICATION_LIMIT = 20;const NOTIFICATION_STALE_TIME = 5 * 60 * 1000; // 5 minutesconst NOTIFICATION_GC_TIME = 10 * 60 * 1000; // 10 minutes@@ -115,7 +113,7 @@ function entityNotificationsQueryOptions(eventItemId: string, limit: number) {}/** Paginated query for notifications for a single entity. */-export function useEntityNotificationsQuery(args: {+function _useEntityNotificationsQuery(args: {eventItemId: () => string;limit?: number;}) {@@ -169,7 +167,7 @@ function entitiesNotificationsQueryOptions(}/** Paginated query for notifications across multiple entities. */-export function useEntitiesNotificationsQuery(args: {+function _useEntitiesNotificationsQuery(args: {eventItemIds: () => string[];limit?: number;}) {@@ -223,7 +221,7 @@ export function invalidateEntityNotifications(eventItemId: string) {});}-export function invalidateAllNotifications() {+function _invalidateAllNotifications() {return queryClient.invalidateQueries({queryKey: notificationKeys._def,});diff --git a/js/app/packages/queries/preview/index.ts b/js/app/packages/queries/preview/index.tsindex a8b69ac342..ccf6016c9f 100644--- a/js/app/packages/queries/preview/index.ts+++ b/js/app/packages/queries/preview/index.ts@@ -1,16 +1,13 @@-export { previewKeys } from './keys';export {getItemPreview,invalidatePreview,setPreviewFileType,setPreviewName,- setPreviewOnCreate,useItemPreview,} from './preview';export type {AccessiblePreviewItem,ItemEntity,- MessageContext,PreviewItem,PreviewItemNoAccess,} from './types';@@ -24,5 +21,4 @@ export {enqueueDocumentWakeup,enqueuePreviewWakeup,isWakeableDocument,- type WakeableDocument,} from './wakeup';diff --git a/js/app/packages/queries/preview/wakeup.ts b/js/app/packages/queries/preview/wakeup.tsindex 5d8e03a8e5..7556ab2968 100644--- a/js/app/packages/queries/preview/wakeup.ts+++ b/js/app/packages/queries/preview/wakeup.ts@@ -65,7 +65,7 @@ function enqueueDocumentIdWakeup(documentId: string) {documentWakeupBatcher.addItem(documentId);}-export type WakeableDocument = ItemLike & {+type WakeableDocument = ItemLike & {id: string;type: 'document';fileType: 'md';diff --git a/js/app/packages/queries/properties/definitions.ts b/js/app/packages/queries/properties/definitions.tsindex 74586c9190..76e7c7818c 100644--- a/js/app/packages/queries/properties/definitions.ts+++ b/js/app/packages/queries/properties/definitions.ts@@ -11,7 +11,7 @@ import { queryClient } from '../client';import { type MutationCallbacks, withCallbacks } from '../utils';import { propertiesKeys } from './keys';-export type ListPropertiesQueryParams = {+type ListPropertiesQueryParams = {scope: PropertyScope;includeOptions: boolean;forEntityType?: EntityType;@@ -46,14 +46,14 @@ export function useListPropertiesQuery(});}-export function invalidatePropertyDefinitions() {+function invalidatePropertyDefinitions() {queryClient.invalidateQueries({predicate: ({ queryKey }) =>queryKey.includes('properties') && queryKey.includes('definitions'),});}-export type CreatePropertyDefinitionParams = {+type CreatePropertyDefinitionParams = {body: CreatePropertyDefinitionRequest;};diff --git a/js/app/packages/queries/properties/entity.ts b/js/app/packages/queries/properties/entity.tsindex 9ab2898562..be999801ef 100644--- a/js/app/packages/queries/properties/entity.ts+++ b/js/app/packages/queries/properties/entity.ts@@ -12,10 +12,7 @@ import type {PropertyDefinitionDomain,} from '../../core/component/Properties/types';import { isInstantiatedProperty } from '../../core/component/Properties/utils';-import {- type PropertiesEntityType,- propertiesServiceClient,-} from '../../service-clients/service-properties/client';+import { propertiesServiceClient } from '../../service-clients/service-properties/client';import type { EntityType } from '../../service-clients/service-properties/generated/schemas/entityType';import type { SoupProperty } from '../../service-clients/service-storage/generated/schemas/soupProperty';import type { SoupPropertyValue } from '../../service-clients/service-storage/generated/schemas/soupPropertyValue';@@ -62,7 +59,7 @@ export function useEntityPropertiesQuery();}-export function invalidatePropertiesForEntity(+function invalidatePropertiesForEntity(entityType: EntityType,entityId: string) {@@ -204,7 +201,7 @@ function apiValuesToSoupPropertyValue(}}-export type DeleteEntityPropertyParams = {+type DeleteEntityPropertyParams = {entityPropertyId: string;entityType: EntityType;entityId: string;@@ -240,7 +237,7 @@ export function useDeleteEntityPropertyMutation(}));}-export type AddEntityPropertyParams = {+type AddEntityPropertyParams = {entityId: string;entityType: EntityType;propertyDefinitionId: string;@@ -282,12 +279,7 @@ export function useAddEntityPropertyMutation(}));}-export type SetPropertyStatusCompleteParams = {- entityType: PropertiesEntityType;- entityId: string;-};--export type BulkSaveEntityPropertiesParams = {+type BulkSaveEntityPropertiesParams = {properties: Array<{entityId: string;entityType: EntityType;diff --git a/js/app/packages/queries/properties/options.ts b/js/app/packages/queries/properties/options.tsindex 079eea4cd6..2322995559 100644--- a/js/app/packages/queries/properties/options.ts+++ b/js/app/packages/queries/properties/options.ts@@ -33,9 +33,7 @@ export function usePropertyOptionsQuery(});}-export type PropertyOptionsQuery = ReturnType<typeof usePropertyOptionsQuery>;--export function invalidatePropertyOptions(propertyDefinitionId: string) {+function invalidatePropertyOptions(propertyDefinitionId: string) {queryClient.invalidateQueries({queryKey: propertiesKeys.options({ propertyDefinitionId }).queryKey,});@@ -45,7 +43,7 @@ export type AddPropertyOptionAsyncMutation = ReturnType<typeof useAddPropertyOptionMutation>['mutateAsync'];-export type AddPropertyOptionParams = {+type AddPropertyOptionParams = {propertyDefinitionId: string;body: AddPropertyOptionRequest;};diff --git a/js/app/packages/queries/soup/items.ts b/js/app/packages/queries/soup/items.tsindex f666930171..fe0335c8d5 100644--- a/js/app/packages/queries/soup/items.ts+++ b/js/app/packages/queries/soup/items.ts@@ -17,11 +17,7 @@ import type { EntityFilters } from '@service-storage/generated/schemas/entityFilimport type { Params } from '@service-storage/generated/schemas/params';import type { PostSoupAstRequestAllOf } from '@service-storage/generated/schemas/postSoupAstRequestAllOf';import type { PostSoupRequest } from '@service-storage/generated/schemas/postSoupRequest';-import {- type StaleTime,- type UseInfiniteQueryResult,- useInfiniteQuery,-} from '@tanstack/solid-query';+import { type StaleTime, useInfiniteQuery } from '@tanstack/solid-query';import type { Accessor } from 'solid-js';export type SoupParams = Params;@@ -46,8 +42,6 @@ export type SoupAstItemsQueryArgs = {groupKey?: string;};-export type UseSoupQueryResult = UseInfiniteQueryResult<EntityData[], Error>;-export type SoupApiItemFilter = (item: SoupApiItem) => boolean;interface SoupItemsQueryOptions {@@ -55,13 +49,13 @@ interface SoupItemsQueryOptions {staleTime?: StaleTime;}-export type SoupAstItemsPage = {+type SoupAstItemsPage = {items: SoupApiItem[];nextCursor: string | null;groups?: GroupMeta[];};-export type SoupAstItemsData = {+type SoupAstItemsData = {entities: EntityData[];groups: GroupMeta[] | undefined;items: SoupApiItem[];diff --git a/js/app/packages/queries/soup/normalized-cache/index.ts b/js/app/packages/queries/soup/normalized-cache/index.tsindex cf33b95cde..7f51e8ed16 100644--- a/js/app/packages/queries/soup/normalized-cache/index.ts+++ b/js/app/packages/queries/soup/normalized-cache/index.ts@@ -1,10 +1,7 @@-export type { NormalizerData } from './normalizer';-export { getSoupNormalizer, initSoupNormalizer } from './normalizer';+export { initSoupNormalizer } from './normalizer';export {getSoupEntityById,- getSoupItemId,hasSoupEntity,- insertSoupEntity,invalidateAllSoup,invalidateSoupEntity,optimisticUpdateSoupEntity,@@ -15,7 +12,6 @@ export {removeSoupEntities,} from './operations';export type {- SoupEntityPartial,SoupEntityTag,SoupTransaction,} from './types';diff --git a/js/app/packages/queries/soup/search.ts b/js/app/packages/queries/soup/search.tsindex 7c7ebb3253..8d590d3a64 100644--- a/js/app/packages/queries/soup/search.ts+++ b/js/app/packages/queries/soup/search.ts@@ -95,7 +95,7 @@ export const useSearchSoupQuery = (}));};-export type SearchChannelQueryArgs = {+type SearchChannelQueryArgs = {params: {cursor?: string | null;page_size?: number;diff --git a/js/app/packages/queries/storage/binary-document.ts b/js/app/packages/queries/storage/binary-document.tsindex ee0f6d7d5b..384d9e7128 100644--- a/js/app/packages/queries/storage/binary-document.ts+++ b/js/app/packages/queries/storage/binary-document.ts@@ -73,7 +73,7 @@ export function useBinaryDocumentQuery(documentId: Accessor<string>) {return useQuery(() => binaryDocumentQueryOptions(documentId()));}-export function invalidateBinaryDocument(documentId: string) {+function _invalidateBinaryDocument(documentId: string) {return queryClient.invalidateQueries({queryKey: binaryDocumentKeys.document(documentId).queryKey,});diff --git a/js/app/packages/queries/storage/deleted.ts b/js/app/packages/queries/storage/deleted.tsindex 07de1cfc40..0a6f42a21a 100644--- a/js/app/packages/queries/storage/deleted.ts+++ b/js/app/packages/queries/storage/deleted.ts@@ -35,7 +35,7 @@ function transformItems(items: Item[]): Item[] {return items.map((item) => ({ ...item, name: itemToSafeName(item) }));}-export function useDeletedItemsQuery() {+function _useDeletedItemsQuery() {return useQuery(() => ({...deletedItemsQueryOptions(),placeholderData: (prev) => prev,@@ -46,7 +46,7 @@ export function useDeletedItemsQuery() {type FileTree = ReturnType<typeof buildFileTree>;-export function useDeletedTreeQuery() {+function _useDeletedTreeQuery() {return useQuery(() => ({...deletedItemsQueryOptions(),placeholderData: (prev) => prev,diff --git a/js/app/packages/queries/storage/document-location.ts b/js/app/packages/queries/storage/document-location.tsindex 82a82020e1..d56506fd12 100644--- a/js/app/packages/queries/storage/document-location.ts+++ b/js/app/packages/queries/storage/document-location.ts@@ -18,7 +18,7 @@ type GetDocumentLocationResult = Awaited<ReturnType<typeof storageServiceClient.getDocumentLocation>>;-export type DocumentLocation = ResultType<GetDocumentLocationResult>['data'];+type DocumentLocation = ResultType<GetDocumentLocationResult>['data'];type WaitForDocumentLocationOptions = {target: string;@@ -47,7 +47,7 @@ function retryDelay(return Math.min(initialDelayMs * 2 ** attempt, maxDelayMs);}-export function documentLocationQueryOptions(args: DocumentLocationArgs) {+function _documentLocationQueryOptions(args: DocumentLocationArgs) {return {queryKey: documentLocationKeys.location(args.documentId, args.versionId).queryKey,@@ -58,7 +58,7 @@ export function documentLocationQueryOptions(args: DocumentLocationArgs) {};}-export async function fetchDocumentLocation(+async function fetchDocumentLocation(args: DocumentLocationArgs): Promise<DocumentLocation> {return throwOnErr(async () =>@@ -66,7 +66,7 @@ export async function fetchDocumentLocation().then((result) => result.data);}-export function invalidateDocumentLocation(args: DocumentLocationArgs) {+function invalidateDocumentLocation(args: DocumentLocationArgs) {storageServiceClient.getDocumentLocation.invalidate({documentId: args.documentId,});@@ -80,7 +80,7 @@ export function invalidateDocumentLocation(args: DocumentLocationArgs) {});}-export async function waitForDocumentLocation(+async function waitForDocumentLocation(args: DocumentLocationArgs,options: WaitForDocumentLocationOptions): Promise<DocumentLocation> {@@ -186,17 +186,17 @@ export function waitForDocumentPresignedUrlReady(});}-export function locationToAppResult(+function _locationToAppResult(location: DocumentLocation): Result<{ data: DocumentLocation }, ResultError<string>[]> {return ok({ data: location });}-export function isDocumentLocationReady(location: DocumentLocation) {+function isDocumentLocationReady(location: DocumentLocation) {return location.content.state === DocumentContentState.ready;}-export function isDocumentLocationResultReady(+function _isDocumentLocationResultReady(result: Result<{ data: DocumentLocation }, ResultError<string>[]>) {return !result.isErr() && isDocumentLocationReady(result.value.data);diff --git a/js/app/packages/queries/storage/keys.ts b/js/app/packages/queries/storage/keys.tsindex 6ca2d7fbcd..2b45525a90 100644--- a/js/app/packages/queries/storage/keys.ts+++ b/js/app/packages/queries/storage/keys.ts@@ -7,7 +7,7 @@ export const projectsKeys = createQueryKeys('projects', {}),});-export const deletedKeys = createQueryKeys('deleted', {+const deletedKeys = createQueryKeys('deleted', {list: null,});diff --git a/js/app/packages/queries/storage/project-preview.ts b/js/app/packages/queries/storage/project-preview.tsindex 05da2d0cd1..b14fb06c5c 100644--- a/js/app/packages/queries/storage/project-preview.ts+++ b/js/app/packages/queries/storage/project-preview.ts@@ -67,7 +67,7 @@ export function useProjectPreviewQuery(projectId: Accessor<string>) {* Fetch and cache project preview data* Useful for prefetching or ensuring data is available*/-export async function fetchAndCacheProjectPreview(+async function _fetchAndCacheProjectPreview(projectId: string): Promise<Result<{ project: ProjectPreviewData }, ResultError<string>[]>> {const result = await catchToResult(async () =>@@ -84,7 +84,7 @@ export async function fetchAndCacheProjectPreview(/*** Invalidate project preview cache*/-export function invalidateProjectPreview(projectId: string) {+function _invalidateProjectPreview(projectId: string) {return queryClient.invalidateQueries({queryKey: projectsKeys.preview(projectId).queryKey,});@@ -93,10 +93,7 @@ export function invalidateProjectPreview(projectId: string) {/*** Set project preview data directly in cache*/-export function setProjectPreviewData(- projectId: string,- data: ProjectPreviewData-) {+function _setProjectPreviewData(projectId: string, data: ProjectPreviewData) {return queryClient.setQueryData<ProjectPreviewData>(projectsKeys.preview(projectId).queryKey,datadiff --git a/js/app/packages/queries/storage/projects.ts b/js/app/packages/queries/storage/projects.tsindex 46cf82a99f..726f5c4119 100644--- a/js/app/packages/queries/storage/projects.ts+++ b/js/app/packages/queries/storage/projects.ts@@ -127,7 +127,7 @@ type CreateProjectContext = {tempProjectId: string;};-export function useCreateProjectMutation(+function _useCreateProjectMutation(callbacks?: MutationCallbacks<string | undefined,Error,diff --git a/js/app/packages/queries/sync/markdownText.ts b/js/app/packages/queries/sync/markdownText.tsdeleted file mode 100644index 3fbda8e60b..0000000000--- a/js/app/packages/queries/sync/markdownText.ts+++ /dev/null@@ -1,30 +0,0 @@-import { createLexicalWrapper } from '@core/component/LexicalMarkdown/context/LexicalWrapperContext';-import {- editorStateAsMarkdown,- initializeEditorWithState,-} from '@core/component/LexicalMarkdown/utils';-import { syncServiceClient } from '@service-sync/client';--/**- * Fetches a document from the sync service and returns its content as markdown text.- * @param documentId The ID of the document to fetch- * @param target 'external' for GFM-compatible markdown, 'internal' for round-trip compatible markdown- * @returns The document content as a markdown string, or null if the document is empty- */-export async function fetchDocumentAsMarkdown(- documentId: string,- target: 'external' | 'internal' = 'external'-): Promise<string | null> {- const rawState = await syncServiceClient.getRaw({ documentId });- if (!rawState || !rawState.root || rawState.root.children.length === 0) {- return null;- }- const { editor } = createLexicalWrapper({- type: 'markdown',- namespace: 'document-markdown-extractor',- isInteractable: () => false,- });- initializeEditorWithState(editor, rawState);- const markdown = editorStateAsMarkdown(editor, target);- return markdown;-}diff --git a/js/app/packages/queries/team/index.ts b/js/app/packages/queries/team/index.tsindex ed594866c5..ef8bf757e3 100644--- a/js/app/packages/queries/team/index.ts+++ b/js/app/packages/queries/team/index.ts@@ -1,24 +1,7 @@+export {} from './invitations';+export {} from './invites';+export {- invalidateUserInvites,- useJoinTeamMutation,- useRejectInvitationMutation,- useUserInvitesQuery,-} from './invitations';-export {- invalidateTeamInvites,- useDeleteTeamInviteMutation,- useInviteToTeamMutation,- useTeamInvitesQuery,-} from './invites';-export { teamKeys } from './keys';-export { useRemoveUserFromTeamMutation } from './members';-export {- invalidateTeam,invalidateUserTeams,- useCreateTeamMutation,- useCreateTeamWithInvitesMutation,- useDeleteTeamMutation,- usePatchTeamMutation,- useTeamQuery,useUserTeamsQuery,} from './teams';diff --git a/js/app/packages/queries/team/invitations.ts b/js/app/packages/queries/team/invitations.tsindex d0d87d2b12..853c0d02ff 100644--- a/js/app/packages/queries/team/invitations.ts+++ b/js/app/packages/queries/team/invitations.ts@@ -18,7 +18,7 @@ export function useUserInvitesQuery() {}));}-export function invalidateUserInvites() {+function invalidateUserInvites() {return queryClient.invalidateQueries({queryKey: teamKeys.userInvites.queryKey,});diff --git a/js/app/packages/queries/team/invites.ts b/js/app/packages/queries/team/invites.tsindex 5446f3580d..932ffacaae 100644--- a/js/app/packages/queries/team/invites.ts+++ b/js/app/packages/queries/team/invites.ts@@ -20,7 +20,7 @@ export function useTeamInvitesQuery(teamId: Accessor<string>) {}));}-export function invalidateTeamInvites(teamId: string) {+function invalidateTeamInvites(teamId: string) {return queryClient.invalidateQueries({queryKey: teamKeys.invites(teamId).queryKey,});diff --git a/js/app/packages/queries/team/teams.ts b/js/app/packages/queries/team/teams.tsindex 590825f13d..87fc77aa6e 100644--- a/js/app/packages/queries/team/teams.ts+++ b/js/app/packages/queries/team/teams.ts@@ -44,7 +44,7 @@ export function invalidateTeam(teamId: string) {type CreateTeamArgs = CreateTeamRequest;type CreateTeamCallbacks = MutationCallbacks<Team, Error, CreateTeamArgs>;-export function useCreateTeamMutation(callbacks?: CreateTeamCallbacks) {+function _useCreateTeamMutation(callbacks?: CreateTeamCallbacks) {return useMutation(() => ({mutationFn: async (args: CreateTeamArgs) =>await throwOnErr(() => authServiceClient.createTeam(args)),diff --git a/js/app/packages/queries/undo.ts b/js/app/packages/queries/undo.tsindex 7685f605e7..a87c74f828 100644--- a/js/app/packages/queries/undo.ts+++ b/js/app/packages/queries/undo.ts@@ -46,9 +46,9 @@ type UndoEntry = {onRedone?: () => void;};-export type UndoEntryInput = Omit<UndoEntry, 'id'>;+type UndoEntryInput = Omit<UndoEntry, 'id'>;-export type UndoHandle = {+type UndoHandle = {id: string;/** Undo this specific entry, even if it is not at the top of the stack. */undo: (callbacks?: UndoCallbacks) => Promise<void>;@@ -179,7 +179,7 @@ export const [MutationUndoProvider, useMutationUndoContext] =});-export type UndoLifecycle = {+type UndoLifecycle = {onUndone?: () => void;onRedone?: () => void;};diff --git a/js/app/packages/service-clients/service-auth/client.ts b/js/app/packages/service-clients/service-auth/client.tsindex 073be73b8b..821982cca6 100644--- a/js/app/packages/service-clients/service-auth/client.ts+++ b/js/app/packages/service-clients/service-auth/client.ts@@ -80,7 +80,7 @@ function getExpiresAt(token: string) {// Promise to track ongoing refresh operations to prevent multiple concurrent refresheslet ongoingRefresh: Promise<string | null> | null = null;-export async function getAccessToken(): Promise<string | null> {+async function getAccessToken(): Promise<string | null> {const data = accessTokenData();if (!data) {return null;@@ -128,8 +128,6 @@ export async function getAccessToken(): Promise<string | null> {return accessToken;}-export type { GetLegacyUserPermissionsResponse, UserOrganizationResponse };-export type PatchSubscriptionTierErrorCode =| 'TIER_UNCHANGED'| 'USER_IN_TEAM'diff --git a/js/app/packages/service-clients/service-call/client.ts b/js/app/packages/service-clients/service-call/client.tsindex e9a148a08e..ae3afda0aa 100644--- a/js/app/packages/service-clients/service-call/client.ts+++ b/js/app/packages/service-clients/service-call/client.ts@@ -6,12 +6,7 @@ import type { CallRecord } from '@service-storage/generated/schemas/callRecord';import type { CallTokenResponse } from '@service-storage/generated/schemas/callTokenResponse';import type { LeaveCallResponse } from '@service-storage/generated/schemas/leaveCallResponse';-export type {- CallActiveResponse,- CallRecord,- CallTokenResponse,- LeaveCallResponse,-};+export type { CallRecord, CallTokenResponse };const host: string = SERVER_HOSTS['document-storage-service'];diff --git a/js/app/packages/service-clients/service-cognition/client.ts b/js/app/packages/service-clients/service-cognition/client.tsindex 92f7f3e006..5cb54a959b 100644--- a/js/app/packages/service-clients/service-cognition/client.ts+++ b/js/app/packages/service-clients/service-cognition/client.ts@@ -43,15 +43,15 @@ type WithChatId = { chat_id: string };type WithName = { name: string };type WithProjectId = { project_id: string };-export function dcsFetch(+function dcsFetch(url: string,init?: SafeFetchInit): Promise<Result<void, ResultError<FetchWithTokenErrorCode>[]>>;-export function dcsFetch<T extends ObjectLike>(+function dcsFetch<T extends ObjectLike>(url: string,init?: SafeFetchInit): Promise<Result<T, ResultError<FetchWithTokenErrorCode>[]>>;-export function dcsFetch<T extends ObjectLike = never>(+function dcsFetch<T extends ObjectLike = never>(url: string,init?: SafeFetchInit):@@ -59,7 +59,7 @@ export function dcsFetch<T extends ObjectLike = never>(| Promise<Result<void, ResultError<FetchWithTokenErrorCode>[]>> {return fetchWithToken<T>(`${dcsHost}${url}`, init);}-export type Success = { success: boolean };+type Success = { success: boolean };type IdMappingResponse = { target_id: string | null };diff --git a/js/app/packages/service-clients/service-cognition/extraction.ts b/js/app/packages/service-clients/service-cognition/extraction.tsdeleted file mode 100644index 094b126234..0000000000--- a/js/app/packages/service-clients/service-cognition/extraction.ts+++ /dev/null@@ -1,86 +0,0 @@-// import { runWithOwner } from "solid-js";-// import type { ExtractionStatusEnum } from "./generated/schemas";--// // import { createCognitionWebsocketEffect, ws } from './websocket';--// type ResolveExtraction = {-// callback: (status: "ok" | "error") => void;-// clearTimeout: () => void;-// };--// const waiters: Map<string, ResolveExtraction> = new Map();--// const ACCEPT_STATUSES: ExtractionStatusEnum["type"][] = [-// "complete",-// "insufficient",-// "empty",-// ];--// // user will see an error if this times out-// const MAX_WAIT_MS = 12000;--// const createExtractionStatusEffects = (id: string) => {-// let dispose = () => {};--// // runWithOwner=null forces dispose to be called manually since we do not want a parent owner to be cleaned up early-// runWithOwner(null, () => {-// const disposeExtractionStatusUpdate = createCognitionWebsocketEffect(-// "extraction_status_update",-// (data) => {-// const waiter = waiters.get(id);-// if (!waiter) return;-// const status = ACCEPT_STATUSES.includes(data.status.type)-// ? "ok"-// : "error";-// waiter.callback(status);-// waiter.clearTimeout();-// waiters.delete(id);-// disposeExtractionStatusUpdate();-// },-// );--// const disposeExtractionStatusAck = createCognitionWebsocketEffect(-// "extraction_status_ack",-// (data) => {-// const waiter = waiters.get(id);-// if (!waiter) return;-// if (ACCEPT_STATUSES.includes(data.status.type)) {-// waiter.callback("ok");-// waiter.clearTimeout();-// waiters.delete(id);-// disposeExtractionStatusAck();-// }-// },-// );--// dispose = () => {-// disposeExtractionStatusUpdate();-// disposeExtractionStatusAck();-// };-// });--// return dispose;-// };--// export function waitExtractionStatus(id: string): Promise<"ok" | "error"> {-// const disposeWebsocketEffects = createExtractionStatusEffects(id);--// ws.send({ type: "extraction_status", attachment_id: id });--// return new Promise<"ok" | "error">((accept) => {-// // always run this after timeout-// setTimeout(() => {-// disposeWebsocketEffects();-// waiters.delete(id);-// }, MAX_WAIT_MS);--// const errorTimeout = setTimeout(() => {-// accept("error");-// }, MAX_WAIT_MS);--// waiters.set(id, {-// callback: accept,-// clearTimeout: () => clearTimeout(errorTimeout),-// });-// });-// }diff --git a/js/app/packages/service-clients/service-cognition/service.ts b/js/app/packages/service-clients/service-cognition/service.tsdeleted file mode 100644index 1d08358304..0000000000--- a/js/app/packages/service-clients/service-cognition/service.ts+++ /dev/null@@ -1,34 +0,0 @@-// import type { ToWebSocketMessage } from "./generated/schemas";--// import type { MessageStream } from './websocket';--// type MessageType<T extends ToWebSocketMessage["type"]> = Omit<-// Extract<ToWebSocketMessage, { type: T }>,-// "type"-// >;--// utility type to remove stream_id for websocket client requests-// where it is automatically injected-// type NoStreamId<T> = Omit<T, "stream_id">;--// export type CognitionWebsocketService = {-// streamEditMessage: (-// args: NoStreamId<MessageType<"edit_chat_message">>,-// ) => MessageStream;-// sendStreamChatMessage: (-// args: NoStreamId<MessageType<"send_chat_message">>,-// ) => MessageStream;-// stopChatMessage: (args: MessageType<"stop_chat_message">) => Promise<void>;-// selectModel: (args: MessageType<"select_model_for_chat">) => Promise<void>;-// extractionStatus: (args: MessageType<"extraction_status">) => Promise<void>;-// sendCompletion: (args: MessageType<"send_completion">) => Promise<void>;-// streamSimpleCompletion: (-// args: MessageType<"get_simple_completion_stream">,-// ) => Promise<void>;-// editLastMessage: (-// args: NoStreamId<MessageType<"edit_chat_message">>,-// ) => Promise<void>;-// extractionStatusSync: (-// args: MessageType<"extraction_status">,-// ) => Promise<"ok" | "error">;-// };diff --git a/js/app/packages/service-clients/service-cognition/types.ts b/js/app/packages/service-clients/service-cognition/types.tsdeleted file mode 100644index e0d1bdf21e..0000000000--- a/js/app/packages/service-clients/service-cognition/types.ts+++ /dev/null@@ -1,3 +0,0 @@-import type { ExtractionStatusEnum } from './generated/schemas';--export type ExtractionStatusType = ExtractionStatusEnum['type'];diff --git a/js/app/packages/service-clients/service-comms/client.ts b/js/app/packages/service-clients/service-comms/client.tsindex a0a3128484..e61530abba 100644--- a/js/app/packages/service-clients/service-comms/client.ts+++ b/js/app/packages/service-clients/service-comms/client.ts@@ -50,15 +50,15 @@ export type { ApiThreadReply } from '@service-storage/generated/schemas/apiThreaconst commsHost: string = SERVER_HOSTS['document-storage-service'];-export function commsFetch(+function commsFetch(url: string,init?: SafeFetchInit): Promise<Result<void, ResultError<FetchWithTokenErrorCode>[]>>;-export function commsFetch<T extends ObjectLike>(+function commsFetch<T extends ObjectLike>(url: string,init?: SafeFetchInit): Promise<Result<T, ResultError<FetchWithTokenErrorCode>[]>>;-export function commsFetch<T extends ObjectLike = never>(+function commsFetch<T extends ObjectLike = never>(url: string,init?: SafeFetchInit):@@ -67,9 +67,8 @@ export function commsFetch<T extends ObjectLike = never>(return fetchWithToken<T>(`${commsHost}${url}`, init);}-export type EmptyResponse = {};export type IdResponse = { id: string };-export type Success = { success: boolean };+export type MessageResponse = { message: string };type WithChannelId = { channel_id: string };diff --git a/js/app/packages/service-clients/service-connection/stream.ts b/js/app/packages/service-clients/service-connection/stream.tsindex ffa3d1420e..5879101de8 100644--- a/js/app/packages/service-clients/service-connection/stream.ts+++ b/js/app/packages/service-clients/service-connection/stream.ts@@ -23,7 +23,7 @@ export type StreamId = {stream_id: string;};-export type StreamItem<K extends keyof StreamType> = {+type StreamItem<K extends keyof StreamType> = {id: StreamId;payload: StreamType[K];};diff --git a/js/app/packages/service-clients/service-contacts/client.ts b/js/app/packages/service-clients/service-contacts/client.tsindex b1be0ecabe..12b0794cf7 100644--- a/js/app/packages/service-clients/service-contacts/client.ts+++ b/js/app/packages/service-clients/service-contacts/client.ts@@ -11,15 +11,15 @@ const contactsHost = `${SERVER_HOSTS['contacts']}`;import type { GetContactsResponse } from './generated/schemas/getContactsResponse';-export function contactsFetch(+function contactsFetch(url: string,init?: SafeFetchInit): Promise<Result<void, ResultError<FetchWithTokenErrorCode>[]>>;-export function contactsFetch<T extends ObjectLike>(+function contactsFetch<T extends ObjectLike>(url: string,init?: SafeFetchInit): Promise<Result<T, ResultError<FetchWithTokenErrorCode>[]>>;-export function contactsFetch<T extends ObjectLike = never>(+function contactsFetch<T extends ObjectLike = never>(url: string,init?: SafeFetchInit):diff --git a/js/app/packages/service-clients/service-email/client.ts b/js/app/packages/service-clients/service-email/client.tsindex 7fc1df7b2d..f6546838ef 100644--- a/js/app/packages/service-clients/service-email/client.ts+++ b/js/app/packages/service-clients/service-email/client.ts@@ -34,15 +34,15 @@ import type { EmptyResponse } from './generated/schemas/emptyResponse';const emailHost: string = SERVER_HOSTS['email-service'];-export function emailFetch(+function emailFetch(url: string,init?: SafeFetchInit): Promise<Result<void, ResultError<FetchWithTokenErrorCode>[]>>;-export function emailFetch<T extends ObjectLike>(+function emailFetch<T extends ObjectLike>(url: string,init?: SafeFetchInit): Promise<Result<T, ResultError<FetchWithTokenErrorCode>[]>>;-export function emailFetch<T extends ObjectLike = never>(+function emailFetch<T extends ObjectLike = never>(url: string,init?: SafeFetchInit):diff --git a/js/app/packages/service-clients/service-notification/client.ts b/js/app/packages/service-clients/service-notification/client.tsindex 2443b17598..4acff7c7f8 100644--- a/js/app/packages/service-clients/service-notification/client.ts+++ b/js/app/packages/service-clients/service-notification/client.ts@@ -19,32 +19,20 @@ import type { UserUnsubscribe } from './generated/schemas/userUnsubscribe';const notificationHost: string = SERVER_HOSTS['notification-service'];// const notificationHost: string = 'http://localhost:8086';-export const NOTIFICATION_WEBSOCKET_EVENT = 'notification';-type NotificationEventType = typeof NOTIFICATION_WEBSOCKET_EVENT;+const _NOTIFICATION_WEBSOCKET_EVENT = 'notification';-export type IncomingNotification = {- type: NotificationEventType;- data: string;-};type WithEventItemId = { event_item_id: string };type WithItem = { item_id: string; item_type: string };-export type UnifiedNotification = Omit<ApiUserNotification, 'ownerId'> & {- senderId?: string | null;- // whether the notification is incoming on the websocket and needs processing- // as opposed to coming from the database or an already processed notification- new?: boolean;-};--export function notificationFetch(+function notificationFetch(url: string,init?: SafeFetchInit): Promise<Result<void, ResultError<FetchWithTokenErrorCode>[]>>;-export function notificationFetch<T extends ObjectLike>(+function notificationFetch<T extends ObjectLike>(url: string,init?: SafeFetchInit): Promise<Result<T, ResultError<FetchWithTokenErrorCode>[]>>;-export function notificationFetch<T extends ObjectLike = never>(+function notificationFetch<T extends ObjectLike = never>(url: string,init?: SafeFetchInit):@@ -52,11 +40,10 @@ export function notificationFetch<T extends ObjectLike = never>(| Promise<Result<void, ResultError<FetchWithTokenErrorCode>[]>> {return fetchWithToken<T>(`${notificationHost}${url}`, init);}-export type Success = { success: boolean };// message id is set by the notification service-export type ChannelMentionMetadata = z.infer<typeof channelMentionMetadata>;-export const channelMentionMetadata = z.object({++const _channelMentionMetadata = z.object({message_id: z.string(),});diff --git a/js/app/packages/service-clients/service-properties/client.ts b/js/app/packages/service-clients/service-properties/client.tsindex 1dfbfd3cec..33e3b0ceaf 100644--- a/js/app/packages/service-clients/service-properties/client.ts+++ b/js/app/packages/service-clients/service-properties/client.ts@@ -64,15 +64,15 @@ type GetBulkEntityPropertiesArgs = {const propertiesHost: string = SERVER_HOSTS['document-storage-service'];-export function propertiesFetch(+function propertiesFetch(url: string,init?: SafeFetchInit): Promise<Result<void, ResultError<FetchWithTokenErrorCode>[]>>;-export function propertiesFetch<T extends ObjectLike>(+function propertiesFetch<T extends ObjectLike>(url: string,init?: SafeFetchInit): Promise<Result<T, ResultError<FetchWithTokenErrorCode>[]>>;-export function propertiesFetch<T extends ObjectLike = never>(+function propertiesFetch<T extends ObjectLike = never>(url: string,init?: SafeFetchInit):diff --git a/js/app/packages/service-clients/service-properties/service.ts b/js/app/packages/service-clients/service-properties/service.tsdeleted file mode 100644index 9b022dd5f1..0000000000--- a/js/app/packages/service-clients/service-properties/service.ts+++ /dev/null@@ -1,148 +0,0 @@-import {- asRawShape,- fetchErrorsSvc,- Svc,- withFetchErrors,-} from '@core/service';-import { z } from 'zod';-import * as schemas from './generated/zod';--export const PropertiesService = new Svc(- 'Properties Service - Manages document metadata and properties'-)- .use('fetchErrors', fetchErrorsSvc)- .fn('listProperties', {- description: schemas.listPropertiesQueryParams.description!,- args: schemas.listPropertiesQueryParams.shape,- result: asRawShape(schemas.listPropertiesResponse),- throws: withFetchErrors(),- })- .fn('createPropertyDefinition', {- description: schemas.createPropertyDefinitionBody.description!,- modifies: true,- args: {- body: schemas.createPropertyDefinitionBody,- },- result: asRawShape(- z- .object({- created_at: z.string().datetime(),- data_type: z.enum([- 'boolean',- 'date',- 'number',- 'string',- 'select_number',- 'select_string',- 'entity',- ]),- display_name: z.string(),- id: z.string().uuid(),- is_metadata: z.boolean(),- is_multi_select: z.boolean(),- owner: z.union([- z.object({ scope: z.enum(['user']), user_id: z.string() }),- z.object({- scope: z.enum(['organization']),- organization_id: z.number(),- }),- z.object({- scope: z.enum(['user_and_organization']),- user_id: z.string(),- organization_id: z.number(),- }),- ]),- specific_entity_type: z- .enum(['channel', 'chat', 'document', 'project', 'thread', 'user'])- .nullable()- .optional(),- updated_at: z.string().datetime(),- })- .describe('Property definition model (service representation).')- ),- throws: withFetchErrors(),- })- .fn('deletePropertyDefinition', {- description: schemas.deletePropertyDefinitionParams.description!,- modifies: true,- args: schemas.deletePropertyDefinitionParams.shape,- result: asRawShape(z.object({ success: z.boolean() })),- throws: withFetchErrors(),- })- .fn('getEntityProperties', {- description:- schemas.getEntityPropertiesParams.description ||- 'Get all properties for an entity',- args: {- ...schemas.getEntityPropertiesParams.shape,- query: schemas.getEntityPropertiesQueryParams,- },- result: asRawShape(schemas.getEntityPropertiesResponse),- throws: withFetchErrors(),- })- .fn('setEntityProperty', {- description:- schemas.setEntityPropertyParams.description ||- 'Set or update a property value for an entity',- modifies: true,- args: {- ...schemas.setEntityPropertyParams.shape,- body: schemas.setEntityPropertyBody,- },- result: asRawShape(z.object({ success: z.boolean() })),- throws: withFetchErrors(),- })- .fn('deleteEntityProperty', {- description: schemas.deleteEntityPropertyParams.description!,- modifies: true,- args: schemas.deleteEntityPropertyParams.shape,- result: asRawShape(z.object({ success: z.boolean() })),- throws: withFetchErrors(),- })- .fn('getPropertyOptions', {- description: schemas.getPropertyOptionsParams.description!,- args: schemas.getPropertyOptionsParams.shape,- result: asRawShape(schemas.getPropertyOptionsResponse),- throws: withFetchErrors(),- })- .fn('addPropertyOption', {- description: schemas.addPropertyOptionParams.description!,- modifies: true,- args: {- ...schemas.addPropertyOptionParams.shape,- body: schemas.addPropertyOptionBody,- },- result: asRawShape(- z- .object({- created_at: z.string().datetime(),- display_order: z.number(),- id: z.string().uuid(),- property_definition_id: z.string().uuid(),- updated_at: z.string().datetime(),- value: z.union([- z.object({- type: z.enum(['string']),- value: z.string(),- }),- z.object({- type: z.enum(['number']),- value: z.number(),- }),- ]),- })- .describe(- 'A selectable option for select-type properties (service representation).'- )- ),- throws: withFetchErrors(),- })- .fn('deletePropertyOption', {- description: schemas.deletePropertyOptionParams.description!,- modifies: true,- args: schemas.deletePropertyOptionParams.shape,- result: asRawShape(z.object({ success: z.boolean() })),- throws: withFetchErrors(),- });--export type PropertiesService = typeof PropertiesService;diff --git a/js/app/packages/service-clients/service-scheduled-action/client.ts b/js/app/packages/service-clients/service-scheduled-action/client.tsindex cb53e2fb84..9b4a3288af 100644--- a/js/app/packages/service-clients/service-scheduled-action/client.ts+++ b/js/app/packages/service-clients/service-scheduled-action/client.ts@@ -16,15 +16,15 @@ import type {const scheduledActionHost: string = SERVER_HOSTS['scheduled-action'];-export function scheduledActionFetch(+function scheduledActionFetch(url: string,init?: SafeFetchInit): Promise<Result<void, ResultError<FetchWithTokenErrorCode>[]>>;-export function scheduledActionFetch<T extends ObjectLike>(+function scheduledActionFetch<T extends ObjectLike>(url: string,init?: SafeFetchInit): Promise<Result<T, ResultError<FetchWithTokenErrorCode>[]>>;-export function scheduledActionFetch<T extends ObjectLike = never>(+function scheduledActionFetch<T extends ObjectLike = never>(url: string,init?: SafeFetchInit):diff --git a/js/app/packages/service-clients/service-search/client.ts b/js/app/packages/service-clients/service-search/client.tsindex b0fa7c9c86..db6b20a2cf 100644--- a/js/app/packages/service-clients/service-search/client.ts+++ b/js/app/packages/service-clients/service-search/client.ts@@ -14,17 +14,17 @@ import type { ChannelSearchResponse } from './generated/models/channelSearchRespimport type { UnifiedSearchRequest } from './generated/models/unifiedSearchRequest';import type { UnifiedSearchResponse } from './generated/models/unifiedSearchResponse';-export type { ChannelSearchRequest, ChannelSearchResponse };+export type { ChannelSearchRequest };-export function searchServiceFetch(+function searchServiceFetch(url: string,init?: SafeFetchInit): Promise<Result<void, ResultError<FetchWithTokenErrorCode>[]>>;-export function searchServiceFetch<T extends ObjectLike>(+function searchServiceFetch<T extends ObjectLike>(url: string,init?: SafeFetchInit): Promise<Result<T, ResultError<FetchWithTokenErrorCode>[]>>;-export function searchServiceFetch<T extends ObjectLike = never>(+function searchServiceFetch<T extends ObjectLike = never>(url: string,init?: SafeFetchInit):@@ -43,7 +43,7 @@ export type SearchArgs = {request: UnifiedSearchRequest;};-export type ChannelSearchArgs = {+type ChannelSearchArgs = {params: SearchParams;request: ChannelSearchRequest;};diff --git a/js/app/packages/service-clients/service-static-files/client.ts b/js/app/packages/service-clients/service-static-files/client.tsindex d70366b7d3..14223e3ae6 100644--- a/js/app/packages/service-clients/service-static-files/client.ts+++ b/js/app/packages/service-clients/service-static-files/client.ts@@ -13,15 +13,15 @@ import type { PutFileResponse } from './generated/schemas/putFileResponse';const staticFileHost = `${SERVER_HOSTS['static-file']}`;-export function staticFetch(+function staticFetch(url: string,init?: SafeFetchInit): Promise<Result<void, ResultError<FetchWithTokenErrorCode>[]>>;-export function staticFetch<T extends ObjectLike>(+function staticFetch<T extends ObjectLike>(url: string,init?: SafeFetchInit): Promise<Result<T, ResultError<FetchWithTokenErrorCode>[]>>;-export function staticFetch<T extends ObjectLike = never>(+function staticFetch<T extends ObjectLike = never>(url: string,init?: SafeFetchInit):diff --git a/js/app/packages/service-clients/service-storage/client.ts b/js/app/packages/service-clients/service-storage/client.tsindex 97e70c1764..52e60321b4 100644--- a/js/app/packages/service-clients/service-storage/client.ts+++ b/js/app/packages/service-clients/service-storage/client.ts@@ -119,7 +119,7 @@ export function dssFetch<T extends Record<string, any> = never>(return fetchWithToken<T>(`${dssHost}${url}`, init);}-export type Success = {+type Success = {id: string | null | undefined;success: boolean;};@@ -147,7 +147,7 @@ const itemTypeSet = new Set(['thread',]);-export function isItemType(str: string): str is ItemType {+function _isItemType(str: string): str is ItemType {return itemTypeSet.has(str);}@@ -195,14 +195,14 @@ export function isCloudStorageItem(return Object.values(CloudStorageItemTypeMap).includes(item as any);}-export type ProcessingResultType = 'PREPROCESS' | 'SPLIT_TEXTS';+type ProcessingResultType = 'PREPROCESS' | 'SPLIT_TEXTS';export type ProcessingResultResponseType<T extends ProcessingResultType> =T extends 'PREPROCESS'? ICoParse: T extends 'SPLIT_TEXTS'? TSegment[]: never;-export type UserPins = UserPinsResponse;+type UserPins = UserPinsResponse;function withVersionId(version_id?: string | undefined | null): string {return version_id ? `?version_id=${version_id}` : '';@@ -1355,7 +1355,7 @@ export const storageServiceClient = {typeof enhancements &Record<string, unknown>;-export const uploadFileToPresignedUrl = async (+const _uploadFileToPresignedUrl = async (presignedUrl: URL,file: IDocumentStorageServiceFile,signal?: AbortSignaldiff --git a/js/app/packages/service-clients/service-storage/service.ts b/js/app/packages/service-clients/service-storage/service.tsindex a3e24ef974..e3e420e47c 100644--- a/js/app/packages/service-clients/service-storage/service.ts+++ b/js/app/packages/service-clients/service-storage/service.ts@@ -10,20 +10,20 @@ import {import { z } from 'zod';import * as schemas from './generated/zod';-export const ChatMessageSchema = z.object({+const _ChatMessageSchema = z.object({content: z.string().describe('Content of the message'),id: z.number().describe('The chat message id'),role: z.string().describe('Whether the chat is from the user or system'),});-export const ChatResponseSchema = z.object({});+const _ChatResponseSchema = z.object({});-export const DocxDocumentPartLocation = z.object({+const DocxDocumentPartLocation = z.object({sha: z.string(),url: z.string(),});-export const GetWriterPartsResponse = z.object({+const GetWriterPartsResponse = z.object({presignedUrls: z.array(DocxDocumentPartLocation),});@@ -98,7 +98,7 @@ const AnnotationsSvc = new Svc('Annotations Service')modifies: true,});-export const ProjectsSvc = new Svc('Projects Service')+const ProjectsSvc = new Svc('Projects Service').use('fetchErrors', fetchErrorsSvc).fn('getAll', {description: 'Get all projects',@@ -197,7 +197,7 @@ export const ProjectsSvc = new Svc('Projects Service')throws: withFetchErrors(),});-export const ViewsSvc = new Svc('Views Service')+const ViewsSvc = new Svc('Views Service').use('fetchErrors', fetchErrorsSvc).fn('getSavedViews', {description: 'Get the list of saved views',@@ -235,7 +235,7 @@ export const ViewsSvc = new Svc('Views Service')throws: withFetchErrors(),});-export const PermissionsTokensSvc = new Svc('Permissions Tokens Service')+const PermissionsTokensSvc = new Svc('Permissions Tokens Service').use('fetchErrors', fetchErrorsSvc).fn('createPermissionToken', {description: 'creates a permission token for a document',@@ -250,7 +250,7 @@ export const PermissionsTokensSvc = new Svc('Permissions Tokens Service')throws: withFetchErrors(),});-export const InstructionsSvc = new Svc('Instructions Service')+const InstructionsSvc = new Svc('Instructions Service').use('fetchErrors', fetchErrorsSvc).fn('create', {description: schemas.createInstructionsHandlerResponse.description!,diff --git a/js/app/packages/service-clients/service-storage/util/fetchBinary.ts b/js/app/packages/service-clients/service-storage/util/fetchBinary.tsindex 4750434b4b..19faeff569 100644--- a/js/app/packages/service-clients/service-storage/util/fetchBinary.ts+++ b/js/app/packages/service-clients/service-storage/util/fetchBinary.ts@@ -2,7 +2,6 @@ import type { ResultError } from '@core/util/result';import { platformFetch } from 'core/util/platformFetch';import { err, ok, type Result } from 'neverthrow';-import type { DocumentMetadata } from '../generated/schemas/documentMetadata';import type { StorageError } from './storageError';export async function fetchBinary(@@ -64,8 +63,3 @@ export async function fetchBinary<T extends ArrayBuffer | Blob>(}}}--export type BinaryFile = {- blob: Blob;- metadata: DocumentMetadata;-};diff --git a/js/app/packages/service-clients/service-storage/util/filename.ts b/js/app/packages/service-clients/service-storage/util/filename.tsindex 9cecd9aebe..e66d9cf043 100644--- a/js/app/packages/service-clients/service-storage/util/filename.ts+++ b/js/app/packages/service-clients/service-storage/util/filename.ts@@ -42,7 +42,7 @@ export function fileExtension(* @param extensions - An array of allowed extensions.* @returns True if the filename has a valid extension, false otherwise.*/-export function hasExtension(filename: string, extensions: string[]): boolean {+function _hasExtension(filename: string, extensions: string[]): boolean {const extension = fileExtension(filename);if (!extension) return false;return extensions.some(@@ -52,10 +52,7 @@ export function hasExtension(filename: string, extensions: string[]): boolean {);}-export const reverseFormatDocumentName = (- name: string,- fileType?: string | null-) => {+const _reverseFormatDocumentName = (name: string, fileType?: string | null) => {if (!fileType) return name;const blockName = fileTypeToBlockName(fileType);diff --git a/js/app/packages/service-clients/service-storage/util/getDocxFile.ts b/js/app/packages/service-clients/service-storage/util/getDocxFile.tsindex 70e8f930af..0cf58a15fc 100644--- a/js/app/packages/service-clients/service-storage/util/getDocxFile.ts+++ b/js/app/packages/service-clients/service-storage/util/getDocxFile.ts@@ -16,16 +16,8 @@ export type DocxBaseExpandedPart<T> = {export type DocxExpandedPart = DocxBaseExpandedPart<ArrayBuffer>;-export type DocxExpandedPartWithoutSha = Omit<DocxExpandedPart, 'sha'>;--export type DocxExpandedParts = DocxExpandedPart[];export type DocxExpandedPartList = Omit<DocxExpandedPart, 'content'>[];-export type DocxExpandedFile = {- parts: DocxExpandedParts;- metadata: WithRequired<DocumentMetadata, 'documentBom'>;-};-export type GetDocxFileResponse = FlattenObject<{parts: Array<{ sha: string; url: string }>;metadata: WithRequired<DocumentMetadata, 'documentBom'>;diff --git a/js/app/packages/service-clients/service-storage/util/newBlankDocument.ts b/js/app/packages/service-clients/service-storage/util/newBlankDocument.tsdeleted file mode 100644index 0ac37c6fd8..0000000000--- a/js/app/packages/service-clients/service-storage/util/newBlankDocument.ts+++ /dev/null@@ -1,20 +0,0 @@-import type { BlockName } from '@core/block';-import { blockNameToMimeTypes } from '@core/constant/allBlocks';--export function newBlankDocument(blockName: BlockName) {- const encoder = new TextEncoder();- switch (blockName) {- case 'md':- return new File([encoder.encode('')], '', {- type: blockNameToMimeTypes[blockName]?.[0],- });- case 'canvas':- return new File(- [encoder.encode('{"nodes": [],"edges": [],"groups": []}')],- 'New Canvas.canvas',- { type: blockNameToMimeTypes[blockName]?.[0] }- );- default:- return null;- }-}diff --git a/js/app/packages/service-clients/service-storage/util/opfs.ts b/js/app/packages/service-clients/service-storage/util/opfs.tsindex a65a99d34a..a2581ab2d6 100644--- a/js/app/packages/service-clients/service-storage/util/opfs.ts+++ b/js/app/packages/service-clients/service-storage/util/opfs.ts@@ -3,7 +3,7 @@ import type { DocxExpandedPartList } from './getDocxFile';/** If making breaking changes to the OPFS structure / format, increment this */const OPFS_VERSION = 0;-export const OPFS_DIR_NAME = `macro-documents-v${OPFS_VERSION}`;+const OPFS_DIR_NAME = `macro-documents-v${OPFS_VERSION}`;let opfsHandle_: FileSystemDirectoryHandle | null = null;/** OPFS filesystem handle singleton */@@ -29,7 +29,7 @@ async function getOPFSDocumentDirHandle() {return opfsDocumentDirHandle_;}-export interface OPFSDocumentStore {+interface OPFSDocumentStore {get: (documentID: string,options?: { create: boolean }@@ -40,7 +40,7 @@ export interface OPFSDocumentStore {}/** Abstraction around a Macro DSS Document that exists in OPFS */-export class OPFSDocument {+class OPFSDocument {private readonly opfsDocumentDirHandle: FileSystemDirectoryHandle;readonly documentID: string;diff --git a/js/app/packages/service-clients/service-storage/util/presignedUrl.ts b/js/app/packages/service-clients/service-storage/util/presignedUrl.tsindex 3552b3b1dd..b7e6415ba7 100644--- a/js/app/packages/service-clients/service-storage/util/presignedUrl.ts+++ b/js/app/packages/service-clients/service-storage/util/presignedUrl.ts@@ -3,9 +3,7 @@ import { storageServiceClient } from '../client';// we expire slightly before the actual expiry to avoid race conditionconst EXPIRE_OFFSET_SECONDS = 10;-export const parseExpiryTimeFromPresignedUrl = (- blobUrl: string-): Date | undefined => {+const parseExpiryTimeFromPresignedUrl = (blobUrl: string): Date | undefined => {try {const url = new URL(blobUrl);const expires = url.searchParams.get('Expires');diff --git a/js/app/packages/service-clients/service-storage/util/refetchResources.ts b/js/app/packages/service-clients/service-storage/util/refetchResources.tsindex 3682e597bd..a8a4bb3416 100644--- a/js/app/packages/service-clients/service-storage/util/refetchResources.ts+++ b/js/app/packages/service-clients/service-storage/util/refetchResources.ts@@ -15,7 +15,7 @@ export function refetchResources() {invalidatePreview();}-export async function refetchProjectResources(_force = false) {+async function refetchProjectResources(_force = false) {await invalidateProjects();refetchDocumentShareButtonResource();diff --git a/js/app/packages/service-clients/service-storage/util/websocketPromiseChain.ts b/js/app/packages/service-clients/service-storage/util/websocketPromiseChain.tsindex e7ee11f760..3517ab7949 100644--- a/js/app/packages/service-clients/service-storage/util/websocketPromiseChain.ts+++ b/js/app/packages/service-clients/service-storage/util/websocketPromiseChain.ts@@ -171,16 +171,6 @@ export function createWebsocketPromiseChain<// Supporting types and interfacesexport enum JobTypeEnum {- Ping = 'ping',- CreateTempFile = 'create_temp_file',- PdfExport = 'pdf_export',- PdfPreprocess = 'pdf_preprocess',- PdfModify = 'pdf_modify',- PdfPasswordEncrypt = 'pdf_password_encrypt',- PdfSplitTexts = 'pdf_split_texts',- PdfRemoveMetadata = 'pdf_remove_metadata',- DocxSimpleCompare = 'docx_simple_compare',- DocxConsolidate = 'docx_consolidate',DocxUpload = 'docx_upload',}@@ -201,7 +191,7 @@ type DocumentProcessResponse =| DocumentProcessSuccessResponse| DocumentProcessErrorResponse;-export type WebsocketJobSubmissionErrorResponse = {+type WebsocketJobSubmissionErrorResponse = {jobId?: string;macroRequestId?: string;event?: string;@@ -225,14 +215,6 @@ export type WebsocketJobSubmissionSuccessResponse<T = unknown> = Omit<data: T;};-export type WebsocketJobSubmissionResponse<T = unknown> =- | WebsocketJobSubmissionSuccessResponse<T>- | WebsocketJobSubmissionErrorResponse;--export type ListenerCallback = (- response: WebsocketJobSubmissionResponse & { macroRequestId: string }-) => void | Promise<void>;-// Type Guardsfunction isDocumentProcessResponse(data: any): data is DocumentProcessResponse {return (diff --git a/js/app/packages/service-clients/service-storage/websocket.ts b/js/app/packages/service-clients/service-storage/websocket.tsindex 458f0ab433..f656da95a8 100644--- a/js/app/packages/service-clients/service-storage/websocket.ts+++ b/js/app/packages/service-clients/service-storage/websocket.ts@@ -20,7 +20,7 @@ const HEARTBEAT_INTERVAL = 300000;*/const HEARTBEAT_TIMEOUT = 5000;-export const ws = new WebsocketBuilder(SERVER_HOSTS['websocket-service'])+const ws = new WebsocketBuilder(SERVER_HOSTS['websocket-service']).withBackoff(new ConstantBackoff(2_000)).withMaxRetries(20).withHeartbeat({@@ -34,7 +34,7 @@ export const ws = new WebsocketBuilder(SERVER_HOSTS['websocket-service'])export const storageWS = ws;-export const state = createWebsocketStateSignal(ws);+const _state = createWebsocketStateSignal(ws);type WebSocketJobConfig<T, R, D, U> = {// websocket request datadiff --git a/js/app/packages/service-clients/service-stripe/client.ts b/js/app/packages/service-clients/service-stripe/client.tsindex ff47ff2768..9672d9d170 100644--- a/js/app/packages/service-clients/service-stripe/client.ts+++ b/js/app/packages/service-clients/service-stripe/client.ts@@ -126,7 +126,7 @@ export const stripeServiceClient = {},};-export type UpdateSubscriptionTierResult =+type UpdateSubscriptionTierResult =| { ok: true }| { ok: false; code: PatchSubscriptionTierErrorCode | 'UNKNOWN' };diff --git a/js/app/packages/service-clients/service-sync/client.ts b/js/app/packages/service-clients/service-sync/client.tsindex b0d30b6fa5..3a6e420af2 100644--- a/js/app/packages/service-clients/service-sync/client.ts+++ b/js/app/packages/service-clients/service-sync/client.ts@@ -39,15 +39,15 @@ const cancelIdleTask =: (id: number) =>window.clearTimeout(id as unknown as ReturnType<typeof setTimeout>);-export function syncFetch(+function syncFetch(url: string,init?: SafeFetchInit): Promise<Result<void, ResultError<FetchWithTokenErrorCode>[]>>;-export function syncFetch<T extends ObjectLike>(+function syncFetch<T extends ObjectLike>(url: string,init?: SafeFetchInit): Promise<Result<T, ResultError<FetchWithTokenErrorCode>[]>>;-export function syncFetch<T extends ObjectLike = never>(+function syncFetch<T extends ObjectLike = never>(url: string,init?: SafeFetchInit):diff --git a/js/app/packages/tauri/src/navigation.ts b/js/app/packages/tauri/src/navigation.tsindex 96c3c6ee55..9b2d3e81be 100644--- a/js/app/packages/tauri/src/navigation.ts+++ b/js/app/packages/tauri/src/navigation.ts@@ -16,7 +16,7 @@ let pendingNavigation: string | null = null;* Called by useTauriNavigationEffect when the router is ready.* Drains any navigation that was buffered before the router was ready.*/-export function registerNavigate(fn: (path: string) => void) {+function registerNavigate(fn: (path: string) => void) {registeredNavigate = fn;if (pendingNavigation) {const path = pendingNavigation;diff --git a/js/app/packages/theme/components/ThemeList.tsx b/js/app/packages/theme/components/ThemeList.tsxindex dda67f394d..1b1d6a1a5d 100644--- a/js/app/packages/theme/components/ThemeList.tsx+++ b/js/app/packages/theme/components/ThemeList.tsx@@ -6,7 +6,7 @@ import { ThemeCrud } from './ThemeCrud';import { For } from 'solid-js';-export function ThemeList() {+function ThemeList() {const analytics = useAnalytics()return (diff --git a/js/app/packages/theme/components/ThemeTools.tsx b/js/app/packages/theme/components/ThemeTools.tsxindex f5106d4bce..f45af1b082 100644--- a/js/app/packages/theme/components/ThemeTools.tsx+++ b/js/app/packages/theme/components/ThemeTools.tsx@@ -7,7 +7,7 @@ import IconSave from '@phosphor-icons/core/regular/floppy-disk-back.svg?componenimport { createMemo, Show } from 'solid-js';import { Button, cn } from '@ui';-export function ThemeTools(props: { class?: string }) {+function ThemeTools(props: { class?: string }) {let themeName!: HTMLDivElement;const defaultThemeName = 'New Theme';diff --git a/js/app/packages/theme/signals/themeReactive.ts b/js/app/packages/theme/signals/themeReactive.tsindex 0b9ed15254..7d954e2bfe 100644--- a/js/app/packages/theme/signals/themeReactive.ts+++ b/js/app/packages/theme/signals/themeReactive.ts@@ -128,7 +128,7 @@ createEffect());-export function createThemeEffect(cb: () => void) {+function _createThemeEffect(cb: () => void) {return createEffect(on(ALL_THEME_SIGNALS, cb));}diff --git a/js/app/packages/theme/utils/themeUtils.ts b/js/app/packages/theme/utils/themeUtils.tsindex 69f901a735..305f326e72 100644--- a/js/app/packages/theme/utils/themeUtils.ts+++ b/js/app/packages/theme/utils/themeUtils.ts@@ -11,7 +11,7 @@ export function exportTheme(themeId?: string){navigator.clipboard.writeText(theme);}-export async function importTheme(): Promise<void>{+async function _importTheme(): Promise<void>{try {const text = await navigator.clipboard.readText();const parsed: unknown = JSON.parse(text);@@ -146,7 +146,7 @@ export function deleteTheme(id: string): void{}/** Returns true when the current theme has a dark background (ink lightness > panel lightness). */-export function isThemeDark(): boolean {+function _isThemeDark(): boolean {return themeReactive.c0.l[0]() > themeReactive.b0.l[0]();}diff --git a/js/app/packages/ui/components/Avatar.tsx b/js/app/packages/ui/components/Avatar.tsxindex c29b4f29e1..318f1e7675 100644--- a/js/app/packages/ui/components/Avatar.tsx+++ b/js/app/packages/ui/components/Avatar.tsx@@ -54,7 +54,7 @@ export function Avatar(props: AvatarProps) {);}-export type AvatarImageProps = {+type AvatarImageProps = {src: string;alt?: string;class?: string;@@ -77,7 +77,7 @@ function AvatarImage(props: AvatarImageProps) {);}-export type AvatarFallbackProps = ParentProps<{+type AvatarFallbackProps = ParentProps<{class?: string;}>;@@ -175,7 +175,7 @@ export function AvatarGroup(props: AvatarGroupProps) {);}-export type AvatarGroupCountProps = ParentProps<{+type AvatarGroupCountProps = ParentProps<{size?: AvatarGroupSize;class?: string;}>;diff --git a/js/app/packages/ui/components/Dropdown.tsx b/js/app/packages/ui/components/Dropdown.tsxindex 0fc99c7897..ae211af471 100644--- a/js/app/packages/ui/components/Dropdown.tsx+++ b/js/app/packages/ui/components/Dropdown.tsx@@ -14,7 +14,7 @@ import type { ComponentProps } from 'solid-js';</Dropdown>*/-export type DropdownTriggerProps = ComponentProps<typeof KobalteDropdownMenu.Trigger> & ButtonProps;+type DropdownTriggerProps = ComponentProps<typeof KobalteDropdownMenu.Trigger> & ButtonProps;type DropdownContentProps = ComponentProps<typeof KobalteDropdownMenu.Content>;type DropdownSubContentProps = ComponentProps<typeof KobalteDropdownMenu.SubContent>;type DropdownItemProps = ComponentProps<typeof KobalteDropdownMenu.Item>;diff --git a/js/app/packages/ui/components/Hotkey.tsx b/js/app/packages/ui/components/Hotkey.tsxindex cae2073d3b..3230e9ba4c 100644--- a/js/app/packages/ui/components/Hotkey.tsx+++ b/js/app/packages/ui/components/Hotkey.tsx@@ -5,7 +5,7 @@ import type { Theme } from 'core/component/Themes';import { IS_MAC } from '@core/constant/isMac';import { cn } from '@ui';-export const modifierMap = {+const modifierMap = {shift: IS_MAC ? '⇧' : 'Shift',ctrl: IS_MAC ? '⌃' : 'Ctrl',meta: IS_MAC ? '⌘' : 'Ctrl',@@ -25,7 +25,7 @@ const symbolMap = {ENTER: '↵',};-export const hotkeyStyles: Record<Theme, { label: string; hotkey: string }> = {+const hotkeyStyles: Record<Theme, { label: string; hotkey: string }> = {extraMuted: {hotkey: 'bg-surface border border-ink-extra-muted text-ink-extra-muted',diff --git a/js/app/packages/ui/components/HoverCard.tsx b/js/app/packages/ui/components/HoverCard.tsxindex 97b67f6d84..8b94d807f8 100644--- a/js/app/packages/ui/components/HoverCard.tsx+++ b/js/app/packages/ui/components/HoverCard.tsx@@ -4,7 +4,7 @@ import type { JSX, ParentProps } from 'solid-js';import { cn } from '../utils/classname';import { Surface } from './Surface';-export type HoverCardProps = ParentProps<{+type HoverCardProps = ParentProps<{triggerClass?: string;contentClass?: string;placement?: Placement;diff --git a/js/app/packages/ui/components/Layer.tsx b/js/app/packages/ui/components/Layer.tsxindex 0802fa834a..8e7262e459 100644--- a/js/app/packages/ui/components/Layer.tsx+++ b/js/app/packages/ui/components/Layer.tsx@@ -1,7 +1,7 @@import { themeDepth } from '@theme/signals/themeSignals';import type { JSX } from 'solid-js';-export type LayerProps = {+type LayerProps = {children?: JSX.Element;depth?: 0 | 1 | 2 | 3 | 4 | 5;};diff --git a/js/app/packages/ui/components/SegmentedControl.tsx b/js/app/packages/ui/components/SegmentedControl.tsxindex 20fdc46ed4..6580269984 100644--- a/js/app/packages/ui/components/SegmentedControl.tsx+++ b/js/app/packages/ui/components/SegmentedControl.tsx@@ -2,7 +2,7 @@ import { SegmentedControl as KSegmentedControl } from '@kobalte/core/segmented-cimport { cn } from '../utils/classname';import { For, type JSX } from 'solid-js';-export type SegmentedControlOption<T extends string | number | boolean> = {+type SegmentedControlOption<T extends string | number | boolean> = {value: T;label: string;disabled?: boolean;diff --git a/js/app/packages/ui/components/Tooltip.tsx b/js/app/packages/ui/components/Tooltip.tsxindex 97bbfb7bd6..8a8546ce4e 100644--- a/js/app/packages/ui/components/Tooltip.tsx+++ b/js/app/packages/ui/components/Tooltip.tsx@@ -6,7 +6,7 @@ import type { ParentProps } from 'solid-js';import { For, Show } from 'solid-js';import { Surface } from '@ui';-export type TooltipProps = ParentProps<{+type TooltipProps = ParentProps<{hotkey?: HotkeyToken | HotkeyToken[];/*** Raw keyboard shortcut(s) to render in the tooltip (e.g. "cmd+enter").diff --git a/js/app/packages/ui/utils/classname.ts b/js/app/packages/ui/utils/classname.tsindex 766daf0a4c..88c80eb9b7 100644--- a/js/app/packages/ui/utils/classname.ts+++ b/js/app/packages/ui/utils/classname.ts@@ -2,7 +2,7 @@ import { extendTailwindMerge } from 'tailwind-merge';// Local `clsx`-compatible types + implementation (so we don't depend on the external// `clsx` package being installed).-export type ClassValue =+type ClassValue =| string| number| nulldiff --git a/js/app/packages/websocket/core/websocket-serializer.ts b/js/app/packages/websocket/core/websocket-serializer.tsindex 1d4f48d974..263c2c6e32 100644--- a/js/app/packages/websocket/core/websocket-serializer.ts+++ b/js/app/packages/websocket/core/websocket-serializer.ts@@ -27,7 +27,7 @@ export interface WebsocketSerializer</*** Type guard to check if this is default websocket data.*/-export function isDefaultWebsocketData(data: unknown): data is WebsocketData {+function _isDefaultWebsocketData(data: unknown): data is WebsocketData {return (typeof data === 'string' ||data instanceof ArrayBuffer ||diff --git a/js/app/packages/websocket/core/websocket-url-resolver.ts b/js/app/packages/websocket/core/websocket-url-resolver.tsindex 1c64812788..8effaefcd9 100644--- a/js/app/packages/websocket/core/websocket-url-resolver.ts+++ b/js/app/packages/websocket/core/websocket-url-resolver.ts@@ -1,6 +1,6 @@export type UrlResolver = string | (() => string | Promise<string>);-export function isThunk(+function isThunk(url: UrlResolver): url is (() => string) | (() => Promise<string>) {return typeof url === 'function';diff --git a/js/app/packages/websocket/platform/tauri-websocket.ts b/js/app/packages/websocket/platform/tauri-websocket.tsindex d8e9c295ea..f66ac9a773 100644--- a/js/app/packages/websocket/platform/tauri-websocket.ts+++ b/js/app/packages/websocket/platform/tauri-websocket.ts@@ -9,7 +9,7 @@ import type { MinimalWebSocket, WebSocketFactory } from './minimal-websocket';/*** Tauri WebSocket wrapper that implements MinimalWebSocket interface*/-export class TauriWebSocketWrapper implements MinimalWebSocket {+class TauriWebSocketWrapper implements MinimalWebSocket {private ws: TauriWebsocket; // Tauri WebSocket instanceprivate _readyState: number = 0; // CONNECTINGprivate _url: string;diff --git a/js/app/packages/websocket/tests/websocket-test-utils.ts b/js/app/packages/websocket/tests/websocket-test-utils.tsindex 01f6262fd7..3da62d61ba 100644--- a/js/app/packages/websocket/tests/websocket-test-utils.ts+++ b/js/app/packages/websocket/tests/websocket-test-utils.ts@@ -7,7 +7,7 @@ import { WebsocketEvent, type WebsocketEventListenerWithOptions } from '../';* @param ms the amount of milliseconds to wait before rejecting* @param msg an optional message to include in the error*/-export const rejectAfter = (ms: number, msg?: string): Promise<void> =>+const rejectAfter = (ms: number, msg?: string): Promise<void> =>new Promise((_, reject) =>setTimeout(() => reject(msg ? new Error(`Timeout: ${msg}`) : new Error(`Timeout`)),@@ -105,7 +105,7 @@ export const getListenersWithOptions = <K extends WebsocketEvent>(* @param isBinary whether the message is binary* @returns the message as a string*/-export const wsMessageToString = (+const wsMessageToString = (message: ArrayBuffer | Blob | Buffer | Buffer[],isBinary: boolean): string => {diff --git a/js/bun.lock b/js/bun.lockindex abb76fa624..34867994c4 100644--- a/js/bun.lock+++ b/js/bun.lock@@ -19,8 +19,6 @@"@codemirror/language": "^6.11.3","@corvu/dialog": "^0.2.4","@corvu/drawer": "^0.2.4",- "@corvu/resizable": "^0.2.5",- "@corvu/tooltip": "^0.2.2","@date-fns/tz": "^1.4.1","@floating-ui/dom": "^1.7.4","@fontsource-variable/inter": "^5.2.8",@@ -49,7 +47,6 @@"@solid-primitives/event-bus": "^1.1.2","@solid-primitives/lifecycle": "^0.1.2","@solid-primitives/memo": "^1.4.5",- "@solid-primitives/mutation-observer": "^1.2.2","@solid-primitives/platform": "^0.2.1","@solid-primitives/promise": "^1.1.2","@solid-primitives/resize-observer": "^2.1.3",@@ -64,7 +61,6 @@"@tauri-apps/api": "^2.8.0","@tauri-apps/plugin-haptics": "~2","@tauri-apps/plugin-http": "~2.5.8",- "@tauri-apps/plugin-log": "^2.8.0","@tauri-apps/plugin-notification": "~2","@tauri-apps/plugin-os": "~2","@tauri-apps/plugin-websocket": "~2",@@ -79,7 +75,6 @@"email-validator": "^2.0.4","emojilib": "^4.0.2","fuse.js": "^7.1.0",- "fuzzy": "^0.1.3","katex": "^0.16.22","lexical": "^0.32.1","libheif-js": "^1.19.8",@@ -89,7 +84,6 @@"nanoid": "^3.3.7","neverthrow": "^8.2.0","posthog-js": "^1.360.2",- "prismjs": "^1.30.0","short-uuid": "^5.2.0","signature_pad": "^5.0.10","solid-gesture": "^0.0.3",@@ -113,14 +107,12 @@"@playwright/test": "^1.55.1","@solidjs/meta": "^0.29.4","@solidjs/testing-library": "^0.8.10",- "@testing-library/jest-dom": "^6.9.1","@testing-library/user-event": "^14.6.1","@types/facebook-pixel": "^0.0.31","@types/gtag.js": "^0.0.20","@types/linkify-it": "^5.0.0","@types/lodash": "^4.17.20","@types/node": "^24.8.0",- "@types/prismjs": "^1.26.5","@types/uuid": "^10.0.0","@types/wicg-file-system-access": "^2020.9.5","@types/ws": "^8.5.14",@@ -227,9 +219,6 @@"app/packages/filesystem": {"name": "@coparse/filesystem","version": "0.1.0",- "dependencies": {- "jszip": "^3.10.1",- },"devDependencies": {"@types/wicg-file-system-access": "^2020.9.5","typedoc": "^0.22.18",@@ -609,10 +598,6 @@"@corvu/drawer": ["@corvu/[email protected]", "", { "dependencies": { "@corvu/dialog": "~0.2.4", "@corvu/utils": "~0.4.2", "@solid-primitives/memo": "^1.4.1", "solid-transition-size": "~0.1.4" }, "peerDependencies": { "solid-js": "^1.8" } }, "sha512-7jQoGZ8ROB9CmXam2nMY2wEskU3IoFwZQywkF/7vrBc/edGsPv7mOVQ1GN6G+4nd7nrMZ3UtqHAhmRh9V0azlw=="],- "@corvu/resizable": ["@corvu/[email protected]", "", { "dependencies": { "@corvu/utils": "~0.4.2" }, "peerDependencies": { "solid-js": "^1.8" } }, "sha512-psax38DraM9SXtaNh/sfvizGO6xLCL4sqT4rWYlMZP5ZsUM05Q30tvXgnTo2roQFNOz2e06WofhDsBXTjY6g4A=="],-- "@corvu/tooltip": ["@corvu/[email protected]", "", { "dependencies": { "@corvu/utils": "~0.4.2", "@floating-ui/dom": "^1.6.13", "solid-dismissible": "~0.1.1", "solid-presence": "~0.2.0" }, "peerDependencies": { "solid-js": "^1.8" } }, "sha512-gyOBJ43GNAecDtmWc68A5YJvifXWwK0VZZdTOcFbX0rVQUA2ihBMltRE4oj7/lKidg2gXALjmFr71Blt5s3YuQ=="],-"@corvu/utils": ["@corvu/[email protected]", "", { "dependencies": { "@floating-ui/dom": "^1.6.11" }, "peerDependencies": { "solid-js": "^1.8" } }, "sha512-Ox2kYyxy7NoXdKWdHeDEjZxClwzO4SKM8plAaVwmAJPxHMqA0rLOoAsa+hBDwRLpctf+ZRnAd/ykguuJidnaTA=="],"@cowasm/memfs": ["@cowasm/[email protected]", "", { "dependencies": { "fs-monkey": "^1.0.3" } }, "sha512-TSz00K+BdLxAYFQvwHmKgM/eAK6h9OYSQhPTcv/9XSyOF0Q90EtMkJvtwirwAXunfTsZw8R9YMu1UU213ooVKw=="],@@ -1309,8 +1294,6 @@"@solid-primitives/memo": ["@solid-primitives/[email protected]", "", { "dependencies": { "@solid-primitives/scheduled": "^1.5.3", "@solid-primitives/utils": "^6.4.0" }, "peerDependencies": { "solid-js": "^1.6.12" } }, "sha512-dMfFShNsyX5virETyDv/Uoy2HP+PL4k8cUTTLb2r4TfoqJb010KIaOuURqp/Qbdznp4ZkDuP57b28d45kaOueQ=="],- "@solid-primitives/mutation-observer": ["@solid-primitives/[email protected]", "", { "dependencies": { "@solid-primitives/utils": "^6.4.0" }, "peerDependencies": { "solid-js": "^1.6.12" } }, "sha512-p69O/zwvR7fCT87KGN3hkDfsZyWAJH+bsCZrdmWHcM5/8lg1Ndh7NjxXX1G1Ugk6ru/Bx6MvSppbbfkdBlwzgQ=="],-"@solid-primitives/platform": ["@solid-primitives/[email protected]", "", { "peerDependencies": { "solid-js": "^1.6.12" } }, "sha512-902jki7Q88/JNl4PIAg9h3lWFC3W/9y4OrpK9cmaYRobD3V5qyXAWTlM4aAKPfwpABhTFu9Ky07FPcfF9hWp+Q=="],"@solid-primitives/promise": ["@solid-primitives/[email protected]", "", { "dependencies": { "@solid-primitives/utils": "^6.4.0" }, "peerDependencies": { "solid-js": "^1.6.12" } }, "sha512-zbOfRFT0q5b9ZncRbI9fkQPS/C8HHZh/s67805HApsbniWGoikhHoBf68n53CHAXlULZ8EqQGovieiZuUoLF/g=="],@@ -1429,8 +1412,6 @@"@tauri-apps/plugin-http": ["@tauri-apps/[email protected]", "", { "dependencies": { "@tauri-apps/api": "^2.10.1" } }, "sha512-oxd7oypzQeu8kAfFCrw534Kq7Cw+NzozcnCY21O4rz3A+veJiIiuSCMIprgGcZOcLAXFP9GmDhKUbhuKWcunRw=="],- "@tauri-apps/plugin-log": ["@tauri-apps/[email protected]", "", { "dependencies": { "@tauri-apps/api": "^2.8.0" } }, "sha512-a+7rOq3MJwpTOLLKbL8d0qGZ85hgHw5pNOWusA9o3cf7cEgtYHiGY/+O8fj8MvywQIGqFv0da2bYQDlrqLE7rw=="],-"@tauri-apps/plugin-notification": ["@tauri-apps/[email protected]", "", { "dependencies": { "@tauri-apps/api": "^2.8.0" } }, "sha512-Zw+ZH18RJb41G4NrfHgIuofJiymusqN+q8fGUIIV7vyCH+5sSn5coqRv/MWB9qETsUs97vmU045q7OyseCV3Qg=="],"@tauri-apps/plugin-os": ["@tauri-apps/[email protected]", "", { "dependencies": { "@tauri-apps/api": "^2.8.0" } }, "sha512-n+nXWeuSeF9wcEsSPmRnBEGrRgOy6jjkSU+UVCOV8YUGKb2erhDOxis7IqRXiRVHhY8XMKks00BJ0OAdkpf6+A=="],@@ -1497,8 +1478,6 @@"@types/node": ["@types/[email protected]", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-A1sre26ke7HDIuY/M23nd9gfB+nrmhtYyMINbjI1zHJxYteKR6qSMX56FsmjMcDb3SMcjJg5BiRRgOCC/yBD0g=="],- "@types/prismjs": ["@types/[email protected]", "", {}, "sha512-vqlvI7qlMvcCBbVe0AKAb4f97//Hy0EBTaiW8AalRnG/xAN5zOiWWyrNqNXeq8+KAuvRewjCVY1+IPxk4RdNYw=="],-"@types/request": ["@types/[email protected]", "", { "dependencies": { "@types/caseless": "*", "@types/node": "*", "@types/tough-cookie": "*", "form-data": "^2.5.5" } }, "sha512-FGJ6udDNUCjd19pp0Q3iTiDkwhYup7J8hpMW9c4k53NrccQFFWKRho6hvtPPEhnXWKvukfwAlB6DbDz4yhH5Gg=="],"@types/resolve": ["@types/[email protected]", "", {}, "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q=="],@@ -1593,7 +1572,7 @@"argparse": ["[email protected]", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="],- "aria-query": ["[email protected]", "", {}, "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw=="],+ "aria-query": ["[email protected]", "", { "dependencies": { "dequal": "^2.0.3" } }, "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A=="],"array-buffer-byte-length": ["[email protected]", "", { "dependencies": { "call-bound": "^1.0.3", "is-array-buffer": "^3.0.5" } }, "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw=="],@@ -1851,7 +1830,7 @@"dogapi": ["[email protected]", "", { "dependencies": { "extend": "^3.0.2", "json-bigint": "^1.0.0", "lodash": "^4.17.21", "minimist": "^1.2.5", "rc": "^1.2.8" }, "bin": { "dogapi": "bin/dogapi" } }, "sha512-065fsvu5dB0o4+ENtLjZILvXMClDNH/yA9H6L8nsdcNiz9l0Hzpn7aQaCOPYXxqyzq4CRPOdwkFXUjDOXfRGbg=="],- "dom-accessibility-api": ["[email protected]", "", {}, "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w=="],+ "dom-accessibility-api": ["[email protected]", "", {}, "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg=="],"dom-css": ["[email protected]", "", { "dependencies": { "add-px-to-style": "1.0.0", "prefix-style": "2.0.1", "to-camel-case": "1.0.0" } }, "sha512-w9kU7FAbaSh3QKijL6n59ofAhkkmMJ31GclJIz/vyQdjogfyxcB6Zf8CZyibOERI5o0Hxz30VmJS7+7r5fEj2Q=="],@@ -2637,7 +2616,7 @@"react-is": ["[email protected]", "", {}, "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w=="],- "readable-stream": ["[email protected]", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA=="],+ "readable-stream": ["[email protected]", "", { "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA=="],"readdirp": ["[email protected]", "", {}, "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg=="],@@ -3307,9 +3286,9 @@"@tanstack/react-query/@tanstack/query-core": ["@tanstack/[email protected]", "", {}, "sha512-1HunU0bXVsR1ZJMZbcOPE6VtaBJxsW809RE9xPe4Gz7MlB0GWwQvuTPhMoEmQ/hIzFKJ/DWAuttIe7BOaWx0tA=="],- "@testing-library/dom/aria-query": ["[email protected]", "", { "dependencies": { "dequal": "^2.0.3" } }, "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A=="],+ "@testing-library/jest-dom/aria-query": ["[email protected]", "", {}, "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw=="],- "@testing-library/dom/dom-accessibility-api": ["[email protected]", "", {}, "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg=="],+ "@testing-library/jest-dom/dom-accessibility-api": ["[email protected]", "", {}, "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w=="],"@types/request/form-data": ["[email protected]", "", { "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", "hasown": "^2.0.2", "mime-types": "^2.1.35", "safe-buffer": "^5.2.1" } }, "sha512-jqdObeR2rxZZbPSGL+3VckHMYtu+f9//KXBsVny6JSX/pa38Fy+bGjuG8eW/H6USNQWhLi8Num++cU2yOCNz4A=="],@@ -3325,8 +3304,6 @@"babel-plugin-jsx-dom-expressions/@babel/helper-module-imports": ["@babel/[email protected]", "", { "dependencies": { "@babel/types": "^7.18.6" } }, "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA=="],- "bl/readable-stream": ["[email protected]", "", { "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA=="],-"chalk/supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],"csso/css-tree": ["[email protected]", "", { "dependencies": { "mdn-data": "2.0.28", "source-map-js": "^1.0.1" } }, "sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA=="],@@ -3335,8 +3312,6 @@"dom-serializer/entities": ["[email protected]", "", {}, "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw=="],- "duplexify/readable-stream": ["[email protected]", "", { "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA=="],-"eventid/uuid": ["[email protected]", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="],"fast-glob/glob-parent": ["[email protected]", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="],@@ -3369,6 +3344,8 @@"json-schema-to-typescript/@apidevtools/json-schema-ref-parser": ["@apidevtools/[email protected]", "", { "dependencies": { "@jsdevtools/ono": "^7.1.3", "@types/json-schema": "^7.0.15", "js-yaml": "^4.1.0" } }, "sha512-60vepv88RwcJtSHrD6MjIL6Ta3SOYbgfnkHb+ppAVK+o9mXprRtulx7VlRl3lN3bbvysAfCS7WMVfhUYemB0IQ=="],+ "jszip/readable-stream": ["[email protected]", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA=="],+"katex/commander": ["[email protected]", "", {}, "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww=="],"lexical-service/@types/node": ["@types/[email protected]", "", { "dependencies": { "undici-types": "~6.20.0" } }, "sha512-ClIbNe36lawluuvq3+YYhnIN2CELi+6q8NpnM7PYp4hBn/TatfboPgVSm2rwKRfnV2M+Ty9GWDFI64KEe+kysA=="],@@ -3433,8 +3410,6 @@"strip-literal/js-tokens": ["[email protected]", "", {}, "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ=="],- "superagent/readable-stream": ["[email protected]", "", { "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA=="],-"supports-hyperlinks/supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],"svgo/commander": ["[email protected]", "", {}, "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw=="],