Files
numolus/app/frontend/engine/index.ts
T
wkh 0fca61eb65 Add in-app help, formula reference outlines, underline and auto-closing
- Help dialog (?, F1, Datei > Hilfe): user topics, all shortcuts and the
  formula functions with one search over everything. Topics and shortcuts
  are plain data in data/help.ts; the function list comes from
  codeReference.ts so new built-ins appear by themselves.
- While a formula is edited, the grid outlines each referenced cell/range
  in the colour of its position in the text, and the outline can be
  dragged to move or resize the reference, as in Excel. Point-mode picks
  (click, drag, arrow keys) are outlined too, so keyboard picking is no
  longer blind.
- Underline as a cell format, plus Mod+Shift+B/I/U toggles that switch on
  unless every selected cell already has the format.
- A formula committed with open parentheses or an open text literal gets
  the missing closers appended; anything that still doesn't parse is left
  alone so the usual error shows instead of a guess.
- Cells and tables with a fill but no text colour get dark or light text
  by WCAG contrast instead of the theme colour (no black on black).
2026-10-24 00:38:01 +02:00

85 lines
1.7 KiB
TypeScript

/**
* Public surface of the formula engine.
*
* Nothing in `./` imports Vue, the DOM or any spreadsheet library. See
* ./README.md for the grammar (EBNF), the evaluation model and the error model.
*/
export { tokenize, LexError, type Token, type TokenType } from './lexer';
export {
parseFormula,
completeFormula,
parseFunctionBlock,
parseMacroBlock,
collectRefs,
collectRefsInBlock,
ParseError,
type Node,
type CellNode,
type RangeNode,
type NamedRefNode,
type BlockNode,
type ActionNode,
} from './parser';
export { evaluate, runMacroActions } from './evaluator';
export { DependencyGraph } from './graph';
export { FUNCTIONS, getFunction, hasFunction, BUILTIN_SIGNATURES } from './functions';
export {
colToNumber,
numberToCol,
parseA1,
toA1,
looksLikeCell,
expandRange,
rangeCells,
wholeLineAt,
parseLinePart,
formatLinePart,
WHOLE_LINE_END,
cycleReferenceLocks,
currentIdentifierAtCaret,
formulaRefSpans,
type RefSpan,
} from './refs';
export {
Workbook,
literalValue,
type TableModel,
} from './workbook';
export {
dateToSerial,
timeSerial,
serialToUtcDate,
todaySerial,
nowSerial,
parseDateTimeLiteral,
type DateLiteralKind,
} from './dates';
export {
buildFunctionIndex,
expandUserFunctions,
expandMacroBlock,
collectCalledFunctionNames,
collectCalledFunctionNamesInBlock,
declaredBlockNames,
findInvalidForSource,
findInvalidActionTarget,
blockAlwaysReturns,
type FunctionDef,
} from './userFunctions';
export {
FormulaError,
isError,
keyOf,
parseKey,
ERROR_CODES,
type ErrorCode,
type CellValue,
type CellRef,
type Scalar,
type EngineHost,
type MacroWriteHost,
type MacroNetworkHost,
type NamedRangeDef,
} from './types';