@ultrst-armada/floks 1.13.4 → 1.13.8
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/.krusbl-release-attestation.json +3 -3
- package/package.json +5 -5
- package/packages/canvas-ui/package.json +2 -2
- package/packages/contracts/dist/index.d.ts +21 -1
- package/packages/contracts/dist/index.js +7 -0
- package/packages/ui/dist/{chunk-RBYTWUD4.js → chunk-X6ZJS2VY.js} +141 -36
- package/packages/ui/dist/components/auth/index.d.ts +14 -1
- package/packages/ui/dist/components/auth/index.js +13 -3
- package/packages/ui/dist/index.d.ts +2 -1
- package/packages/ui/dist/index.js +12 -2
- package/packages/ui/package.json +4 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": 1,
|
|
3
3
|
"packageName": "@ultrst-armada/floks",
|
|
4
|
-
"version": "1.13.
|
|
5
|
-
"sourceCommit": "
|
|
4
|
+
"version": "1.13.8",
|
|
5
|
+
"sourceCommit": "03fdb292d608787daa6787e049e34be772118b58",
|
|
6
6
|
"releaseWorkflow": "npm Release",
|
|
7
|
-
"workflowRunId": "
|
|
7
|
+
"workflowRunId": "41790810478"
|
|
8
8
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultrst-armada/floks",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -74,12 +74,12 @@
|
|
|
74
74
|
"clean": "pnpm -r run clean"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@ultrst-armada/frnlts": "^0.5.
|
|
77
|
+
"@ultrst-armada/frnlts": "^0.5.4",
|
|
78
78
|
"@xyflow/react": "^12.8.6",
|
|
79
79
|
"d3-force": "^3.0.0",
|
|
80
80
|
"zod": "^3.24.1",
|
|
81
81
|
"zustand": "^5.0.3",
|
|
82
|
-
"@dinilmusick/gutts": "^1.
|
|
82
|
+
"@dinilmusick/gutts": "^1.4.0"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
85
|
"@ultrst-armada/kloks": "^1.17.0",
|
|
@@ -93,8 +93,8 @@
|
|
|
93
93
|
"@types/node": "^22.0.0",
|
|
94
94
|
"@types/react": "^19.0.0",
|
|
95
95
|
"@types/react-dom": "^19.0.0",
|
|
96
|
-
"@ultrst-armada/kloks": "^1.24.
|
|
97
|
-
"@ultrst-armada/frnlts": "^0.5.
|
|
96
|
+
"@ultrst-armada/kloks": "^1.24.5",
|
|
97
|
+
"@ultrst-armada/frnlts": "^0.5.4",
|
|
98
98
|
"happy-dom": "^21.0.3",
|
|
99
99
|
"lucide-react": "^1.55.0",
|
|
100
100
|
"react": "^19.0.1",
|
|
@@ -75,8 +75,8 @@
|
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@floks/ui": "workspace:*",
|
|
78
|
-
"@ultrst-armada/frnlts": "^0.5.
|
|
79
|
-
"@ultrst-armada/kloks": "^1.24.
|
|
78
|
+
"@ultrst-armada/frnlts": "^0.5.4",
|
|
79
|
+
"@ultrst-armada/kloks": "^1.24.5"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
82
82
|
"@dnd-kit/core": "^6.0.0",
|
|
@@ -521,4 +521,24 @@ interface FrnlThemeDefinition {
|
|
|
521
521
|
/** Convert a validated Floks ThemePack to FrnlTS component/state visual parameters. */
|
|
522
522
|
declare function themePackToFrnlTheme(themePack: ThemePack): FrnlThemeDefinition;
|
|
523
523
|
|
|
524
|
-
|
|
524
|
+
type FloksPromotionKind = "component" | "theme" | "theme-pack";
|
|
525
|
+
interface FloksPromotionRequest {
|
|
526
|
+
assetId: string;
|
|
527
|
+
kind: FloksPromotionKind;
|
|
528
|
+
sourceRepository: string;
|
|
529
|
+
sourceCommit: string;
|
|
530
|
+
verificationId: string;
|
|
531
|
+
files: readonly string[];
|
|
532
|
+
}
|
|
533
|
+
interface FloksPromotionResult {
|
|
534
|
+
assetId: string;
|
|
535
|
+
status: "accepted" | "rejected";
|
|
536
|
+
canonicalReference?: string;
|
|
537
|
+
reason?: string;
|
|
538
|
+
}
|
|
539
|
+
declare const floksPromotionContract: {
|
|
540
|
+
readonly id: "floks.krusbl-promotion";
|
|
541
|
+
readonly requiredEvidence: readonly ["sourceRepository", "sourceCommit", "verificationId"];
|
|
542
|
+
};
|
|
543
|
+
|
|
544
|
+
export { type ComponentThemeContract, ComponentThemeContractSchema, type ContractDiffResult, FLOKS_CANONICAL_CONTRACT, FLOKS_COMPONENT_REGISTRY, FLOKS_PUBLIC_SYMBOLS, type FloksContractSnapshot, FloksContractSnapshotSchema, type FloksPromotionKind, type FloksPromotionRequest, type FloksPromotionResult, type FrnlThemeDefinition, type FrnlThemeState, type ThemePack, ThemePackSchema, type ThemePackSlotBinding, ThemePackSlotBindingSchema, type ThemePackStateMapping, ThemePackStateMappingSchema, type ThemeTarget, ThemeTargetSchema, type ThemeValidationResult, type VisualParameter, VisualParameterSchema, type VisualSlot, VisualSlotSchema, type VisualState, VisualStateSchema, createFloksSnapshot, diffContractSnapshots, floksPromotionContract, getComponentContract, listComponentContracts, loadThemePack, themePackToFrnlTheme, validateThemePackAgainstContract };
|
|
@@ -490,6 +490,12 @@ function themePackToFrnlTheme(themePack) {
|
|
|
490
490
|
baseVisualParameters: { ...themePack.parameters }
|
|
491
491
|
};
|
|
492
492
|
}
|
|
493
|
+
|
|
494
|
+
// src/krusbl-promotion.ts
|
|
495
|
+
var floksPromotionContract = {
|
|
496
|
+
id: "floks.krusbl-promotion",
|
|
497
|
+
requiredEvidence: ["sourceRepository", "sourceCommit", "verificationId"]
|
|
498
|
+
};
|
|
493
499
|
export {
|
|
494
500
|
ComponentThemeContractSchema,
|
|
495
501
|
FLOKS_CANONICAL_CONTRACT,
|
|
@@ -505,6 +511,7 @@ export {
|
|
|
505
511
|
VisualStateSchema,
|
|
506
512
|
createFloksSnapshot,
|
|
507
513
|
diffContractSnapshots,
|
|
514
|
+
floksPromotionContract,
|
|
508
515
|
getComponentContract,
|
|
509
516
|
listComponentContracts,
|
|
510
517
|
loadThemePack,
|
|
@@ -17,28 +17,62 @@ import React, { useId, useMemo, useState } from "react";
|
|
|
17
17
|
import { LogIn, UserPlus, Eye, EyeOff, Shield, ArrowRight, AlertCircle } from "lucide-react";
|
|
18
18
|
|
|
19
19
|
// src/components/auth/GoogleSignInButton.tsx
|
|
20
|
-
import { jsx } from "react/jsx-runtime";
|
|
20
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
21
|
+
var GoogleIcon = ({ size = 14, className = "" }) => /* @__PURE__ */ jsxs("svg", { width: size, height: size, viewBox: "0 0 24 24", className, "aria-hidden": "true", style: { flexShrink: 0 }, children: [
|
|
22
|
+
/* @__PURE__ */ jsx(
|
|
23
|
+
"path",
|
|
24
|
+
{
|
|
25
|
+
fill: "#4285F4",
|
|
26
|
+
d: "M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
/* @__PURE__ */ jsx(
|
|
30
|
+
"path",
|
|
31
|
+
{
|
|
32
|
+
fill: "#34A853",
|
|
33
|
+
d: "M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
/* @__PURE__ */ jsx(
|
|
37
|
+
"path",
|
|
38
|
+
{
|
|
39
|
+
fill: "#FBBC05",
|
|
40
|
+
d: "M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.06H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.94l2.85-2.22.81-.63z"
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ jsx(
|
|
44
|
+
"path",
|
|
45
|
+
{
|
|
46
|
+
fill: "#EA4335",
|
|
47
|
+
d: "M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.06l3.66 2.84c.87-2.6 3.3-4.52 6.16-4.52z"
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
] });
|
|
21
51
|
var GoogleSignInButton = ({
|
|
22
52
|
onSignIn,
|
|
23
53
|
disabled = false,
|
|
24
54
|
loading = false,
|
|
25
|
-
label = "CONTINUE WITH GOOGLE"
|
|
26
|
-
|
|
55
|
+
label = "CONTINUE WITH GOOGLE",
|
|
56
|
+
className = ""
|
|
57
|
+
}) => /* @__PURE__ */ jsxs(
|
|
27
58
|
"button",
|
|
28
59
|
{
|
|
29
60
|
type: "button",
|
|
30
61
|
onClick: () => void onSignIn(),
|
|
31
62
|
disabled: disabled || loading,
|
|
32
|
-
className:
|
|
63
|
+
className: `w-full py-2.5 text-[10px] font-black border-2 border-[var(--skipo-border-color)] bg-[var(--skipo-bg)] hover:bg-[var(--skipo-surface-hover,var(--skipo-surface))] text-[var(--skipo-text)] flex items-center justify-center gap-2.5 transition-colors cursor-pointer select-none disabled:opacity-50 ${className}`,
|
|
33
64
|
"aria-label": label,
|
|
34
|
-
children:
|
|
65
|
+
children: [
|
|
66
|
+
loading ? /* @__PURE__ */ jsx("span", { className: "inline-block w-3.5 h-3.5 border-2 border-[var(--skipo-accent)] border-t-transparent rounded-full animate-spin" }) : /* @__PURE__ */ jsx(GoogleIcon, { size: 14 }),
|
|
67
|
+
/* @__PURE__ */ jsx("span", { children: loading ? "CONNECTING GOOGLE..." : label })
|
|
68
|
+
]
|
|
35
69
|
}
|
|
36
70
|
);
|
|
37
71
|
|
|
38
72
|
// src/components/auth/AuthPage.tsx
|
|
39
73
|
import { defineFrnlComponent } from "@ultrst-armada/frnlts";
|
|
40
74
|
import { useFrnlComponent } from "@ultrst-armada/frnlts/react";
|
|
41
|
-
import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
75
|
+
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
42
76
|
var AUTH_PAGE_REQUIRED_SERVICES = ["auth"];
|
|
43
77
|
var authPageDefinition = defineFrnlComponent({
|
|
44
78
|
name: "AuthPage",
|
|
@@ -57,6 +91,7 @@ var AuthPage = ({
|
|
|
57
91
|
onRegister,
|
|
58
92
|
onSuccess,
|
|
59
93
|
onGoogleSignIn,
|
|
94
|
+
enableGoogleSignIn = true,
|
|
60
95
|
onSwitchToAdmin
|
|
61
96
|
}) => {
|
|
62
97
|
const store = useFloksFrnlStore();
|
|
@@ -107,7 +142,7 @@ var AuthPage = ({
|
|
|
107
142
|
setLoading(false);
|
|
108
143
|
}
|
|
109
144
|
};
|
|
110
|
-
return /* @__PURE__ */
|
|
145
|
+
return /* @__PURE__ */ jsxs2(
|
|
111
146
|
"div",
|
|
112
147
|
{
|
|
113
148
|
id: componentId,
|
|
@@ -116,8 +151,8 @@ var AuthPage = ({
|
|
|
116
151
|
className: "min-h-screen h-screen w-screen bg-[var(--skipo-bg)] text-[var(--skipo-text)] font-mono flex flex-col justify-between overflow-hidden",
|
|
117
152
|
style: { minHeight: "100vh", height: "100vh", width: "100vw" },
|
|
118
153
|
children: [
|
|
119
|
-
/* @__PURE__ */
|
|
120
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ jsxs2("header", { className: "border-b-2 border-[var(--skipo-border-color)] bg-[var(--skipo-surface)] px-6 py-3.5 flex items-center justify-between shrink-0", children: [
|
|
155
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-3", children: [
|
|
121
156
|
appIcon && typeof appIcon !== "string" ? /* @__PURE__ */ jsx2("div", { className: "w-8 h-8 shrink-0 flex items-center justify-center", children: appIcon }) : !iconError ? /* @__PURE__ */ jsx2("div", { className: "w-8 h-8 shrink-0 flex items-center justify-center overflow-hidden rounded bg-[var(--skipo-surface)] border border-[var(--skipo-border-color)]", children: /* @__PURE__ */ jsx2(
|
|
122
157
|
"img",
|
|
123
158
|
{
|
|
@@ -127,27 +162,27 @@ var AuthPage = ({
|
|
|
127
162
|
onError: () => setIconError(true)
|
|
128
163
|
}
|
|
129
164
|
) }) : /* @__PURE__ */ jsx2("div", { className: "w-8 h-8 shrink-0 bg-[var(--skipo-accent)] text-black font-black flex items-center justify-center text-xs rounded select-none", children: "\u25B2" }),
|
|
130
|
-
/* @__PURE__ */
|
|
165
|
+
/* @__PURE__ */ jsxs2("div", { children: [
|
|
131
166
|
/* @__PURE__ */ jsx2("span", { className: "text-sm font-black uppercase tracking-wider", children: appName }),
|
|
132
167
|
/* @__PURE__ */ jsx2("span", { className: "ml-2 text-[10px] text-[var(--skipo-text-muted)] tracking-tight", children: appSubtitle })
|
|
133
168
|
] })
|
|
134
169
|
] }),
|
|
135
|
-
onSwitchToAdmin && /* @__PURE__ */
|
|
170
|
+
onSwitchToAdmin && /* @__PURE__ */ jsxs2("button", { type: "button", onClick: onSwitchToAdmin, className: "px-3 py-1.5 text-[10px] font-black border-2 border-[var(--skipo-accent)] text-[var(--skipo-accent)] flex items-center gap-1.5", children: [
|
|
136
171
|
/* @__PURE__ */ jsx2(Shield, { size: 13 }),
|
|
137
172
|
" ADMIN ",
|
|
138
173
|
/* @__PURE__ */ jsx2(ArrowRight, { size: 13 })
|
|
139
174
|
] })
|
|
140
175
|
] }),
|
|
141
|
-
/* @__PURE__ */ jsx2("main", { className: "flex-1 flex items-center justify-center p-4 overflow-auto", children: /* @__PURE__ */
|
|
142
|
-
/* @__PURE__ */
|
|
143
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ jsx2("main", { className: "flex-1 flex items-center justify-center p-4 overflow-auto", children: /* @__PURE__ */ jsxs2("div", { className: "w-full max-w-md border-2 border-[var(--skipo-border-color)] bg-[var(--skipo-surface)] shadow-[6px_6px_0px_var(--skipo-border-color)] p-6 my-auto", children: [
|
|
177
|
+
/* @__PURE__ */ jsxs2("div", { className: "grid grid-cols-2 gap-2 mb-5", children: [
|
|
178
|
+
/* @__PURE__ */ jsxs2("button", { type: "button", onClick: () => {
|
|
144
179
|
setMode("login");
|
|
145
180
|
setError(null);
|
|
146
181
|
}, className: `py-2 text-[10px] font-black border ${mode === "login" ? "bg-[var(--skipo-accent)] text-black" : "bg-[var(--skipo-bg)]"}`, children: [
|
|
147
182
|
/* @__PURE__ */ jsx2(LogIn, { size: 13, className: "inline mr-1" }),
|
|
148
183
|
" SIGN IN"
|
|
149
184
|
] }),
|
|
150
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ jsxs2("button", { type: "button", onClick: () => {
|
|
151
186
|
setMode("register");
|
|
152
187
|
setError(null);
|
|
153
188
|
}, className: `py-2 text-[10px] font-black border ${mode === "register" ? "bg-[var(--skipo-accent)] text-black" : "bg-[var(--skipo-bg)]"}`, children: [
|
|
@@ -155,21 +190,21 @@ var AuthPage = ({
|
|
|
155
190
|
" CREATE ACCOUNT"
|
|
156
191
|
] })
|
|
157
192
|
] }),
|
|
158
|
-
error && /* @__PURE__ */
|
|
193
|
+
error && /* @__PURE__ */ jsxs2("div", { className: "mb-4 p-3 border-2 border-red-500/80 bg-red-950/30 text-red-300 text-xs flex items-center gap-2", children: [
|
|
159
194
|
/* @__PURE__ */ jsx2(AlertCircle, { size: 14 }),
|
|
160
195
|
error
|
|
161
196
|
] }),
|
|
162
|
-
/* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ jsxs2("form", { onSubmit: submit, className: "space-y-3", children: [
|
|
163
198
|
mode === "register" && React.createElement(frnlTextInput, { id: componentId + ".name", label: "Full Name", value: name, onChange: (e) => setName(e.target.value) }),
|
|
164
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ jsxs2("div", { children: [
|
|
165
200
|
React.createElement(frnlTextInput, { id: componentId + ".email", label: "Email Address", value: email, onChange: (e) => setEmail(e.target.value), type: "email", autoComplete: "username" }),
|
|
166
201
|
!emailValid && /* @__PURE__ */ jsx2("div", { className: "mt-1 text-[10px] text-red-400", children: "Enter a valid email address." })
|
|
167
202
|
] }),
|
|
168
203
|
/* @__PURE__ */ jsx2("div", { children: React.createElement(frnlTextInput, { id: componentId + ".password", label: "Password", value: password, onChange: (e) => setPassword(e.target.value), type: showPassword ? "text" : "password", autoComplete: mode === "login" ? "current-password" : "new-password", trailingIcon: /* @__PURE__ */ jsx2("button", { type: "button", "aria-label": "Toggle password visibility", onClick: () => setShowPassword((v) => !v), children: showPassword ? /* @__PURE__ */ jsx2(EyeOff, { size: 13 }) : /* @__PURE__ */ jsx2(Eye, { size: 13 }) }) }) }),
|
|
169
204
|
React.createElement(frnlButton, { type: "submit", disabled: loading, loading, variant: "accent", size: "lg", className: "w-full", icon: /* @__PURE__ */ jsx2(ArrowRight, { size: 13 }) }, mode === "login" ? "SIGN IN TO WORKSPACE" : "CREATE ACCOUNT")
|
|
170
205
|
] }),
|
|
171
|
-
onGoogleSignIn && /* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */
|
|
206
|
+
(onGoogleSignIn || enableGoogleSignIn) && /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
207
|
+
/* @__PURE__ */ jsxs2("div", { className: "my-4 flex items-center gap-2 text-[9px] text-[var(--skipo-text-muted)]", children: [
|
|
173
208
|
/* @__PURE__ */ jsx2("span", { className: "h-px flex-1 bg-[var(--skipo-border-color)]" }),
|
|
174
209
|
" OR ",
|
|
175
210
|
/* @__PURE__ */ jsx2("span", { className: "h-px flex-1 bg-[var(--skipo-border-color)]" })
|
|
@@ -177,11 +212,16 @@ var AuthPage = ({
|
|
|
177
212
|
/* @__PURE__ */ jsx2(
|
|
178
213
|
GoogleSignInButton,
|
|
179
214
|
{
|
|
215
|
+
label: mode === "register" ? "SIGN UP WITH GOOGLE" : "CONTINUE WITH GOOGLE",
|
|
180
216
|
onSignIn: async () => {
|
|
181
217
|
setGoogleLoading(true);
|
|
182
218
|
setError(null);
|
|
183
219
|
try {
|
|
184
|
-
|
|
220
|
+
let result;
|
|
221
|
+
if (!onGoogleSignIn) {
|
|
222
|
+
throw new Error("Canonical Luth Google sign-in handler is not configured.");
|
|
223
|
+
}
|
|
224
|
+
result = await onGoogleSignIn();
|
|
185
225
|
if (!result.success) throw new Error(result.error || "Google sign-in failed.");
|
|
186
226
|
onSuccess?.(result);
|
|
187
227
|
} catch (error2) {
|
|
@@ -205,17 +245,20 @@ var AuthPage = ({
|
|
|
205
245
|
// src/components/auth/LoginModal.tsx
|
|
206
246
|
import { useState as useState2 } from "react";
|
|
207
247
|
import { ArrowRight as ArrowRight2, ShieldCheck, AlertCircle as AlertCircle2 } from "lucide-react";
|
|
208
|
-
import { jsx as jsx3, jsxs as
|
|
248
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
209
249
|
var LoginModal = ({
|
|
210
250
|
appName = "Ecosystem App",
|
|
211
251
|
onSuccess,
|
|
212
|
-
defaultEmail = ""
|
|
252
|
+
defaultEmail = "",
|
|
253
|
+
onGoogleSignIn,
|
|
254
|
+
enableGoogleSignIn = true
|
|
213
255
|
}) => {
|
|
214
256
|
const [email, setEmail] = useState2(defaultEmail);
|
|
215
257
|
const [password, setPassword] = useState2("");
|
|
216
258
|
const [isRegister, setIsRegister] = useState2(false);
|
|
217
259
|
const [name, setName] = useState2("");
|
|
218
260
|
const [loading, setLoading] = useState2(false);
|
|
261
|
+
const [googleLoading, setGoogleLoading] = useState2(false);
|
|
219
262
|
const [error, setError] = useState2(null);
|
|
220
263
|
const handleSubmit = async (e) => {
|
|
221
264
|
e.preventDefault();
|
|
@@ -251,26 +294,26 @@ var LoginModal = ({
|
|
|
251
294
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-xs font-mono p-4",
|
|
252
295
|
onWheel: (e) => e.stopPropagation(),
|
|
253
296
|
onPointerDown: (e) => e.stopPropagation(),
|
|
254
|
-
children: /* @__PURE__ */
|
|
255
|
-
/* @__PURE__ */
|
|
256
|
-
/* @__PURE__ */
|
|
297
|
+
children: /* @__PURE__ */ jsxs3("div", { className: "w-full max-w-md p-6 border-2 border-[var(--skipo-border-color)] bg-[var(--skipo-surface)] text-[var(--skipo-text)] shadow-2xl rounded-lg space-y-4", children: [
|
|
298
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between pb-3 border-b border-[var(--skipo-border-color)]", children: [
|
|
299
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-2", children: [
|
|
257
300
|
/* @__PURE__ */ jsx3("div", { className: "w-7 h-7 bg-[var(--skipo-accent)] text-black font-black flex items-center justify-center text-xs rounded", children: "\u25B2" }),
|
|
258
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ jsxs3("span", { className: "font-black text-sm tracking-wider uppercase text-[var(--skipo-text)]", children: [
|
|
259
302
|
appName,
|
|
260
303
|
" Authentication"
|
|
261
304
|
] })
|
|
262
305
|
] }),
|
|
263
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ jsxs3("span", { className: "text-[9px] px-2 py-0.5 border border-emerald-500/50 bg-emerald-500/10 text-emerald-300 font-bold rounded flex items-center gap-1", children: [
|
|
264
307
|
/* @__PURE__ */ jsx3(ShieldCheck, { size: 10 }),
|
|
265
308
|
" SYSTEM DB"
|
|
266
309
|
] })
|
|
267
310
|
] }),
|
|
268
|
-
error && /* @__PURE__ */
|
|
311
|
+
error && /* @__PURE__ */ jsxs3("div", { className: "p-3 border border-red-500/60 bg-red-500/10 text-red-300 text-xs rounded flex items-start gap-2", children: [
|
|
269
312
|
/* @__PURE__ */ jsx3(AlertCircle2, { size: 14, className: "shrink-0 mt-0.5" }),
|
|
270
313
|
/* @__PURE__ */ jsx3("span", { children: error })
|
|
271
314
|
] }),
|
|
272
|
-
/* @__PURE__ */
|
|
273
|
-
isRegister && /* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ jsxs3("form", { onSubmit: handleSubmit, className: "space-y-3", children: [
|
|
316
|
+
isRegister && /* @__PURE__ */ jsxs3("div", { children: [
|
|
274
317
|
/* @__PURE__ */ jsx3("label", { className: "block text-[10px] font-black uppercase mb-1", children: "Full Name *" }),
|
|
275
318
|
/* @__PURE__ */ jsx3(
|
|
276
319
|
BaseInput,
|
|
@@ -283,7 +326,7 @@ var LoginModal = ({
|
|
|
283
326
|
}
|
|
284
327
|
)
|
|
285
328
|
] }),
|
|
286
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ jsxs3("div", { children: [
|
|
287
330
|
/* @__PURE__ */ jsx3("label", { className: "block text-[10px] font-black uppercase mb-1", children: "Email Address *" }),
|
|
288
331
|
/* @__PURE__ */ jsx3(
|
|
289
332
|
BaseInput,
|
|
@@ -296,7 +339,7 @@ var LoginModal = ({
|
|
|
296
339
|
}
|
|
297
340
|
)
|
|
298
341
|
] }),
|
|
299
|
-
/* @__PURE__ */
|
|
342
|
+
/* @__PURE__ */ jsxs3("div", { children: [
|
|
300
343
|
/* @__PURE__ */ jsx3("label", { className: "block text-[10px] font-black uppercase mb-1", children: "Password *" }),
|
|
301
344
|
/* @__PURE__ */ jsx3(
|
|
302
345
|
BaseInput,
|
|
@@ -309,7 +352,7 @@ var LoginModal = ({
|
|
|
309
352
|
}
|
|
310
353
|
)
|
|
311
354
|
] }),
|
|
312
|
-
/* @__PURE__ */ jsx3("div", { className: "pt-2", children: /* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ jsx3("div", { className: "pt-2", children: /* @__PURE__ */ jsxs3(
|
|
313
356
|
BaseButton,
|
|
314
357
|
{
|
|
315
358
|
variant: "accent",
|
|
@@ -324,7 +367,48 @@ var LoginModal = ({
|
|
|
324
367
|
}
|
|
325
368
|
) })
|
|
326
369
|
] }),
|
|
327
|
-
/* @__PURE__ */
|
|
370
|
+
enableGoogleSignIn !== false && /* @__PURE__ */ jsxs3("div", { className: "space-y-2", children: [
|
|
371
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-2 text-[9px] text-[var(--skipo-text-muted)]", children: [
|
|
372
|
+
/* @__PURE__ */ jsx3("span", { className: "h-px flex-1 bg-[var(--skipo-border-color)]" }),
|
|
373
|
+
" OR ",
|
|
374
|
+
/* @__PURE__ */ jsx3("span", { className: "h-px flex-1 bg-[var(--skipo-border-color)]" })
|
|
375
|
+
] }),
|
|
376
|
+
/* @__PURE__ */ jsx3(
|
|
377
|
+
GoogleSignInButton,
|
|
378
|
+
{
|
|
379
|
+
disabled: loading || googleLoading,
|
|
380
|
+
loading: googleLoading,
|
|
381
|
+
onSignIn: async () => {
|
|
382
|
+
setGoogleLoading(true);
|
|
383
|
+
setError(null);
|
|
384
|
+
try {
|
|
385
|
+
if (onGoogleSignIn) {
|
|
386
|
+
await onGoogleSignIn();
|
|
387
|
+
} else {
|
|
388
|
+
const res = await fetch("/api/auth/sign-in/social", {
|
|
389
|
+
method: "POST",
|
|
390
|
+
headers: { "Content-Type": "application/json" },
|
|
391
|
+
body: JSON.stringify({ provider: "google", callbackURL: window.location.origin })
|
|
392
|
+
});
|
|
393
|
+
if (res.ok) {
|
|
394
|
+
const data = await res.json().catch(() => ({}));
|
|
395
|
+
if (data.url) {
|
|
396
|
+
window.location.href = data.url;
|
|
397
|
+
return;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
throw new Error("Google sign-in endpoint unavailable.");
|
|
401
|
+
}
|
|
402
|
+
} catch (err) {
|
|
403
|
+
setError(err.message || "Google sign-in failed.");
|
|
404
|
+
} finally {
|
|
405
|
+
setGoogleLoading(false);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
)
|
|
410
|
+
] }),
|
|
411
|
+
/* @__PURE__ */ jsxs3("div", { className: "pt-2 border-t border-[var(--skipo-border-color)]/60 flex items-center justify-between text-[11px]", children: [
|
|
328
412
|
/* @__PURE__ */ jsx3(
|
|
329
413
|
"button",
|
|
330
414
|
{
|
|
@@ -344,10 +428,31 @@ var LoginModal = ({
|
|
|
344
428
|
);
|
|
345
429
|
};
|
|
346
430
|
|
|
431
|
+
// src/components/auth/LuthAuthClient.ts
|
|
432
|
+
import {
|
|
433
|
+
resolveClientOrigin,
|
|
434
|
+
resolveClientEnvironment
|
|
435
|
+
} from "@dinilmusick/gutts";
|
|
436
|
+
import {
|
|
437
|
+
LuthAuthClient,
|
|
438
|
+
createLuthAuthClient
|
|
439
|
+
} from "@dinilmusick/gutts";
|
|
440
|
+
import { LuthAuthError } from "@dinilmusick/gutts";
|
|
441
|
+
var resolveLuthOrigin = resolveClientOrigin;
|
|
442
|
+
var resolveLuthEnvironment = resolveClientEnvironment;
|
|
443
|
+
|
|
444
|
+
// src/components/auth/luthAuthTypes.ts
|
|
445
|
+
import { LuthAuthError as LuthAuthError2 } from "@dinilmusick/gutts";
|
|
446
|
+
|
|
347
447
|
export {
|
|
448
|
+
GoogleIcon,
|
|
348
449
|
GoogleSignInButton,
|
|
349
450
|
AUTH_PAGE_REQUIRED_SERVICES,
|
|
350
451
|
authPageDefinition,
|
|
351
452
|
AuthPage,
|
|
352
|
-
LoginModal
|
|
453
|
+
LoginModal,
|
|
454
|
+
resolveLuthOrigin,
|
|
455
|
+
resolveLuthEnvironment,
|
|
456
|
+
LuthAuthClient,
|
|
457
|
+
createLuthAuthClient
|
|
353
458
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
+
import { resolveClientEnvironment, resolveClientOrigin } from '@dinilmusick/gutts';
|
|
3
|
+
export { DeploymentEnvironment, EmailSignInCredentials, EmailSignUpData, GoogleSignInOptions, LuthAuthClient, LuthAuthClientConfig, LuthAuthError, LuthAuthTokenStore, LuthSession, LuthSessionResult, LuthUser, RegisterApplicationResult, createLuthAuthClient } from '@dinilmusick/gutts';
|
|
2
4
|
|
|
3
5
|
declare const AUTH_PAGE_REQUIRED_SERVICES: readonly ["auth"];
|
|
4
6
|
interface AuthResult {
|
|
@@ -21,6 +23,7 @@ interface AuthPageProps {
|
|
|
21
23
|
}) => Promise<AuthResult>;
|
|
22
24
|
onSuccess?: (result: AuthResult) => void;
|
|
23
25
|
onGoogleSignIn?: () => Promise<AuthResult>;
|
|
26
|
+
enableGoogleSignIn?: boolean;
|
|
24
27
|
onSwitchToAdmin?: () => void;
|
|
25
28
|
}
|
|
26
29
|
declare const authPageDefinition: {
|
|
@@ -83,6 +86,8 @@ interface LoginModalProps {
|
|
|
83
86
|
appName?: string;
|
|
84
87
|
onSuccess: (user: any, token: string) => void;
|
|
85
88
|
defaultEmail?: string;
|
|
89
|
+
onGoogleSignIn?: () => Promise<void> | void;
|
|
90
|
+
enableGoogleSignIn?: boolean;
|
|
86
91
|
}
|
|
87
92
|
declare const LoginModal: React__default.FC<LoginModalProps>;
|
|
88
93
|
|
|
@@ -91,7 +96,15 @@ interface GoogleSignInButtonProps {
|
|
|
91
96
|
disabled?: boolean;
|
|
92
97
|
loading?: boolean;
|
|
93
98
|
label?: string;
|
|
99
|
+
className?: string;
|
|
94
100
|
}
|
|
101
|
+
declare const GoogleIcon: React__default.FC<{
|
|
102
|
+
size?: number;
|
|
103
|
+
className?: string;
|
|
104
|
+
}>;
|
|
95
105
|
declare const GoogleSignInButton: React__default.FC<GoogleSignInButtonProps>;
|
|
96
106
|
|
|
97
|
-
|
|
107
|
+
declare const resolveLuthOrigin: typeof resolveClientOrigin;
|
|
108
|
+
declare const resolveLuthEnvironment: typeof resolveClientEnvironment;
|
|
109
|
+
|
|
110
|
+
export { AUTH_PAGE_REQUIRED_SERVICES, AuthPage, type AuthPageProps, type AuthResult, GoogleIcon, GoogleSignInButton, type GoogleSignInButtonProps, LoginModal, type LoginModalProps, authPageDefinition, resolveLuthEnvironment, resolveLuthOrigin };
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AUTH_PAGE_REQUIRED_SERVICES,
|
|
3
3
|
AuthPage,
|
|
4
|
+
GoogleIcon,
|
|
4
5
|
GoogleSignInButton,
|
|
5
6
|
LoginModal,
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
LuthAuthClient,
|
|
8
|
+
authPageDefinition,
|
|
9
|
+
createLuthAuthClient,
|
|
10
|
+
resolveLuthEnvironment,
|
|
11
|
+
resolveLuthOrigin
|
|
12
|
+
} from "../../chunk-X6ZJS2VY.js";
|
|
8
13
|
import "../../chunk-5QDNIDDN.js";
|
|
9
14
|
import "../../chunk-5ZMXFCD4.js";
|
|
10
15
|
import "../../chunk-C3L53YN4.js";
|
|
@@ -15,7 +20,12 @@ import "../../chunk-A2CDQISJ.js";
|
|
|
15
20
|
export {
|
|
16
21
|
AUTH_PAGE_REQUIRED_SERVICES,
|
|
17
22
|
AuthPage,
|
|
23
|
+
GoogleIcon,
|
|
18
24
|
GoogleSignInButton,
|
|
19
25
|
LoginModal,
|
|
20
|
-
|
|
26
|
+
LuthAuthClient,
|
|
27
|
+
authPageDefinition,
|
|
28
|
+
createLuthAuthClient,
|
|
29
|
+
resolveLuthEnvironment,
|
|
30
|
+
resolveLuthOrigin
|
|
21
31
|
};
|
|
@@ -7,7 +7,8 @@ export { AppShell, AppShellProps, BreadcrumbNav, BreadcrumbNavProps, HeaderBar,
|
|
|
7
7
|
export { ApiCallIndicator, ApiCallIndicatorProps, AutoSaveStatus, AutoSaveToggle, AutoSaveToggleProps, BottomStripContextValue, BottomStripProvider, BottomStripProviderProps, StatusLight, StatusLightProps, SystemMessage, SystemMessageDisplay, SystemMessageDisplayProps, SystemMessageType, useBottomStrip } from './components/bottom-strip/index.js';
|
|
8
8
|
export { B as BottomStrip, a as BottomStripProps } from './BottomStrip-DYhAUQR4.js';
|
|
9
9
|
export { AccountsSettingsSection, AccountsSettingsSectionProps, SettingsTab, SettingsTabProps, ThemeSettingsSection } from './components/settings/index.js';
|
|
10
|
-
export { AUTH_PAGE_REQUIRED_SERVICES, AuthPage, AuthPageProps, AuthResult, GoogleSignInButton, GoogleSignInButtonProps, LoginModal, LoginModalProps, authPageDefinition } from './components/auth/index.js';
|
|
10
|
+
export { AUTH_PAGE_REQUIRED_SERVICES, AuthPage, AuthPageProps, AuthResult, GoogleIcon, GoogleSignInButton, GoogleSignInButtonProps, LoginModal, LoginModalProps, authPageDefinition, resolveLuthEnvironment, resolveLuthOrigin } from './components/auth/index.js';
|
|
11
|
+
export { DeploymentEnvironment, EmailSignInCredentials, EmailSignUpData, GoogleSignInOptions, LuthAuthClient, LuthAuthClientConfig, LuthAuthError, LuthAuthTokenStore, LuthSession, LuthSessionResult, LuthUser, RegisterApplicationResult, createLuthAuthClient } from '@dinilmusick/gutts';
|
|
11
12
|
export { FrnlTileRecord, TilesMenu, TilesMenuProps, tilesMenuDefinition } from './components/tiles/index.js';
|
|
12
13
|
export { GRAPHS_MENU_REQUIRED_SERVICES, GraphRecord, GraphsMenu, GraphsMenuProps } from './components/graph/index.js';
|
|
13
14
|
export { BackblazeAccount, BackblazeBucket, KloksServiceInvoker, SrklBackblazeAccount, SrklBackblazeTile, StorageOptionTiles, StoragePresetTile, StorageSelection, WORKSPACE_CREATE_DIALOG_REQUIRED_SERVICES, WORKSPACE_TILES_MENU_REQUIRED_SERVICES, WorkspaceCreateDialog, WorkspaceCreateDialogProps, WorkspaceCreateInput, WorkspaceGate, WorkspaceGateProps, WorkspaceRecord, WorkspaceSecondaryClone, WorkspaceSecondaryClonesPanel, WorkspaceStorageReadonlyPanel, WorkspaceStorageService, WorkspaceTilesMenu, WorkspaceTilesMenuProps, createKloksWorkspaceStorageService, defaultWorkspaceStorageService, workspaceTilesMenuDefinition } from './components/workspace/index.js';
|
|
@@ -207,10 +207,15 @@ import {
|
|
|
207
207
|
import {
|
|
208
208
|
AUTH_PAGE_REQUIRED_SERVICES,
|
|
209
209
|
AuthPage,
|
|
210
|
+
GoogleIcon,
|
|
210
211
|
GoogleSignInButton,
|
|
211
212
|
LoginModal,
|
|
212
|
-
|
|
213
|
-
|
|
213
|
+
LuthAuthClient,
|
|
214
|
+
authPageDefinition,
|
|
215
|
+
createLuthAuthClient,
|
|
216
|
+
resolveLuthEnvironment,
|
|
217
|
+
resolveLuthOrigin
|
|
218
|
+
} from "./chunk-X6ZJS2VY.js";
|
|
214
219
|
import {
|
|
215
220
|
frnlButton,
|
|
216
221
|
frnlButtonDefinition,
|
|
@@ -303,6 +308,7 @@ export {
|
|
|
303
308
|
FrnlStoreProvider,
|
|
304
309
|
GRAPHS_MENU_REQUIRED_SERVICES,
|
|
305
310
|
GhostButton,
|
|
311
|
+
GoogleIcon,
|
|
306
312
|
GoogleSignInButton,
|
|
307
313
|
GraphsMenu,
|
|
308
314
|
HeaderBar,
|
|
@@ -322,6 +328,7 @@ export {
|
|
|
322
328
|
ListStyleSchema,
|
|
323
329
|
LoadingOverlay,
|
|
324
330
|
LoginModal,
|
|
331
|
+
LuthAuthClient,
|
|
325
332
|
MarkdownSectionStylesSchema,
|
|
326
333
|
ModalContainer,
|
|
327
334
|
ModalPanel,
|
|
@@ -389,6 +396,7 @@ export {
|
|
|
389
396
|
centralLedger,
|
|
390
397
|
createAppThemeSocket,
|
|
391
398
|
createKloksWorkspaceStorageService,
|
|
399
|
+
createLuthAuthClient,
|
|
392
400
|
defaultWorkspaceStorageService,
|
|
393
401
|
depmThemeSocket,
|
|
394
402
|
floksFrnlFrontendApi,
|
|
@@ -415,6 +423,8 @@ export {
|
|
|
415
423
|
getUIElement,
|
|
416
424
|
paletteToSkipoThemePack,
|
|
417
425
|
registerUIElement,
|
|
426
|
+
resolveLuthEnvironment,
|
|
427
|
+
resolveLuthOrigin,
|
|
418
428
|
resolveTypographyCascade,
|
|
419
429
|
safeValidateModularThemePack,
|
|
420
430
|
subscribeToPalette,
|
package/packages/ui/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@floks/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Floks UI — Reusable React Component Library with Theme Engine, Base Primitives, Containers, Composite & Layout",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -102,8 +102,9 @@
|
|
|
102
102
|
"clean": "rm -rf dist"
|
|
103
103
|
},
|
|
104
104
|
"dependencies": {
|
|
105
|
+
"@dinilmusick/gutts": "^1.4.0",
|
|
105
106
|
"zod": "^3.24.1",
|
|
106
|
-
"@ultrst-armada/frnlts": "^0.5.
|
|
107
|
+
"@ultrst-armada/frnlts": "^0.5.4",
|
|
107
108
|
"zustand": "^5.0.3",
|
|
108
109
|
"@xyflow/react": "^12.8.6",
|
|
109
110
|
"d3-force": "^3.0.0"
|
|
@@ -113,6 +114,7 @@
|
|
|
113
114
|
"react": "^18.0.0 || ^19.0.0",
|
|
114
115
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
115
116
|
},
|
|
117
|
+
"peerDependenciesMeta": {},
|
|
116
118
|
"devDependencies": {
|
|
117
119
|
"@types/d3-force": "^3.0.10"
|
|
118
120
|
}
|