@insforge/react 0.6.9 → 0.6.10

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.d.cts CHANGED
@@ -109,4 +109,116 @@ declare function getProviderConfig(provider: OAuthProvider): OAuthProviderConfig
109
109
  */
110
110
  declare function getAllProviderConfigs(): Partial<Record<OAuthProvider, OAuthProviderConfig>>;
111
111
 
112
- export { type InitialAuthState, InsforgeProvider, InsforgeProviderCore, type InsforgeProviderProps, OAUTH_PROVIDER_CONFIG, OAuthProviderConfig, getAllProviderConfigs, getProviderConfig, useInsforge };
112
+ interface StyleProviderProps {
113
+ children: ReactNode;
114
+ /** Optional nonce value for CSP (Content Security Policy) */
115
+ nonce?: string;
116
+ }
117
+ /**
118
+ * Provides Emotion CSS-in-JS styling context for Insforge components.
119
+ *
120
+ * This ensures styles are injected dynamically at runtime, preventing FOUC
121
+ * in SSR environments like Next.js.
122
+ *
123
+ * @internal
124
+ */
125
+ declare function StyleProvider({ children, nonce }: StyleProviderProps): react_jsx_runtime.JSX.Element;
126
+
127
+ /**
128
+ * Insforge Design System Theme
129
+ *
130
+ * Complete design tokens for all components
131
+ */
132
+ declare const theme: {
133
+ readonly colors: {
134
+ readonly primary: "#000000";
135
+ readonly primaryHover: "#1f1f1f";
136
+ readonly text: "#000000";
137
+ readonly textSecondary: "#828282";
138
+ readonly textMuted: "#a3a3a3";
139
+ readonly textGray: "#525252";
140
+ readonly border: "#d4d4d4";
141
+ readonly borderGray: "#e4e4e7";
142
+ readonly borderHover: "#9ca3af";
143
+ readonly borderFocus: "#000000";
144
+ readonly bgWhite: "#ffffff";
145
+ readonly bgLight: "#fafafa";
146
+ readonly bgGray: "#f5f5f5";
147
+ readonly bgHover: "#f9fafb";
148
+ readonly error: "#dc2626";
149
+ readonly errorBg: "#fee2e2";
150
+ readonly success: "#16a34a";
151
+ readonly successBg: "#d1fae5";
152
+ readonly successDark: "#059669";
153
+ readonly black: "#000000";
154
+ readonly zinc900: "#09090b";
155
+ };
156
+ readonly spacing: {
157
+ readonly 1: "0.25rem";
158
+ readonly 2: "0.5rem";
159
+ readonly 3: "0.75rem";
160
+ readonly 4: "1rem";
161
+ readonly 6: "1.5rem";
162
+ readonly 8: "2rem";
163
+ readonly 10: "2.5rem";
164
+ };
165
+ readonly radius: {
166
+ readonly xs: "0.125rem";
167
+ readonly sm: "0.25rem";
168
+ readonly md: "0.375rem";
169
+ readonly lg: "0.5rem";
170
+ readonly xl: "0.75rem";
171
+ readonly full: "9999px";
172
+ };
173
+ readonly fontSize: {
174
+ readonly xs: "0.75rem";
175
+ readonly sm: "0.875rem";
176
+ readonly base: "1rem";
177
+ readonly lg: "1.125rem";
178
+ readonly xl: "1.25rem";
179
+ readonly '2xl': "1.5rem";
180
+ };
181
+ readonly lineHeight: {
182
+ readonly tight: "1rem";
183
+ readonly normal: "1.25rem";
184
+ readonly relaxed: "1.5rem";
185
+ readonly loose: "2rem";
186
+ };
187
+ readonly fontFamily: {
188
+ readonly base: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif";
189
+ readonly manrope: "'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif";
190
+ };
191
+ readonly fontWeight: {
192
+ readonly normal: 400;
193
+ readonly medium: 500;
194
+ readonly semibold: 600;
195
+ };
196
+ readonly shadow: {
197
+ readonly sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)";
198
+ readonly md: "0 1px 2px 0 rgba(0, 0, 0, 0.1)";
199
+ readonly lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)";
200
+ };
201
+ readonly transition: {
202
+ readonly fast: "150ms cubic-bezier(0.4, 0, 0.2, 1)";
203
+ readonly base: "200ms cubic-bezier(0.4, 0, 0.2, 1)";
204
+ };
205
+ readonly sizes: {
206
+ readonly input: {
207
+ readonly height: "2.5rem";
208
+ };
209
+ readonly button: {
210
+ readonly height: "2.5rem";
211
+ readonly heightOAuth: "2.25rem";
212
+ };
213
+ readonly avatar: "2rem";
214
+ readonly icon: "1.25rem";
215
+ readonly iconSm: "1.125rem";
216
+ readonly iconLg: "1.5rem";
217
+ readonly verifyCode: "3rem";
218
+ readonly verifyIcon: "4rem";
219
+ readonly verifyIconInner: "2rem";
220
+ };
221
+ };
222
+ type Theme = typeof theme;
223
+
224
+ export { type InitialAuthState, InsforgeProvider, InsforgeProviderCore, type InsforgeProviderProps, OAUTH_PROVIDER_CONFIG, OAuthProviderConfig, StyleProvider, type Theme, getAllProviderConfigs, getProviderConfig, theme, useInsforge };
package/dist/index.d.ts CHANGED
@@ -109,4 +109,116 @@ declare function getProviderConfig(provider: OAuthProvider): OAuthProviderConfig
109
109
  */
110
110
  declare function getAllProviderConfigs(): Partial<Record<OAuthProvider, OAuthProviderConfig>>;
111
111
 
112
- export { type InitialAuthState, InsforgeProvider, InsforgeProviderCore, type InsforgeProviderProps, OAUTH_PROVIDER_CONFIG, OAuthProviderConfig, getAllProviderConfigs, getProviderConfig, useInsforge };
112
+ interface StyleProviderProps {
113
+ children: ReactNode;
114
+ /** Optional nonce value for CSP (Content Security Policy) */
115
+ nonce?: string;
116
+ }
117
+ /**
118
+ * Provides Emotion CSS-in-JS styling context for Insforge components.
119
+ *
120
+ * This ensures styles are injected dynamically at runtime, preventing FOUC
121
+ * in SSR environments like Next.js.
122
+ *
123
+ * @internal
124
+ */
125
+ declare function StyleProvider({ children, nonce }: StyleProviderProps): react_jsx_runtime.JSX.Element;
126
+
127
+ /**
128
+ * Insforge Design System Theme
129
+ *
130
+ * Complete design tokens for all components
131
+ */
132
+ declare const theme: {
133
+ readonly colors: {
134
+ readonly primary: "#000000";
135
+ readonly primaryHover: "#1f1f1f";
136
+ readonly text: "#000000";
137
+ readonly textSecondary: "#828282";
138
+ readonly textMuted: "#a3a3a3";
139
+ readonly textGray: "#525252";
140
+ readonly border: "#d4d4d4";
141
+ readonly borderGray: "#e4e4e7";
142
+ readonly borderHover: "#9ca3af";
143
+ readonly borderFocus: "#000000";
144
+ readonly bgWhite: "#ffffff";
145
+ readonly bgLight: "#fafafa";
146
+ readonly bgGray: "#f5f5f5";
147
+ readonly bgHover: "#f9fafb";
148
+ readonly error: "#dc2626";
149
+ readonly errorBg: "#fee2e2";
150
+ readonly success: "#16a34a";
151
+ readonly successBg: "#d1fae5";
152
+ readonly successDark: "#059669";
153
+ readonly black: "#000000";
154
+ readonly zinc900: "#09090b";
155
+ };
156
+ readonly spacing: {
157
+ readonly 1: "0.25rem";
158
+ readonly 2: "0.5rem";
159
+ readonly 3: "0.75rem";
160
+ readonly 4: "1rem";
161
+ readonly 6: "1.5rem";
162
+ readonly 8: "2rem";
163
+ readonly 10: "2.5rem";
164
+ };
165
+ readonly radius: {
166
+ readonly xs: "0.125rem";
167
+ readonly sm: "0.25rem";
168
+ readonly md: "0.375rem";
169
+ readonly lg: "0.5rem";
170
+ readonly xl: "0.75rem";
171
+ readonly full: "9999px";
172
+ };
173
+ readonly fontSize: {
174
+ readonly xs: "0.75rem";
175
+ readonly sm: "0.875rem";
176
+ readonly base: "1rem";
177
+ readonly lg: "1.125rem";
178
+ readonly xl: "1.25rem";
179
+ readonly '2xl': "1.5rem";
180
+ };
181
+ readonly lineHeight: {
182
+ readonly tight: "1rem";
183
+ readonly normal: "1.25rem";
184
+ readonly relaxed: "1.5rem";
185
+ readonly loose: "2rem";
186
+ };
187
+ readonly fontFamily: {
188
+ readonly base: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif";
189
+ readonly manrope: "'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif";
190
+ };
191
+ readonly fontWeight: {
192
+ readonly normal: 400;
193
+ readonly medium: 500;
194
+ readonly semibold: 600;
195
+ };
196
+ readonly shadow: {
197
+ readonly sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)";
198
+ readonly md: "0 1px 2px 0 rgba(0, 0, 0, 0.1)";
199
+ readonly lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)";
200
+ };
201
+ readonly transition: {
202
+ readonly fast: "150ms cubic-bezier(0.4, 0, 0.2, 1)";
203
+ readonly base: "200ms cubic-bezier(0.4, 0, 0.2, 1)";
204
+ };
205
+ readonly sizes: {
206
+ readonly input: {
207
+ readonly height: "2.5rem";
208
+ };
209
+ readonly button: {
210
+ readonly height: "2.5rem";
211
+ readonly heightOAuth: "2.25rem";
212
+ };
213
+ readonly avatar: "2rem";
214
+ readonly icon: "1.25rem";
215
+ readonly iconSm: "1.125rem";
216
+ readonly iconLg: "1.5rem";
217
+ readonly verifyCode: "3rem";
218
+ readonly verifyIcon: "4rem";
219
+ readonly verifyIconInner: "2rem";
220
+ };
221
+ };
222
+ type Theme = typeof theme;
223
+
224
+ export { type InitialAuthState, InsforgeProvider, InsforgeProviderCore, type InsforgeProviderProps, OAUTH_PROVIDER_CONFIG, OAuthProviderConfig, StyleProvider, type Theme, getAllProviderConfigs, getProviderConfig, theme, useInsforge };