@astryxdesign/cli 0.7.9-canary.f9281ef → 0.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +80 -0
- package/README.md +1 -1
- package/api/component/__fixtures__/resolutions/modules.txt +5 -5
- package/api/swizzle/copy/copy.d.mts +17 -1
- package/api/swizzle/copy/copy.mjs +240 -5
- package/api/swizzle/swizzle.doc.mjs +1 -1
- package/api/swizzle/swizzle.type.mjs +1 -1
- package/api/theme/build/build.mjs +342 -72
- package/api/theme/build/core-interception.mjs +92 -29
- package/api/theme/build/icon-imports.d.mts +35 -4
- package/api/theme/build/icon-imports.mjs +299 -38
- package/assets/discover/official-packages.json +8 -0
- package/assets/docs/author-a-theme.doc.mjs +3 -1
- package/assets/docs/icons.doc.mjs +29 -0
- package/assets/docs/motion.doc.mjs +1 -1
- package/assets/templates/blocks/components/Calendar/useCalendarDaysHookUsage.doc.mjs +14 -0
- package/assets/templates/blocks/components/Calendar/useCalendarDaysHookUsage.tsx +71 -0
- package/assets/templates/blocks/components/Hooks/useInputContainerHookUsage.doc.mjs +15 -0
- package/assets/templates/blocks/components/Hooks/useInputContainerHookUsage.tsx +93 -0
- package/assets/templates/blocks/components/Hooks/useMergedRefsHookUsage.doc.mjs +14 -0
- package/assets/templates/blocks/components/Hooks/useMergedRefsHookUsage.tsx +78 -0
- package/assets/templates/blocks/components/Hooks/useScrollLockHookUsage.doc.mjs +14 -0
- package/assets/templates/blocks/components/Hooks/useScrollLockHookUsage.tsx +80 -0
- package/assets/templates/blocks/components/Hooks/useScrollOverflowHookUsage.doc.mjs +14 -0
- package/assets/templates/blocks/components/Hooks/useScrollOverflowHookUsage.tsx +94 -0
- package/assets/templates/blocks/components/Icon/useIconHookUsage.doc.mjs +19 -0
- package/assets/templates/blocks/components/Icon/useIconHookUsage.tsx +68 -0
- package/assets/templates/blocks/components/Link/useLinkComponentHookUsage.doc.mjs +14 -0
- package/assets/templates/blocks/components/Link/useLinkComponentHookUsage.tsx +89 -0
- package/assets/templates/blocks/components/Overlay/useOverlayHookUsage.doc.mjs +21 -0
- package/assets/templates/blocks/components/Overlay/useOverlayHookUsage.tsx +49 -0
- package/assets/templates/blocks/components/Table/useTableSortableStateHookUsage.doc.mjs +14 -0
- package/assets/templates/blocks/components/Table/useTableSortableStateHookUsage.tsx +61 -0
- package/assets/templates/blocks/components/usePanGesture/PanDraggableBox.doc.mjs +15 -0
- package/assets/templates/blocks/components/usePanGesture/PanDraggableBox.tsx +98 -0
- package/assets/templates/blocks/components/usePanGesture/PanPlayingCard.doc.mjs +14 -0
- package/assets/templates/blocks/components/usePanGesture/PanPlayingCard.tsx +147 -0
- package/assets/templates/themes/neutral/neutralPaletteRefs.generated.ts +2 -2
- package/assets/templates/themes/neutral/neutralTheme.ts +30 -4
- package/assets/theme.template.ts +14 -2
- package/authoring/doctypes/base/type.ts +41 -0
- package/authoring/doctypes/component/component.doc.mjs +7 -1
- package/authoring/doctypes/component/type.ts +5 -0
- package/authoring/index.d.ts +2 -0
- package/clients/cli/commands/swizzle.mjs +10 -0
- package/clients/cli/lib/component-format.mjs +49 -0
- package/foundation/discovery/component-discovery.mjs +17 -6
- package/foundation/response/response-types.doc.mjs +1 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,85 @@
|
|
|
1
1
|
# @xds/cli
|
|
2
2
|
|
|
3
|
+
# 0.7.9
|
|
4
|
+
|
|
5
|
+
#### Experimental APIs
|
|
6
|
+
|
|
7
|
+
- `astryx discover` lists the experimental NavigationStack and NavigationScreen components from `@astryxdesign/lab`.
|
|
8
|
+
|
|
9
|
+
#### New Features
|
|
10
|
+
|
|
11
|
+
- `astryx discover` lists the experimental CircleCheckIndicator component from `@astryxdesign/lab`.
|
|
12
|
+
- `astryx theme build` keeps a theme's `componentIcons` slot functions. The built module imports each slot function from the module the theme source imports it from, writes static slot values beside it as JSON, and reads back the same static `componentIcons` view, so component icon slots resolve the same for the built theme as for the runtime theme. This includes slots inherited from a built, package, or family base. A slot function defined in the theme file still fails the build: move it to its own module and import it. In `--family` output, a member supplies its own slot functions through a named import of its whole `componentIcons` map. The module keeps each slot import as the theme source spells it (`--icons-specifier` rewrites only the icon registry import), so with `--out` in another directory, a module must answer to that specifier from the output directory.
|
|
13
|
+
- A theme chooses which shared icon a component's own icon role uses, by slot, with `defineTheme({componentIcons})`. The first slot is `code-block-copy`: CodeBlock's copy button passes `{copied}` and, with no theme entry, draws `copy`, then `check` while copied. A slot value is a shared icon name, `null` to hide the icon, a partial `{icon, variant, size}` request, or a pure function of the slot's state that returns one; a field the request leaves out keeps the component's own value. For the copy button, `null` hides only the glyph. `theme.componentIcons` reads back the static values. `ComponentIconSlotMap` and the slot value types are exported from `@astryxdesign/core/Icon`. `astryx theme build` carries static slot values into built themes and fails on a slot function, and `astryx component` lists a component's slots.
|
|
14
|
+
- `createPanGesture(element, {axis?, onPan})` and `usePanGesture(ref, {axis?, onPan})` report a drag on an element as values: `onPan` gets `{state, translation, velocity}` as the drag begins, changes, ends at the release, or is cancelled, and a finger, a mouse and a pen all drive it. A mouse or pen drag that starts on selectable text selects it instead; give text the drag should move `user-select: none`. `axis` limits the drag to `'x'` or `'y'`; a drag along the other axis is not reported. `translation` counts from where the drag began, so an element that follows it does not jump, and `velocity` at `ended` is the release velocity in pixels per second. The drag claims its touch at UIKit's 10 pt and leaves presses and long presses alone. `destroy()` removes every listener; the hook creates one pan for the element behind `ref` and destroys it at unmount.
|
|
15
|
+
- Motion: a theme's `tempo` now times the springs of touch motion as well as its CSS durations. Each spring keeps its shape and takes `tempo` times as long, and so does the animated-layout glide. Finger tracking and busy loops stay as measured. A theme with only a duration scale keeps its springs at tempo 1, even inside a theme with a tempo. The springs don't follow `character` yet. The motion doc says so.
|
|
16
|
+
|
|
17
|
+
#### Fixes
|
|
18
|
+
|
|
19
|
+
- `astryx docs <namespace> <section>` loads the project once instead of once for every guide below the namespace, so on a namespace with many guides, such as `astryx docs authoring <section>`, the read itself takes tens of milliseconds instead of hundreds. The answer is unchanged.
|
|
20
|
+
- A run that takes over a crashed run's release-cache lock now also recognizes the npm install that run left behind by its original command line, as npm shows it before renaming its process, when Node's own file is not named `node`, such as `nodejs` or `node-linux-x64`.
|
|
21
|
+
- The lexical ranker behind `astryx build`'s search ranks the candidates search gathers, reused the same way. A later query in the same folder, for the same `type`, gathers again only when an input changed. In a long-running caller, a build that follows a build or a search no longer reads every component, hook, doc, template and theme again. A search that follows a build no longer reads them again either. Results are unchanged.
|
|
22
|
+
- Under the Neutral theme, a selected row, a calendar range and the other selected fills on Neutral's surfaces are visible again, and highlighted code lines are stronger. `--color-accent-muted` matched the surface in dark mode and barely differed from the hover tint in light mode; it is now `#d4d4d4` in light and `#474747` in dark. In dark mode a selected Item, TreeListItem or checked CheckboxListItem row, a numbered Citation and a FileInput dropzone lift their secondary text so it stays readable on the fill; a dropzone's hint is slightly lighter at rest too. Neutral's code comments, operators and punctuation are slightly less muted so they stay readable on a highlighted line. The CLI's Neutral theme template carries the same values.
|
|
23
|
+
- The stock theme's dark-mode accent (`--color-accent`) is now `#0171E3` instead of `#2694FE`, so white text on an accent fill, such as a primary Button's label at rest, meets 4.5:1 (4.70:1, was 3.11:1). Hovered and pressed primary Buttons improve too (about 4.36:1 and 4.03:1, from under 3:1) but stay under 4.5:1. Light mode keeps `#0064E0`. Everything else painted with `--color-accent` in dark mode also darkens: accent fills, focus rings and accent icons. MetadataList's "Show more", Table's sort rank and DateRangeInput's applied preset now use `--color-text-accent`, so their text stays readable on dark surfaces. The theme template that `astryx theme template` writes uses the same dark accent, and the generated color token docs list it. To keep the previous look, a theme can set `'--color-accent': ['#0064E0', '#2694FE']`.
|
|
24
|
+
- `astryx swizzle` no longer runs `gh auth status` before it reports: the ready `gh issue create` line appears when `gh` is on your PATH, found without running it, so a copy never waits on a process start or on GitHub. The line now also appears when `gh` is installed but not logged in; running it, gh asks you to log in.
|
|
25
|
+
- `astryx swizzle` now copies the private attribute owner modules a component imports, and the unexported style modules they need, beside the copy in the package's layout. A swizzled `Item`, `CheckboxList`, `RadioList` or `TreeList` no longer imports a `privateAttributes/*.stylex` subpath that `@astryxdesign/core` does not export. A second swizzle reuses an identical copy and refuses a changed one without `--overwrite`. The receipt's `files` and `filesCopied` include the modules it copied.
|
|
26
|
+
- `astryx theme build` reads the theme's icon import from the source it loaded: a theme saved in place while it builds now builds with its import, or fails and builds on the next save, instead of producing a module without the import.
|
|
27
|
+
- theme: support `CustomTextTypes` module augmentation for custom Text variants (#5013)
|
|
28
|
+
|
|
29
|
+
#### Performance
|
|
30
|
+
|
|
31
|
+
- `astryx search` and `astryx build` read Core's exports map once per run, not once per component. With the other readers, a search now reads Core's package.json 10 times instead of 183. Results are unchanged.
|
|
32
|
+
- When no loaded integration ships templates, the integration-issue check no longer imports every Core template doc. `astryx doctor` in a project whose integrations only ship icon sets now imports none of them.
|
|
33
|
+
- With no integration loaded, the integration-issue check no longer imports every Core template doc. `astryx discover`, and `astryx component` without `--showcase` or `--blocks`, now import none of them.
|
|
34
|
+
- The integration manifest writer loads the code-rewrite toolkit only when it patches a manifest. `astryx component`, `astryx theme list` and `astryx doctor` outside a project no longer load it, and a component lookup loads about 70 fewer modules.
|
|
35
|
+
- `astryx search` and `astryx build` look for a component's doc only in the Core folders whose listing holds its name, not in every folder. A search makes about a quarter of the file checks it made before. Results are unchanged.
|
|
36
|
+
- Outside a project whose config names `debug` or `integrations`, `astryx --version` no longer loads the project, integration and code-rewrite modules. In a folder with no project config, it uses about three quarters less CPU. When no integration is installed, `astryx docs` and `astryx hook --list` load the project but not the code-rewrite modules. Output and exit codes are unchanged.
|
|
37
|
+
- `astryx search` and `astryx build` work out a query word's forms once per entry they score, not once per word compared. Answers are unchanged.
|
|
38
|
+
- `astryx search` and `astryx build` compute a typo's edit distance only up to the most edits that can count. A fuzzy match now computes far fewer table cells, with unchanged answers.
|
|
39
|
+
- A standalone `astryx theme build` against the current Core loads Core's root entry only when the theme imports it. A theme that imports only `@astryxdesign/core/theme` no longer loads all of Core and its components. Family builds and builds against an older Core still load the root. Some builds hand the theme its Core: family builds, builds against an older Core, and themes whose folder has no Core. There, a theme that imports a Core root `require()` cannot load, such as one that awaits at its top level, fails with `ERR_THEME_LOAD`. The error names that root.
|
|
40
|
+
- `astryx doctor`'s theme checks, family builds and builds against an older Core defer an installed Core's root entry. It loads only when the theme or one of its `.cjs` dependencies imports it. A theme that does not import Core's root no longer loads all of Core and its components for them.
|
|
41
|
+
|
|
42
|
+
#### Documentation
|
|
43
|
+
|
|
44
|
+
- The calendars guide says `Calendar`, `DateInput`, `DateRangeInput`, and `DateTimeInput` show the Gregorian calendar unless the application chooses another one. (#9842)
|
|
45
|
+
- Hook docs for `useCalendarDays`, so `astryx hook useCalendarDays` and `astryx search` return it, and a `useCalendarDays — Month Grid` example block: a compact month table built from the hook's `weeks` and `dayNames`, with the previous and next months' days dimmed and a Week starts on control (Sunday or Monday) that reorders both the header and the grid. Copy it with `astryx template useCalendarDaysHookUsage <path>`.
|
|
46
|
+
- Hook docs for `useIcon`, so `astryx hook useIcon` and `astryx search` return it, and a `useIcon — Status Row` example block: a custom status row draws the success, warning and error icons with `useIcon`, and under a Theme that overrides those icons the same row draws the theme's icons. Copy it with `astryx template useIconHookUsage <path>`.
|
|
47
|
+
- Hook docs for `useLinkComponent`, so `astryx hook useLinkComponent` and `astryx search` return it, and a `useLinkComponent — Article Cards` example block: custom Article cards render their title link with the component the hook resolves. Inside a LinkProvider wired to a client-side router the title navigates without a page load, `as="a"` gives a native anchor even inside the provider, and outside the provider the title falls back to the next provider up or a native anchor. Copy it with `astryx template useLinkComponentHookUsage <path>`.
|
|
48
|
+
- Hook docs for `useOverlay`, so `astryx hook useOverlay` and `astryx search` return it, and a `useOverlay — Product Quick View` example block: a product Card spreads the hook's `containerRef` and `containerProps` and renders the returned scrim once over its image. Hovering the card, or moving keyboard focus into it, reveals a Quick view button, and the image link before it lets Tab reach the button. Copy it with `astryx template useOverlayHookUsage <path>`.
|
|
49
|
+
- Hook docs for `useTableSortableState`, so `astryx hook useTableSortableState` and `astryx search` return it, and a `useTableSortableState — Multi-Sort Orders` example block: an orders Table with no sort code of its own, where clicking Customer and then Shift-clicking Total sorts by customer and then by total. Copy it with `astryx template useTableSortableStateHookUsage <path>`.
|
|
50
|
+
- Internationalization gains a short Other calendars guide: choose a calendar on `InternationalizationProvider` or `Calendar`, values stay Gregorian ISO dates, and most calendars need `Temporal` (load `temporal-polyfill/full/global` where it is missing). A new `astryx docs calendars` namespace has the detail: the supported calendars, loading `Temporal` on the server and in the browser, why the lunisolar calendars (`chinese`, `dangi`) can differ by a day between runtimes, and ISO 8601 week numbers. The guide and `Calendar`'s `calendar` prop docs say how to get identical server and browser markup for those calendars: `installImplementation()` from `temporal-polyfill/full/shim` on both sides, since the `full/global` import keeps a native `Temporal`.
|
|
51
|
+
- InfoTip: the component page, `astryx component InfoTip --showcase`, and `astryx component InfoTip --blocks` now have worked examples — a showcase metric label, a row of metric definitions, and read-only settings with permission notes. InfoTip's docs list its anatomy (trigger button, info icon, help surface) and say it follows the toggletip pattern: the button reports `aria-expanded="true"` while the help is pinned, and a screen reader hears the help once when it pins.
|
|
52
|
+
- The `usePanGesture` page opens with a draggable box in two forms side by side: the hook and `createPanGesture`, which takes any element, with the same StyleX styles and Astryx tokens. The playing card follows as the advanced example. The `createPanGesture` page points to that example, and the `usePanGesture` guidance warns against holding the drag offset in a large component's state.
|
|
53
|
+
- A new `useClickableContainer — Clickable Project Card` example block makes a project card clickable anywhere with `useClickableContainer`: a click on the card follows its title link, while the Star button, the owner link and a text selection keep their own behavior, and Ctrl/Cmd+click or middle-click opens the project in a new tab. Copy it with `astryx template useClickableContainerHookUsage <path>`.
|
|
54
|
+
- A new `useImageMode — Photo Caption` example block shows a caption over a photo's sky. `useImageMode` samples only the strip under the caption, and `MediaTheme` gives the caption light or dark text from the result. A Beach photo switch swaps a night photo for a bright beach photo, and the caption keeps the dark fallback while the new photo loads. Copy it with `astryx template useImageModeHookUsage <path>`.
|
|
55
|
+
- A new `useInputContainer — Search Field Wrapper` example block builds a custom search field with a leading search icon, padding and a trailing Clear button. `useInputContainer` puts focus in the input when the icon or the padding is clicked, and a click on Clear stays with Clear. Copy it with `astryx template useInputContainerHookUsage <path>`.
|
|
56
|
+
- A `useMergedRefs — AutoGrowTextArea` example block: an AutoGrowTextArea forwards the caller's ref and keeps its own ref to measure its height, and the merged ref attaches both to the same textarea, so it resizes itself while a parent button focuses it through the forwarded ref. Copy it with `astryx template useMergedRefsHookUsage <path>`.
|
|
57
|
+
- A new `useScrollLock — Full-screen Mobile Menu` example block opens a custom full-screen menu from a Menu button and locks the page behind it with `useScrollLock`, so the page neither scrolls nor shifts sideways, and closing the menu returns the reader to the same scroll position. Copy it with `astryx template useScrollLockHookUsage <path>`.
|
|
58
|
+
- A new `useScrollOverflow — Filter Strip Edge Fades` example block shows a row of active filters that scrolls sideways and fades only the edge where `useScrollOverflow` reports hidden filters. Adding or removing a filter updates the fades, and a right-to-left switch moves the start edge to the right. Copy it with `astryx template useScrollOverflowHookUsage <path>`.
|
|
59
|
+
|
|
60
|
+
#### Other Changes
|
|
61
|
+
|
|
62
|
+
- Internal: the search gather runs in its own listing-cache operation, so a caller that gathers candidates directly lists each folder about once, as `astryx search` already does. The command's results and output are unchanged. Not exported from the package entry point.
|
|
63
|
+
- Internal: the CLI's in-process test helper builds only the commands its arguments need, as a run of the bin does.
|
|
64
|
+
- The CLI's test setup rebuilds Core when its build is older than Core's sources or translations. It does so before any test starts, so a reused checkout no longer tests the CLI against an old Core build. A test waiting on another's build reads it only once that build is finished. One checkout's build no longer holds up another's tests. A run that cannot rebuild a stale Core, while an earlier run in the checkout uses it, stops with an error naming that run.
|
|
65
|
+
- The PowerSearch blocks fit a phone-sized screen. Each sizes its field through a grid column, `minmax(0, <width>)`: the old width where there is room, and the container's width where there is not. The Search with Table block's table scrolls inside its own frame on a narrow screen instead of widening the example.
|
|
66
|
+
- Internal: the main searcher's test checks the count contract for each query, not a byte total over eight queries.
|
|
67
|
+
- The Tokenizer blocks and the table-inbox and work-item-detail page templates follow Tokenizer's `'adaptive'` default, so on a compact touch screen they show the bottom sheet. Their `endContent` and `renderToken` work there as in the inline field; `hasClear` and the overflow modes apply to the inline field, and the Clear and Overflow blocks say so. The rule: docs examples follow `adaptive`; the stories that are fixtures for inline-field geometry (Caret placement, Logical order, RTL end lane, Long token beside the end lane) keep `presentation="popover"`. The table-inbox and work-item-detail back arrows mirror in right-to-left.
|
|
68
|
+
|
|
69
|
+
#### Contributors
|
|
70
|
+
|
|
71
|
+
Thanks to everyone who contributed to this release:
|
|
72
|
+
|
|
73
|
+
- @cixzhang
|
|
74
|
+
- @imdreamrunner
|
|
75
|
+
- @jibin7jose
|
|
76
|
+
- @MannXo
|
|
77
|
+
- @nynexman4464
|
|
78
|
+
- @Sainath-Reddy7
|
|
79
|
+
- @vjeux
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
3
83
|
# 0.7.8
|
|
4
84
|
|
|
5
85
|
#### Experimental APIs
|
package/README.md
CHANGED
|
@@ -499,7 +499,7 @@ Every response has a `type` discriminant. The full set is below (generated from
|
|
|
499
499
|
| `build.help` | The how-to-build-a-page playbook, emitted when no query is given: `playbook: true`, a title, the ordered steps (title, commands, optional returns), the on-system rules, and related lookups. Commands are bare subcommands for the caller to render with its own invocation. |
|
|
500
500
|
| `build.kit` | The template to start from and its kit: query, hasResults, matchCount (never a cap), directMatch, start {name, package, command, basis, reason, alternatives, ...} (the start and each alternative name the package that owns the template), pages (search's closest templates), blocks and domain as SearchResultEntry[] (each naming its package), frame and foundation (Core component names), and hint {reason, commands} when thin. |
|
|
501
501
|
| `swizzle.list` | The names of swizzlable components discoverable from cwd's @astryxdesign/core. The envelope's package is @astryxdesign/core. |
|
|
502
|
-
| `swizzle.copy` | An eject receipt: component name, owning package, output directory, files-copied count, the
|
|
502
|
+
| `swizzle.copy` | An eject receipt: component name, owning package, output directory, files-copied count, the copied file names (relative to the component folder; owner modules copied beside it start with ../), whether any file uses StyleX, and, when the owner has an issues URL, feedback ({issuesUrl, ghCommand?}): where to report the gap that led to swizzling. The envelope's package names the same owning package. |
|
|
503
503
|
| `gap-report.categories` | The fixed gap category values and human-readable labels; when a loaded integration names its own issues URL, meta.destinations lists every destination ({to, default, issuesUrl}) and meta.ask tells an agent to ask the person. |
|
|
504
504
|
| `gap-report.file` | An aggregate receipt: overall status, the selected package, issuesUrl (or null), deliveries in handler order, each {handlerType: project \| integration \| fallback, handler, audience, status, url, message}, and filedCount/routedOnlyCount totals; without --to, when a loaded integration names its own issues URL, destinations and ask as on gap-report.categories. |
|
|
505
505
|
| `template.list` | The effective discovered TemplateListEntry[] for pages and blocks. A winning replacement entry includes optional `replaces`, naming the Core id omitted from the default list. |
|
|
@@ -249,7 +249,7 @@ useBackdropPress useBackdropPress Layer/Layer.doc.mjs Layer/useBackdropPress.ts
|
|
|
249
249
|
useBaseTablePlugins useBaseTablePlugins Table/Table.doc.mjs Table/useBaseTablePlugins.ts
|
|
250
250
|
useBusyAnnouncement useBusyAnnouncement hooks/useAnimatedLayout.doc.mjs hooks/useBusyAnnouncement.ts
|
|
251
251
|
useCalendarConstraints useCalendarConstraints Calendar/Calendar.doc.mjs Calendar/hooks/useCalendarConstraints.ts
|
|
252
|
-
useCalendarDays useCalendarDays Calendar/
|
|
252
|
+
useCalendarDays useCalendarDays Calendar/useCalendarDays.doc.mjs Calendar/hooks/useCalendarDays.ts
|
|
253
253
|
useCalendarNavigation useCalendarNavigation Calendar/Calendar.doc.mjs Calendar/hooks/useCalendarNavigation.ts
|
|
254
254
|
useChatComposerTokens useChatComposerTokens Chat/Chat.doc.mjs Chat/useChatComposerTokens.ts
|
|
255
255
|
useChatDictation useChatDictation Chat/Chat.doc.mjs Chat/useChatDictation.ts
|
|
@@ -264,14 +264,14 @@ useEndLaneReserve useEndLaneReserve Tokenizer/Tokenizer.doc.mjs Tokenizer/useEnd
|
|
|
264
264
|
useFieldStatusAnnouncement useFieldStatusAnnouncement FieldStatus/FieldStatus.doc.mjs FieldStatus/useFieldStatusAnnouncement.ts
|
|
265
265
|
useFocusReturnVisibility useFocusReturnVisibility hooks/useAnimatedLayout.doc.mjs hooks/useFocusReturnVisibility.ts
|
|
266
266
|
useHighlightedOptionScroll useHighlightedOptionScroll hooks/useAnimatedLayout.doc.mjs hooks/useHighlightedOptionScroll.ts
|
|
267
|
-
useIcon useIcon Icon/
|
|
267
|
+
useIcon useIcon Icon/useIcon.doc.mjs Icon/useIcon.ts
|
|
268
268
|
useIndicator useIndicator Indicator/Indicator.doc.mjs Indicator/useIndicator.ts
|
|
269
269
|
useInternalConfig useInternalConfig PowerSearch/PowerSearch.doc.mjs PowerSearch/useInternalConfig.ts
|
|
270
270
|
useIsHydrating useIsHydrating hooks/useAnimatedLayout.doc.mjs hooks/useIsHydrating.ts
|
|
271
271
|
useIsomorphicLayoutEffect useIsomorphicLayoutEffect hooks/useAnimatedLayout.doc.mjs hooks/useIsomorphicLayoutEffect.ts
|
|
272
272
|
useLayerDismissal useLayerDismissal Layer/Layer.doc.mjs Layer/useLayerDismissal.ts
|
|
273
273
|
useLightbox useLightbox Lightbox/useLightbox.doc.mjs Lightbox/useLightbox.tsx
|
|
274
|
-
useLinkComponent useLinkComponent Link/
|
|
274
|
+
useLinkComponent useLinkComponent Link/useLinkComponent.doc.mjs Link/useLinkComponent.ts
|
|
275
275
|
useLinkify useLinkify Link/Link.doc.mjs Link/useLinkify.tsx
|
|
276
276
|
useListFormatter useListFormatter i18n/InternationalizationProvider.doc.mjs i18n/useListFormatter.ts
|
|
277
277
|
useMenuDrillIn useMenuDrillIn DropdownMenu/DropdownMenu.doc.mjs DropdownMenu/useMenuDrillIn.tsx
|
|
@@ -279,7 +279,7 @@ useMenuHover useMenuHover hooks/useAnimatedLayout.doc.mjs hooks/useMenuHover.ts
|
|
|
279
279
|
useMenuOverflow useMenuOverflow DropdownMenu/DropdownMenu.doc.mjs DropdownMenu/useMenuOverflow.ts
|
|
280
280
|
useMobileKeyboard ERR_UNKNOWN_COMPONENT - keyboard/useMobileKeyboard.ts
|
|
281
281
|
useOutlineFromDOM useOutlineFromDOM Outline/Outline.doc.mjs Outline/useOutlineFromDOM.ts
|
|
282
|
-
useOverlay useOverlay Overlay/
|
|
282
|
+
useOverlay useOverlay Overlay/useOverlay.doc.mjs Overlay/useOverlay.tsx
|
|
283
283
|
useOwnScrollGesture useOwnScrollGesture DateInput/DateInput.doc.mjs DateInput/useOwnScrollGesture.ts
|
|
284
284
|
usePager usePager hooks/useAnimatedLayout.doc.mjs hooks/usePager.ts
|
|
285
285
|
usePointerDragScroll usePointerDragScroll DateInput/DateInput.doc.mjs DateInput/usePointerDragScroll.ts
|
|
@@ -300,7 +300,7 @@ useSwipeAction useSwipeAction Item/Item.doc.mjs Item/useSwipeAction.ts
|
|
|
300
300
|
useSwitchTouch useSwitchTouch Switch/Switch.doc.mjs Switch/useSwitchTouch.ts
|
|
301
301
|
useTableCellStyles useTableCellStyles Table/Table.doc.mjs Table/useTableCellStyles.ts
|
|
302
302
|
useTableColumnSettingsState useTableColumnSettingsState Table/Table.doc.mjs Table/plugins/columnSettings/useTableColumnSettingsState.tsx
|
|
303
|
-
useTableSortableState useTableSortableState Table/
|
|
303
|
+
useTableSortableState useTableSortableState Table/plugins/sortable/useTableSortableState.doc.mjs Table/plugins/sortable/useTableSortableState.tsx
|
|
304
304
|
useToastGesture useToastGesture Toast/Toast.doc.mjs Toast/useToastGesture.ts
|
|
305
305
|
useTouchTrigger useTouchTrigger Layer/Layer.doc.mjs Layer/useTouchTrigger.ts
|
|
306
306
|
useTriggerMenu useTriggerMenu Chat/Chat.doc.mjs Chat/useTriggerMenu.tsx
|
|
@@ -25,8 +25,24 @@
|
|
|
25
25
|
*
|
|
26
26
|
* @param {string} content
|
|
27
27
|
* @param {string} [ownerPackage]
|
|
28
|
+
* @param {(importPath: string) => boolean} [keep] Imports to leave relative:
|
|
29
|
+
* the modules the copy carries in the same layout (see `sharedModulesOf`).
|
|
28
30
|
*/
|
|
29
|
-
export function rewriteImports(content: string, ownerPackage?: string): string;
|
|
31
|
+
export function rewriteImports(content: string, ownerPackage?: string, keep?: (importPath: string) => boolean): string;
|
|
32
|
+
/**
|
|
33
|
+
* The modules a copy carries beside the component, in the package's own
|
|
34
|
+
* layout under the output directory (`spec:AST-110` FR4): each private
|
|
35
|
+
* attribute owner module the component imports, and every unexported StyleX
|
|
36
|
+
* module such a carried module imports, transitively. The component's own
|
|
37
|
+
* imports of them, and theirs of each other, stay relative.
|
|
38
|
+
*
|
|
39
|
+
* @param {string} srcRoot the owner package's source root
|
|
40
|
+
* @param {string} componentDir
|
|
41
|
+
* @param {string[]} componentFiles files of the component that are copied
|
|
42
|
+
* @returns {Map<string, string>} module path (relative to srcRoot, no
|
|
43
|
+
* extension) -> its file path relative to srcRoot
|
|
44
|
+
*/
|
|
45
|
+
export function sharedModulesOf(srcRoot: string, componentDir: string, componentFiles: string[]): Map<string, string>;
|
|
30
46
|
/**
|
|
31
47
|
* Copy one component's source into the consumer project for customization,
|
|
32
48
|
* rewriting escaping relative imports to the owner package's subpaths.
|
|
@@ -59,10 +59,16 @@ const DEFAULT_ISSUES_URL = 'https://github.com/meta/astryx/issues/new';
|
|
|
59
59
|
*
|
|
60
60
|
* @param {string} content
|
|
61
61
|
* @param {string} [ownerPackage]
|
|
62
|
+
* @param {(importPath: string) => boolean} [keep] Imports to leave relative:
|
|
63
|
+
* the modules the copy carries in the same layout (see `sharedModulesOf`).
|
|
62
64
|
*/
|
|
63
|
-
export function rewriteImports(content, ownerPackage = CORE_PACKAGE) {
|
|
65
|
+
export function rewriteImports(content, ownerPackage = CORE_PACKAGE, keep = () => false) {
|
|
64
66
|
/** @param {string} importPath */
|
|
65
67
|
const mapTarget = importPath => {
|
|
68
|
+
// A module the copy carries beside the component keeps its relative path.
|
|
69
|
+
if (keep(importPath)) {
|
|
70
|
+
return importPath;
|
|
71
|
+
}
|
|
66
72
|
// Strip ALL leading `../` so a two-levels-up path never yields `<pkg>/..`.
|
|
67
73
|
const rest = importPath.replace(/^(?:\.\.\/)+/, '');
|
|
68
74
|
const parts = rest.split('/');
|
|
@@ -90,6 +96,153 @@ export function rewriteImports(content, ownerPackage = CORE_PACKAGE) {
|
|
|
90
96
|
);
|
|
91
97
|
}
|
|
92
98
|
|
|
99
|
+
/** A private data attribute's owner module (`architecture:public-component-api` INV23). */
|
|
100
|
+
const OWNER_MODULE = /^privateAttributes\/[^/]+\.stylex$/;
|
|
101
|
+
/** A StyleX module, with or without its file extension. */
|
|
102
|
+
const STYLEX_MODULE = /\.stylex(?:\.[cm]?[jt]sx?)?$/;
|
|
103
|
+
/** The extensions an extensionless import may name, in resolution order. */
|
|
104
|
+
const SOURCE_EXTENSIONS = ['.ts', '.tsx', '.mjs', '.js'];
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* The relative import specifiers in a module's source.
|
|
108
|
+
* @param {string} content
|
|
109
|
+
* @returns {string[]}
|
|
110
|
+
*/
|
|
111
|
+
function relativeImportsOf(content) {
|
|
112
|
+
const found = [];
|
|
113
|
+
for (const re of [
|
|
114
|
+
/from\s+['"](\.\.?\/[^'"]+)['"]/g,
|
|
115
|
+
/import\(\s*['"](\.\.?\/[^'"]+)['"]/g,
|
|
116
|
+
]) {
|
|
117
|
+
for (const m of content.matchAll(re)) found.push(m[1]);
|
|
118
|
+
}
|
|
119
|
+
return found;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* The source file an import resolves to under `srcRoot`, as a path relative to
|
|
124
|
+
* `srcRoot` without its extension (`privateAttributes/press.stylex`), and the
|
|
125
|
+
* file's own relative path; null when it resolves outside `srcRoot` or to no
|
|
126
|
+
* file.
|
|
127
|
+
* @param {string} srcRoot
|
|
128
|
+
* @param {string} fromDir directory of the importing file, relative to srcRoot
|
|
129
|
+
* @param {string} importPath
|
|
130
|
+
* @returns {{module: string, file: string} | null}
|
|
131
|
+
*/
|
|
132
|
+
function resolveSourceModule(srcRoot, fromDir, importPath) {
|
|
133
|
+
const module = path.posix.normalize(path.posix.join(fromDir, importPath));
|
|
134
|
+
if (module.startsWith('..') || path.posix.isAbsolute(module)) return null;
|
|
135
|
+
for (const ext of ['', ...SOURCE_EXTENSIONS]) {
|
|
136
|
+
const file = module + ext;
|
|
137
|
+
const abs = path.join(srcRoot, file);
|
|
138
|
+
if (fs.existsSync(abs) && fs.statSync(abs).isFile()) {
|
|
139
|
+
return {
|
|
140
|
+
module: ext ? module : module.replace(/\.[cm]?[jt]sx?$/, ''),
|
|
141
|
+
file,
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* The subpaths the owner package exports (`./theme/tokens.stylex`), read from
|
|
150
|
+
* the nearest package.json above its source root.
|
|
151
|
+
* @param {string} srcRoot
|
|
152
|
+
* @returns {Set<string>}
|
|
153
|
+
*/
|
|
154
|
+
function exportedSubpathsOf(srcRoot) {
|
|
155
|
+
let dir = srcRoot;
|
|
156
|
+
for (;;) {
|
|
157
|
+
const manifest = path.join(dir, 'package.json');
|
|
158
|
+
if (fs.existsSync(manifest)) {
|
|
159
|
+
try {
|
|
160
|
+
const {exports} = JSON.parse(fs.readFileSync(manifest, 'utf-8'));
|
|
161
|
+
return new Set(
|
|
162
|
+
exports && typeof exports === 'object' ? Object.keys(exports) : [],
|
|
163
|
+
);
|
|
164
|
+
} catch {
|
|
165
|
+
return new Set();
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
const parent = path.dirname(dir);
|
|
169
|
+
if (parent === dir) return new Set();
|
|
170
|
+
dir = parent;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* The modules a copy carries beside the component, in the package's own
|
|
176
|
+
* layout under the output directory (`spec:AST-110` FR4): each private
|
|
177
|
+
* attribute owner module the component imports, and every unexported StyleX
|
|
178
|
+
* module such a carried module imports, transitively. The component's own
|
|
179
|
+
* imports of them, and theirs of each other, stay relative.
|
|
180
|
+
*
|
|
181
|
+
* @param {string} srcRoot the owner package's source root
|
|
182
|
+
* @param {string} componentDir
|
|
183
|
+
* @param {string[]} componentFiles files of the component that are copied
|
|
184
|
+
* @returns {Map<string, string>} module path (relative to srcRoot, no
|
|
185
|
+
* extension) -> its file path relative to srcRoot
|
|
186
|
+
*/
|
|
187
|
+
export function sharedModulesOf(srcRoot, componentDir, componentFiles) {
|
|
188
|
+
const exported = exportedSubpathsOf(srcRoot);
|
|
189
|
+
const componentRel = path
|
|
190
|
+
.relative(srcRoot, componentDir)
|
|
191
|
+
.split(path.sep)
|
|
192
|
+
.join('/');
|
|
193
|
+
/** @type {Map<string, string>} */
|
|
194
|
+
const carried = new Map();
|
|
195
|
+
/** @type {Array<{fromDir: string, content: string, owner: boolean}>} */
|
|
196
|
+
const queue = componentFiles
|
|
197
|
+
.filter(f => /\.[cm]?[jt]sx?$/.test(f))
|
|
198
|
+
.map(f => ({
|
|
199
|
+
fromDir: componentRel,
|
|
200
|
+
content: fs.readFileSync(path.join(componentDir, f), 'utf-8'),
|
|
201
|
+
owner: false,
|
|
202
|
+
}));
|
|
203
|
+
while (queue.length > 0) {
|
|
204
|
+
const {fromDir, content, owner} = /** @type {typeof queue[number]} */ (
|
|
205
|
+
queue.shift()
|
|
206
|
+
);
|
|
207
|
+
for (const importPath of relativeImportsOf(content)) {
|
|
208
|
+
const target = resolveSourceModule(srcRoot, fromDir, importPath);
|
|
209
|
+
if (target == null || carried.has(target.module)) continue;
|
|
210
|
+
if (target.module.startsWith(componentRel + '/')) continue;
|
|
211
|
+
const isOwner = OWNER_MODULE.test(target.module);
|
|
212
|
+
// A carried module's unexported StyleX dependency travels with it; a
|
|
213
|
+
// component's own imports of other modules are rewritten as before.
|
|
214
|
+
const isPrivateStyle =
|
|
215
|
+
owner &&
|
|
216
|
+
STYLEX_MODULE.test(target.module) &&
|
|
217
|
+
!exported.has(`./${target.module}`);
|
|
218
|
+
if (!isOwner && !isPrivateStyle) continue;
|
|
219
|
+
carried.set(target.module, target.file);
|
|
220
|
+
queue.push({
|
|
221
|
+
fromDir: path.posix.dirname(target.module),
|
|
222
|
+
content: fs.readFileSync(path.join(srcRoot, target.file), 'utf-8'),
|
|
223
|
+
owner: true,
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return carried;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* A `keep` predicate for `rewriteImports`: true for an import that names one
|
|
232
|
+
* of the carried modules from a file in `fromDir`.
|
|
233
|
+
* @param {Map<string, string>} carried
|
|
234
|
+
* @param {string} fromDir relative to the source root
|
|
235
|
+
* @returns {(importPath: string) => boolean}
|
|
236
|
+
*/
|
|
237
|
+
function keepCarried(carried, fromDir) {
|
|
238
|
+
return importPath => {
|
|
239
|
+
const module = path.posix
|
|
240
|
+
.normalize(path.posix.join(fromDir, importPath))
|
|
241
|
+
.replace(/\.[cm]?[jt]sx?$/, '');
|
|
242
|
+
return carried.has(module);
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
|
|
93
246
|
/**
|
|
94
247
|
* Build the maintainer feedback note for a swizzled component.
|
|
95
248
|
* @param {string} component
|
|
@@ -317,19 +470,64 @@ export async function swizzleCopy(component, options = {}) {
|
|
|
317
470
|
label: 'output file',
|
|
318
471
|
});
|
|
319
472
|
}
|
|
473
|
+
// The owner modules the component imports, and their unexported StyleX
|
|
474
|
+
// dependencies, travel with it in the package's layout (spec:AST-110 FR4).
|
|
475
|
+
const srcRoot = path.dirname(componentDir);
|
|
476
|
+
const componentRel = path
|
|
477
|
+
.relative(srcRoot, componentDir)
|
|
478
|
+
.split(path.sep)
|
|
479
|
+
.join('/');
|
|
480
|
+
const carried = sharedModulesOf(srcRoot, componentDir, sourceFiles);
|
|
481
|
+
const shared = [...carried.values()].map(file => {
|
|
482
|
+
const content = rewriteImports(
|
|
483
|
+
fs.readFileSync(path.join(srcRoot, file), 'utf-8'),
|
|
484
|
+
owner.ownerPackage,
|
|
485
|
+
keepCarried(carried, path.posix.dirname(file)),
|
|
486
|
+
);
|
|
487
|
+
const dest = confineWrite(path.join(outputBase, file), cwd, {
|
|
488
|
+
allowAbsolute: true,
|
|
489
|
+
label: 'output file',
|
|
490
|
+
});
|
|
491
|
+
// Something that is not a readable file in its place counts as changed.
|
|
492
|
+
let existing = null;
|
|
493
|
+
if (fs.existsSync(dest)) {
|
|
494
|
+
try {
|
|
495
|
+
existing = fs.readFileSync(dest, 'utf-8');
|
|
496
|
+
} catch {
|
|
497
|
+
existing = '';
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
// A copy another component's swizzle already wrote is reused when it is
|
|
501
|
+
// the same; a changed one is a file this run would overwrite.
|
|
502
|
+
return {
|
|
503
|
+
file,
|
|
504
|
+
dest,
|
|
505
|
+
content,
|
|
506
|
+
unchanged: existing === content,
|
|
507
|
+
exists: existing != null,
|
|
508
|
+
};
|
|
509
|
+
});
|
|
320
510
|
const existingFiles = sourceFiles.filter(f =>
|
|
321
511
|
fs.existsSync(path.join(outputDir, f)),
|
|
322
512
|
);
|
|
323
|
-
|
|
513
|
+
const changedShared = shared.filter(s => s.exists && !s.unchanged);
|
|
514
|
+
if ((existingFiles.length > 0 || changedShared.length > 0) && !overwrite) {
|
|
324
515
|
const relOutputForMsg = path.relative(cwd, outputDir) || '.';
|
|
516
|
+
const sharedNote =
|
|
517
|
+
changedShared.length > 0
|
|
518
|
+
? ` and ${changedShared.length} changed shared module(s) (${changedShared
|
|
519
|
+
.map(s => path.relative(cwd, s.dest))
|
|
520
|
+
.join(', ')})`
|
|
521
|
+
: '';
|
|
325
522
|
throw new AstryxError(
|
|
326
|
-
`Refusing to overwrite ${existingFiles.length} existing file(s) in ${relOutputForMsg}
|
|
523
|
+
`Refusing to overwrite ${existingFiles.length} existing file(s) in ${relOutputForMsg}/${sharedNote}. ` +
|
|
327
524
|
`Re-run with --overwrite (or -f) to replace them.`,
|
|
328
525
|
[],
|
|
329
526
|
ERROR_CODES.ERR_FILE_EXISTS,
|
|
330
527
|
);
|
|
331
528
|
}
|
|
332
529
|
|
|
530
|
+
|
|
333
531
|
const outputDirExisted = fs.existsSync(outputDir);
|
|
334
532
|
try {
|
|
335
533
|
fs.mkdirSync(outputDir, {recursive: true});
|
|
@@ -351,7 +549,7 @@ export async function swizzleCopy(component, options = {}) {
|
|
|
351
549
|
if (!fs.statSync(srcPath).isFile()) continue;
|
|
352
550
|
let content = fs.readFileSync(srcPath, 'utf-8');
|
|
353
551
|
if (file.endsWith('.ts') || file.endsWith('.tsx')) {
|
|
354
|
-
content = rewriteImports(content, owner.ownerPackage);
|
|
552
|
+
content = rewriteImports(content, owner.ownerPackage, keepCarried(carried, componentRel));
|
|
355
553
|
}
|
|
356
554
|
if (
|
|
357
555
|
(file.endsWith('.ts') || file.endsWith('.tsx')) &&
|
|
@@ -381,6 +579,38 @@ export async function swizzleCopy(component, options = {}) {
|
|
|
381
579
|
copied++;
|
|
382
580
|
}
|
|
383
581
|
|
|
582
|
+
/** @type {string[]} folders this run created for carried modules, outermost first */
|
|
583
|
+
const createdDirs = [];
|
|
584
|
+
for (const module of shared) {
|
|
585
|
+
// An identical copy is already in place: it is part of this copy, unwritten.
|
|
586
|
+
if (module.unchanged) {
|
|
587
|
+
copied++;
|
|
588
|
+
continue;
|
|
589
|
+
}
|
|
590
|
+
try {
|
|
591
|
+
const original = fs.existsSync(module.dest)
|
|
592
|
+
? fs.readFileSync(module.dest)
|
|
593
|
+
: null;
|
|
594
|
+
const firstCreated = fs.mkdirSync(path.dirname(module.dest), {recursive: true});
|
|
595
|
+
if (firstCreated != null) createdDirs.push(firstCreated);
|
|
596
|
+
written.push({dest: module.dest, original});
|
|
597
|
+
fs.writeFileSync(module.dest, module.content);
|
|
598
|
+
copied++;
|
|
599
|
+
} catch (err) {
|
|
600
|
+
const unrestored = undoCopy(written);
|
|
601
|
+
// Remove the folders this run created, as a failed component-file write
|
|
602
|
+
// does, so a retry finds the output as it was.
|
|
603
|
+
for (const dir of [...createdDirs].reverse()) {
|
|
604
|
+
fs.rmSync(dir, {recursive: true, force: true});
|
|
605
|
+
}
|
|
606
|
+
if (!outputDirExisted) {
|
|
607
|
+
fs.rmSync(outputDir, {recursive: true, force: true});
|
|
608
|
+
}
|
|
609
|
+
throw writeFailed(module.dest, cwd, err, unrestored);
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
if (shared.length > 0) usesStyleX = true;
|
|
613
|
+
|
|
384
614
|
const relOutput = path.relative(cwd, outputDir);
|
|
385
615
|
const copiedFiles = files.filter(
|
|
386
616
|
f =>
|
|
@@ -393,7 +623,12 @@ export async function swizzleCopy(component, options = {}) {
|
|
|
393
623
|
package: owner.package,
|
|
394
624
|
outputDir: relOutput,
|
|
395
625
|
filesCopied: copied,
|
|
396
|
-
|
|
626
|
+
// The owner modules and their unexported style dependencies the copy
|
|
627
|
+
// carries beside the component (spec:AST-110 FR4) are its files too.
|
|
628
|
+
files: [
|
|
629
|
+
...copiedFiles.map(f => f),
|
|
630
|
+
...shared.map(m => path.relative(outputDir, m.dest).split(path.sep).join('/')),
|
|
631
|
+
],
|
|
397
632
|
usesStyleX,
|
|
398
633
|
};
|
|
399
634
|
if (feedback) data.feedback = feedback;
|
|
@@ -76,7 +76,7 @@ export const doc = {
|
|
|
76
76
|
{
|
|
77
77
|
type: 'swizzle.copy',
|
|
78
78
|
description:
|
|
79
|
-
'A receipt after copying the component into the project: the component name, owning package, output directory, files-copied count, the
|
|
79
|
+
'A receipt after copying the component into the project: the component name, owning package, output directory, files-copied count, the copied file names (relative to the component folder, including the private attribute owner modules and their unexported style modules copied beside it, e.g. `../privateAttributes/press.stylex.ts`), whether any file uses StyleX, and, when the owner has an issues URL, feedback ({issuesUrl, ghCommand?}): where to report the gap that led to swizzling.',
|
|
80
80
|
},
|
|
81
81
|
],
|
|
82
82
|
throws: [
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
* @property {string} data.package Owner package the component source was copied from.
|
|
35
35
|
* @property {string} data.outputDir
|
|
36
36
|
* @property {number} data.filesCopied
|
|
37
|
-
* @property {string[]} data.files
|
|
37
|
+
* @property {string[]} data.files Copied file names, relative to the component folder; owner modules and their unexported style modules copied beside it start with `../` (spec:AST-110 FR4).
|
|
38
38
|
* @property {boolean} data.usesStyleX Whether any copied file uses StyleX (requires build-time setup).
|
|
39
39
|
* @property {SwizzleFeedback} [data.feedback]
|
|
40
40
|
*/
|