For vue2 projects, use @94ai/common-ui

FAQ ​

Why VitePress 2 alpha? ​

VitePress 1.6.4 depends on Vite 5. This project's baseline uses Vite 8, so VitePress is pinned to 2.0.0-alpha.20, which supports it. In addition, VitePress supports responsive documentation previews on mobile devices by default.

How does TypeScript 7 work with existing tools? ​

The project compiler is pinned to TypeScript 7.0.2. vue-tsc and typescript-eslint do not yet support its package layout, so only their isolated processes use the pinned TypeScript 5.9.3 compatibility compiler.

How do I switch component themes? ​

Install @94ai-plus/nf-theme-chalk or @94ai-plus/nf-theme-oem. Set the theme through NfConfigProvider or app.use(CommonUI, { theme }). Docs and the playground provide live switches. Component themes are independent of light/dark appearance.

How do I change documentation language? ​

Use the language menu next to Theme. Navigation, search, demo actions and page content support Chinese, English, Japanese (ja), Spanish (es), Indonesian (id), Thai (th), Tagalog (tl) and Portuguese (pt). The choice is saved in localStorage (common-ui-plus:docs-language); refresh and reopening docs restore it. Explicit language URLs and playground links with a valid locale parameter take priority over the cache. Example links and the playground entry carry the selected language. Invalid/unavailable storage falls back safely. Historical CHANGELOG and Git commit messages retain their original text.

How is documentation appearance saved and synchronized? ​

The top sun/moon button switches documentation appearance, defaulting to light. The choice is stored as light or dark in localStorage (common-ui-plus:docs-appearance) independently of Chalk/OEM. The top-level Playground link, example links and inline previews carry the current appearance. A valid appearance URL parameter, including share links, takes priority over the cache. Returning from the playground also retains its appearance.

How do I switch library versions and light/dark appearance in the playground? ​

CommonUI defaults to local sources. Focus its selector to fetch published versions directly from npm, including alpha prereleases. Selecting an npm version pins runtime code, built-in standalone entries, both theme stylesheets and type hints to that version via CDN. Edits are preserved; failures retain the previous version. Share links store the commonUI version; local means local sources, separately selectable from the published package with the same version number.

The toolbar selects Vue, Element Plus and TypeScript versions and switches light/dark appearance. Light is the default; appearance affects the editor and preview independently of Chalk/OEM branding. Default Vue 3.5.44 and Element Plus 2.14.7 use local assets. Other versions require a CDN; loading failures retain the previous version and show an error. Share links preserve versions and appearance.

The TypeScript selector changes Monaco's real language service. The browser defaults to local TS 5.9.3 and supports selectable TS 5/6 versions. The repository remains pinned to TS 7, whose new API is not supported by the REPL. SFCs support <style scoped lang="scss">, compiled in a Worker with variables, nesting, mixins and built-in modules. Local and cross-file SCSS imports are not supported.

How do playground themes, localization and sharing work? ​

Switching the toolbar theme or language reloads the isolated preview and synchronizes built-in example settings. CommonUI merges its language into the current application's Element Plus configuration, preserving existing options such as size and namespace and synchronizing related injections without duplicate-provide warnings. Explicit provider settings in custom code take priority.

The reload() method in @vue/repl@4.7.2 reuses the original preview document instead of reading headHTML again. The preview therefore loads both theme-selector-scoped stylesheets and switches them through data-nf-theme, ensuring that Element Plus tokens update correctly even after repeated switches.

Isolated previews use a separate Blob document with the iframe's original sandbox permissions. This prevents micro-app hash routers, including the softphone's, from navigating back to the editor URL and showing a URL-loading error or a nested playground. Old document URLs are released when the preview is recreated or unmounted.

Share links preserve SFC files, theme and language, restoring the editing state when opened. If clipboard access is blocked, a manually copyable link is displayed. Compilation errors have a separate panel, while runtime errors appear in the REPL preview panel. Correcting the code restores the preview.

How do I use SCSS in the playground? ​

Use <style lang="scss"> or <style scoped lang="scss"> in an SFC; indented lang="sass" syntax is also supported. The toolbar provides an SCSS styles example. The browser loads locally bundled Dart Sass 1.93.2 on demand, supporting variables, nesting, mixins and built-in modules such as sass:math. Compiled CSS still passes through Vue's scoped and v-bind() transforms. Errors appear in the compilation error panel and recover after correction; share links preserve the original SCSS.

By default, @vue/repl@4.7.2 rejects style preprocessor languages and does not pass style.lang to the style compiler. The playground compiler adapter detects and precompiles these languages, retaining Sass errors separately so REPL does not clear their diagnostics. Compilation does not depend on the development server and also works on the production static site.

SCSS compiles in an on-demand, isolated Worker, preventing Dart Sass browser globals from interfering with Monaco and avoiding editor-blocking compilation.

Can I edit documentation examples directly? ​

Yes. The four demo actions open the playground, switch JS/TS, copy, and expand/collapse code. Edits update the preview automatically, and collapsing retains the draft. Copy and playground actions use current code and document settings. Syntax/runtime errors are isolated to each example and recover after correction.

Complete Vue SFCs, script setup, TypeScript and SCSS use the playground compiler pipeline. JS/TS drafts are separate; JS conversion removes types and preserves runtime props/emits for typed macros. Refresh resets drafts. Copy the code or use a playground share link to save it.

All documentation DemoBlocks use document previews by default, without demoPreview: document or a preview iframe. Dropdowns and overlays use the document viewport. Editing, JS/TS, copy, expansion, async setup/Suspense and playground links remain available. Each demo owns its locale, configuration theme, styles and cleanup; configuration examples do not change navigation. This is for trusted examples and local edits, not a security sandbox. The standalone playground and shared links remain iframe-isolated.

Which import mode should I use? ​

Use ES Module with modern bundlers such as Vite. Webpack projects can follow manual CJS imports, including styles. Automatic imports use common-ui-resolver with unplugin-vue-components; script calls to Message, Notification and Confirm still need explicit imports. Plain HTML can use UMD globals or importmap mappings to browser ES entries. Load matching Vue, Element Plus, Common UI and theme CSS resources. See Quick start.

How do I configure defaults for all components? ​

Import NfConfigProvider from @94ai-plus/common-ui and set defaults through nfForm, nfTable, nfAlert, nfSoftphone and other component keys. Template attributes can use kebab-case, such as nf-form. Priority is explicit component props → nearest Provider → outer Provider → original defaults. undefined inherits; false, 0 and empty strings remain valid. Merge is per property: arrays, objects and functions replace the inherited value without deep merging. Updates are reactive, while initialization options still follow the component lifecycle. Supply business data, events, slots and native attributes on the component.

Call useMessage(), useNotification() or useConfirm() inside setup of a Provider descendant to inherit its settings. Direct Message, Notification and Confirm calls without context, and softphone manager instances, do not automatically read the component tree. Half-year, half-year-range and week-range pickers use their own defaults first, then inherit missing props from nfDatePicker. See Common UI global configuration.

How do the three softphone exports differ? ​

ts
import NfSoftphone, { nfSoftphone, nfSoftphoneManager } from '@94ai-plus/nf-softphone'

NfSoftphone replaces the Vue component from nf-microphone-vue; nfSoftphone is the former softphoneManager singleton; nfSoftphoneManager is the former SoftphoneManager constructor for independent instances. All load the shared 94AI online web phone through qiankun (default) or wujie. They do not implement local SIP or the legacy iframe/postMessage API.

For asynchronous signatures, set :auto-start="false". In onMounted(async () => …), obtain a matching signature and timestamp, assign both, await nextTick(), then call initSoftphone() on the component ref. An async request may finish after unmount: guard late initialization with a disposal flag. The global configuration page uses this flow and configures language, OEM and PC mode through nfSoftphone.

The component ready event means the micro-app mounted; component initSoftphone() also waits for visible phone-bar content. Default loading remains until then; failures use the error slot. For managers, await phone.ready, then waitForSoftphoneRender(container).ready when visible rendering matters. Vue components clean up internally on unmount; manager users must await phone.destroy() (destory() remains an alias).

Integration demos load the real remote phone bar; rendering does not mean the agent is signed in. Give instances separate name, ancestorOrigin and destinationOrigin. Set the phone language with lang (zh for Chinese, en for English); language does not choose the domestic or overseas environment. Production signatures belong on the backend; documentation test configuration is not a business credential. See the softphone example. Check HTTPS, CORS, CSP, microphone permissions and agent login.

What are the virtual table limitations? ​

Enable virtualized, supply virtualTableData, set virtualProps (rowHeight/itemSize, height, buffer) and provide a stable row-key. The window assumes fixed row heights, preserves selection while scrolling and has no pagination.

Use ordinary mode for tree expansion, row spans or variable-height rows. Private wrapper/VirtualColumn APIs from the old Vue 2 plugin are not preserved. Custom render functions use Vue 3 h()/VNodes, not Vue 2 VNodes.

How are field settings, table columns and widths cached? ​

Table column settings and resized widths use IndexedDB (the nf-table object store in the common-ui-plus database), restored asynchronously without a localStorage fallback or automatic migration of old caches. Await clearColumnEditCached(), clearDragCached() and the legacy *Cookies* synchronization methods to wait for completion. If IndexedDB is unavailable, the current instance remains usable. Search form field settings use the nf-search-form object store in the same database.

Enable columnEdit for visibility/order settings in a drawer or dialog. Use a unique storageKey per view and a separate searchFormStorageKey for the table's search form. priority (cached/value) selects cache/input precedence; synchronize visibility with v-model:showItems or v-model:showColumn.

Call clearColumnEditCached() on the component instance to clear field/column settings and clearDragCached() for table widths.

How do pagination and query Loading work? ​

Without pageAttrs.total, the table paginates the full data array locally. Providing total, including zero, enables server pagination: supply only the current page in data. setEasyConf enables initial and page-change queries unless explicitly overridden by initSearchApi/pageChangeSearchApi.

Handle @search-api with { data, callback }. Pagination keys default to pageNo/pageSize; override them with pageKeys. Always call callback() in the request's finally, including failures. Stale callbacks cannot close a newer Loading state, but business code must still guard row assignments with request IDs or AbortController. See nf-table.

How is component language synchronized with Element Plus? ​

Supported languages are zh-CN, en-US, ja, es, id, th, tl and pt. Create an application-scoped reactive context and pass it to CommonUI; setLocale() updates component text and the corresponding Element Plus locale.

ts
import CommonUI, { createLocale, ja } from '@94ai-plus/common-ui'

const locale = createLocale(ja)
app.use(CommonUI, { locale })
locale.setLocale('es')

NfConfigProvider accepts a language name such as locale="ja"; an explicit elementPlusLocale takes priority. CommonUIOptions.locale accepts a language pack or context, not a string. Translate business slot content separately; the remote softphone controls its own language. See global configuration.

How can I get the official website and versioned documentation URLs offline? ​

With the CLI installed, run npx common-ui site --offline, or call MCP common_ui_site with {}. result.homepage is the official homepage and result.documentation is the snapshot documentation URL; provenance records version, commit and digest. Fixed versions use versions/<version>/, preserving the Chalk/OEM prefix. --offline reads only matching bundled data or verified cache and fails if the snapshot is unavailable. Older snapshots without website metadata return WEBSITE_UNAVAILABLE; other queries remain available without inventing URLs or substituting versions.

Business component migration ​

All components in the current scope have completed their initial migration and now enter ongoing maintenance and iteration. The migration manifest retains only the 34 integrated legacy packages. Together with the locale and resolver foundation packages and the new nf-date-picker package that supplements Element Plus with half-year and week-range selection, there are 37 publishable packages.

NfButton migration contracts and differences ​

  • NfConfigProvider provides independent configuration for every migrated component, supporting all of each component's props. For example, nfButton (template :nf-button) supports all NfButton props, including size, icon, loading and nativeType; it does not reuse Element Plus button or global size, avoiding conflicting size contracts. Explicit component props take precedence, followed by the nearest Provider, outer Providers and component defaults. Merging is reactive and per property: undefined inherits, while false and empty strings override. Events, slots and native passthrough attributes are not global defaults.

  • Vue converts omitted Boolean props to false, so NfButton sets their macro defaults to undefined before merging Provider values, allowing inheritance when no value is supplied. The final DOM behavior still defaults to enabled and not loading. Scoped Symbol.for injection keys let the full library and standalone ESM/CJS/UMD packages share configuration.

  • All legacy props are retained: icon/type/size/round/circle/plain/text/disabled/loading/autofocus/nativeType, with default mini and native type="button". type="text" still maps to primary + text + plain, and info continues to use the primary color.

  • The native button, original click MouseEvent and default slot are retained. Event guards and aria-busy handle disabled/loading states, preventing programmatically dispatched events from bypassing disabled behavior. Original sizes, spacing, borders and hover/active rules remain, with an added keyboard focus-visible indicator.

  • Uses native Vue 3 APIs without vue-demi, Element UI or a Vue 2 compatibility runtime. Vue 2 .native becomes native listener fallthrough in Vue 3.

  • The loading icon is a rotating SVG without a font dependency. Common legacy el-icon class names in the documentation map to Element Plus SVGs; other custom strings remain class names and require consumer-provided icon styles. Vue icon components are supported as icon values; the complete legacy Element UI icon font is not distributed.

  • Style entries are @94ai-plus/nf-theme-{chalk|oem}/nf-button.css or @94ai-plus/nf-button/style.css; the legacy lib/style path is not retained. Both themes include per-component CSS and SCSS sources. Primary and interaction colors use CSS variables and color-mix, requiring modern browsers with color-mix support.

  • Chalk's default token root selector excludes OEM, preventing full/per-package CSS loading order from overriding OEM with Chalk. Supports standalone app.use, named imports, full plugin installation and resolver-based automatic imports.

NfEmpty migration contracts and differences ​

  • Retains the five image/type/border/imageSize/description props, two description/default slots, root attributes/native listener fallthrough and eight legacy illustration categories. Slots take precedence over description; an empty string still falls back to the default text, and the footer is generated only when a default slot is supplied. There are no component-specific events or exposed methods.
  • Reuses all 16 Chalk/OEM SVGs unchanged, inlined at build time without remote images or deployment-base dependencies. Theme selection now consistently uses data-nf-theme/NfConfigProvider theme, without reading legacy window.$agentCustomization. CSS selects the image, theme switching does not remount, and SSR does not access browser globals.
  • Fixes swapped OEM seat/server images, missing seat text and the incorrect use of the Number constructor as the imageSize default. Without a supplied size, illustrations retain their native dimensions (mostly 120px; Chalk internet is 122px and seat is 97px). Nonzero sizes use px and are constrained to the container.
  • Default descriptions use the existing eight-language common-locale; explicit description and slots remain application-controlled. Missing keys in custom locales fall back to the legacy Chinese text. Scoped Symbol.for locale injection keys share context across the full library and standalone ESM/CJS/UMD packages.
  • Supports standalone installation, named exports from the full package, global types and resolver-based on-demand imports. Theme packages provide nf-empty.css and SCSS sources; the standalone package provides style.css. The legacy lib/style path is not retained.
  • Inline template fragments may contain nested <template #description> slots. The playground uses an SFC parser to identify top-level blocks before wrapping fragments. A regex that finds any template tag would misidentify a slot as a complete SFC and prevent preview mounting.

NfImportTemplate migration contracts and differences ​

  • Retains all 12 props, the click(MouseEvent)/upload(File)/emit-error() events and default/tip slots. The default slot replaces the description, not the step number; tip replaces both hints. The error state hides steps and descriptions and displays errorText or the last valid filename. Filename stems longer than 20 characters are truncated while preserving the extension.
  • Defaults follow the legacy source: mode="downLoad" and tipDirection="vertical"; the documented legacy download spelling is also accepted. errorText is a string. The uploadMineType name is retained, but its value is an array of extensions, not MIME types. Defaults are .xlsx/.xls; extension matching is now case-insensitive.
  • File size must remain strictly below limitSize MiB; equality is rejected. Canceling selection no longer causes an error. The input is cleared before selection so the same file can be selected again. loading blocks downloading, file selection and upload, even for manually dispatched events. The component does not provide upload APIs or download requests; applications handle file safety, server limits and networking.
  • Validation failures first use app.config.globalProperties.$openMessage.error, falling back to ElMessage.error when unavailable. Error messages support eight languages; application descriptions and button text remain controlled by props/slots. Error details use SVG and a native button with mouse and keyboard support. No exposed methods are added.
  • Chalk/OEM retain the original hover background images and interactions. Standalone theme CSS includes button styles. Theme builds copy relative image assets into CSS/style/SCSS directories; documentation/playground preparation separately copies assets and rewrites paths to preserve images in archives and static deployments. Small screens allow wrapping to avoid overflow.
  • Import through the standalone package, full package, global types or resolver. Styles use @94ai-plus/nf-theme-{chalk|oem}/nf-import-template.css. Internal cross-workspace component imports use named exports to avoid CJS default imports resolving to the entire module namespace and producing empty components. Element Plus locale objects are inlined in each format, avoiding CJS require of ES locale subpaths that only support import conditions. Vue/Element Plus runtimes and same-repository packages in modular outputs remain external. ESM/CJS/browser ES/UMD undergo actual loading tests.

NfRadioGroup migration contracts and differences ​

  • Retains the 16 legacy props, update:value, change({ index, value }) and the content slot. Vue 2 :value.sync becomes v-model:value. Standard v-model (modelValue / update:modelValue) is added and takes precedence over value when provided, including 0, empty strings and empty arrays. A valid selection emits both update events before change; reselecting the same single-choice item emits nothing. For multiple selection, change's value remains the item acted on, not the resulting array.
  • Option values are string/number, strictly distinguishing numeric 0 from string '0'. Multiple selection first filters valid values from the current array in groups order, then adds/removes the current option without mutating the supplied array. A non-array means no selection, fixing legacy exceptions and incorrect string includes matches. Option values must be unique.
  • Fixes item.disabled being visual only while still allowing selection. Global/local disabling uses native disabled plus event guards, including programmatic click dispatch. Buttons use type=button and do not submit the parent form. Single selection uses radiogroup/radio; multiple selection uses group/checkbox. Enter/Space activate natively; arrows and Home/End skip disabled items. Single selection also selects, while multiple selection only moves focus. Default tabindex remains 0.
  • Tooltip uses Element Plus: openDelay → showAfter and visibleArrow → showArrow. Legacy hideAfter preserves automatic closing through autoClose, timed from actual display, fixing time previously consumed while waiting for openDelay. It is not Element Plus hideAfter's mouse-leave delay, which remains 200ms. enterable controls pointer entry. Missing tip, missing options or global disabling suppress tooltips even with a content slot. content gains optional item/index scope; existing argument-free slots remain valid.
  • popperOptions retains the legacy default { boundariesElement: 'body', gpuAcceleration: false }, converted to Popper 2 preventOverflow/computeStyles modifiers. body maps to the document root boundary, viewport/window to the viewport and scrollParent to clippingParents. DOM elements or valid CSS selectors can be boundaries; server rendering and invalid selectors fall back to clippingParents. Explicit modern modifiers win when names match. Other Popper 1 options must be rewritten for Popper 2 rather than copied blindly. offset remains a number and follows Element Plus offset direction.
  • Element Plus Tooltip still requires an SSR ID provider. The component respects an application-supplied ID_INJECTION_KEY; otherwise Vue 3.5 useId derives a stable seed scoped to the current subtree, avoiding random-ID warnings and server/client mismatches without a cross-request global counter. Tooltip triggerKeys is empty to preserve native Enter/Space handling. Both hover and focus can show hints.
  • VitePress static SSR does not inject HTML into Element Plus Teleport targets. The internal Tooltip adapter renders only the native button during SSR and initial hydration, creating the overlay after mounting. This avoids missing-target hydration warnings, insertBefore errors and interrupted disabled/size updates. Only Tooltip is deferred; applications do not need to wrap the whole component in ClientOnly.
  • Retains three sizes (24/28/36px high), selection states and both themes' primary colors. Narrow screens allow horizontal scrolling to avoid widening the page. Supports standalone app.use, full-package exports, global tags and resolver imports. Standalone/theme packages provide CSS and themes retain SCSS sources. Applications must also import Element Plus styles for Tooltip. Names and tip are application text without built-in translations; all eight documentation languages provide separate example pages.

NfAlert migration contracts and differences ​

Retains title, description, type, closable, closeText, showIcon, center and effect with their defaults, the argument-free close event, and default/title/close slots. title replaces the title and built-in icon; close replaces the entire closing area and displays custom content even when closable=false. Adds the { close } slot parameter and instance close() for custom closing actions.

For legacy compatibility, title and description still render HTML and accept trusted content only. Display untrusted text through slot interpolation. When description and the default slot are both supplied, the default slot now wins instead of neither being displayed. Repeated close calls after hiding no longer emit repeatedly; each instance notifies once. Changing props after closing does not reopen the alert; remount with a new key.

The close icon is now a native type=button with keyboard support and eight-language aria-labels, without submitting forms. Inline SVG replaces the Element UI font. The title container is block-level, avoiding SSR hydration differences from a legacy span containing div elements. Slot state participates directly in rendering, so adding/removing slots updates layout. Vue 3 transitions use enter-from/leave-to. Chalk/OEM retain separate CSS/SCSS; info borders and icons use the component theme's primary color. effect=light/dark controls only the alert appearance, independently of documentation/playground light/dark appearance.

NfDrawer migration contracts and differences ​

Built on Element Plus Drawer, retaining six wrapper props, asynchronous confirm(done, error), cancel(MouseEvent), changeTab, footer and dynamic slots. Uses v-model:visible or v-model (the latter takes precedence), emitting both visibility updates. Escape/backdrop closing defaults to false; wrapperClosable maps to closeOnClickModal, with the latter taking precedence. Cancel and the close icon go through beforeClose; successful confirmation closes directly, preserving legacy semantics.

Fixes crashes with empty tabs, nonreactive dynamic lists and empty title slots hiding the title prop. Hidden tabs use v-show to preserve state. Invalid currentTab falls back to the first item; an empty list clears it and emits update:currentTab(undefined). Primary colors use theme variables. Classes attach to the actual Drawer panel and still work after append-to-body. Hiding both buttons also hides the custom footer.

Confirmation callbacks apply only once and expire after closing, reopening or unmounting. SSR outputs a placeholder; the drawer is created after mounted. Element Plus header takes precedence over the legacy title slot. The incorrect legacy transfer-select anchor is not claimed. Native Element Plus styles still require on-demand or full import.

Element Plus 2.14.7 delays native scroll-lock cleanup by 200ms. Closing and immediately reopening during the entrance animation can leave a body scroll lock. Upstream locking behavior is retained without forcibly clearing body classes shared by other dialogs. Programmatic flows should wait for opened before closing and closed before reopening. Containers that manage scrolling can explicitly set :lock-scroll="false". Confirmation callback generation guards and this upstream animation race are independent.

NfTag migration contracts and differences ​

Retains three props: type defaults to undefined (no state class), value to an empty string and circle to true. Retains the six disabled/success/info/warning/danger/tip states and the default slot. value is plain text without HTML execution; the default slot takes precedence. The decorative dot gains aria-hidden. No business text is built in; localization is supplied through value/slots without automatic translation.

The root remains a native div. click emits the original MouseEvent once, preserving native bubbling and default behavior. The value prop and click argument omitted from legacy documentation are now documented from source. type="disabled" is a gray visual state, not a disabled attribute, and remains clickable. No button role or keyboard behavior is added automatically; applications needing an interactive control must provide complete button/link semantics.

Retains 22px line height, 12px font size, 2px radius, a 4px dot and the six original state colors. Chalk info text/dots remain #0b73ff instead of being forced to #17f; OEM info follows the theme primary color (default #007555). Both backgrounds remain #e7f1ff. The --nf-tag-info-color variable inside theme selectors supports dynamic switching after preloading both stylesheets and nested theme areas. Legacy Event/Slot links incorrectly used ai-action-md anchors; new documentation provides independent tag anchors without claiming future action component links.

NfMessage migration contracts and differences ​

The default export remains the NfMessage component plugin. Named Message provides a callable service with success/warning/info/error, close(id) and closeAll(). Full-package/standalone plugin installation both provide this.$openMessage. useMessage() inherits the current provider's injection and locale and cleans messages on unmount. createMessage(appContext) creates an independent service without a global context tied to the last installed application. An application's closeAll affects only its own messages; direct Message.closeAll affects all messages on the page.

Default duration is 3000ms; values <=0 persist. Hover pauses the timer; leaving restarts its full duration. Escape closes all messages. offset follows the legacy source default of 20px (100 in old documentation was incorrect), explicit 0 is honored, and spacing is 8px. ResizeObserver and window resize recalculate stacking, supporting dynamic VNode heights. Closing is idempotent, close(id) actually closes the DOM, and destruction removes timers, listeners and observers. closeAll uses a snapshot so messages created in callbacks are not accidentally closed.

The service returns a typed MessageHandler with id, el/$el, visible, closed and close(), without Vue 2 private instance fields. onClose receives this handler. SSR returns a no-op handler with closed=true. Strings are escaped by default; only explicit dangerouslyUseHTMLString renders trusted HTML. Direct VNodes are supported. The close control is a keyboard-accessible native button with eight-language aria-labels; SVG removes the Element UI icon-font dependency. Declarative NfMessage retains its default slot without joining service stacking. Theme follows root data-nf-theme.

NfNotification migration contracts and differences ​

The default export is the NfNotification plugin. Named Notification provides a callable service with success/warning/info/error, close(id) and closeAll(). Full and standalone installation both provide this.$openNotify. useNotification() inherits the current provider and automatically cleans up. createNotification(appContext) creates an independent application service without binding to the last installed app. Message and Notification keep separate records.

Retains the 4500ms default, showClose=true, independent stacking at all four corners, and 16px margins and gaps. Hover pauses; leaving restarts the full timer. Delete/Backspace pause, other keys restart, and Escape closes. Fixes duplicate timers from keyboard events and timers restarting during hover. Height/window changes relayout notifications. Cancel/confirm buttons only invoke callbacks; they do not automatically close or trigger card clicks. Applications can explicitly call close() inside callbacks.

close(id) now actually closes the DOM; close() is idempotent and cleans resources. onClose receives NotificationHandler (id, position, el/$el/dom, visible, closed, close), without Vue 2 private fields. SSR returns a no-op handler with closed=true. Strings are escaped by default; HTML is for trusted content only. A valid type icon takes precedence over iconClass; custom icons work without a type. Fixes the default slot not displaying when message is empty. Declarative components do not join service stacking. Close buttons support keyboard use and eight-language aria-labels; callers supply business content and action text. Notifications attach to body and follow root data-nf-theme.

NfConfirm migration contracts and differences ​

The default export is the NfConfirm plugin. Named Confirm(options) returns Promise<ConfirmDone>, and installation provides this.$openConfirm. useConfirm() inherits provider injection/locale and automatically cleans up; createConfirm(appContext) isolates applications. Retains 400px, 35vh, four states, two buttons and loading. Backdrop clicks do not close it and there is no top-right close button. Default buttons support eight languages; explicit empty strings are preserved.

Without onConfirm, confirmation resolves with done; the application must call done() to close. done(false) only stops loading; a resolved Promise does not run then again, so retryable actions should use onConfirm. In custom callbacks, done(false) keeps the Promise pending, and done() settles according to confirm/cancel, fixing Promises left pending by legacy callbacks. Synchronous exceptions/asynchronous rejections stop loading and reject(error), without automatic closing. Rejections are observed internally to support callback users who ignore the return value, without changing explicit catch results.

Fixes cross-instance interference from global currentMsg. Stale done callbacks do not affect later attempts or reopened dialogs. Escape is cancellation, avoiding the legacy Promise never settling after closure. Default cancellation rejects with undefined; custom cancellation does not close automatically. Adds declarative v-model/v-model:visible, a default slot and typed close(), and fixes VNodes being stringified. HTML is trusted-only. The duplicate legacy /3 anchor maps to basic usage; the incorrect notification Options anchor does not override notification routing.

A dedicated service's closeAll closes only its own dialogs; direct Confirm.closeAll handles all Confirms on the page without affecting Message/Notification. Element Plus Dialog manages focus, scroll locks and layering. Closing/unmounting cleans the Vue tree. SSR returns a Promise resolved with a no-op done. Dialogs attach to body and follow root data-nf-theme. Both themes output independent CSS/SCSS.

NfResizablePanels migration contracts and differences ​

Retains the legacy seperator* spelling and cache key nf-resizable-panels-${unique}. Cache is restored only when the item count matches and the total-size error is at most 4px. Arrow keys adjust by 10px, Shift+arrows by 1px. Listeners are removed after dragging or on unmount.

NfIndicatorPlane migration contracts and differences ​

Three-/six-digit hexadecimal bgColor values become backgrounds with 0.1 opacity; other CSS colors are used unchanged. Callers translate business names, units and descriptions.

NfTextOverflow migration contracts and differences ​

Retains the full text DOM and clips by height instead of the legacy binary-search string truncation, without inserting HTML. Recalculates when content, width or fonts change. Expand/collapse controls support keyboard use.

NfAction migration contracts and differences ​

The action component is instantiated once and moved between inline and overlay areas through Teleport, preserving internal state. Legacy Popper 1 boundariesElement/gpuAcceleration must migrate to Popper 2 modifiers; invalid configuration is not silently passed through.

NfInfiniteMenu migration contracts and differences ​

Data and field mappings update reactively. hidden items are not rendered; a parent whose children are all hidden is treated as a leaf. false/0 overrides are preserved. Links filter javascript/data/vbscript, and external links opening new windows use noopener.

NfAudio migration contracts and differences ​

Example audio is generated locally without third-party CDNs. download only emits an event. High-precision mode uses an independent silent AudioWorklet clock without changing the audio output chain. When the secure context/CSP does not allow it, playback falls back to RAF/timeupdate, without promising millisecond precision. Rejected playback, source changes and unmounting clean state and resources.

NfFormItem migration contracts and differences ​

Used with NfForm. hidden means excluded from collapsing, not invisible. Uses Vue 3 v-model and Element Plus validation rules, without relying on Element UI private instance properties.

NfForm migration contracts and differences ​

nf-form-item accompanies the collapsible layout. Collapsing displays the first columns−1 participating items and the last action item. hidden form items always remain visible but do not participate in collapsing; this does not hide their DOM. Dynamic fields register through provide/inject, without Vue 2 private properties. Validation continues to use the native Element Plus context.

These components provide both themes, standalone installation, full-package registration and type declarations. NfFormItem is migrated alongside NfForm as its dependency for collapsing and native validation.

NfRule/NfCondiction migration contracts and differences ​

Rules and conditions retain Chinese enum values, mutable rules/conditions arrays, add/remove events, nested field paths, dropdown merging strategies and the disables matrix. Date ranges use Element Plus DatePicker without depending on the not-yet-migrated nf-date-picker. mini/medium map to small/default. Fixes 0 being overwritten by defaults, duplicate keys in newly added default items, validation reading the wrong parameter object and duplicate validation callbacks. User-property enum values remain, but the legacy version never implemented that editor, so no placeholder implementation is added.

NfKeywords migration contracts and differences ​

Keywords retain # bulk entry, case-insensitive deduplication, regex validation, character limits and the contract that the parent decides whether delAll clears the data. Dense lists retain paginated virtual rendering. Variable grouping preserves field aliases and the variate-click spelling. Generated internal keys no longer pollute business data. Copying uses the browser Clipboard API with a compatibility fallback; failures are not reported as success.

NfVirtualSelect/NfLazySelect/NfPopupLazySelect migration contracts and differences ​

All select-family documentation examples across eight languages use the default in-document preview. Dropdowns/Popovers run in the documentation page without DemoBlock iframe/clipping limits. The transfer selector's popup example explicitly enables popper-append-to-body; the flat example retains its inline panel. Preview overlays receive example-specific classes, preserving CSS isolation, live editing, theme/locale synchronization and per-example cleanup. The standalone playground still uses isolated previewing.

Regular selectors use Element Plus Select, virtual mode uses SelectV2, and popup inline lists/transfer panels use Vue 3 virtual rows. Option slots, aliases, bulk search, disabled items, count limits and missing-value display are retained. Highlighting uses text nodes; remote labels are not parsed as HTML. Filtered transfer-panel bulk operations neither affect selected items outside the filter nor remove disabled items. renderContent uses Vue 3 h/VNode.

For multiple selection with collapseTags=false, regular/virtual dropdown tags support native drag sorting or Alt+Left/Right after focusing a tag. A new array is returned through v-model/change without mutating props. Applications own sorting for custom tag slots. SelectV2's scroll boundary forwards to tobottom; per-scroll scroll/totop events are provided only by inline virtual lists. Omitted modelValue/value explicitly remain undefined, preventing Vue's Boolean-union conversion to false from producing an incorrect display.

Selectors use Vue 3 v-model while remaining compatible with value/update:value/input. Legacy Element UI private $refs/query are no longer guaranteed; use public methods such as focus, filterMethod and scrollToIndex. beforeVisibleChange replaces interception through legacy listener return values. SelectV2 is a vertical dropdown with fixed row height: legacy horizontal/pageMode are unsupported. root/wrap/item tags and styles apply only to inline lists, and getSize returns the configured row height. Popper 1 configuration must become Popper 2 modifiers. Custom Select containers cannot continue relying on Element UI's internal injection protocol.

Paginated request(params, context) returns { records, total }. The first request includes selected values, including 0; context contains the current list and historical cache. Request generations ignore stale search responses; failures do not advance the page, and applications can retry after fetch-error. Cache uses Map to distinguish numeric/string keys. An empty page ends automatic pagination. assignmentOnSelect=false still emits the clicked result without assigning it; popdownOnSelect also works for 0/false. Unmounting ignores pending requests and cleans observers.

Vue 3.5's external props type resolution still uses the older TypeScript compiler API. Build/documentation configuration registers the typescript-vue compatibility compiler only in the Node toolchain, consistent with the existing vue-tsc adapter. Root TypeScript 7 is unchanged, and this compiler does not enter any published package runtime.

NfSoftphone migration contracts and differences ​

Completion of NfSoftphone microfrontend mount does not mean the phone bar is already visible: the remote app may still await user data and asynchronous components. loading therefore ends only after visible text/controls appear in this instance's container and paint frames have passed. Detection also checks Wujie's Shadow DOM and accessible same-origin iframes without bypassing cross-origin isolation. Empty wrappers, scripts, styles and hidden content do not count. If no visible content appears within 30 seconds after mounting, the error slot is shown. Destruction, unmounting or a new initialization cancels earlier detection. ready still means mounted and actions available, not agent sign-in or UI readiness. Component initSoftphone() continues to await render detection.

Integration examples and the global configuration page's NfSoftphone examples load the real remote phone bar rather than being universally described as offline simulations. Rendering, micro-app mounting and agent sign-in are different states. Business signatures are generated on the backend; documentation debugging configuration is not a business credential.

For asynchronous signatures using onMounted async, disable autoStart, obtain a matching signature/timestamp pair, assign them, then await nextTick() before calling the component ref's initSoftphone(). Parent mounted completion does not mean that cycle's reactive props have reached the child. Requests may finish after unmounting; the destruction flag prevents late initialization, not a second mounted call after unmounting.

The component's ready event means only micro-app mounting completed. Component initSoftphone() also awaits visible rendering. The manager's phone.ready does not include rendering detection; direct manager consumers can use waitForSoftphoneRender(container).ready. Component unmounting automatically destroys its internals; consumers must call destroy() on manager instances.

Examples explicitly map eight languages through lang (zh-CN → zh, en-US → en, others unchanged); factory/singleton configurations also pass lang. Changing documentation language unmounts and remounts following page lifecycle. Remote initialization reads shared.getLanguage(). Updating only manager option.lang does not imply hot switching the remote UI, and destroying/recreating cannot provide lossless switching during calls. The business component still defaults to zh; language does not change the service environment.

The loading indicator and phone bar share one grid cell. An opaque loading layer covers the bar while it is being painted and is removed after detection, avoiding a visible bar/loading flash side by side. The mount container remains measurable. Detection still waits for visible content and paint frames, without hiding the container or using fixed delays. Manager documentation examples use the same layout, with --el-bg-color supplying light/dark backgrounds.

Vue converts omitted Boolean props to false, so directly merging them into the manager would override existing defaults. NfSoftphone sets Vue defaults for isOem/numberKeyBoard to undefined; the manager filters undefined entries and retains shared business defaults (both true) without duplicating default configuration in the wrapper. Explicit false, 0 and empty strings remain. autoStart controls component lifecycle and still defaults to true; :auto-start="false" disables automatic initialization. updateOptions remains incremental; updating with undefined does not reset an existing value.

@94ai-plus/nf-softphone combines the legacy nf-microphone manager with the component wrapper documented under nf-microphone-vue: default/named export NfSoftphone, singleton nfSoftphone and constructor nfSoftphoneManager. All three fetch the 94AI public online phone bar through qiankun or Wujie micro-app loading, passing shared configuration and using a named communication bus. They do not reimplement SIP or support the old nf-softphone iframe/postMessage interface. Legacy nf-microphone-vue was not a separate npm package, so its migration is recorded under nf-microphone. The older package with the same nf-softphone name is outside the migration scope, and its incompatibility notes remain.

initSoftphone() retains its contract of returning a manager instance. After asynchronous loading, await phone.ready before actions. Unload with await phone.destroy(); the legacy destory() spelling remains compatible. Vue 2 .sync becomes v-model:sign/v-model:timestamp. Component and controller share lifecycle, event filtering, signature refresh and state sharing. Multiple instances must have different name, ancestorOrigin and destinationOrigin; duplicate active names throw. Both loading backends remove their listeners on unload. accept() and ignore() retain the remote phone bar's command aliases; do not infer commands from callback event names.

The micro-app engine loads only during actual initialization, without accessing window during SSR import. The remote phone bar does not depend on host window.CryptoJS; the old wrapper supplied it only for consumer signature debugging. This package removes the CryptoJS npm runtime dependency and automatic global injection. Normal initialization neither loads it nor changes an existing host instance. Prefer backend-generated sign/timestamp. Documentation does not copy old secrets or connect real agents by default. Deployments must provide HTTPS, CORS, CSP, microphone permission and remote phone-bar availability. Component themes affect only the local container; the remote application controls its appearance and language capabilities. blackList checks the current hash during initialization. Structural settings (mode/url/env/name/communication namespace) require destruction and reinitialization; ordinary credentials/features can update through updateOptions or component props.

Consumers still debugging with window.CryptoJS.HmacSHA1(appKey + timestamp, appSecret) followed by Base64 can import createSoftphoneSign(appKey, timestamp, appSecret, options?) from the softphone or full package. This asynchronous method prefers Web Crypto UTF-8/HMAC/SHA-1/standard Base64. Only when native capability or the algorithm is unsupported does it load remote CryptoJS (not npm's crypto package). Fourth argument { env: 'sg' } selects overseas https://seat.teleai.com/CryptoJS.js; default and other env values select domestic https://seat.94ai.com/CryptoJS.js. It is independent of component instances, so callers must pass the same env rather than infer it from language or IP. An existing compatible window.CryptoJS is reused. Concurrent calls share the first script-loading Promise through a shared window Symbol instead of downloading separately by region. Failure or a 15-second timeout clears pending state and rejects; later retries are allowed without automatic regional failover. Fourth-argument cryptoJsUrl overrides the env default with a trusted self-hosted script and requires matching CSP permission. Fallback creates a CryptoJS global; normal component initialization does not. When native signing works, no remote script is requested and host CryptoJS is untouched. Other native signing errors do not silently fall back. See the softphone package README. Fix timestamp before signing and update the signature/timestamp together to avoid asynchronous timestamp changes. Production frontends should not hold appSecret; fallback does not extend Vue 3 or build-output browser support.

For continued console/consumer debugging with window.CryptoJS, explicitly call await installSoftphoneCryptoJS(options?) (named export from standalone and full packages). This method does not take the native-signing path: it prepares CryptoJS even when Web Crypto is available, returning the same instance as window.CryptoJS. It shares regional URLs, existing instances and the loading Promise with signature fallback, avoiding duplicate downloads. The browser global type is optional; use the returned value or check for existence after installation. SSR calls explicitly reject. Component initialization/unmounting does not automatically install/remove this shared object. Use for debugging only; do not expose appSecret in production frontends.

Browser ES/UMD builds fix process.env.NODE_ENV to production, preventing qiankun from requiring a Node process global during browser initialization. Browser ES remains a single file with micro-app engines running during initialization; copying the entry file is sufficient for documentation/playground execution. ESM/CJS dynamic chunks are published with dist.

NfSearchForm/NfTable migration contracts and differences ​

  • nf-search-form is rebuilt with Vue 3 NfForm/Element Plus, retaining configured fields, search/export/reset, linked options, range/multiple-value conversion, validation, custom slots, field visibility and sorting. Adds optional v-model without mutating consumer configuration or defaults. Fixes lost range value 0, validation errors from hidden fields and stale asynchronous responses overwriting current data.
  • Field/column settings support drawers and dialogs, category search, select-all, sorting and left-fixed columns. Search-form settings and table column order, visibility, pinning and dragged widths use IndexedDB (separate nf-search-form/nf-table object stores in the common-ui-plus database). Legacy *Cookies* method names remain aliases, but perform asynchronous IndexedDB access; await saving, restoring or clearing as needed. They do not read old Cookies or automatically migrate localStorage caches. Without IndexedDB, only instance-local state is retained. Multiple instances on one page should use separate storageKey values; the built-in search form uses searchFormStorageKey. Canceling edits does not save.
  • nf-table combines search forms, client/server pagination, selection, tree data, nested headers, status tags, Vue 3 h renderers, action bars, column widths and draggable right-fixed action columns. Legacy Element UI fixed-column DOM duplication becomes Element Plus sticky columns. mini/medium map to small/default.
  • The callback in searchApi({ data, callback }) ends the current Loading and should be called in request finally. Stale callbacks cannot close a newer request's Loading. Applications still need request generations or AbortController to prevent stale results from overwriting newer rows.
  • The Vue 2 el-table-virtual-scroll plugin is replaced by a local fixed-row-height window. Virtual mode requires stable row-key and a rowHeight suitable for the content, and preserves offscreen selection. Use normal mode for tree expansion, row merging or variable row heights. Legacy private wrapper/VirtualColumn APIs are not retained.
  • Not-yet-migrated date/time-zone/quarter-specific controls must be explicitly integrated through components, individual component options or slots. Ordinary date pickers do not silently substitute different business semantics. Vue 2 VNodes and Element UI private instances are incompatible.
  • Both components provide standalone packages, full-package registration, template types, both themes, eight-language documentation and playground examples. Examples use in-document previews so Select, Tooltip and column-setting overlays are not clipped by DemoBlock iframes.

Component library scripts overview ​

The tables cover every script in the root package.json, preserving its exact name. Examples use Yarn; npm run <script> -- <arguments> is also supported. Combined scripts do not consistently forward arguments; use an entry explicitly supporting --dry-run for previews.

Documentation, builds and search ​

CommandPurpose and caveats
yarn dev:docStart docs using component sources in packages/*/src; the docs server also mounts the isolated playground. No documentation startup command refreshes development logs; run yarn build:dev-log separately when needed.
yarn dev:doc:httpsRetained development entry that sets HTTPS=true. The current VitePress configuration does not read it, enable HTTPS or generate certificates; actual HTTPS requires additional configuration.
yarn dev:doc_increase-memorySource-mode docs with an 8192 MB Node heap limit for the VitePress process.
yarn dev:doc:oemStart docs with the OEM component theme as default and base /common-ui-plus-oem/. A valid cached browser theme still takes priority.
yarn lib:docStart docs using archive entries in lib/<package>/dist/es/index.mjs. Build themes and components first; rebuild after source changes to verify packaged behavior.
yarn lib:doc_increase-memoryBuilt-package docs with an 8192 MB heap limit for VitePress; the same build prerequisites apply.
yarn extract:docExtract headings, anchors and body text into search indexes at the root and in docs/public/. Preserve the Chinese legacy doc-search.json format and include all eight languages in the enhanced index; validate navigation targets and duplicate anchors.
yarn preview:docPreview existing static output in docs/.vitepress/dist. Does not build; run build:doc or build:doc:oem first.
yarn build:docRefresh search and prepare browser/theme assets, then build the current site and versions/<fixed-version>/, each with its own playground and AI snapshot. Output: docs/.vitepress/dist; main base: /common-ui-plus/. Does not refresh development logs/changelog or upload.
yarn build:dev-logGenerate development pages for all eight languages and JSON/Markdown statistics, then refresh search. Preserve root CHANGELOG.md and existing version-note pages. Only committed Git history is counted.
yarn build:contributorsGenerate the root README's three-month contributor bubble chart and initials wall from full local Git history. Supports --ref and --until; no Token, automatic fetch or upload.
yarn build:doc:oemBuild the current and archived sites with OEM defaults and base /common-ui-plus-oem/. Shares docs/.vitepress/dist with the main site, so changing build themes replaces local output; build the intended theme before deployment.

Components, themes and playground ​

CommandPurpose and caveats
yarn config:packages:initInitialize package.config.local.mjs with organization, package metadata and complete current READMEs for all packages; never overwrite an existing file.
yarn build:themeBuild all themes by default, or pass nf-theme-chalk / nf-theme-oem, the full package name, or chalk / oem to build one. Generate aggregate and per-module CSS, SCSS and source maps; sync only the selected themes to lib/<theme> with package.json, README and LICENSE. Invalid arguments fail before building.
yarn build:componentsBuild all publishable non-theme packages and sync lib/<package> mirrors. Component/libraries emit ESM, CJS, browser ES/UMD, types and styles; the CLI emits dist/index.mjs and default local knowledge. Select one short/full package name or --fixture; use cli --ai-snapshot-version <fixed-version> for a CLI release snapshot.
yarn dev:playgroundStart the standalone @vue/repl development app. Not needed alongside dev:doc, which already mounts it.
yarn build:playgroundPrepare local browser dependencies and themes, then build to docs/public/repl/. Does not generate a docs route or upload anything.

Workspaces, scaffolding and versions ​

CommandPurpose and caveats
yarn newRun yarn new <short-name or @94ai-plus/name> to create a package skeleton, entry and README with an npm badge; refuse existing directories. The template currently pins 1.0.0-alpha.0; component registration, docs and theme integration are not automatic.
yarn putRun yarn put <full-workspace-name> add/remove/install .... Validate the workspace, delegate add/remove to Yarn workspace commands and install to the root installation. Support --dry-run without temporarily rewriting workspaces.
yarn ci-lock-versionChoose or specify a CI release version locally; synchronize root, Lerna and package versions, explicit internal ranges, versioned README links and the Yarn lockfile. Preserve workspace ranges; no build, publication or changelog edits. Supports read-only --dry-run.

Publishing, deployment and releases ​

Full public, private and publish:github publication, including CI and ordinary --dry-run, runs yarn lint:check after the dependency audit, then yarn typecheck, with separate numbered console steps. Either failure stops publication. public:reuse / private:reuse still skips both checks. Lint does not automatically fix source files.

External writes

Publication commands may upload packages/docs or create Releases/tags. publish:doc --dry-run/publish:doc:oem --dry-run validate locally without network access or upload. Package dry runs still build and test; combined publication scripts do not consistently forward --dry-run. Documentation publishing protects history and no longer deletes the whole site first.

CommandPurpose and caveats
yarn publicPublish complete npm packages to https://registry.npmjs.org/: dependency audit → lint:check → types → full tests and coverage (each metric ≥99%) → theme/component builds → build integration tests → fixed-version CLI snapshot → pack checks → upload confirmation → npm publication → GitLab Release. Supports --dry-run and verified current-version artifact reuse with --reuse-build.
yarn public:reuseReuse previously verified packages/*/dist matching the source and current fixed version. Skip dependency auditing, lint checks, type checking, full tests and coverage, builds and build integration tests; generate no new test or coverage report. Retain CLI snapshot integrity, pack, version, authentication and Release checks; do not convert local knowledge into a snapshot. Supports --dry-run; equivalent to npm run public -- --reuse-build.
yarn privatePublish complete packages to NPM_REGISTRY_URL or the company registry, retaining dependency audit, lint checks, types, full tests and coverage, builds and pack checks. Do not check or create GitLab Releases or require a dedicated GitLab Token. Supports --dry-run and verified same-version artifact reuse with --reuse-build.
yarn private:reuseReuse verified current-fixed-version artifacts matching the source to publish privately; equivalent to yarn private --reuse-build. Skip dependency audit, lint checks, types, all tests and coverage, builds and build integration tests; retain snapshot, pack, version, registry authentication and upload confirmation. No GitLab Release. Supports --dry-run.
yarn publish:githubDistribute the current fixed version to GitHub Packages with isolated GitHub authentication and repository linking. Real upload requires --release-version <version> --yes; --dry-run builds/tests/packs without uploading or changing existing channels.
yarn release:githubPublish current fixed-version changelog notes locally to xccjh/common-ui-plus using GITHUB_PACKAGES_TOKEN. Offline preview: --dry-run; publishes the current lerna.json fixed version immediately by default without version or --yes arguments; optional --release-version must match it. Still requires repository contents write access and a clean pushed commit. No package publication, builds or conflict overwrites.
yarn release:github:actionActions-only Release entry for the organization default-branch manual workflow. Uses automatic GITHUB_TOKEN for 94ai-plus/common-ui-plus, never GITHUB_PACKAGES_TOKEN; local execution is rejected. Preview is offline; real creation requires an explicit version and --yes, preserving tag and Release conflict checks.
yarn release:github:organizationPublish current fixed-version changelog notes locally to 94ai-plus/common-ui-plus using GITHUB_PACKAGES_TOKEN. Offline preview: --dry-run; publishes the current lerna.json fixed version immediately by default without version or --yes arguments; optional --release-version must match it. Still requires repository contents write access and a clean pushed commit. No package publication, builds or conflict overwrites.
yarn release:gitlabUse --dry-run for an offline preview. Without arguments, publish the current lerna.json fixed version immediately; no --yes required, and optional --release-version must match it. Validate existing artifacts, generate/upload lib ZIP and restore the GitLab Release download link without republishing npm. Requires GitLab/OSS configuration and clean committed/pushed sources; conflicts are not overwritten.
yarn release:giteePublish directly using the current fixed version from lerna.json and its matching docs/changelog.md notes; no version argument or --yes required. --dry-run previews offline. Optional --release-version must match the current version. Requires dedicated GITEE_TOKEN and a clean commit pushed to Gitee (xccjh/common-ui-plus). Creates missing tags, skips identical Releases and rejects conflicts; no npm or ZIP uploads.
yarn publish:docDeploy existing main-site output using the restricted OSS publisher. Verify digests, lock the theme prefix, upload the full archive and completion marker, update the root site, then merge online versions.json. Does not build, delete the whole site or overwrite history. --dry-run validates locally without network access.
yarn publish:doc:oemDeploy OEM output under common-ui-plus-oem/ with the same restricted publisher. Build OEM first; upload order and history protection match publish:doc. Supports --dry-run; no longer invokes rt-cli oss-delete.
yarn republish:docDirectly overwrite published main-site docs for an explicit --version. Offline preview by default; --yes executes. No backups or automatic rollback; retry with the same build after failure. Update the root only for latest, preserve other versions; no history deletion or automatic CDN purge.
yarn republish:doc:oemDirectly overwrite an OEM version under common-ui-plus-oem/. Build OEM first and specify --version. Defaults to preview; --yes executes without backups, with the same retry and version protection rules as republish:doc.
yarn publish:doc:allExtract search → build the main site → deploy it to OSS.
yarn publish:doc:all:oemExtract search → build OEM → deploy it to OSS.
yarn publish:allRun yarn private, then yarn publish:doc:all: complete private package publication, then build and deploy main-site docs. Does not publish to public npm, deploy OEM, archive lib or create a GitLab Release.

This repository's Yarn bootstrap automatically loads root .env.local, including for plain yarn install. Publishing entry points additionally retain Node's --env-file-if-exists; child processes inherit the variables, while existing shell/CI values take priority. .env.*.local variants are not automatically loaded. Both patterns are Git-ignored; never commit credentials. Private publishing supports NPM_PRIVATE_USERNAME plus NPM_PRIVATE_PASSWORD_BASE64 without an npm token; Yarn derives npmAuthIdent in memory. Public npm publishing still requires NPM_AUTH_TOKEN. Real publishing needs registry authentication, scope permission and a valid new-repository origin; automatic GitLab Release requires its dedicated token, while documentation deployment needs the OSS variables listed in .env.example. npm itself does not automatically load the file, but the publication scripts above explicitly load it. Composite publishing commands do not uniformly forward --dry-run; use an entry that explicitly supports it.

Real yarn public / yarn private publishing first offers the current version, next prerelease, patch/minor/major, or a custom full version, then asks again before upload. All publishable packages share one fixed version. All versions, including prereleases, default to the latest tag instead of automatically using next. npm installations without an explicit version use the version tagged latest. Applied local version changes are retained on later cancellation/failure, without automatic commits or pushes. CI requires --release-version <version> --yes. Dry-run never prompts or changes versions; an explicit target only previews the plan while builds validate the current version. Automatic GitLab Releases for public npm must match the committed fixed version.

After all packages succeed, public automatically creates a GitLab Release from the matching docs/changelog.md version notes. Configure a dedicated GITLAB_TOKEN with api scope and project/tag permissions, and commit/push the source, version and notes first, keeping the checkout clean. If version selection changes local files, commit/push them before retrying with the current version. Release failures do not roll back npm packages; retry only release:gitlab. Documentation deployment requires separate OSS configuration. See internal/scripts/GITLAB_RELEASE.md in the repository. private, including --reuse-build and CI, does not check or create a GitLab Release and requires no dedicated GitLab Token.

Normal publication generates the CLI snapshot for the current lerna.json version after tests. The default local knowledge from build:components cli cannot be used for reuse publication. public:reuse neither rebuilds the snapshot nor replaces prior verification; its menu accepts only the current version. Public npm checks every package, including the CLI, for publishConfig.access: public. Verified temporary Lerna manifest changes are restored after success/failure, with conflicts preserved for review. Partial failures do not roll back published packages or continue to Release creation; resolve the cause and retry the same version. Packages publish from packages/*/dist; after public npm succeeds, a lib ZIP is generated and uploaded, and its download link is added to GitLab Release.

public, public:reuse and real release:gitlab use OSS releases/. Configure the four OSS variables and RELEASE_ASSET_BASE_URL, the complete public download directory, such as https://front.94ai.com/releases. ZIPs use current validated workspace files in the lib mirror layout, including README images, CLI Skill and fixed-version snapshot, excluding stale mirrors. Identical content is reused and verified by SHA-256 readback. Compression and network waits log progress every 15 seconds. If attachments or Release fail after npm succeeds, confirm publication and retry only yarn release:gitlab --release-version <current-version> --yes; npm is not republished. Missing links may be added to an otherwise identical Release; conflicting links are rejected. --dry-run generates no ZIP and does not connect or upload. Private and GitHub publishing do not run this attachment flow.

publish:github publishes packages to GitHub Packages; running it locally does not create a Release. release:github:action is Actions-only and uses the automatic GITHUB_TOKEN. Local organization/personal Releases use release:github:organization/release:github with GITHUB_PACKAGES_TOKEN. Local Release entries publish only current-version notes and tags, without builds or npm uploads. release:gitee also publishes notes only, targets xccjh/common-ui-plus and uses the dedicated GITEE_TOKEN.

Create GITHUB_PACKAGES_TOKEN under GitHub → Settings → Developer settings → Personal access tokens → Tokens (classic), then set it in root .env.local or the terminal. A classic PAT needs public_repo for public repository Releases or repo for private repositories, plus organization SSO authorization when required. Also grant write:packages if publishing packages; that permission alone cannot create Releases. Actions generates GITHUB_TOKEN automatically; do not create it manually or copy it locally.

Checks, tests and utilities ​

CommandPurpose and caveats
yarn lintRun ESLint with automatic fixes, which can modify source files. Register the Vue/TypeScript compatibility compiler only in this process.
yarn lint:checkCheck ESLint rules without fixes; suitable for CI.
yarn typecheckRun vue-tsc --noEmit through the compatibility wrapper to check Vue templates and TypeScript without emitting files.
yarn testRun both Vitest projects: checks includes component unit, engineering/publication script and AI tests; build prepares themes/components and validates artifacts. No coverage by default, separate type-consumer check or Playwright.
yarn test:buildRun only tests/build/. Global setup builds themes/components once, then tests ESM/CJS/UMD, exports, dependencies, declarations, both themes and npm package contents. Alternative: yarn test --project build.
yarn test:playgroundRun all Playwright tests for docs, components, DemoBlock and the playground using local Chrome. Start docs automatically, or set PLAYGROUND_TEST_URL to an already-running site's complete base URL.
yarn test:typesCheck only consumer fixtures in tests/types/tsconfig.json for component tags, props, events and slots.
yarn test:scriptsRun only tests/scripts/ for workspace, build/publication, authentication, OSS, Release, CI, search and documentation contracts. Included in checks, so test and test:coverage already run these tests. Use simulated services or temporary directories without real publication.
yarn test:coverageRun all checks tests: component unit, engineering/publication scripts and AI. V8 measures executable packages/*/src/ source, including unexecuted files and excluding .d.ts; lines/statements/functions/branches must each reach ≥99%. No build project, separate type-consumer check or Playwright. Write reports/SVGs to coverage/ without uploading; failures still generate pass rate without fabricating coverage.
yarn publish:coverageUpload verified default-branch pass-rate/coverage SVGs to independent OSS objects. Failed runs update pass rate only; never delete docs or publish source reports. Require clean, latest default branch and OSS variables; --dry-run uses no network.
yarn test:allRun lint:check, typecheck, all Vitest tests (checks/build), test:types and test:playground in sequence; stop on any failure. No additional theme/component builds, search extraction, production docs builds, publication previews, development logs or coverage. The Vitest build project still prepares required artifacts; browser tests start the docs development server by default and require local Chrome.
yarn build:aiGenerate docs/public/ai/knowledge.json, ai/manifest.json, per-component docs/metadata/examples, llms.txt, llms-full.txt, llms-full-cn.txt and design.md from public source, package manifests, eight-language docs and themes. Defaults to local development knowledge; --snapshot-version <fixed-version> pins the current version. Does not build the CLI package or upload.
yarn check:aiRegenerate and validate AI source knowledge in memory: matching package versions, existing referenced packages/public exports, valid unique component/example IDs, nonempty parseable Vue SFC examples, schema and digest. No file writes or registry requests; does not compare old generated artifacts for staleness or replace type checks or test:ai.
yarn test:aiRun only tests/ai/ for knowledge generation/queries, CLI, MCP, exact-version matching/caches, Skill installation and project setup. Included in checks; no real package publication or installation into personal AI-tool directories.
yarn audit:dependenciesInspect publishable packages' dependencies/peerDependencies/optionalDependencies for Element UI, vue-demi, @vue/composition-api and legacy @94ai runtime packages; verify the initially completed migration scope, migrated entries, existing source workspaces and unique targets. Not an npm vulnerability audit or full transitive-dependency scan.
yarn figletPrint common-ui-plus ASCII art in the terminal; do not create component/image files.
yarn assistant:wecomStart the local WeCom smart-bot persistent connection. Build the CLI and prepare offline knowledge and internal/wecom-assistant/.env.local first. Connects to WeCom and model services; not a read-only check.
yarn assistant:wecom:appStart the retained WeCom custom-application callback service with its own credentials and public callback. Do not mix its configuration with the persistent smart-bot connection.
yarn specs:statusRead-only task state, completion and dropped-task counts; default to active and unclassified legacy specs, with --include-archive for archives. Also report structural errors without executing tasks or changing state. Completion counts do not establish QA or publication success.
yarn specs:checkRead-only validation of global spec IDs, required requirements/design/tasks/test-cases files, task IDs/checkboxes, duplicate IDs, dropped-task reasons, effective tasks and closed task-document code fences. Errors fail the command. Does not run code tests or prove functional acceptance.
yarn ai:contextRead repository Markdown sections for on-demand AI context. <file.md> --headings lists headings and line numbers; <file.md> --section "unique full heading" includes that section and subsections. Reject outside paths and missing/duplicate headings. No writes or model calls.
yarn ai:workflow:checkRead-only local Markdown-link checks for maintainer workflow entries, indexes and specs, plus specification validation. Errors fail the command. Does not verify remote links, business behavior or acceptance evidence, or publish/archive anything.

Scope: test:scripts and test:ai are targeted checks entries already included in test and test:coverage. test:all adds separate type-consumer and real-browser checks, without coverage. Full package publication uses dedicated preflight rather than test:all: dependency audit → lint:check → typecheck → test:coverage → theme/component builds → build integration tests → CLI snapshot → pack validation, followed by channel-specific upload/Release behavior.

Common examples ​

sh
# Source development and built-package verification
yarn dev:doc
yarn build:theme
yarn build:components
yarn lib:doc

# Select one package, or build verification inputs
yarn build:components nf-button
yarn build:components @94ai-plus/nf-button
yarn build:components --fixture

# Use package.json.name, not a directory path
yarn put @94ai-plus/common-ui add @94ai-plus/nf-button
yarn put @94ai-plus/common-ui remove @94ai-plus/nf-button
yarn put @94ai-plus/common-ui install --dry-run

# Refresh development logs and search without replacing root CHANGELOG
yarn build:dev-log

# Publication previews: no remote writes; checks vary by entry
yarn private --dry-run
yarn public --dry-run
yarn public:reuse --dry-run
yarn publish:doc --dry-run
yarn publish:doc:oem --dry-run

Publish a Release separately (select one target; preview first, then commit and push source, version and notes before real execution; replace the example version with the current fixed version):

sh
# Offline previews: no token, builds or remote writes
yarn release:github --dry-run
yarn release:github:organization --dry-run
yarn release:gitee --dry-run

# Personal GitHub repository xccjh/common-ui-plus: GITHUB_PACKAGES_TOKEN
yarn release:github --release-version 1.0.0-beta.2 --yes

# Organization GitHub repository 94ai-plus/common-ui-plus: GITHUB_PACKAGES_TOKEN
yarn release:github:organization --release-version 1.0.0-beta.2 --yes

# Gitee repository xccjh/common-ui-plus: GITEE_TOKEN
yarn release:gitee

Testing, AI knowledge and maintainer-tool examples (choose individual commands for your task):

sh
yarn test --project checks
yarn test:all
yarn test:coverage

yarn check:ai
yarn build:ai

yarn specs:status
yarn specs:check
yarn ai:workflow:check
yarn ai:context .agents/docs/ai-workflow.md --headings
yarn ai:context .agents/docs/ai-workflow.md --section "质量门槛"

new only creates a skeleton; component implementation, exports/registration, themes and docs navigation still need to be added. Prepare versions with ci-lock-version, publish packages with public / private, and deploy docs with the corresponding publish:doc entry.