@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 +20 -7
- package/dist/components/charts/candlestick/logic.js +6 -6
- package/dist/components/charts/candlestick/styled.js +1 -1
- package/dist/components/charts/highlighting-line-data/logic.js +1 -1
- package/dist/components/charts/highlighting-line-data/styled.js +1 -1
- package/dist/components/metric-card/MetricChart.js +210 -192
- package/dist/components/metric-card/index.js +101 -76
- package/dist/components/metric-card/logic.js +142 -65
- package/dist/components/metric-card/styled.js +69 -46
- package/dist/components/paginated-list/logic.js +13 -13
- package/dist/components/paginated-list/styled.js +12 -12
- package/dist/components/profile-card/logic.js +5 -5
- package/dist/components/profile-card/styled.js +4 -4
- package/dist/components/widget/index.js +4 -0
- package/dist/components/widget/styled.js +38 -0
- package/dist/main.d.ts +148 -68
- package/dist/main.js +13 -11
- package/package.json +3 -1
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 —
|
|
43
|
-
yarn build:
|
|
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
|
-
|
|
46
|
-
|
|
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
|
-
|
|
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
|
|
2
|
-
import { useThemeProps as
|
|
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 =
|
|
110
|
+
const e = E({
|
|
111
111
|
props: P,
|
|
112
|
-
name: "
|
|
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:
|
|
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:
|
|
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
|
};
|