Factorio Core Library


Modern reactive UI framework and utilities for Factorio 2.0 mods

Content
8 days ago
2.1
149

Changelog

-
Version: 1.0.1
Date: 2026-08-22
  Refactoring:
    - Overhauled styles module architecture: consolidated internal definitions into _common.ts and simplified public index.ts exports.
    - Flattened all GUI element style types into dedicated *Styles string unions (ButtonStyles, FrameStyles, LabelStyles, etc.) for direct IntelliSense tooltips and cleaner TypeDoc API docs.
    - Simplified prototype styling helper getDefaultStyles() and removed overengineered TypedGuiStyle.
    - Open union pattern StyleFor<E> = ElementStyleMap[E] | (string & {}) seamlessly accepts custom mod styles without module augmentation.
  Features:
    - Added lazy logging support to strace (traceLazy, debugLazy, infoLazy, warnLazy, errorLazy) with zero execution overhead when log levels are disabled.
    - Added log level checker methods to strace (isTrace, isDebug, isInfo, isLevelEnabled).
    - Added runtime-global mod setting fcore-log-level for real-time in-game log level control without restarting.
  Documentation:
    - Updated Starlight documentation website with comprehensive architectural guides for styles, strace, scheduler, and React.
-
Version: 1.0.0
Date: 2026-08-21
  Features:
    - Initial release of fcore (Factorio Core Library).
    - Declarative React Virtual DOM reconciler with native JSX support for Factorio 2.0.
    - React hooks: useState, useReducer, useEffect, useLayoutEffect, useMemo, useCallback, useRef, useInterval, useEntityLifecycle, useTransientData.
    - Bucketed tick scheduler with O(1) tick lookup.
    - High-performance tag-based event bus routing.
    - Pre-built UI components: WindowFrame, Titlebar, TabbedPane, SectionGroup, WellSection, WellFold, Input, Button, Checkbox, Dropdown, RadioButtons, SignalPicker, SlotButton, SlotButtonTable.
    - Type-safe GUI style engine with StyleFor<E> inference.
    - Composite signal and quality encoder/decoder.
    - Structured logger (strace) with lazy evaluation and runtime log level settings.