@deslop/auth 0.1.1920 → 0.1.1996

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/server.js CHANGED
@@ -2088,6 +2088,35 @@ function isIterable(input) {
2088
2088
  return hasProperty(input, Symbol.iterator) || isString$1(input);
2089
2089
  }
2090
2090
  /**
2091
+ * Checks whether a value is a `RegExp`.
2092
+ *
2093
+ * **When to use**
2094
+ *
2095
+ * Use when you need a `Predicate` runtime guard for regular expressions.
2096
+ *
2097
+ * **Details**
2098
+ *
2099
+ * Uses `instanceof RegExp`.
2100
+ *
2101
+ * **Example** (Guarding RegExp values)
2102
+ *
2103
+ * ```ts import.meta.vitest
2104
+ * import { Predicate } from "effect"
2105
+ *
2106
+ * const data: unknown = /abc/
2107
+ *
2108
+ * Predicate.isRegExp(data) // => true
2109
+ * ```
2110
+ *
2111
+ * @see {@link isDate}
2112
+ * @stability stable
2113
+ * @category guards
2114
+ * @since 3.9.0
2115
+ */
2116
+ function isRegExp(input) {
2117
+ return input instanceof RegExp;
2118
+ }
2119
+ /**
2091
2120
  * Creates a predicate that returns `true` if either predicate is `true`.
2092
2121
  *
2093
2122
  * **When to use**
@@ -7320,6 +7349,36 @@ const has$3 = /*#__PURE__*/ dual(2, (self, key) => Object.hasOwn(self, key));
7320
7349
  */
7321
7350
  const get$12 = /*#__PURE__*/ dual(2, (self, key) => Object.hasOwn(self, key) ? some$1(self[key]) : none());
7322
7351
  /**
7352
+ * Removes a key from a record.
7353
+ *
7354
+ * **When to use**
7355
+ *
7356
+ * Use to create a shallow copy of a record without one property.
7357
+ *
7358
+ * **Details**
7359
+ *
7360
+ * If the key is not present, the result is still a shallow copy of the original
7361
+ * record.
7362
+ *
7363
+ * **Example** (Removing a key)
7364
+ *
7365
+ * ```ts import.meta.vitest
7366
+ * import { Record } from "effect"
7367
+ *
7368
+ * Record.remove({ a: 1, b: 2 }, "a") // => { b: 2 }
7369
+ * ```
7370
+ *
7371
+ * @stability stable
7372
+ * @category mutations
7373
+ * @since 2.0.0
7374
+ */
7375
+ const remove$5 = /*#__PURE__*/ dual(2, (self, key) => {
7376
+ if (!has$3(self, key)) return { ...self };
7377
+ const out = { ...self };
7378
+ delete out[key];
7379
+ return out;
7380
+ });
7381
+ /**
7323
7382
  * Maps a record into another record by applying a transformation function to each of its values.
7324
7383
  *
7325
7384
  * **Example** (Mapping record values)
@@ -11906,7 +11965,7 @@ const logWithLevel = (level) => (...message) => {
11906
11965
  return void_$4;
11907
11966
  });
11908
11967
  };
11909
- const colors = {
11968
+ const colors$1 = {
11910
11969
  bold: "1",
11911
11970
  red: "31",
11912
11971
  green: "32",
@@ -11918,7 +11977,7 @@ const colors = {
11918
11977
  black: "30",
11919
11978
  bgBrightRed: "101"
11920
11979
  };
11921
- colors.gray, colors.blue, colors.green, colors.yellow, colors.red, colors.bgBrightRed, colors.black;
11980
+ colors$1.gray, colors$1.blue, colors$1.green, colors$1.yellow, colors$1.red, colors$1.bgBrightRed, colors$1.black;
11922
11981
  const defaultDateFormat = (date) => `${date.getHours().toString().padStart(2, "0")}:${date.getMinutes().toString().padStart(2, "0")}:${date.getSeconds().toString().padStart(2, "0")}.${date.getMilliseconds().toString().padStart(3, "0")}`;
11923
11982
  /** @internal */
11924
11983
  const defaultLogger = /*#__PURE__*/ loggerMake(({ cause, date, fiber, logLevel, message }) => {
@@ -16345,6 +16404,71 @@ const match$2 = (regExp) => (self) => fromNullOr(self.match(regExp));
16345
16404
  * @since 2.0.0
16346
16405
  */
16347
16406
  const replaceAll = (searchValue, replaceValue) => (self) => self.replaceAll(searchValue, replaceValue);
16407
+ /**
16408
+ * Normalizes a string by splitting it into word parts, transforming each part,
16409
+ * and joining the parts with a configurable delimiter. By default, words contain
16410
+ * Unicode letters, combining marks, and numbers; no Unicode normalization is applied.
16411
+ *
16412
+ * **When to use**
16413
+ *
16414
+ * Use when you need custom word-case output with a delimiter or part transform
16415
+ * that the fixed case helpers do not provide.
16416
+ *
16417
+ * @see {@link pascalCase} for fixed PascalCase output
16418
+ * @see {@link camelCase} for fixed lower-initial camelCase output
16419
+ * @see {@link constantCase} for fixed uppercase underscore-separated output
16420
+ * @see {@link kebabCase} for fixed lowercase hyphen-separated output
16421
+ * @see {@link snakeCase} for fixed lowercase underscore-separated output
16422
+ *
16423
+ * @stability stable
16424
+ * @category transforming
16425
+ * @since 4.0.0
16426
+ */
16427
+ const noCase = /*#__PURE__*/ dual((args) => typeof args[0] === "string", (input, options) => {
16428
+ const splitRegExp = toRegExpArray(options?.splitRegExp ?? SPLIT_REGEXP);
16429
+ const stripRegExp = toRegExpArray(options?.stripRegExp ?? STRIP_REGEXP);
16430
+ const delimiter = options?.delimiter ?? " ";
16431
+ const transform = options?.transform ?? toLowerCase;
16432
+ return normalizeCase(input, splitRegExp, stripRegExp, delimiter, transform);
16433
+ });
16434
+ const toRegExpArray = (regexp) => isRegExp(regexp) ? [regexp] : regexp;
16435
+ const normalizeCase = (input, splitRegExp, stripRegExp, delimiter, transform) => {
16436
+ let result = input;
16437
+ for (const regexp of splitRegExp) result = result.replace(regexp, "$1\0$2");
16438
+ for (const regexp of stripRegExp) result = result.replace(regexp, "\0");
16439
+ let start = 0;
16440
+ let end = result.length;
16441
+ while (result.charAt(start) === "\0") start++;
16442
+ while (result.charAt(end - 1) === "\0") end--;
16443
+ if (start >= end) return "";
16444
+ return result.slice(start, end).split("\0").map(transform).join(delimiter);
16445
+ };
16446
+ const SPLIT_REGEXP = [
16447
+ /([\p{Ll}\p{N}]\p{M}*)(\p{Lu})/gu,
16448
+ /(\p{Lu}\p{M}*)(\p{Lu}\p{M}*\p{Ll})/gu,
16449
+ /(\p{L}\p{M}*)(\p{N})/gu,
16450
+ /(\p{N}\p{M}*)(\p{L})/gu
16451
+ ];
16452
+ const STRIP_REGEXP = /[^\p{L}\p{M}\p{N}]+/gu;
16453
+ /**
16454
+ * Converts a string to kebab-case (lowercase with hyphens).
16455
+ *
16456
+ * **When to use**
16457
+ *
16458
+ * Use to normalize free-form labels, identifiers, or keys into lowercase
16459
+ * hyphen-separated text.
16460
+ *
16461
+ * @see {@link noCase} for configurable delimiters and part transforms
16462
+ * @see {@link snakeCase} for lowercase underscore-separated output
16463
+ * @see {@link constantCase} for uppercase underscore-separated output
16464
+ * @see {@link camelCase} for lower-initial camelCase output
16465
+ * @see {@link pascalCase} for upper-initial PascalCase output
16466
+ *
16467
+ * @stability stable
16468
+ * @category transforming
16469
+ * @since 4.0.0
16470
+ */
16471
+ const kebabCase = /*#__PURE__*/ noCase({ delimiter: "-" });
16348
16472
  // ../../node_modules/.pnpm/effect@4.1.7/node_modules/effect/dist/internal/random.js
16349
16473
  /** @internal */
16350
16474
  const Random$1 = /*#__PURE__*/ Reference("effect/Random", { defaultValue: () => ({
@@ -82477,7 +82601,7 @@ var PaginatedResultMeta = class extends (/*#__PURE__*/ Opaque()(/*#__PURE__*/ St
82477
82601
  * @category schemas
82478
82602
  * @since 4.0.0
82479
82603
  */
82480
- const Role$3 = /*#__PURE__*/ Literals(["user", "assistant"]);
82604
+ const Role$4 = /*#__PURE__*/ Literals(["user", "assistant"]);
82481
82605
  /**
82482
82606
  * Schema for optional client-facing annotations on MCP objects.
82483
82607
  *
@@ -82497,7 +82621,7 @@ var Annotations$3 = class extends (/*#__PURE__*/ Opaque()(/*#__PURE__*/ Struct$2
82497
82621
  * It can include multiple entries to indicate content useful for multiple
82498
82622
  * audiences (e.g., `["user", "assistant"]`).
82499
82623
  */
82500
- audience: /*#__PURE__*/ optional$7(/*#__PURE__*/ ArraySchema(Role$3)),
82624
+ audience: /*#__PURE__*/ optional$7(/*#__PURE__*/ ArraySchema(Role$4)),
82501
82625
  /**
82502
82626
  * Describes how important this data is for operating the server.
82503
82627
  *
@@ -83691,7 +83815,7 @@ const SamplingMessageContentBlock$2 = /*#__PURE__*/ Union$2([
83691
83815
  * @since 4.0.0
83692
83816
  */
83693
83817
  var SamplingMessage$5 = class extends (/*#__PURE__*/ Opaque()(/*#__PURE__*/ Struct$2({
83694
- role: Role$3,
83818
+ role: Role$4,
83695
83819
  content: /*#__PURE__*/ Union$2([SamplingMessageContentBlock$2, /*#__PURE__*/ ArraySchema(SamplingMessageContentBlock$2)]),
83696
83820
  _meta: /*#__PURE__*/ optional$7(UnknownObject$5)
83697
83821
  }))) {};
@@ -83815,7 +83939,7 @@ var ModelPreferences$2 = class extends (/*#__PURE__*/ Class$1("@effect/ai/McpSch
83815
83939
  * @since 4.0.0
83816
83940
  */
83817
83941
  var CreateMessageResult$5 = class extends (/*#__PURE__*/ Class$1("@effect/ai/McpSchema/CreateMessageResult")({
83818
- role: Role$3,
83942
+ role: Role$4,
83819
83943
  content: /*#__PURE__*/ Union$2([SamplingMessageContentBlock$2, /*#__PURE__*/ ArraySchema(SamplingMessageContentBlock$2)]),
83820
83944
  _meta: /*#__PURE__*/ optional$7(UnknownObject$5),
83821
83945
  /**
@@ -84842,7 +84966,7 @@ const ProgressToken$1 = /*#__PURE__*/ Union$2([String$6, Finite]);
84842
84966
  /**
84843
84967
  * @internal
84844
84968
  */
84845
- const Role$2 = /*#__PURE__*/ Literals(["user", "assistant"]);
84969
+ const Role$3 = /*#__PURE__*/ Literals(["user", "assistant"]);
84846
84970
  /**
84847
84971
  * @internal
84848
84972
  */
@@ -84925,7 +85049,7 @@ const McpError$1 = /*#__PURE__*/ Struct$2({
84925
85049
  * @internal
84926
85050
  */
84927
85051
  const Annotation = /*#__PURE__*/ Struct$2({
84928
- audience: /*#__PURE__*/ optional$6(/*#__PURE__*/ ArraySchema(Role$2)),
85052
+ audience: /*#__PURE__*/ optional$6(/*#__PURE__*/ ArraySchema(Role$3)),
84929
85053
  priority: /*#__PURE__*/ optional$6(/*#__PURE__*/ Finite.check(/*#__PURE__*/ isBetween({
84930
85054
  minimum: 0,
84931
85055
  maximum: 1
@@ -85265,7 +85389,7 @@ const ClientCapabilities$2 = /*#__PURE__*/ Struct$2({
85265
85389
  * @internal
85266
85390
  */
85267
85391
  const Annotations$2 = /*#__PURE__*/ Struct$2({
85268
- audience: /*#__PURE__*/ optional$4(/*#__PURE__*/ ArraySchema(Role$2)),
85392
+ audience: /*#__PURE__*/ optional$4(/*#__PURE__*/ ArraySchema(Role$3)),
85269
85393
  priority: /*#__PURE__*/ optional$4(/*#__PURE__*/ Finite.check(/*#__PURE__*/ isBetween({
85270
85394
  minimum: 0,
85271
85395
  maximum: 1
@@ -85377,14 +85501,14 @@ const SamplingContent = /*#__PURE__*/ Union$2([
85377
85501
  * @internal
85378
85502
  */
85379
85503
  const PromptMessage$2 = /*#__PURE__*/ Struct$2({
85380
- role: Role$2,
85504
+ role: Role$3,
85381
85505
  content: ContentBlock$2
85382
85506
  });
85383
85507
  /**
85384
85508
  * @internal
85385
85509
  */
85386
85510
  const SamplingMessage$2 = /*#__PURE__*/ Struct$2({
85387
- role: Role$2,
85511
+ role: Role$3,
85388
85512
  content: SamplingContent
85389
85513
  });
85390
85514
  /**
@@ -85445,7 +85569,7 @@ const CallToolResult$2 = /*#__PURE__*/ Struct$2({
85445
85569
  */
85446
85570
  const CreateMessageResult$2 = /*#__PURE__*/ Struct$2({
85447
85571
  ...ResultMeta$1.fields,
85448
- role: Role$2,
85572
+ role: Role$3,
85449
85573
  content: SamplingContent,
85450
85574
  model: String$6,
85451
85575
  stopReason: /*#__PURE__*/ optional$4(String$6)
@@ -85813,7 +85937,7 @@ const ContentBlock$1 = /*#__PURE__*/ Union$2([
85813
85937
  * @internal
85814
85938
  */
85815
85939
  const PromptMessage$1 = /*#__PURE__*/ Struct$2({
85816
- role: Role$2,
85940
+ role: Role$3,
85817
85941
  content: ContentBlock$1
85818
85942
  });
85819
85943
  /**
@@ -85869,7 +85993,7 @@ const SamplingMessageContentBlock$1 = /*#__PURE__*/ Union$2([
85869
85993
  * @internal
85870
85994
  */
85871
85995
  const SamplingMessage$1 = /*#__PURE__*/ Struct$2({
85872
- role: Role$2,
85996
+ role: Role$3,
85873
85997
  content: /*#__PURE__*/ Union$2([SamplingMessageContentBlock$1, /*#__PURE__*/ ArraySchema(SamplingMessageContentBlock$1)]),
85874
85998
  _meta: Meta$1
85875
85999
  });
@@ -86208,7 +86332,7 @@ const ProgressToken = RequestId;
86208
86332
  /**
86209
86333
  * @internal
86210
86334
  */
86211
- const Role$1 = Role$2;
86335
+ const Role$2 = Role$3;
86212
86336
  /**
86213
86337
  * @internal
86214
86338
  */
@@ -86350,7 +86474,7 @@ const Prompt = Prompt$1;
86350
86474
  * @internal
86351
86475
  */
86352
86476
  const PromptMessage = /*#__PURE__*/ Struct$2({
86353
- role: Role$1,
86477
+ role: Role$2,
86354
86478
  content: ContentBlock
86355
86479
  });
86356
86480
  const ToolInputSchema = /*#__PURE__*/ StructWithRest(/*#__PURE__*/ Struct$2({
@@ -86392,7 +86516,7 @@ const SamplingMessageContentBlock = /*#__PURE__*/ Union$2([
86392
86516
  * @internal
86393
86517
  */
86394
86518
  const SamplingMessage = /*#__PURE__*/ Struct$2({
86395
- role: Role$1,
86519
+ role: Role$2,
86396
86520
  content: /*#__PURE__*/ Union$2([SamplingMessageContentBlock, /*#__PURE__*/ ArraySchema(SamplingMessageContentBlock)]),
86397
86521
  _meta: Meta
86398
86522
  });
@@ -98255,8 +98379,8 @@ const publicAccess = [
98255
98379
  "POST /api/capture",
98256
98380
  "POST /api/capture/:id/activity",
98257
98381
  "POST /api/files/:id",
98258
- "GET /api/images/:id",
98259
- "GET /api/notes/:id/media/:index"
98382
+ "GET /api/images/:id/:revision",
98383
+ "GET /api/notes/:id/media/:revision/:index"
98260
98384
  ], (surface) => ({
98261
98385
  app: "stash",
98262
98386
  callers: ["member"],
@@ -98264,10 +98388,12 @@ const publicAccess = [
98264
98388
  })),
98265
98389
  ...map$10([
98266
98390
  "notes.events",
98267
- "notes.body",
98268
- "notes.media",
98391
+ "notes.search",
98392
+ "notes.detail",
98393
+ "notes.gallery",
98269
98394
  "notes.capture",
98270
- "notes.regenerate"
98395
+ "notes.regenerate",
98396
+ "notes.remove"
98271
98397
  ], (name) => ({
98272
98398
  app: "stash",
98273
98399
  callers: ["member"],
@@ -98293,7 +98419,8 @@ const publicAccess = [
98293
98419
  "flights.save",
98294
98420
  "flights.remove",
98295
98421
  "travel.set",
98296
- "push.register"
98422
+ "push.register",
98423
+ "tracking.refresh"
98297
98424
  ], (name) => ({
98298
98425
  app: "trips",
98299
98426
  callers: ["member"],
@@ -98408,8 +98535,8 @@ const HTTP_DOMAINS = {
98408
98535
  "POST /mcp": 406,
98409
98536
  "PUT /mcp": 405,
98410
98537
  "gateway * /ai/*": 402,
98411
- "stash GET /api/images/:id": 400,
98412
- "stash GET /api/notes/:id/media/:index": 400,
98538
+ "stash GET /api/images/:id/:revision": 400,
98539
+ "stash GET /api/notes/:id/media/:revision/:index": 400,
98413
98540
  "stash POST /api/capture": 422,
98414
98541
  "stash POST /api/capture/:id/activity": 422,
98415
98542
  "stash POST /api/files/:id": 422,
@@ -98428,7 +98555,7 @@ function okJson(body) {
98428
98555
  }
98429
98556
  const Icon = replyWith(200, String$6.check(isPattern(/^<svg\b[^>]*>.+<\/svg>\s*$/su)));
98430
98557
  const Manifest = okJson(Struct$2({
98431
- background_color: NonEmptyString,
98558
+ background_color: optionalKey(NonEmptyString),
98432
98559
  display: Literal("standalone"),
98433
98560
  icons: NonEmptyArray(Struct$2({
98434
98561
  purpose: NonEmptyString,
@@ -98440,7 +98567,7 @@ const Manifest = okJson(Struct$2({
98440
98567
  scope: NonEmptyString,
98441
98568
  short_name: NonEmptyString,
98442
98569
  start_url: NonEmptyString,
98443
- theme_color: NonEmptyString
98570
+ theme_color: optionalKey(NonEmptyString)
98444
98571
  }));
98445
98572
  const ClientMetadata = okJson(Struct$2({
98446
98573
  client_id: HttpUrl,
@@ -99739,7 +99866,10 @@ const layerWeb = unwrap$7(gen(function* () {
99739
99866
  if (!(yield* (yield* FileSystem).exists((yield* Path$1).join(client, "index.html")))) return empty$11;
99740
99867
  const name = capitalize(yield* appName);
99741
99868
  return mergeAll$1(add("GET", MANIFEST_PATH, succeed$5(jsonUnsafe({
99742
- background_color: "#0d0c0c",
99869
+ ...name === "Portfolio" && {
99870
+ background_color: "#0d0c0c",
99871
+ theme_color: "#0d0c0c"
99872
+ },
99743
99873
  display: "standalone",
99744
99874
  icons: [{
99745
99875
  purpose: "any",
@@ -99750,8 +99880,7 @@ const layerWeb = unwrap$7(gen(function* () {
99750
99880
  name,
99751
99881
  scope: "/",
99752
99882
  short_name: name,
99753
- start_url: "/",
99754
- theme_color: "#0d0c0c"
99883
+ start_url: "/"
99755
99884
  }, {
99756
99885
  contentType: "application/manifest+json",
99757
99886
  headers: { "cache-control": "no-cache" }
@@ -100889,7 +101018,7 @@ const StatusJson = fromJsonString(Struct$2({
100889
101018
  User: Record$1(TailnetUserId, Profile)
100890
101019
  }), { reviver: exactNumbers });
100891
101020
  // src/people/contract.ts
100892
- const Role = Literals([
101021
+ const Role$1 = Literals([
100893
101022
  "Admin",
100894
101023
  "Member",
100895
101024
  "Waiting"
@@ -100897,7 +101026,7 @@ const Role = Literals([
100897
101026
  const Account = Struct$2({
100898
101027
  ...User.fields,
100899
101028
  fullName: OptionFromOptionalKey(String$6),
100900
- role: Role
101029
+ role: Role$1
100901
101030
  });
100902
101031
  const Person = Struct$2({
100903
101032
  ...Account.fields,
@@ -101310,6 +101439,15 @@ var Sessions = class Sessions extends Service$1()("@deslop/auth/sessions/server/
101310
101439
  strategy: "sliding"
101311
101440
  })) });
101312
101441
  return Sessions.of({
101442
+ active: fn("Sessions.active")(function* (ids) {
101443
+ const since = cutoff(yield* now);
101444
+ const rows = yield* findAll({
101445
+ Request: Void,
101446
+ Result: Struct$2({ id: String$6 }),
101447
+ execute: () => sql`SELECT id FROM ${table} WHERE id IN ${sql.in(ids)} AND lastSeenAt > ${since}`
101448
+ })();
101449
+ return map$10(rows, (row) => row.id);
101450
+ }, asAuthError("Cannot read active sessions")),
101313
101451
  create: fn("Sessions.create")(function* (user, address, browser) {
101314
101452
  const secret = encode$1(yield* random.randomBytes(32));
101315
101453
  const now$4 = yield* now;
@@ -101755,6 +101893,15 @@ const peopleHandlers = PeopleRpcs.toLayer(gen(function* () {
101755
101893
  };
101756
101894
  }));
101757
101895
  // src/sessions/handlers.ts
101896
+ const SessionIds = ArraySchema(String$6);
101897
+ const sessionsHttp = use((router) => gen(function* () {
101898
+ const sessions = yield* Sessions;
101899
+ yield* router.add("POST", "/api/sessions/active", authResponse(gen(function* () {
101900
+ if (!isMachine((yield* HttpServerRequest).headers["x-deslop-client"] ?? "")) return text("Only this machine may verify sessions", { status: 403 });
101901
+ const requested = yield* schemaBodyJson(SessionIds);
101902
+ return yield* schemaJson(SessionIds)(yield* sessions.active(requested));
101903
+ })));
101904
+ }));
101758
101905
  const sessionsTools = make$13(make$14("list_sessions", {
101759
101906
  dependencies: [CurrentUser],
101760
101907
  description: "List your browser sessions, newest activity first.",
@@ -101778,30 +101925,119 @@ const sessionsToolHandlers = sessionsTools.toLayer(map$7(Sessions, (sessions) =>
101778
101925
  })
101779
101926
  })));
101780
101927
  const sessionsHandlers = SessionsRpcs.toLayer(map$7(Sessions, (sessions) => ({ "sessions.watch": (_, options) => unwrap$4(map$7(CurrentUser, (user) => sessions.watch(user.id, identifyRequestOf(options.headers, "verify").session))) })));
101781
- // ../../packages/components/src/shared/styles.ts
101782
- const black = "#000";
101783
- const ink = "#f4f4f4";
101784
- const muted = "#a1a1a1";
101785
- const card = "#1c1c1e";
101786
- const chipFill = "#2c2c2e";
101928
+ Literals(["light", "dark"]);
101929
+ const hues = {
101930
+ auth: "auth",
101931
+ deploy: "deploy",
101932
+ gateway: "gateway",
101933
+ opm: "opm",
101934
+ scope: "scope",
101935
+ stash: "stash",
101936
+ trips: "trips"
101937
+ };
101938
+ Literals(keys$1(hues));
101939
+ Literals([
101940
+ "success",
101941
+ "warning",
101942
+ "error",
101943
+ "info"
101944
+ ]);
101945
+ Literals([
101946
+ "canvas",
101947
+ "surface",
101948
+ "raised",
101949
+ "control",
101950
+ "ink",
101951
+ "secondary",
101952
+ "quiet",
101953
+ "rule",
101954
+ "outline",
101955
+ "glass",
101956
+ "glassEdge",
101957
+ "glassHighlight"
101958
+ ]);
101959
+ const palettes = {
101960
+ dark: {
101961
+ accent: {
101962
+ auth: "#93a6cc",
101963
+ deploy: "#86a6ef",
101964
+ gateway: "#ec87ae",
101965
+ opm: "#e6c4a0",
101966
+ scope: "#5cc9c0",
101967
+ stash: "#f2c46b",
101968
+ trips: "#f39a4b"
101969
+ },
101970
+ canvas: "#000000",
101971
+ control: "#303035",
101972
+ error: "#ff817a",
101973
+ glass: "rgba(44,44,47,.90)",
101974
+ glassEdge: "rgba(255,255,255,.20)",
101975
+ glassHighlight: "rgba(255,255,255,.07)",
101976
+ info: "#9cbaff",
101977
+ ink: "#f4f4f4",
101978
+ outline: "#72727d",
101979
+ quiet: "#a6a6af",
101980
+ raised: "#252527",
101981
+ rule: "#3c3c41",
101982
+ secondary: "#aaaab1",
101983
+ success: "#5bd879",
101984
+ surface: "#1c1c1e",
101985
+ warning: "#ffd20a"
101986
+ },
101987
+ light: {
101988
+ accent: {
101989
+ auth: "#415a89",
101990
+ deploy: "#2c55a0",
101991
+ gateway: "#8c315a",
101992
+ opm: "#725333",
101993
+ scope: "#126962",
101994
+ stash: "#75520e",
101995
+ trips: "#8b4617"
101996
+ },
101997
+ canvas: "#f2f2f7",
101998
+ control: "#e7e7ed",
101999
+ error: "#a62132",
102000
+ glass: "rgba(255,255,255,.92)",
102001
+ glassEdge: "rgba(0,0,0,.13)",
102002
+ glassHighlight: "#ffffff",
102003
+ info: "#365e9f",
102004
+ ink: "#17171b",
102005
+ outline: "#85858f",
102006
+ quiet: "#5e5e6a",
102007
+ raised: "#f7f7fa",
102008
+ rule: "#d8d8df",
102009
+ secondary: "#575761",
102010
+ success: "#1d6b3b",
102011
+ surface: "#ffffff",
102012
+ warning: "#7f5200"
102013
+ }
102014
+ };
102015
+ function variable(role) {
102016
+ return `--design-${kebabCase(role)}`;
102017
+ }
102018
+ const roles = remove$5(palettes.light, "accent");
102019
+ const colors = {
102020
+ accent: map$11(hues, (hue) => `var(${variable(`accent-${hue}`)})`),
102021
+ ...map$11(roles, (_value, role) => `var(${variable(role)})`)
102022
+ };
101787
102023
  const styles = {
101788
102024
  body: {
101789
- color: ink,
102025
+ color: colors.ink,
101790
102026
  fontSize: 15,
101791
102027
  lineHeight: 22
101792
102028
  },
101793
102029
  bone: {
101794
- backgroundColor: chipFill,
102030
+ backgroundColor: colors.control,
101795
102031
  borderRadius: 6
101796
102032
  },
101797
102033
  card: {
101798
- backgroundColor: card,
101799
- borderRadius: 22,
102034
+ backgroundColor: colors.surface,
102035
+ borderRadius: 24,
101800
102036
  overflow: "hidden"
101801
102037
  },
101802
102038
  chip: {
101803
102039
  alignItems: "center",
101804
- backgroundColor: chipFill,
102040
+ backgroundColor: colors.raised,
101805
102041
  display: "flex",
101806
102042
  flexShrink: 0,
101807
102043
  justifyContent: "center",
@@ -101809,12 +102045,12 @@ const styles = {
101809
102045
  },
101810
102046
  control: {
101811
102047
  alignItems: "center",
101812
- backgroundColor: "#202020",
102048
+ backgroundColor: colors.raised,
101813
102049
  borderRadius: 8,
101814
102050
  display: "flex",
101815
102051
  justifyContent: "center",
101816
- minHeight: 40,
101817
- minWidth: 40,
102052
+ minHeight: 44,
102053
+ minWidth: 44,
101818
102054
  paddingInline: 10
101819
102055
  },
101820
102056
  detail: {
@@ -101824,30 +102060,44 @@ const styles = {
101824
102060
  padding: 20
101825
102061
  },
101826
102062
  dot: {
101827
- borderRadius: 3,
102063
+ borderRadius: 3.5,
101828
102064
  flexShrink: 0,
101829
- height: 6,
101830
- width: 6
102065
+ height: 7,
102066
+ width: 7
101831
102067
  },
101832
102068
  emptyLine: {
101833
- color: muted,
102069
+ color: colors.secondary,
101834
102070
  fontSize: 17,
101835
102071
  lineHeight: 22,
101836
102072
  textAlign: "center"
101837
102073
  },
102074
+ field: {
102075
+ borderColor: colors.outline,
102076
+ borderRadius: 12,
102077
+ borderWidth: 1,
102078
+ minHeight: 44,
102079
+ padding: 8
102080
+ },
101838
102081
  figure: {
101839
- color: muted,
101840
- fontSize: 15,
101841
- lineHeight: 20
102082
+ color: colors.secondary,
102083
+ fontSize: 13,
102084
+ lineHeight: 18
101842
102085
  },
101843
102086
  frame: {
101844
- backgroundColor: black,
102087
+ backgroundColor: colors.canvas,
101845
102088
  display: "flex",
101846
102089
  flex: 1,
101847
102090
  minHeight: 0
101848
102091
  },
102092
+ glass: {
102093
+ backgroundColor: colors.glass,
102094
+ borderColor: colors.glassEdge,
102095
+ borderRadius: 22,
102096
+ borderWidth: 1,
102097
+ minHeight: 44
102098
+ },
101849
102099
  groupHeading: {
101850
- color: ink,
102100
+ color: colors.ink,
101851
102101
  fontSize: 15,
101852
102102
  fontWeight: "600",
101853
102103
  lineHeight: 20,
@@ -101856,14 +102106,14 @@ const styles = {
101856
102106
  paddingTop: 18
101857
102107
  },
101858
102108
  heading: {
101859
- color: ink,
102109
+ color: colors.ink,
101860
102110
  fontSize: 20,
101861
102111
  fontWeight: "600",
101862
102112
  lineHeight: 26
101863
102113
  },
101864
102114
  headline: {
101865
- color: ink,
101866
- fontSize: 26,
102115
+ color: colors.ink,
102116
+ fontSize: 28,
101867
102117
  fontWeight: "700",
101868
102118
  lineHeight: 32
101869
102119
  },
@@ -101874,12 +102124,12 @@ const styles = {
101874
102124
  minWidth: 0
101875
102125
  },
101876
102126
  line: {
101877
- color: muted,
102127
+ color: colors.secondary,
101878
102128
  fontSize: 13,
101879
102129
  lineHeight: 18
101880
102130
  },
101881
102131
  overline: {
101882
- color: ink,
102132
+ color: colors.ink,
101883
102133
  flexShrink: 1,
101884
102134
  fontSize: 14,
101885
102135
  fontWeight: "600",
@@ -101904,12 +102154,22 @@ const styles = {
101904
102154
  flexDirection: "row",
101905
102155
  minHeight: 0
101906
102156
  },
102157
+ pill: {
102158
+ borderRadius: 12,
102159
+ minHeight: 24,
102160
+ paddingInline: 8
102161
+ },
102162
+ reader: {
102163
+ color: colors.ink,
102164
+ fontSize: 16,
102165
+ lineHeight: 25
102166
+ },
101907
102167
  row: {
101908
102168
  alignItems: "center",
101909
102169
  display: "flex",
101910
102170
  flexDirection: "row",
101911
102171
  gap: 12,
101912
- minHeight: 52,
102172
+ minHeight: 54,
101913
102173
  paddingInline: 16
101914
102174
  },
101915
102175
  rowBody: {
@@ -101927,12 +102187,13 @@ const styles = {
101927
102187
  paddingInline: 16
101928
102188
  },
101929
102189
  scale: {
101930
- color: "rgba(235,235,245,.6)",
102190
+ color: colors.quiet,
101931
102191
  fontSize: 11,
101932
- lineHeight: 14
102192
+ lineHeight: 15
101933
102193
  },
101934
102194
  sheet: {
101935
- backgroundColor: "#151515",
102195
+ backgroundColor: colors.surface,
102196
+ borderRadius: 26,
101936
102197
  display: "flex",
101937
102198
  flexDirection: "column",
101938
102199
  gap: 16,
@@ -101945,14 +102206,32 @@ const styles = {
101945
102206
  justifyContent: "flex-end"
101946
102207
  },
101947
102208
  summary: {
101948
- color: muted,
102209
+ color: colors.secondary,
101949
102210
  fontSize: 14,
101950
102211
  lineHeight: 19
101951
102212
  },
102213
+ tile: {
102214
+ backgroundColor: colors.surface,
102215
+ borderRadius: 24,
102216
+ gap: 8,
102217
+ padding: 16
102218
+ },
102219
+ tileLabel: {
102220
+ color: colors.secondary,
102221
+ fontSize: 13,
102222
+ lineHeight: 18
102223
+ },
102224
+ tileValue: {
102225
+ color: colors.ink,
102226
+ fontSize: 28,
102227
+ fontWeight: "600",
102228
+ lineHeight: 32
102229
+ },
101952
102230
  title: {
101953
- color: ink,
102231
+ color: colors.ink,
101954
102232
  flexShrink: 1,
101955
102233
  fontSize: 16,
102234
+ fontWeight: "500",
101956
102235
  lineHeight: 21
101957
102236
  },
101958
102237
  titleLine: {
@@ -101961,6 +102240,12 @@ const styles = {
101961
102240
  flexDirection: "row",
101962
102241
  gap: 6,
101963
102242
  minWidth: 0
102243
+ },
102244
+ workspaceTitle: {
102245
+ color: colors.ink,
102246
+ fontSize: 34,
102247
+ fontWeight: "700",
102248
+ lineHeight: 39
101964
102249
  }
101965
102250
  };
101966
102251
  // src/sign-ins/shared.ts
@@ -102150,8 +102435,12 @@ function waitingPage(unavailable) {
102150
102435
  });
102151
102436
  return html(`<!doctype html>
102152
102437
  <html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
102153
- <meta name="color-scheme" content="dark"><meta http-equiv="refresh" content="5"><title>Auth</title></head>
102154
- <body style="display:grid;place-items:center;min-height:100dvh;margin:0;background:${black};color:${styles.line.color};
102438
+ <meta name="color-scheme" content="light dark">
102439
+ <meta name="theme-color" media="(prefers-color-scheme: light)" content="${palettes.light.canvas}">
102440
+ <meta name="theme-color" media="(prefers-color-scheme: dark)" content="${palettes.dark.canvas}">
102441
+ <meta http-equiv="refresh" content="5"><title>Auth</title></head>
102442
+ <body style="display:grid;place-items:center;min-height:100dvh;margin:0;
102443
+ background:light-dark(${palettes.light.canvas},${palettes.dark.canvas});color:light-dark(${palettes.light.secondary},${palettes.dark.secondary});
102155
102444
  font:${styles.line.fontSize}px/${styles.line.lineHeight}px system-ui"><p role="status">${text}</p></body></html>`);
102156
102445
  }
102157
102446
  const association = { webcredentials: { apps: flatMap$6(AppSignIn.fields.app.literals, (slug) => map$10(["", ".dev"], (suffix) => `99K7MQUK7F.xyz.mp281x.${slug}${suffix}`)) } };
@@ -102208,7 +102497,7 @@ runApp({
102208
102497
  auth: provide$2(effectContext(map$7(Identity, (identity) => Auth.makeContext((headers, purpose) => withSpan(identity.resolve(identifyRequestOf(headers, purpose)), "Identity.account")))), layerServices),
102209
102498
  icon: icon_default,
102210
102499
  middleware: (app) => map$7(app, setHeader("content-security-policy", "frame-ancestors 'none'")),
102211
- routes: provide$2(mergeAll$1(identityHttp, signInsHttp, layerRpc({
102500
+ routes: provide$2(mergeAll$1(identityHttp, sessionsHttp, signInsHttp, layerRpc({
102212
102501
  group: RpcContracts,
102213
102502
  handlers: mergeAll$1(identityHandlers, peopleHandlers, sessionsHandlers)
102214
102503
  }), layerMcp({