@devfellowship/components 1.5.0 → 2.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/hooks.d.cts +4 -3
- package/dist/hooks.d.ts +4 -3
- package/dist/index.cjs +3690 -868
- package/dist/index.d.cts +1291 -194
- package/dist/index.d.ts +1291 -194
- package/dist/index.js +3788 -976
- package/dist/providers.d.cts +8 -4
- package/dist/providers.d.ts +8 -4
- package/dist/styles/fonts.css +35 -22
- package/dist/styles/theme-mappings.css +20 -12
- package/dist/styles/tokens.css +1218 -1
- package/dist/{use-auth-DdapDv2H.d.cts → use-auth-t8aJ9mx7.d.cts} +7 -2
- package/dist/{use-auth-DdapDv2H.d.ts → use-auth-t8aJ9mx7.d.ts} +7 -2
- package/package.json +8 -9
package/dist/providers.d.cts
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
export { A as AuthContextType, a as AuthProvider, b as AuthProviderProps, U as UserProfile, u as useAuth, c as useSession } from './use-auth-
|
|
2
|
-
import
|
|
3
|
-
import { ReactNode } from 'react';
|
|
1
|
+
export { A as AuthContextType, a as AuthProvider, b as AuthProviderProps, U as UserProfile, u as useAuth, c as useSession } from './use-auth-t8aJ9mx7.cjs';
|
|
2
|
+
import React__default, { ReactNode } from 'react';
|
|
4
3
|
import '@supabase/supabase-js';
|
|
5
4
|
|
|
5
|
+
/**
|
|
6
|
+
* FeatureFlagProvider — simple static feature flag system.
|
|
7
|
+
* Apps pass a flags map; consumers read flags via useFeatureFlag().
|
|
8
|
+
*/
|
|
9
|
+
|
|
6
10
|
type FeatureFlags = Record<string, boolean>;
|
|
7
11
|
interface FeatureFlagProviderProps {
|
|
8
12
|
children: ReactNode;
|
|
9
13
|
flags: FeatureFlags;
|
|
10
14
|
}
|
|
11
|
-
declare const FeatureFlagProvider: ({ children, flags, }: FeatureFlagProviderProps) =>
|
|
15
|
+
declare const FeatureFlagProvider: ({ children, flags, }: FeatureFlagProviderProps) => React__default.JSX.Element;
|
|
12
16
|
declare const useFeatureFlag: (flag: string) => boolean;
|
|
13
17
|
declare const useFeatureFlags: () => FeatureFlags;
|
|
14
18
|
|
package/dist/providers.d.ts
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
export { A as AuthContextType, a as AuthProvider, b as AuthProviderProps, U as UserProfile, u as useAuth, c as useSession } from './use-auth-
|
|
2
|
-
import
|
|
3
|
-
import { ReactNode } from 'react';
|
|
1
|
+
export { A as AuthContextType, a as AuthProvider, b as AuthProviderProps, U as UserProfile, u as useAuth, c as useSession } from './use-auth-t8aJ9mx7.js';
|
|
2
|
+
import React__default, { ReactNode } from 'react';
|
|
4
3
|
import '@supabase/supabase-js';
|
|
5
4
|
|
|
5
|
+
/**
|
|
6
|
+
* FeatureFlagProvider — simple static feature flag system.
|
|
7
|
+
* Apps pass a flags map; consumers read flags via useFeatureFlag().
|
|
8
|
+
*/
|
|
9
|
+
|
|
6
10
|
type FeatureFlags = Record<string, boolean>;
|
|
7
11
|
interface FeatureFlagProviderProps {
|
|
8
12
|
children: ReactNode;
|
|
9
13
|
flags: FeatureFlags;
|
|
10
14
|
}
|
|
11
|
-
declare const FeatureFlagProvider: ({ children, flags, }: FeatureFlagProviderProps) =>
|
|
15
|
+
declare const FeatureFlagProvider: ({ children, flags, }: FeatureFlagProviderProps) => React__default.JSX.Element;
|
|
12
16
|
declare const useFeatureFlag: (flag: string) => boolean;
|
|
13
17
|
declare const useFeatureFlags: () => FeatureFlags;
|
|
14
18
|
|
package/dist/styles/fonts.css
CHANGED
|
@@ -7,22 +7,35 @@
|
|
|
7
7
|
* - JetBrains Mono → mono (weights 400 / 500 / 600)
|
|
8
8
|
* - Georgia → editorial (system serif — no @font-face needed)
|
|
9
9
|
*
|
|
10
|
-
*
|
|
10
|
+
* -------------------------------------------------------------------------
|
|
11
11
|
* TODO(fonts): WOFF2 BINARIES NOT YET COMMITTED.
|
|
12
12
|
*
|
|
13
|
-
* These
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
13
|
+
* These font-face blocks describe the expected self-hosted families. The
|
|
14
|
+
* actual WOFF2 files have NOT been vendored yet (a separate follow-up will add
|
|
15
|
+
* them, ideally subset/latin, so we avoid committing large/unverified binaries
|
|
16
|
+
* in a tokens-only change).
|
|
17
17
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
18
|
+
* WARNING: do NOT set the font src back to a /fonts/<family>/...woff2 URL
|
|
19
|
+
* until those binaries actually ship in the build output. Doing so was the
|
|
20
|
+
* ROOT CAUSE of a runaway on storybook.devfellowship.com (Cloudflare Pages):
|
|
21
|
+
* every missing /fonts woff2 404 is served by the CF Pages SPA-fallback as
|
|
22
|
+
* index.html (HTTP 200, text/html). That HTML re-references addon chunks with
|
|
23
|
+
* RELATIVE paths, which the browser resolves against the failing /fonts/inter
|
|
24
|
+
* base, giving another 404, another HTML fallback, an ever-deeper compounding
|
|
25
|
+
* path, and an INFINITE fetch loop (~1000 req/s, pegged CPU, multi-GB memory).
|
|
26
|
+
* The _redirects guard shipped alongside this file (public/_redirects) forces
|
|
27
|
+
* such misses to a real 404 as a second line of defense.
|
|
23
28
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
29
|
+
* UNTIL the binaries land, we use local()-only sources: they resolve against
|
|
30
|
+
* fonts already installed on the machine and emit ZERO network requests, so
|
|
31
|
+
* there is no 404 to amplify. theme.css keeps the Google Fonts import as the
|
|
32
|
+
* real working webfont source, so type rendering is unaffected. Once the WOFF2
|
|
33
|
+
* files are vendored under packages/ui/src/styles/fonts/ (and copied into the
|
|
34
|
+
* build output), swap each src back to a url(...) woff2 source and drop the
|
|
35
|
+
* Google Fonts import from theme.css.
|
|
36
|
+
*
|
|
37
|
+
* Follow-up: vendor subset WOFF2 + add tsup copy step + build preload.
|
|
38
|
+
* -------------------------------------------------------------------------
|
|
26
39
|
*/
|
|
27
40
|
|
|
28
41
|
/* ─── Barlow Condensed (display) ─────────────────────────────────────────── */
|
|
@@ -31,21 +44,21 @@
|
|
|
31
44
|
font-style: normal;
|
|
32
45
|
font-weight: 500;
|
|
33
46
|
font-display: swap;
|
|
34
|
-
src:
|
|
47
|
+
src: local('Barlow Condensed Medium'), local('BarlowCondensed-Medium');
|
|
35
48
|
}
|
|
36
49
|
@font-face {
|
|
37
50
|
font-family: 'Barlow Condensed';
|
|
38
51
|
font-style: normal;
|
|
39
52
|
font-weight: 600;
|
|
40
53
|
font-display: swap;
|
|
41
|
-
src:
|
|
54
|
+
src: local('Barlow Condensed SemiBold'), local('BarlowCondensed-SemiBold');
|
|
42
55
|
}
|
|
43
56
|
@font-face {
|
|
44
57
|
font-family: 'Barlow Condensed';
|
|
45
58
|
font-style: normal;
|
|
46
59
|
font-weight: 700;
|
|
47
60
|
font-display: swap;
|
|
48
|
-
src:
|
|
61
|
+
src: local('Barlow Condensed Bold'), local('BarlowCondensed-Bold');
|
|
49
62
|
}
|
|
50
63
|
|
|
51
64
|
/* ─── Inter (body) ───────────────────────────────────────────────────────── */
|
|
@@ -54,28 +67,28 @@
|
|
|
54
67
|
font-style: normal;
|
|
55
68
|
font-weight: 400;
|
|
56
69
|
font-display: swap;
|
|
57
|
-
src:
|
|
70
|
+
src: local('Inter'), local('Inter-Regular');
|
|
58
71
|
}
|
|
59
72
|
@font-face {
|
|
60
73
|
font-family: 'Inter';
|
|
61
74
|
font-style: normal;
|
|
62
75
|
font-weight: 500;
|
|
63
76
|
font-display: swap;
|
|
64
|
-
src:
|
|
77
|
+
src: local('Inter Medium'), local('Inter-Medium');
|
|
65
78
|
}
|
|
66
79
|
@font-face {
|
|
67
80
|
font-family: 'Inter';
|
|
68
81
|
font-style: normal;
|
|
69
82
|
font-weight: 600;
|
|
70
83
|
font-display: swap;
|
|
71
|
-
src:
|
|
84
|
+
src: local('Inter SemiBold'), local('Inter-SemiBold');
|
|
72
85
|
}
|
|
73
86
|
@font-face {
|
|
74
87
|
font-family: 'Inter';
|
|
75
88
|
font-style: normal;
|
|
76
89
|
font-weight: 700;
|
|
77
90
|
font-display: swap;
|
|
78
|
-
src:
|
|
91
|
+
src: local('Inter Bold'), local('Inter-Bold');
|
|
79
92
|
}
|
|
80
93
|
|
|
81
94
|
/* ─── JetBrains Mono (mono) ──────────────────────────────────────────────── */
|
|
@@ -84,19 +97,19 @@
|
|
|
84
97
|
font-style: normal;
|
|
85
98
|
font-weight: 400;
|
|
86
99
|
font-display: swap;
|
|
87
|
-
src:
|
|
100
|
+
src: local('JetBrains Mono'), local('JetBrainsMono-Regular');
|
|
88
101
|
}
|
|
89
102
|
@font-face {
|
|
90
103
|
font-family: 'JetBrains Mono';
|
|
91
104
|
font-style: normal;
|
|
92
105
|
font-weight: 500;
|
|
93
106
|
font-display: swap;
|
|
94
|
-
src:
|
|
107
|
+
src: local('JetBrains Mono Medium'), local('JetBrainsMono-Medium');
|
|
95
108
|
}
|
|
96
109
|
@font-face {
|
|
97
110
|
font-family: 'JetBrains Mono';
|
|
98
111
|
font-style: normal;
|
|
99
112
|
font-weight: 600;
|
|
100
113
|
font-display: swap;
|
|
101
|
-
src:
|
|
114
|
+
src: local('JetBrains Mono SemiBold'), local('JetBrainsMono-SemiBold');
|
|
102
115
|
}
|
|
@@ -70,18 +70,26 @@
|
|
|
70
70
|
--color-chart-4: var(--chart-4);
|
|
71
71
|
--color-chart-5: var(--chart-5);
|
|
72
72
|
|
|
73
|
-
/* ─── Border radius ──────────────────────────────────────────────────────
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
/*
|
|
81
|
-
--
|
|
82
|
-
--
|
|
83
|
-
--
|
|
84
|
-
|
|
73
|
+
/* ─── Border radius ──────────────────────────────────────────────────────
|
|
74
|
+
* Map Tailwind's radius scale onto the DS --p-radius-* primitives. These
|
|
75
|
+
* MUST reference a differently-named source (the --p-* primitives) — the
|
|
76
|
+
* old `--radius-md: var(--radius-md)` was self-referential, so it resolved
|
|
77
|
+
* to nothing and EVERY `rounded-{sm,md,lg,xl,full}` utility computed to 0px
|
|
78
|
+
* (Avatar/Switch/Slider/RadioGroup rendered square). */
|
|
79
|
+
--radius-sm: var(--p-radius-sm); /* 4px */
|
|
80
|
+
--radius-md: var(--p-radius-md); /* 6px */
|
|
81
|
+
--radius-lg: var(--p-radius-lg); /* 10px */
|
|
82
|
+
--radius-xl: var(--p-radius-xl); /* 14px */
|
|
83
|
+
--radius-full: var(--p-radius-pill); /* 999px — full circle / pill */
|
|
84
|
+
|
|
85
|
+
/* ─── Fonts ──────────────────────────────────────────────────────────────
|
|
86
|
+
* Same rule as radius above: map onto the differently-named --p-font-*
|
|
87
|
+
* primitives. The old `--font-sans: var(--font-sans)` was self-referential,
|
|
88
|
+
* so it resolved to nothing (mirrors tokens.css §"Font shortcuts"). */
|
|
89
|
+
--font-sans: var(--p-font-sans);
|
|
90
|
+
--font-condensed: var(--p-font-display);
|
|
91
|
+
--font-mono: var(--p-font-mono);
|
|
92
|
+
--font-editorial: var(--p-font-editorial);
|
|
85
93
|
|
|
86
94
|
/* ─── Editorial / paper (light, NOT default — see tokens.css §5.8) ─────── */
|
|
87
95
|
--color-paper: var(--paper);
|