@drfed/web 0.0.0-stage → 0.1.0-dev.561
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/.output/nitro.json +17 -0
- package/.output/public/.vite/manifest.json +483 -0
- package/.output/public/_build/assets/ActorDetailQuery.graphql-D96mwq1k.js +60 -0
- package/.output/public/_build/assets/ActorDetailQuery.graphql-DrxSNh1X.js +60 -0
- package/.output/public/_build/assets/CompleteLoginChallenge.graphql-C5Zq3wNh.js +10 -0
- package/.output/public/_build/assets/CopyButton-B2l484wE.js +1 -0
- package/.output/public/_build/assets/CopyButton-Bi-ZR8x9.css +1 -0
- package/.output/public/_build/assets/CreateInstanceMutation.graphql-B4CRy6cl.js +19 -0
- package/.output/public/_build/assets/CreateObjectMutation.graphql-B4A01dgV.js +23 -0
- package/.output/public/_build/assets/GenerateActorsMutation.graphql-mlHJNIbe.js +23 -0
- package/.output/public/_build/assets/GetHostQuery.graphql-CuzDdOdW.js +17 -0
- package/.output/public/_build/assets/GetHostQuery.graphql-o9K0Qkg0.js +17 -0
- package/.output/public/_build/assets/HomeViewerQuery.graphql-B903WWKs.js +8 -0
- package/.output/public/_build/assets/HttpStatusCode-bgaVzuLy.js +1 -0
- package/.output/public/_build/assets/InstanceActorListQuery.graphql-DmNwiEhM.js +24 -0
- package/.output/public/_build/assets/InstanceActorListQuery.graphql-paa7teUO.js +24 -0
- package/.output/public/_build/assets/InstanceDetailQuery.graphql-B52nR132.js +66 -0
- package/.output/public/_build/assets/InstanceDetailQuery.graphql-DSA2BcAV.js +66 -0
- package/.output/public/_build/assets/JNCCF6MP-CNMywyiC.js +1 -0
- package/.output/public/_build/assets/LP6E37CW-Cwv6G3n1.js +1 -0
- package/.output/public/_build/assets/SignInMutation.graphql-BalZYNFu.js +9 -0
- package/.output/public/_build/assets/TSB6MOZK-CpiH97G1.js +1 -0
- package/.output/public/_build/assets/Toast-3-eXCAKc.css +1 -0
- package/.output/public/_build/assets/Toast-C1zr9crB.js +1 -0
- package/.output/public/_build/assets/WorkspaceQuery.graphql-UoI7QDs4.js +23 -0
- package/.output/public/_build/assets/_...404_-WZ8kAljY.js +1 -0
- package/.output/public/_build/assets/_challengeId_-Dk-0l7zl.js +1 -0
- package/.output/public/_build/assets/_id_-YcZZShAv.css +1 -0
- package/.output/public/_build/assets/_id_-bpxdclBj.js +1 -0
- package/.output/public/_build/assets/_slug_-CyTA2aW7.css +1 -0
- package/.output/public/_build/assets/_slug_-DXfRknzJ.js +200 -0
- package/.output/public/_build/assets/about-DIrbzRsi.js +1 -0
- package/.output/public/_build/assets/actors-HfZh_afh.js +24 -0
- package/.output/public/_build/assets/client-CGFoRcqH.js +3 -0
- package/.output/public/_build/assets/components-5MVu7IcD.js +1 -0
- package/.output/public/_build/assets/dist-BrJ_B8nU.js +1 -0
- package/.output/public/_build/assets/dist-DVo0HS5G.js +1 -0
- package/.output/public/_build/assets/dist-WrlGlK67.js +1 -0
- package/.output/public/_build/assets/entry-client-BurSTYr9.css +1 -0
- package/.output/public/_build/assets/entry-client-Do7ocrsL.js +8 -0
- package/.output/public/_build/assets/form-BxigYd7J.css +1 -0
- package/.output/public/_build/assets/form.module-BecmEfV_.js +1 -0
- package/.output/public/_build/assets/index-BHn6sAgH.js +23 -0
- package/.output/public/_build/assets/index-BSLqnqN7.js +8 -0
- package/.output/public/_build/assets/index-B_xLBDOo.css +1 -0
- package/.output/public/_build/assets/instance-tpMrvJNZ.js +35 -0
- package/.output/public/_build/assets/label-Mv8GZ4jc.js +1 -0
- package/.output/public/_build/assets/objects-DPb8DI8A.css +1 -0
- package/.output/public/_build/assets/objects-DR9TfL-V.js +25 -0
- package/.output/public/_build/assets/relay-runtime-BX3uubtA.js +7 -0
- package/.output/public/_build/assets/routing-DMN2NHu6.js +1 -0
- package/.output/public/_build/assets/sign-in-B67sv7z8.js +10 -0
- package/.output/public/_build/assets/web-DB_Nkq2D.js +1 -0
- package/.output/public/apple-touch-icon.png +0 -0
- package/.output/public/favicon.ico +0 -0
- package/.output/public/icon-192.png +0 -0
- package/.output/public/icon-512.png +0 -0
- package/.output/public/icon-mask.png +0 -0
- package/.output/public/icon.svg +395 -0
- package/.output/public/manifest.webmanifest +13 -0
- package/.output/server/_...404_-DDEH5apf.mjs +16 -0
- package/.output/server/_challengeId_-C_n_Bww9.mjs +100 -0
- package/.output/server/_chunks/ssr-renderer.mjs +26 -0
- package/.output/server/_id_-DqytvZEf.mjs +505 -0
- package/.output/server/_libs/@shikijs/core+[...].mjs +7173 -0
- package/.output/server/_libs/@shikijs/engine-javascript+[...].mjs +3110 -0
- package/.output/server/_libs/babel__runtime.mjs +243 -0
- package/.output/server/_libs/dequal.mjs +25 -0
- package/.output/server/_libs/faker-js__faker.mjs +13150 -0
- package/.output/server/_libs/fbjs.mjs +115 -0
- package/.output/server/_libs/h3+rou3+srvx.mjs +650 -0
- package/.output/server/_libs/hookable.mjs +41 -0
- package/.output/server/_libs/invariant.mjs +36 -0
- package/.output/server/_libs/relay-runtime.mjs +9704 -0
- package/.output/server/_libs/seroval-plugins.mjs +563 -0
- package/.output/server/_libs/seroval.mjs +2956 -0
- package/.output/server/_libs/shikijs__langs.mjs +3 -0
- package/.output/server/_libs/shikijs__themes.mjs +7 -0
- package/.output/server/_libs/solid-js.mjs +1248 -0
- package/.output/server/_libs/solid-relay+tiny-invariant.mjs +1029 -0
- package/.output/server/_libs/ufo.mjs +64 -0
- package/.output/server/_libs/valibot.mjs +711 -0
- package/.output/server/_runtime.mjs +33 -0
- package/.output/server/_slug_-CBOaSqoF.mjs +978 -0
- package/.output/server/_ssr/ActorDetailQuery.graphql-C1mWRP1B.mjs +283 -0
- package/.output/server/_ssr/CompleteLoginChallenge.graphql-CM7o_Md1.mjs +78 -0
- package/.output/server/_ssr/CopyButton-CQNR5D1y.mjs +43 -0
- package/.output/server/_ssr/CreateInstanceMutation.graphql-C-h2lGxz.mjs +116 -0
- package/.output/server/_ssr/CreateObjectMutation.graphql-C393Hp7q.mjs +166 -0
- package/.output/server/_ssr/GenerateActorsMutation.graphql-D2ADtn1j.mjs +163 -0
- package/.output/server/_ssr/GetHostQuery.graphql-C45XQo1i.mjs +127 -0
- package/.output/server/_ssr/HomeViewerQuery.graphql-Dote4Pkz.mjs +81 -0
- package/.output/server/_ssr/InstanceActorListQuery.graphql-DgItgN5t.mjs +167 -0
- package/.output/server/_ssr/InstanceDetailQuery.graphql-DP5wWWjX.mjs +367 -0
- package/.output/server/_ssr/JNCCF6MP-BAZlBnvx.mjs +419 -0
- package/.output/server/_ssr/LP6E37CW-D2Ih_b_K.mjs +163 -0
- package/.output/server/_ssr/SignInMutation.graphql-BBXmiay6.mjs +72 -0
- package/.output/server/_ssr/TSB6MOZK-D06WZb6o.mjs +166 -0
- package/.output/server/_ssr/Toast-Bb1gcxED.mjs +947 -0
- package/.output/server/_ssr/WorkspaceQuery.graphql-DnCO8t-4.mjs +153 -0
- package/.output/server/_ssr/about-CD3QIgf_.mjs +14 -0
- package/.output/server/_ssr/actors-CMWf-xQU.mjs +1160 -0
- package/.output/server/_ssr/dist-D6rgyh-L.mjs +81 -0
- package/.output/server/_ssr/dist-I7KRMRbA.mjs +432 -0
- package/.output/server/_ssr/form.module-CTvIl1lm.mjs +192 -0
- package/.output/server/_ssr/index-C4crD6q-.mjs +347 -0
- package/.output/server/_ssr/index-yuhuc6-X.mjs +111 -0
- package/.output/server/_ssr/instance-ZYWGeWd3.mjs +280 -0
- package/.output/server/_ssr/label-DAXzanI9.mjs +9 -0
- package/.output/server/_ssr/objects-D5MVukzB.mjs +4316 -0
- package/.output/server/_ssr/routing-DKTLkkbY.mjs +620 -0
- package/.output/server/_ssr/sign-in-CNHZb_zL.mjs +264 -0
- package/.output/server/_ssr/ssr.mjs +6121 -0
- package/.output/server/index.mjs +684 -0
- package/LICENSE +661 -0
- package/README.md +143 -2
- package/dist/bridge.d.mts +39 -0
- package/dist/bridge.mjs +104 -0
- package/dist/bridge.mjs.map +1 -0
- package/dist/request-policy.d.mts +8 -0
- package/dist/request-policy.mjs +94 -0
- package/dist/request-policy.mjs.map +1 -0
- package/dist/runtime.d.mts +14 -0
- package/dist/runtime.mjs +44 -0
- package/dist/runtime.mjs.map +1 -0
- package/package.json +123 -3
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { r as __toESM } from "../_runtime.mjs";
|
|
2
|
+
import { n as require_relay_runtime } from "../_libs/relay-runtime.mjs";
|
|
3
|
+
import { D as Show, E as Match, K as mergeProps, N as createComponent, V as createSignal, g as ssrAttribute, h as ssr, k as Switch, u as escape, v as ssrHydrationKey } from "../_libs/solid-js.mjs";
|
|
4
|
+
import { n as Title } from "./dist-D6rgyh-L.mjs";
|
|
5
|
+
import { a as __export, i as Polymorphic, t as Button } from "./JNCCF6MP-BAZlBnvx.mjs";
|
|
6
|
+
import { b as string, d as object, h as pipe, l as nonEmpty, r as email, x as trim } from "../_libs/valibot.mjs";
|
|
7
|
+
import { i as createMutation } from "../_libs/solid-relay+tiny-invariant.mjs";
|
|
8
|
+
import { n as Form, r as createForm, t as Field } from "./dist-I7KRMRbA.mjs";
|
|
9
|
+
import { m as form_module_default } from "./form.module-CTvIl1lm.mjs";
|
|
10
|
+
import { t as TextField } from "./TSB6MOZK-D06WZb6o.mjs";
|
|
11
|
+
//#region node_modules/.nitro/vite/services/ssr/_build/assets/sign-in-CNHZb_zL.js
|
|
12
|
+
var import_relay_runtime = /* @__PURE__ */ __toESM(require_relay_runtime());
|
|
13
|
+
/**
|
|
14
|
+
* @generated SignedSource<<f922c28fa3ef1530d281ae9db8af9386>>
|
|
15
|
+
* @lightSyntaxTransform
|
|
16
|
+
*/
|
|
17
|
+
var { ConcreteRequest } = import_relay_runtime?.default?.default?.__esModule ? import_relay_runtime.default.default : import_relay_runtime?.default?.__esModule ? import_relay_runtime.default : import_relay_runtime;
|
|
18
|
+
var node = function() {
|
|
19
|
+
var v0 = [{
|
|
20
|
+
"defaultValue": null,
|
|
21
|
+
"kind": "LocalArgument",
|
|
22
|
+
"name": "email"
|
|
23
|
+
}, {
|
|
24
|
+
"defaultValue": null,
|
|
25
|
+
"kind": "LocalArgument",
|
|
26
|
+
"name": "verifyUrl"
|
|
27
|
+
}], v1 = [{
|
|
28
|
+
"alias": null,
|
|
29
|
+
"args": [{
|
|
30
|
+
"kind": "Variable",
|
|
31
|
+
"name": "email",
|
|
32
|
+
"variableName": "email"
|
|
33
|
+
}, {
|
|
34
|
+
"kind": "Variable",
|
|
35
|
+
"name": "verifyUrl",
|
|
36
|
+
"variableName": "verifyUrl"
|
|
37
|
+
}],
|
|
38
|
+
"concreteType": "LoginChallenge",
|
|
39
|
+
"kind": "LinkedField",
|
|
40
|
+
"name": "loginByEmail",
|
|
41
|
+
"plural": false,
|
|
42
|
+
"selections": [{
|
|
43
|
+
"alias": null,
|
|
44
|
+
"args": null,
|
|
45
|
+
"kind": "ScalarField",
|
|
46
|
+
"name": "challengeId",
|
|
47
|
+
"storageKey": null
|
|
48
|
+
}],
|
|
49
|
+
"storageKey": null
|
|
50
|
+
}];
|
|
51
|
+
return {
|
|
52
|
+
"fragment": {
|
|
53
|
+
"argumentDefinitions": v0,
|
|
54
|
+
"kind": "Fragment",
|
|
55
|
+
"metadata": null,
|
|
56
|
+
"name": "SignInMutation",
|
|
57
|
+
"selections": v1,
|
|
58
|
+
"type": "Mutation",
|
|
59
|
+
"abstractKey": null
|
|
60
|
+
},
|
|
61
|
+
"kind": "Request",
|
|
62
|
+
"operation": {
|
|
63
|
+
"argumentDefinitions": v0,
|
|
64
|
+
"kind": "Operation",
|
|
65
|
+
"name": "SignInMutation",
|
|
66
|
+
"selections": v1
|
|
67
|
+
},
|
|
68
|
+
"params": {
|
|
69
|
+
"cacheID": "37e10229ff566b2aae936dd6e4f5eeba",
|
|
70
|
+
"id": null,
|
|
71
|
+
"metadata": {},
|
|
72
|
+
"name": "SignInMutation",
|
|
73
|
+
"operationKind": "mutation",
|
|
74
|
+
"text": "mutation SignInMutation(\n $email: Email!\n $verifyUrl: URITemplate!\n) {\n loginByEmail(email: $email, verifyUrl: $verifyUrl) {\n challengeId\n }\n}\n"
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
}();
|
|
78
|
+
node.hash = "8c239b3bc42d23561c6a06c26b528dfd";
|
|
79
|
+
__export({}, {
|
|
80
|
+
Alert: () => Alert,
|
|
81
|
+
Root: () => AlertRoot
|
|
82
|
+
});
|
|
83
|
+
function AlertRoot(props) {
|
|
84
|
+
return createComponent(Polymorphic, mergeProps({
|
|
85
|
+
as: "div",
|
|
86
|
+
role: "alert"
|
|
87
|
+
}, props));
|
|
88
|
+
}
|
|
89
|
+
var Alert = AlertRoot;
|
|
90
|
+
var { graphql } = import_relay_runtime?.default?.default?.__esModule ? import_relay_runtime.default.default : import_relay_runtime?.default?.__esModule ? import_relay_runtime.default : import_relay_runtime;
|
|
91
|
+
var _tmpl$ = [
|
|
92
|
+
"<main",
|
|
93
|
+
"><!--$-->",
|
|
94
|
+
"<!--/--><section",
|
|
95
|
+
" aria-labelledby=\"sign-in-title\"><header",
|
|
96
|
+
"><h1 id=\"sign-in-title\">Sign in</h1><p>Enter your email address to receive a secure sign-in link.</p></header><!--$-->",
|
|
97
|
+
"<!--/--><!--$-->",
|
|
98
|
+
"<!--/--></section></main>"
|
|
99
|
+
];
|
|
100
|
+
var _tmpl$2 = [
|
|
101
|
+
"<span",
|
|
102
|
+
" class=\"",
|
|
103
|
+
"\">Required</span>"
|
|
104
|
+
];
|
|
105
|
+
var _tmpl$3 = [
|
|
106
|
+
"<span",
|
|
107
|
+
" id=\"email-error\" class=\"",
|
|
108
|
+
"\" role=\"alert\">",
|
|
109
|
+
"</span>"
|
|
110
|
+
];
|
|
111
|
+
var _tmpl$4 = [
|
|
112
|
+
"<output",
|
|
113
|
+
" class=\"",
|
|
114
|
+
"\">",
|
|
115
|
+
"</output>"
|
|
116
|
+
];
|
|
117
|
+
var id$$ = "src/routes/sign-in.tsx?pick=default&pick=$css&lang.tsx";
|
|
118
|
+
var signInMutation = node;
|
|
119
|
+
var signInSchema = object({ email: pipe(string(), trim(), nonEmpty("Enter a valid email address."), email("Enter a valid email address.")) });
|
|
120
|
+
function SignInPage() {
|
|
121
|
+
const [result, setResult] = createSignal();
|
|
122
|
+
const [commitSignIn, isSigningIn] = createMutation(signInMutation);
|
|
123
|
+
const signInForm = createForm({
|
|
124
|
+
schema: signInSchema,
|
|
125
|
+
initialInput: { email: "" }
|
|
126
|
+
});
|
|
127
|
+
const submit = ({ email }) => {
|
|
128
|
+
const verifyUrl = `${globalThis.location.origin}/confirm/{challengeId}?code={code}`;
|
|
129
|
+
setResult(void 0);
|
|
130
|
+
commitSignIn({
|
|
131
|
+
variables: {
|
|
132
|
+
email,
|
|
133
|
+
verifyUrl
|
|
134
|
+
},
|
|
135
|
+
onCompleted: (_response, errors) => {
|
|
136
|
+
const graphQLErrors = errors ?? [];
|
|
137
|
+
if (graphQLErrors.length > 0) {
|
|
138
|
+
setResult({
|
|
139
|
+
message: graphQLErrors.map((error) => error.message).join("\n"),
|
|
140
|
+
status: "error"
|
|
141
|
+
});
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
setResult({
|
|
145
|
+
message: "Check your inbox for a secure sign-in link. You can close this page.",
|
|
146
|
+
status: "success"
|
|
147
|
+
});
|
|
148
|
+
},
|
|
149
|
+
onError: (error) => {
|
|
150
|
+
setResult({
|
|
151
|
+
message: error.message,
|
|
152
|
+
status: "error"
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
};
|
|
157
|
+
return ssr(_tmpl$, ssrHydrationKey() + ssrAttribute("class", escape(form_module_default.page, true), false), escape(createComponent(Title, { children: "Sign in — DrFed" })), ssrAttribute("class", escape(form_module_default.panel, true), false), ssrAttribute("class", escape(form_module_default.header, true), false), escape(createComponent(Form, {
|
|
158
|
+
get ["class"]() {
|
|
159
|
+
return form_module_default.form;
|
|
160
|
+
},
|
|
161
|
+
of: signInForm,
|
|
162
|
+
onSubmit: submit,
|
|
163
|
+
get children() {
|
|
164
|
+
return [createComponent(Field, {
|
|
165
|
+
of: signInForm,
|
|
166
|
+
path: ["email"],
|
|
167
|
+
children: (field) => createComponent(TextField, {
|
|
168
|
+
get ["class"]() {
|
|
169
|
+
return form_module_default.field;
|
|
170
|
+
},
|
|
171
|
+
get name() {
|
|
172
|
+
return field.props.name;
|
|
173
|
+
},
|
|
174
|
+
get value() {
|
|
175
|
+
return field.input ?? "";
|
|
176
|
+
},
|
|
177
|
+
required: true,
|
|
178
|
+
get children() {
|
|
179
|
+
return [
|
|
180
|
+
createComponent(TextField.Label, {
|
|
181
|
+
get ["class"]() {
|
|
182
|
+
return form_module_default.fieldHeading;
|
|
183
|
+
},
|
|
184
|
+
get children() {
|
|
185
|
+
return ["Email address", ssr(_tmpl$2, ssrHydrationKey(), `${escape(form_module_default.fieldStatus, true)} ${escape(form_module_default.required, true)}`)];
|
|
186
|
+
}
|
|
187
|
+
}),
|
|
188
|
+
createComponent(TextField.Input, mergeProps(() => field.props, {
|
|
189
|
+
get ["class"]() {
|
|
190
|
+
return form_module_default.input;
|
|
191
|
+
},
|
|
192
|
+
type: "email",
|
|
193
|
+
autocomplete: "email",
|
|
194
|
+
inputMode: "email",
|
|
195
|
+
placeholder: "you@example.com",
|
|
196
|
+
get ["aria-invalid"]() {
|
|
197
|
+
return Boolean(field.errors);
|
|
198
|
+
},
|
|
199
|
+
get ["aria-describedby"]() {
|
|
200
|
+
return field.errors ? "email-error" : void 0;
|
|
201
|
+
}
|
|
202
|
+
})),
|
|
203
|
+
createComponent(Show, {
|
|
204
|
+
get when() {
|
|
205
|
+
return field.errors;
|
|
206
|
+
},
|
|
207
|
+
children: (errors) => ssr(_tmpl$3, ssrHydrationKey(), `${escape(form_module_default.notice, true)} ${escape(form_module_default.error, true)}`, escape(errors()[0]))
|
|
208
|
+
})
|
|
209
|
+
];
|
|
210
|
+
}
|
|
211
|
+
})
|
|
212
|
+
}), createComponent(Button, {
|
|
213
|
+
get ["class"]() {
|
|
214
|
+
return form_module_default.button;
|
|
215
|
+
},
|
|
216
|
+
type: "submit",
|
|
217
|
+
get disabled() {
|
|
218
|
+
return isSigningIn();
|
|
219
|
+
},
|
|
220
|
+
get children() {
|
|
221
|
+
return createComponent(Show, {
|
|
222
|
+
get when() {
|
|
223
|
+
return isSigningIn();
|
|
224
|
+
},
|
|
225
|
+
get fallback() {
|
|
226
|
+
return result()?.status === "success" ? "Resend sign-in link" : "Send sign-in link";
|
|
227
|
+
},
|
|
228
|
+
children: "Sending link…"
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
})];
|
|
232
|
+
}
|
|
233
|
+
})), escape(createComponent(Show, {
|
|
234
|
+
get when() {
|
|
235
|
+
return result();
|
|
236
|
+
},
|
|
237
|
+
children: (formResult) => createComponent(Switch, { get children() {
|
|
238
|
+
return [createComponent(Match, {
|
|
239
|
+
get when() {
|
|
240
|
+
return formResult().status === "error";
|
|
241
|
+
},
|
|
242
|
+
get children() {
|
|
243
|
+
return createComponent(Alert, {
|
|
244
|
+
get ["class"]() {
|
|
245
|
+
return `${form_module_default.notice} ${form_module_default.error}`;
|
|
246
|
+
},
|
|
247
|
+
get children() {
|
|
248
|
+
return formResult().message;
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
}), createComponent(Match, {
|
|
253
|
+
get when() {
|
|
254
|
+
return formResult().status === "success";
|
|
255
|
+
},
|
|
256
|
+
get children() {
|
|
257
|
+
return ssr(_tmpl$4, ssrHydrationKey(), `${escape(form_module_default.notice, true)} ${escape(form_module_default.success, true)}`, escape(formResult().message));
|
|
258
|
+
}
|
|
259
|
+
})];
|
|
260
|
+
} })
|
|
261
|
+
})));
|
|
262
|
+
}
|
|
263
|
+
//#endregion
|
|
264
|
+
export { SignInPage as default, id$$ };
|