@web-my-money/blocks 1.0.0

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/dist/index.mjs ADDED
@@ -0,0 +1,121 @@
1
+ import {
2
+ ActivityFeed,
3
+ AppBrand,
4
+ AppShell,
5
+ AppearanceSettings,
6
+ BrandFrame,
7
+ DashboardHeader,
8
+ DataSummaryCards,
9
+ DataTable,
10
+ EmptyState,
11
+ GlassPanel,
12
+ KPIRow,
13
+ LayoutToggle,
14
+ NotificationBanner,
15
+ PageHeader,
16
+ PageHeaderBanner,
17
+ SidebarNavigation,
18
+ StatCard,
19
+ SubTabs,
20
+ useActionRunner,
21
+ useLayoutPreference,
22
+ useOptimisticAction
23
+ } from "./chunk-UM2RDUPI.mjs";
24
+ import {
25
+ AvatarGroup,
26
+ BentoGrid,
27
+ CTABanner,
28
+ CaseStudiesSection,
29
+ ComparisonTable,
30
+ ContactForm,
31
+ DEFAULT_WAVES,
32
+ FadeUp,
33
+ Faq,
34
+ FeatureGrid,
35
+ Footer,
36
+ HeroCanvas,
37
+ HeroSection,
38
+ LayeredButton,
39
+ LogoCloud,
40
+ Marquee,
41
+ NavBar,
42
+ PricingTable,
43
+ ProcessSteps,
44
+ ScrollReveal,
45
+ SectionGlow,
46
+ SectionIntro,
47
+ SectionLabel,
48
+ SocialProof,
49
+ StatsSection,
50
+ TechCarousel,
51
+ TestimonialCarousel,
52
+ TestimonialsCarousel,
53
+ TestimonialsSection,
54
+ TextRotator,
55
+ UseCasesSection,
56
+ ValueStackSection,
57
+ WaveCanvas
58
+ } from "./chunk-X6SF4TT2.mjs";
59
+ import {
60
+ LightboxGallery,
61
+ Thumbnail
62
+ } from "./chunk-L6OIX4DG.mjs";
63
+ import "./chunk-PJO7WJ4G.mjs";
64
+ export {
65
+ ActivityFeed,
66
+ AppBrand,
67
+ AppShell,
68
+ AppearanceSettings,
69
+ AvatarGroup,
70
+ BentoGrid,
71
+ BrandFrame,
72
+ CTABanner,
73
+ CaseStudiesSection,
74
+ ComparisonTable,
75
+ ContactForm,
76
+ DEFAULT_WAVES,
77
+ DashboardHeader,
78
+ DataSummaryCards,
79
+ DataTable,
80
+ EmptyState,
81
+ FadeUp,
82
+ Faq,
83
+ FeatureGrid,
84
+ Footer,
85
+ GlassPanel,
86
+ HeroCanvas,
87
+ HeroSection,
88
+ KPIRow,
89
+ LayeredButton,
90
+ LayoutToggle,
91
+ LightboxGallery,
92
+ LogoCloud,
93
+ Marquee,
94
+ NavBar,
95
+ NotificationBanner,
96
+ PageHeader,
97
+ PageHeaderBanner,
98
+ PricingTable,
99
+ ProcessSteps,
100
+ ScrollReveal,
101
+ SectionGlow,
102
+ SectionIntro,
103
+ SectionLabel,
104
+ SidebarNavigation,
105
+ SocialProof,
106
+ StatCard,
107
+ StatsSection,
108
+ SubTabs,
109
+ TechCarousel,
110
+ TestimonialCarousel,
111
+ TestimonialsCarousel,
112
+ TestimonialsSection,
113
+ TextRotator,
114
+ Thumbnail,
115
+ UseCasesSection,
116
+ ValueStackSection,
117
+ WaveCanvas,
118
+ useActionRunner,
119
+ useLayoutPreference,
120
+ useOptimisticAction
121
+ };
@@ -0,0 +1,32 @@
1
+ interface UseUrlPanelParamOptions {
2
+ /**
3
+ * History behavior when opening/closing. Default "push" — matches wmm-tasks'
4
+ * task detail (each open is its own back-button stop, so Back closes the
5
+ * panel instead of leaving the page). Use "replace" if you don't want every
6
+ * open/close to add a history entry.
7
+ */
8
+ historyMode?: "push" | "replace";
9
+ /** Forwarded to the router call. Default false (don't scroll on open/close). */
10
+ scroll?: boolean;
11
+ }
12
+ /**
13
+ * Syncs a SlideOver/Sheet/Dialog's open state to a URL query param
14
+ * (`?<key>=<id>`) — the wmm-tasks pattern generalized: any list/board view can
15
+ * open a detail panel via a shareable, back-button-aware URL without a
16
+ * separate route. Pairs with `SlideOver`/`useRecordNav` from
17
+ * `@web-my-money/primitives/slide-over`.
18
+ *
19
+ * const panel = useUrlPanelParam("t");
20
+ * <SlideOver open={panel.isOpen} onOpenChange={(o) => !o && panel.close()}>
21
+ * ...
22
+ * </SlideOver>
23
+ * <TaskCard onClick={() => panel.open(task.shortId)} />
24
+ */
25
+ declare function useUrlPanelParam(key: string, options?: UseUrlPanelParamOptions): {
26
+ value: string | null;
27
+ isOpen: boolean;
28
+ open: (id: string) => void;
29
+ close: () => void;
30
+ };
31
+
32
+ export { type UseUrlPanelParamOptions, useUrlPanelParam };
package/dist/next.d.ts ADDED
@@ -0,0 +1,32 @@
1
+ interface UseUrlPanelParamOptions {
2
+ /**
3
+ * History behavior when opening/closing. Default "push" — matches wmm-tasks'
4
+ * task detail (each open is its own back-button stop, so Back closes the
5
+ * panel instead of leaving the page). Use "replace" if you don't want every
6
+ * open/close to add a history entry.
7
+ */
8
+ historyMode?: "push" | "replace";
9
+ /** Forwarded to the router call. Default false (don't scroll on open/close). */
10
+ scroll?: boolean;
11
+ }
12
+ /**
13
+ * Syncs a SlideOver/Sheet/Dialog's open state to a URL query param
14
+ * (`?<key>=<id>`) — the wmm-tasks pattern generalized: any list/board view can
15
+ * open a detail panel via a shareable, back-button-aware URL without a
16
+ * separate route. Pairs with `SlideOver`/`useRecordNav` from
17
+ * `@web-my-money/primitives/slide-over`.
18
+ *
19
+ * const panel = useUrlPanelParam("t");
20
+ * <SlideOver open={panel.isOpen} onOpenChange={(o) => !o && panel.close()}>
21
+ * ...
22
+ * </SlideOver>
23
+ * <TaskCard onClick={() => panel.open(task.shortId)} />
24
+ */
25
+ declare function useUrlPanelParam(key: string, options?: UseUrlPanelParamOptions): {
26
+ value: string | null;
27
+ isOpen: boolean;
28
+ open: (id: string) => void;
29
+ close: () => void;
30
+ };
31
+
32
+ export { type UseUrlPanelParamOptions, useUrlPanelParam };
package/dist/next.js ADDED
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/next.ts
31
+ var next_exports = {};
32
+ __export(next_exports, {
33
+ useUrlPanelParam: () => useUrlPanelParam
34
+ });
35
+ module.exports = __toCommonJS(next_exports);
36
+
37
+ // src/use-url-panel-param.ts
38
+ var React = __toESM(require("react"));
39
+ var import_navigation = require("next/navigation");
40
+ function useUrlPanelParam(key, options = {}) {
41
+ const { historyMode = "push", scroll = false } = options;
42
+ const router = (0, import_navigation.useRouter)();
43
+ const pathname = (0, import_navigation.usePathname)();
44
+ const searchParams = (0, import_navigation.useSearchParams)();
45
+ const value = searchParams.get(key);
46
+ const open = React.useCallback(
47
+ (id) => {
48
+ const params = new URLSearchParams(searchParams.toString());
49
+ params.set(key, id);
50
+ router[historyMode](`${pathname}?${params.toString()}`, { scroll });
51
+ },
52
+ [key, pathname, searchParams, router, historyMode, scroll]
53
+ );
54
+ const close = React.useCallback(() => {
55
+ const params = new URLSearchParams(searchParams.toString());
56
+ params.delete(key);
57
+ const qs = params.toString();
58
+ router[historyMode](qs ? `${pathname}?${qs}` : pathname, { scroll });
59
+ }, [key, pathname, searchParams, router, historyMode, scroll]);
60
+ return { value, isOpen: value != null, open, close };
61
+ }
62
+ // Annotate the CommonJS export names for ESM import in node:
63
+ 0 && (module.exports = {
64
+ useUrlPanelParam
65
+ });
package/dist/next.mjs ADDED
@@ -0,0 +1,28 @@
1
+ // src/use-url-panel-param.ts
2
+ import * as React from "react";
3
+ import { usePathname, useRouter, useSearchParams } from "next/navigation";
4
+ function useUrlPanelParam(key, options = {}) {
5
+ const { historyMode = "push", scroll = false } = options;
6
+ const router = useRouter();
7
+ const pathname = usePathname();
8
+ const searchParams = useSearchParams();
9
+ const value = searchParams.get(key);
10
+ const open = React.useCallback(
11
+ (id) => {
12
+ const params = new URLSearchParams(searchParams.toString());
13
+ params.set(key, id);
14
+ router[historyMode](`${pathname}?${params.toString()}`, { scroll });
15
+ },
16
+ [key, pathname, searchParams, router, historyMode, scroll]
17
+ );
18
+ const close = React.useCallback(() => {
19
+ const params = new URLSearchParams(searchParams.toString());
20
+ params.delete(key);
21
+ const qs = params.toString();
22
+ router[historyMode](qs ? `${pathname}?${qs}` : pathname, { scroll });
23
+ }, [key, pathname, searchParams, router, historyMode, scroll]);
24
+ return { value, isOpen: value != null, open, close };
25
+ }
26
+ export {
27
+ useUrlPanelParam
28
+ };