@hybridcore/ui 1.5.88 → 1.5.89

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/README.md CHANGED
@@ -28,7 +28,7 @@ yarn dev # opens the Vite dev server with Storybook
28
28
 
29
29
  ### Iterate against a real consumer (e.g. Smart Navigator) without publishing
30
30
 
31
- We use [`yalc`](https://github.com/wclr/yalc) to link the lib into consumer projects locally, so changes show up in their dev server without a `yarn version` + `npm publish` round trip. Full rationale, gotchas, and follow-ups in [`docs/plans/local-dev-flow.md`](./docs/plans/local-dev-flow.md).
31
+ We use [`yalc`](https://github.com/wclr/yalc) to link the lib into consumer projects locally, so changes show up in their dev server without a `yarn version` + `npm publish` round trip. Full rationale, gotchas, and follow-ups in [`docs/plans/local-dev-flow.md`](./docs/plans/local-dev-flow.md); current progress in [`docs/BACKLOG.md`](./docs/BACKLOG.md) § 0.1.
32
32
 
33
33
  One-time setup (per machine):
34
34
 
@@ -36,17 +36,30 @@ One-time setup (per machine):
36
36
  npm i -g yalc
37
37
  ```
38
38
 
39
- Daily workflow:
39
+ Daily workflow — two terminals, two commands:
40
40
 
41
41
  ```sh
42
- # terminal 1 — keep dist/ hot
43
- yarn build:watch
42
+ # terminal 1 — lib: rebuild + auto-push to every linked consumer on each save
43
+ cd shared/ui && yarn build:push
44
+ ```
44
45
 
45
- # terminal 2 — push to all linked consumers whenever you want them to pick up
46
- yalc push --no-scripts
46
+ ```sh
47
+ # terminal 2 — consumer (Smart Navigator): link the lib, then run the dev
48
+ # server under a watcher that auto-restarts on every yalc push
49
+ cd SmartNavigator/frontend && yarn link:ui && yarn dev:lib
47
50
  ```
48
51
 
49
- `--no-scripts` skips the `prepublishOnly` rebuild (since `build:watch` already keeps `dist/` current). Drop it if you're not running the watcher.
52
+ Edit any file under `lib/components/…` vite rebuilds → `yalc push` fires automatically → the consumer's `dev:lib` watcher detects the push, wipes Umi's mfsu cache, and restarts `max dev`. Browser auto-reloads. No manual rebuilds, pushes, or cache wipes.
53
+
54
+ #### Script reference
55
+
56
+ | Script | What it does |
57
+ | ------------------- | -------------------------------------------------------------------------------------------------- |
58
+ | `yarn build` | One-shot prod build (used by `prepublishOnly`). Does **not** push to yalc. |
59
+ | `yarn build:watch` | `vite build --watch` only — re-rolls `dist/` and types on each save. Does **not** push to yalc. |
60
+ | `yarn build:push` | Same as `build:watch` plus an auto-`yalc push` after every successful rebuild. Use this for dev. |
61
+
62
+ The auto-push hook is implemented as a `closeBundle` plugin in [`vite.config.ts`](./vite.config.ts), gated by the `YALC_PUSH=1` env var that the `build:push` script sets. `yarn build` stays pure so npm publishes never accidentally push to local consumers.
50
63
 
51
64
  To register the lib in a consumer project for the first time, run `yalc add @hybridcore/ui` once **inside the consumer**. The Smart Navigator frontend wraps this in a `yarn link:ui` script — see its README.
52
65
 
@@ -1,5 +1,5 @@
1
- import { R as M, L, T as k, m as T, i as V, b as G, A as S, X as j, c as z, g as O, V as R, d as N, f as _, p as E } from "../../../AxisRendererY-kADUad00.js";
2
- import { useThemeProps as H } from "@mui/material";
1
+ import { R as M, L, T as k, m as T, i as V, b as G, A as S, X as j, c as H, g as O, V as R, d as N, f as _, p as z } from "../../../AxisRendererY-kADUad00.js";
2
+ import { useThemeProps as E } from "@mui/material";
3
3
  import { useRef as A, useLayoutEffect as W, useEffect as U } from "react";
4
4
  import { X as Z, D as q } from "../../../DateAxis-CMum47iz.js";
5
5
  import { C as F } from "../../../ColumnSeries-BTcqshjB.js";
@@ -107,9 +107,9 @@ Object.defineProperty(C, "classNames", {
107
107
  value: F.classNames.concat([C.className])
108
108
  });
109
109
  const $ = (P) => {
110
- const e = H({
110
+ const e = E({
111
111
  props: P,
112
- name: "MuiCandlestickChart"
112
+ name: "HCCandlestickChart"
113
113
  }), {
114
114
  data: t,
115
115
  seriesName: h,
@@ -159,7 +159,7 @@ const $ = (P) => {
159
159
  maxDeviation: 0.3,
160
160
  groupData: !0,
161
161
  baseInterval: { timeUnit: "day", count: 1 },
162
- renderer: z.new(s, {
162
+ renderer: H.new(s, {
163
163
  minorGridEnabled: !0
164
164
  }),
165
165
  tooltip: O.new(s, {})
@@ -216,7 +216,7 @@ const $ = (P) => {
216
216
  opacity: 0.6
217
217
  })
218
218
  ), X.columns.template.setAll({
219
- width: E(80)
219
+ width: z(80)
220
220
  })), f.data.setAll(t), n && X && X.data.setAll(t), i.appear(1e3), f.appear(1e3), () => {
221
221
  s.dispose();
222
222
  };
@@ -1,6 +1,6 @@
1
1
  import { styled as i } from "@mui/material";
2
2
  const h = i("div", {
3
- name: "MuiCandlestickChart",
3
+ name: "HCCandlestickChart",
4
4
  slot: "Root"
5
5
  })(({ ownerState: t }) => ({
6
6
  position: "relative",
@@ -178,7 +178,7 @@ Object.defineProperty(D, "classNames", {
178
178
  const le = (y) => {
179
179
  const e = K({
180
180
  props: y,
181
- name: "MuiHighlightLineChart"
181
+ name: "HCHighlightLineChart"
182
182
  }), {
183
183
  seriesData: t,
184
184
  height: c = "500px",
@@ -1,6 +1,6 @@
1
1
  import { styled as t } from "@mui/material";
2
2
  const o = t("div", {
3
- name: "MuiHighlightLineChart",
3
+ name: "HCHighlightLineChart",
4
4
  slot: "Root"
5
5
  })(({ ownerState: i }) => ({
6
6
  position: "relative",