Skip to content

chore(release): version packages#50

Merged
lc-soft merged 1 commit into
developfrom
changeset-release/develop
Jun 23, 2026
Merged

chore(release): version packages#50
lc-soft merged 1 commit into
developfrom
changeset-release/develop

Conversation

@github-actions

@github-actions github-actions Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to develop, this PR will be updated.

Releases

@lcui/fluent-icons@2.0.0

Major Changes

  • b39bde0: BREAKING: package renamed from @lcui/react-icons to @lcui/fluent-icons.

    The functionality is unchanged, but the package name on npm has moved. Update
    your dependency and import statements:

    - import { Icon } from "@lcui/react-icons";
    + import { Icon } from "@lcui/fluent-icons";

    The previous package (@lcui/react-icons) will receive no further updates.

Patch Changes

  • b39bde0: Repository restructure: the three packages now live in a single monorepo at
    lcui-dev/lcui-toolkit, managed with
    npm workspaces and Changesets. The original repositories have been archived.
    No runtime behaviour changes; published artifacts are equivalent to the prior
    standalone releases.
  • Updated dependencies [082269c]
  • Updated dependencies [62e81f8]
  • Updated dependencies [b39bde0]
  • Updated dependencies [9638d0a]
  • Updated dependencies [b39bde0]
  • Updated dependencies [d97979c]
    • @lcui/react@0.6.0

@lcui/cli@1.3.0

Minor Changes

  • 2488da6: feat(cli): incremental compilation with persistent build manifest

    lcui build is now incremental. A build manifest at
    .lcui/build/manifest.json records each source file's content hash, loader
    chain, dependency hashes (collected from import, sass @use/@import,
    postcss / tailwind config, etc.) and output hashes. Unchanged entries are
    skipped entirely on subsequent builds and their previous outputs are reused.

    Every write also goes through a content-aware writeIfChanged: if the new
    bytes match the file on disk, the file is not touched. This prevents
    spurious mtime updates from triggering a full xmake rebuild when nothing
    actually changed.

    New CLI flags:

    • --force — ignore the manifest and rebuild everything.
    • --skip-xmake — do not invoke xmake after compilation.

    The manifest is invalidated automatically when the CLI version, the
    compiler configuration, or tsconfig.json / postcss.config.* /
    tailwind.config.* / lcui.config.js change. xmake is also auto-skipped
    when no output file changed during the build.

  • 220e7e1: feat(cli): compile all component functions in TSX files

    Previously only export default components were compiled. Now ts-loader
    compiles all three categories: export default, named exports (export function),
    and internal functions (non-exported).

    Internal components receive a file-name prefix to avoid global namespace
    collisions. For example, MyButton in helpers.tsx becomes helpers_my_button.
    Each component independently generates its own ui_register_{name}, ui_create_{name},
    and related functions, and all registrations are individually called in main.h.

  • c7a732a: feat(cli): prefix-aware naming for internal components

    Improve internal component naming to avoid redundancy and preserve
    user-defined customization:

    • Skip prefix injection when the function name already starts with the file
      prefix in snake_case (e.g., FieldTableProvider in field-table.tsx
      becomes field_table_provider, not field_table_field_table_provider)
    • Detect user-set displayName assignments in AST and preserve them verbatim,
      without auto-prefix injection or snakeCase normalization
    • Use double underscore (__) separator when injecting file prefix for
      internal components (e.g., Header in page.tsx becomes page__header),
      making injected names visually distinct from natural component names
    • Update @lcui/react to use displayName as-is (not via snakeCase) when
      generating widget tags, ensuring the __ separator survives through to the
      final C identifier

Patch Changes

  • 62e81f8: fix(react): prefix React dev-mode warnings with source file path

    React's dev-mode console.error outputs (e.g., missing "key" prop in
    .map()) were printed without any source file context during lcui build,
    making it impossible to identify which .tsx triggered them.

    Fix by adding an optional filePath field to compile() options. When
    provided, @lcui/react temporarily patches console.error during
    componentFunc execution and transformReactNode, prepending
    in <filePath>: to each warning. The patch is reverted in a finally
    block so the original console.error is always restored, even on exception.

    @lcui/cli's ts-loader now passes loader.resourcePath as filePath
    when calling compile(), so every warning during build includes the
    absolute path of the source file.

  • fad5a6f: fix(cli): use default export name for resource loader when shouldPreRender filters inner components

    When a TSX file has multiple components and inner ones use shouldPreRender
    (so ui-loader filters them out), ui-loader previously derived the resource
    loader function name from the surviving schema (currentSchema.name) instead
    of the default export. This caused a linker error because ts-loader declared
    ui_load_field_table_resources but ui-loader emitted
    ui_load_field_table_provider_resources.

    Fix by passing defaultComponentSnakeName from ts-loader to ui-loader via a
    default-component node in the tree, so both loaders agree on the resource
    function name regardless of schema filtering.

  • 8317ce8: fix(cli): track skeleton .c/.h files in manifest to prevent cache from skipping regeneration

    Skeleton .c and .h files were lost from the build manifest after the
    first incremental rebuild. When ts-loader ran on a subsequent build and a
    skeleton already existed on disk, emitFile was skipped (by the existsSync
    guard), so recordEntryOutput was never called. finalizeEntry then
    overwrote the manifest entry with an outputs list that omitted the
    skeletons. Deleting those files afterwards would never invalidate the cache,
    and they were never regenerated.

    Added a new CompilerContext.addOutput(filePath) method that lets loaders
    declare an existing file as an entry output without triggering a write.
    ts-loader now calls it in the else branch of the existsSync guard,
    ensuring skeletons are always tracked in the manifest regardless of whether
    they were created or reused in this build.

  • 576cb31: fix(cli): skip independent compilation for shouldPreRender components

  • 46ca9f5: fix(cli): gracefully skip ui-loader for data-only TypeScript files

    When a .ts file under app/ or src/ exports no component functions (i.e. only plain variables, interfaces, or constants), ts-loader now returns undefined to the loader chain, and ui-loader handles this by passing through without generating C code. Previously ui-loader would throw "invalid content", breaking the entire build.

    This aligns with webpack's loader semantics where loaders may return null/undefined to signal a no-op pass.

  • b39bde0: Repository restructure: the three packages now live in a single monorepo at
    lcui-dev/lcui-toolkit, managed with
    npm workspaces and Changesets. The original repositories have been archived.
    No runtime behaviour changes; published artifacts are equivalent to the prior
    standalone releases.

  • Updated dependencies [082269c]

  • Updated dependencies [62e81f8]

  • Updated dependencies [b39bde0]

  • Updated dependencies [9638d0a]

  • Updated dependencies [b39bde0]

  • Updated dependencies [d97979c]

    • @lcui/react@0.6.0

Bug Fixes

  • 调整发版命令解决文件缺失问题 (728a49f)

@lcui/react@0.6.0

Minor Changes

  • 9638d0a: feat(react): support Fragment flattening in children

    Fragment elements (<>...</>) in children are now auto-flattened at compile
    time, so each fragment's children become siblings of the parent node. This
    enables list rendering patterns like .map() returning multiple sibling
    elements without a wrapper widget.

  • b39bde0: Internal: split src/ into runtime/, compiler/, and widgets/ subdirectories.

    Add subpath exports so callers can import a narrower surface area:

    import { Button } from "@lcui/react/widgets";
    import { compile } from "@lcui/react/compiler";
    import { useState } from "@lcui/react/runtime";

    No breaking changes — every symbol previously exported from @lcui/react is
    still available from the package root.

  • d97979c: feat(react): allow string C-function names on JSX event props

    @lcui/cli's ts-loader has always supported <button onClick="handle_click" />
    as a way to bind a JSX event to a C function — at runtime the string is
    emitted as a ui_widget_on(...) call plus a forward declaration in the
    generated header. Until now this form failed TypeScript's type check because
    React declares e.g. onClick as MouseEventHandler<T> | undefined.

    This release ships a focused JSX type augmentation that widens the subset of
    on* event props that LCUI actually dispatches to also accept string. The
    augmentation is loaded automatically when you import from @lcui/react,
    so no user-side configuration is required. Covered props (chosen from
    ui_event_type_t):

    • Mouse: onClick, onDoubleClick, onMouseDown, onMouseUp,
      onMouseMove, onMouseOver, onMouseOut, onWheel
    • Keyboard: onKeyDown, onKeyUp, onKeyPress
    • Focus: onFocus, onBlur
    • Clipboard: onPaste
    • Form / value change: onChange (semantic "change" event dispatched by
      widgets such as TextInput)

    Event-name compatibility is handled by a small remap table in the React
    compiler so the names users write match the names LCUI actually dispatches:

    • onDoubleClick"dblclick" (instead of the default "doubleclick")
    • everything else falls back to the existing onXxx → "xxx" rule

    TextInputProps now also declares onChange explicitly for better IDE
    hints on <TextInput>.

    Props for browser-only events (drag / pointer / animation / transition /
    contextmenu / touch with mismatched names) and the SVGAttributes
    namespace are intentionally not widened: passing a string on those will
    keep failing type-checking, so users do not end up with code that compiles
    but cannot bind at runtime.

    JavaScript callbacks (onClick={() => { ... }}) continue to work unchanged
    and remain type-checked as before. Invalid values like onClick={42} are
    still rejected.

Patch Changes

  • 082269c: fix(react): bind every widget when multiple widgets share the same string event handler

    Previously the compiler deduplicated event handler declarations by name,
    which caused ui_widget_on to be emitted only for the first widget when
    several buttons shared the same onClick="my_handler". Split the handler
    declaration (still deduplicated) from the per-widget binding (no longer
    deduplicated) so each widget correctly receives its own ui_widget_on call.

  • 62e81f8: fix(react): prefix React dev-mode warnings with source file path

    React's dev-mode console.error outputs (e.g., missing "key" prop in
    .map()) were printed without any source file context during lcui build,
    making it impossible to identify which .tsx triggered them.

    Fix by adding an optional filePath field to compile() options. When
    provided, @lcui/react temporarily patches console.error during
    componentFunc execution and transformReactNode, prepending
    in <filePath>: to each warning. The patch is reverted in a finally
    block so the original console.error is always restored, even on exception.

    @lcui/cli's ts-loader now passes loader.resourcePath as filePath
    when calling compile(), so every warning during build includes the
    absolute path of the source file.

  • b39bde0: Repository restructure: the three packages now live in a single monorepo at
    lcui-dev/lcui-toolkit, managed with
    npm workspaces and Changesets. The original repositories have been archived.
    No runtime behaviour changes; published artifacts are equivalent to the prior
    standalone releases.

Features

  • 更新头文件名称 ui__widgets.h -> LCUI/widgets.h (78fac30)

0.4.0 (2024-12-22)

Bug Fixes

  • 结点名称与组件名称不一致 (3cc733b)
  • 指定 ref 属性后未正确生成对应结构体成员 (a3b7920)
  • fmt() 函数生成的代码缺失必要头文件 (efb4ea4)

Features

  • 添加 ScrollArea 组件 (bdbd870)
  • 添加 Scrollbar 组件 (766ca91)
  • 支持用函数名称绑定事件处理器 (31a38d6)
  • useState() 函数支持传入第二个参数指定值类型 (ace2bc2)

@github-actions github-actions Bot force-pushed the changeset-release/develop branch from c86080c to c166365 Compare June 21, 2026 15:53
@lc-soft lc-soft merged commit 24932e9 into develop Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant