@openpawlabs/diy-guides-ui 1.7.0 → 1.7.2
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 +6 -2
- package/dist/components/GuideLayout/GuideLayout.d.ts +1 -1
- package/dist/components/GuideLayout/GuideLayout.d.ts.map +1 -1
- package/dist/components/GuideLayout/GuideLayout.stories.d.ts.map +1 -1
- package/dist/components/GuideStepList/GuideStepList.d.ts.map +1 -1
- package/dist/context/guideScrollMargin.d.ts +4 -0
- package/dist/context/guideScrollMargin.d.ts.map +1 -1
- package/dist/diy-guides-ui.cjs +5 -5
- package/dist/diy-guides-ui.cjs.map +1 -1
- package/dist/diy-guides-ui.js +2072 -2041
- package/dist/diy-guides-ui.js.map +1 -1
- package/dist/hooks/useGuideStepUrlSync.d.ts +3 -1
- package/dist/hooks/useGuideStepUrlSync.d.ts.map +1 -1
- package/dist/stories/Welcome.stories.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/utils/pickActiveGuideStep.d.ts +10 -0
- package/dist/utils/pickActiveGuideStep.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ src/
|
|
|
46
46
|
components/ # One folder per component (tsx, stories, tests, index)
|
|
47
47
|
hooks/ # Shared hooks (e.g. useControlledState)
|
|
48
48
|
types/ # Shared design tokens (colors, callout types) and types
|
|
49
|
-
styles/ #
|
|
49
|
+
styles/ # Public component CSS plus Storybook/dev Tailwind entry
|
|
50
50
|
index.ts # Public API exports
|
|
51
51
|
.storybook/ # Storybook configuration
|
|
52
52
|
```
|
|
@@ -63,12 +63,16 @@ Import styles in your app CSS:
|
|
|
63
63
|
|
|
64
64
|
```css
|
|
65
65
|
@import "tailwindcss";
|
|
66
|
+
@source "../node_modules/@openpawlabs/diy-guides-ui/dist";
|
|
66
67
|
@import "@heroui/styles";
|
|
67
68
|
@import "@openpawlabs/diy-guides-ui/styles";
|
|
68
69
|
```
|
|
69
70
|
|
|
71
|
+
The package styles export contains only library design tokens and component CSS.
|
|
72
|
+
Your app owns Tailwind generation, so include the `@source` path from your CSS
|
|
73
|
+
file to the installed package `dist/` directory.
|
|
74
|
+
|
|
70
75
|
```tsx
|
|
71
|
-
import "@openpawlabs/diy-guides-ui/styles";
|
|
72
76
|
import {
|
|
73
77
|
GuideLayout,
|
|
74
78
|
GuideStepList,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
2
|
import { type Difficulty } from "../DifficultyBadge";
|
|
3
3
|
export interface GuideLayoutProps {
|
|
4
4
|
/** `GuideLayout.Header`, `GuideLayout.Intro`, `GuideLayout.Sidebar`, and `GuideLayout.Content`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GuideLayout.d.ts","sourceRoot":"","sources":["../../../src/components/GuideLayout/GuideLayout.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"GuideLayout.d.ts","sourceRoot":"","sources":["../../../src/components/GuideLayout/GuideLayout.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAU,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAM/C,OAAO,EAEL,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,gBAAgB;IAC/B,mGAAmG;IACnG,QAAQ,EAAE,SAAS,CAAC;IACpB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,sBAAsB;IACrC,mBAAmB;IACnB,KAAK,EAAE,SAAS,CAAC;IACjB,uFAAuF;IACvF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,kDAAkD;IAClD,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,8DAA8D;IAC9D,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,6DAA6D;IAC7D,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,iBAAS,iBAAiB,CAAC,EACzB,KAAK,EACL,SAAS,EACT,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,IAAI,EACJ,SAAS,GACV,EAAE,sBAAsB,+BA2CxB;AAED,+DAA+D;AAC/D,iBAAS,gBAAgB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,qBAAqB,+BAMvE;AAED,iEAAiE;AACjE,iBAAS,kBAAkB,CAAC,EAC1B,QAAQ,EACR,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+BAMA;AAED,kEAAkE;AAClE,iBAAS,kBAAkB,CAAC,EAC1B,QAAQ,EACR,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+BAMA;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,mDAKnB,gBAAgB;;;;;CAyBpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GuideLayout.stories.d.ts","sourceRoot":"","sources":["../../../src/components/GuideLayout/GuideLayout.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAoC5D,QAAA,MAAM,IAAI;;;;;;;
|
|
1
|
+
{"version":3,"file":"GuideLayout.stories.d.ts","sourceRoot":"","sources":["../../../src/components/GuideLayout/GuideLayout.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAoC5D,QAAA,MAAM,IAAI;;;;;;;qBAwDA,CAAT;;;;qBAOqB,CAAC;;;;;;;;;;;;;;;CAtDa,CAAC;AAErC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAKnC,eAAO,MAAM,SAAS,EAAE,KAwGvB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KA2B3B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAsD5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GuideStepList.d.ts","sourceRoot":"","sources":["../../../src/components/GuideStepList/GuideStepList.tsx"],"names":[],"mappings":"AAEA,OAAO,EASL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"GuideStepList.d.ts","sourceRoot":"","sources":["../../../src/components/GuideStepList/GuideStepList.tsx"],"names":[],"mappings":"AAEA,OAAO,EASL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AASf,OAAO,EAAkB,KAAK,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAGjF,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,8DAA8D;IAC9D,QAAQ,EAAE,SAAS,CAAC;IACpB,qDAAqD;IACrD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,4DAA4D;IAC5D,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAC;IACrD;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iEAAiE;IACjE,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,6EAA6E;IAC7E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gEAAgE;IAChE,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACnD;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAMD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,YAAmB,EACnB,gBAAgB,EAChB,WAAkB,EAClB,WAAoB,EACpB,UAAmB,EACnB,kBAAkB,EAClB,eAAe,EAAE,yBAA6B,EAC9C,yBAA+B,EAC/B,SAAS,GACV,EAAE,kBAAkB,+BAgHpB"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
1
2
|
/** Extra top scroll margin (px) supplied by a page shell such as `GuideLayout`. */
|
|
2
3
|
export declare const GuideScrollMarginContext: import("react").Context<number>;
|
|
4
|
+
/** Scroll anchor for the guide overview — set by `GuideLayout` on its root element. */
|
|
5
|
+
export declare const GuideTopRefContext: import("react").Context<RefObject<HTMLElement | null> | null>;
|
|
3
6
|
export declare function useGuideScrollMargin(): number;
|
|
7
|
+
export declare function useGuideTopRef(): RefObject<HTMLElement | null> | null;
|
|
4
8
|
/** Tailwind `scroll-mt-4` — baseline breathing room below the scroll anchor. */
|
|
5
9
|
export declare const GUIDE_STEP_BASE_SCROLL_MARGIN = 16;
|
|
6
10
|
/** Sticky progress bar `top-2` offset in px. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guideScrollMargin.d.ts","sourceRoot":"","sources":["../../src/context/guideScrollMargin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"guideScrollMargin.d.ts","sourceRoot":"","sources":["../../src/context/guideScrollMargin.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAElE,mFAAmF;AACnF,eAAO,MAAM,wBAAwB,iCAAmB,CAAC;AAEzD,uFAAuF;AACvF,eAAO,MAAM,kBAAkB,+DAC4B,CAAC;AAE5D,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C;AAED,wBAAgB,cAAc,IAAI,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,IAAI,CAErE;AAED,gFAAgF;AAChF,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAEhD,gDAAgD;AAChD,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAEhD,wBAAgB,+BAA+B,CAAC,EAC9C,mBAAuB,EACvB,iBAAqB,EACrB,kBAA0B,EAC1B,yBAA6B,GAC9B,EAAE;IACD,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACpC,GAAG,MAAM,CAWT"}
|