@revealui/core 0.10.1 → 0.11.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.
Files changed (62) hide show
  1. package/dist/client/admin/components/DocumentForm.js +17 -6
  2. package/dist/client/richtext/RichTextEditor.d.ts +1 -1
  3. package/dist/client/richtext/RichTextEditor.d.ts.map +1 -1
  4. package/dist/client/richtext/RichTextEditor.js +15 -15
  5. package/dist/client/richtext/components/ImageNodeComponent.js +4 -4
  6. package/dist/collections/CollectionOperations.d.ts +5 -0
  7. package/dist/collections/CollectionOperations.d.ts.map +1 -1
  8. package/dist/collections/CollectionOperations.js +7 -0
  9. package/dist/collections/operations/create.d.ts.map +1 -1
  10. package/dist/collections/operations/create.js +20 -0
  11. package/dist/collections/operations/delete.d.ts.map +1 -1
  12. package/dist/collections/operations/delete.js +14 -0
  13. package/dist/collections/operations/drafts.d.ts +33 -0
  14. package/dist/collections/operations/drafts.d.ts.map +1 -0
  15. package/dist/collections/operations/drafts.js +43 -0
  16. package/dist/collections/operations/fieldValidation.d.ts +53 -0
  17. package/dist/collections/operations/fieldValidation.d.ts.map +1 -0
  18. package/dist/collections/operations/fieldValidation.js +89 -0
  19. package/dist/collections/operations/find.d.ts.map +1 -1
  20. package/dist/collections/operations/find.js +23 -5
  21. package/dist/collections/operations/findById.d.ts +1 -0
  22. package/dist/collections/operations/findById.d.ts.map +1 -1
  23. package/dist/collections/operations/findById.js +33 -21
  24. package/dist/collections/operations/snapshot.d.ts +30 -0
  25. package/dist/collections/operations/snapshot.d.ts.map +1 -0
  26. package/dist/collections/operations/snapshot.js +81 -0
  27. package/dist/collections/operations/update.d.ts.map +1 -1
  28. package/dist/collections/operations/update.js +21 -0
  29. package/dist/error-handling/error-boundary.d.ts.map +1 -1
  30. package/dist/error-handling/error-boundary.js +11 -7
  31. package/dist/error-handling/fallback-components.d.ts.map +1 -1
  32. package/dist/error-handling/fallback-components.js +68 -48
  33. package/dist/features.d.ts +0 -2
  34. package/dist/features.d.ts.map +1 -1
  35. package/dist/features.js +2 -5
  36. package/dist/generated/types/admin.d.ts +42 -35
  37. package/dist/generated/types/admin.d.ts.map +1 -1
  38. package/dist/instance/RevealUIInstance.d.ts.map +1 -1
  39. package/dist/instance/methods/findById.d.ts +2 -0
  40. package/dist/instance/methods/findById.d.ts.map +1 -1
  41. package/dist/license.d.ts +67 -1
  42. package/dist/license.d.ts.map +1 -1
  43. package/dist/license.js +184 -25
  44. package/dist/richtext/exports/client/rcc.d.ts.map +1 -1
  45. package/dist/richtext/exports/client/rcc.js +6 -1
  46. package/dist/richtext/exports/server/rsc.d.ts +15 -2
  47. package/dist/richtext/exports/server/rsc.d.ts.map +1 -1
  48. package/dist/richtext/exports/server/rsc.js +36 -6
  49. package/dist/storage/index.d.ts +4 -5
  50. package/dist/storage/index.d.ts.map +1 -1
  51. package/dist/storage/index.js +10 -13
  52. package/dist/storage/object-storage.d.ts +5 -5
  53. package/dist/storage/object-storage.js +5 -5
  54. package/dist/storage/types.d.ts +5 -12
  55. package/dist/storage/types.d.ts.map +1 -1
  56. package/dist/storage/types.js +4 -4
  57. package/dist/types/runtime.d.ts +51 -0
  58. package/dist/types/runtime.d.ts.map +1 -1
  59. package/package.json +21 -22
  60. package/dist/storage/vercel-blob-provider.d.ts +0 -28
  61. package/dist/storage/vercel-blob-provider.d.ts.map +0 -1
  62. package/dist/storage/vercel-blob-provider.js +0 -88
@@ -1 +1 @@
1
- {"version":3,"file":"findById.d.ts","sourceRoot":"","sources":["../../../src/collections/operations/findById.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,YAAY,EACZ,wBAAwB,EACxB,sBAAsB,EACtB,cAAc,EACd,aAAa,EAGd,MAAM,sBAAsB,CAAC;AAK9B,wBAAsB,QAAQ,CAC5B,MAAM,EAAE,sBAAsB,EAC9B,EAAE,EAAE,wBAAwB,GAAG,IAAI,EACnC,OAAO,EAAE;IACP,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,GACA,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAsIhC"}
1
+ {"version":3,"file":"findById.d.ts","sourceRoot":"","sources":["../../../src/collections/operations/findById.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,YAAY,EACZ,wBAAwB,EACxB,sBAAsB,EACtB,cAAc,EACd,aAAa,EAGd,MAAM,sBAAsB,CAAC;AAM9B,wBAAsB,QAAQ,CAC5B,MAAM,EAAE,sBAAsB,EAC9B,EAAE,EAAE,wBAAwB,GAAG,IAAI,EACnC,OAAO,EAAE;IACP,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,GACA,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAkJhC"}
@@ -5,41 +5,53 @@
5
5
  */
6
6
  import { afterRead } from '../../fields/hooks/afterRead/index.js';
7
7
  import { deserializeJsonFields } from '../../utils/json-parsing.js';
8
+ import { publishedOnlyReadFilter } from './drafts.js';
8
9
  import { find } from './find.js';
9
10
  import { selectByIdQuery } from './sqlAdapter.js';
10
11
  export async function findByID(config, db, options) {
11
- const { id, depth = 0, req, populate: populateOption } = options;
12
+ const { id, depth = 0, req, populate: populateOption, draft = false } = options;
12
13
  // Validate depth
13
14
  if (depth < 0 || depth > 3) {
14
15
  throw new Error(`Depth must be between 0 and 3, got ${depth}`);
15
16
  }
16
- // --- Access control enforcement ---
17
+ // --- Access control + draft enforcement ---
17
18
  if (!options.overrideAccess) {
18
19
  const accessConfig = config.access;
19
20
  const readAccess = accessConfig?.read;
21
+ let accessWhere;
20
22
  if (readAccess) {
21
23
  if (!req)
22
24
  return null; // No request context = deny
23
25
  const result = await readAccess({ req, id });
24
26
  if (result === false)
25
27
  return null;
26
- if (result !== true) {
27
- // Row-level access: a WhereClause means "allowed only for rows matching
28
- // this filter". Confirm THIS row matches before returning it — otherwise
29
- // findByID hands back rows the ownership rule was meant to scope out
30
- // (cross-tenant / unpublished-draft leakage). Reuse find()'s AND-merge so
31
- // the filter runs through the same proven path the list view uses (both
32
- // storage adapters); overrideAccess skips re-evaluating the rule.
33
- const scoped = await find(config, db, {
34
- where: { and: [{ id: { equals: id } }, result] },
35
- limit: 1,
36
- depth,
37
- req,
38
- ...(populateOption !== undefined ? { populate: populateOption } : {}),
39
- overrideAccess: true,
40
- });
41
- return scoped.docs[0] ?? null;
42
- }
28
+ if (result !== true)
29
+ accessWhere = result;
30
+ }
31
+ // For a drafts-enabled collection read without draft mode, the row must also
32
+ // be published. draft=true drops THIS filter only — accessWhere still stands.
33
+ const statusFilter = publishedOnlyReadFilter(config, draft);
34
+ if (accessWhere || statusFilter) {
35
+ // Row-level access and/or the published-only filter apply. Route through
36
+ // find()'s AND-merge the same proven path the list view uses on both
37
+ // storage adapters — so findByID cannot hand back a row the ownership rule
38
+ // or draft state was meant to scope out (cross-tenant / draft leakage).
39
+ // overrideAccess skips re-evaluating access.read; find() re-derives the
40
+ // published-only filter itself from `draft`, so only accessWhere is merged
41
+ // in here.
42
+ const where = accessWhere
43
+ ? { and: [{ id: { equals: id } }, accessWhere] }
44
+ : { id: { equals: id } };
45
+ const scoped = await find(config, db, {
46
+ where,
47
+ limit: 1,
48
+ depth,
49
+ req,
50
+ draft,
51
+ ...(populateOption !== undefined ? { populate: populateOption } : {}),
52
+ overrideAccess: true,
53
+ });
54
+ return scoped.docs[0] ?? null;
43
55
  }
44
56
  }
45
57
  if (db?.collectionStorage?.findByID) {
@@ -60,7 +72,7 @@ export async function findByID(config, db, options) {
60
72
  currentDepth: 1,
61
73
  depth,
62
74
  doc,
63
- draft: false,
75
+ draft,
64
76
  fallbackLocale: req.fallbackLocale || 'en',
65
77
  findMany: false,
66
78
  flattenLocales: true,
@@ -107,7 +119,7 @@ export async function findByID(config, db, options) {
107
119
  currentDepth: 1,
108
120
  depth,
109
121
  doc,
110
- draft: false,
122
+ draft,
111
123
  fallbackLocale: req.fallbackLocale || 'en',
112
124
  findMany: false,
113
125
  flattenLocales: true,
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Snapshot Operations
3
+ *
4
+ * Point-in-time revisions of a document, modeled on the `page_revisions`
5
+ * pattern (per-doc revision number, content snapshot, createdBy,
6
+ * changeDescription).
7
+ *
8
+ * Persistence lives behind the `collectionStorage` seam so the typed store owns
9
+ * the revision table — the same seam `create`/`update`/`delete` already use.
10
+ * Core owns the access gate. This deliberately does NOT introduce a parallel
11
+ * dynamic revisions table: snapshots require a registered typed storage
12
+ * adapter, keeping core drafts thin (the edit-session layer owns its own
13
+ * snapshot path and does not route through here).
14
+ */
15
+ import type { QueryableDatabaseAdapter, RevealCollectionConfig, RevealDocument, RevealRequest } from '../../types/index.js';
16
+ export interface SnapshotOptions {
17
+ id: string | number;
18
+ req?: RevealRequest;
19
+ changeDescription?: string;
20
+ overrideAccess?: boolean;
21
+ }
22
+ export interface RestoreOptions {
23
+ id: string | number;
24
+ revisionId: string | number;
25
+ req?: RevealRequest;
26
+ overrideAccess?: boolean;
27
+ }
28
+ export declare function createSnapshot(config: RevealCollectionConfig, db: QueryableDatabaseAdapter | null, options: SnapshotOptions): Promise<RevealDocument>;
29
+ export declare function restoreSnapshot(config: RevealCollectionConfig, db: QueryableDatabaseAdapter | null, options: RestoreOptions): Promise<RevealDocument>;
30
+ //# sourceMappingURL=snapshot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../../../src/collections/operations/snapshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EACV,wBAAwB,EACxB,sBAAsB,EACtB,cAAc,EACd,aAAa,EAEd,MAAM,sBAAsB,CAAC;AAiD9B,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAsB,cAAc,CAClC,MAAM,EAAE,sBAAsB,EAC9B,EAAE,EAAE,wBAAwB,GAAG,IAAI,EACnC,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,cAAc,CAAC,CAczB;AAED,wBAAsB,eAAe,CACnC,MAAM,EAAE,sBAAsB,EAC9B,EAAE,EAAE,wBAAwB,GAAG,IAAI,EACnC,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,cAAc,CAAC,CAczB"}
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Snapshot Operations
3
+ *
4
+ * Point-in-time revisions of a document, modeled on the `page_revisions`
5
+ * pattern (per-doc revision number, content snapshot, createdBy,
6
+ * changeDescription).
7
+ *
8
+ * Persistence lives behind the `collectionStorage` seam so the typed store owns
9
+ * the revision table — the same seam `create`/`update`/`delete` already use.
10
+ * Core owns the access gate. This deliberately does NOT introduce a parallel
11
+ * dynamic revisions table: snapshots require a registered typed storage
12
+ * adapter, keeping core drafts thin (the edit-session layer owns its own
13
+ * snapshot path and does not route through here).
14
+ */
15
+ import { find } from './find.js';
16
+ function accessDenied() {
17
+ return new Error('Access denied: insufficient permissions to snapshot this document');
18
+ }
19
+ function snapshotUnsupported(slug) {
20
+ const err = new Error(`Snapshots are not supported for collection '${slug}': no typed storage adapter is registered.`);
21
+ err.statusCode = 501;
22
+ return err;
23
+ }
24
+ /**
25
+ * Confirm the caller may write the target document — snapshotting and restoring
26
+ * are part of the edit lifecycle. Reuses `access.update` and the same row-level
27
+ * scoping `update()` uses, so a caller cannot snapshot or restore a row outside
28
+ * its scope.
29
+ */
30
+ async function assertWriteAccess(config, db, id, req, overrideAccess) {
31
+ if (overrideAccess)
32
+ return;
33
+ const updateAccess = config.access?.update;
34
+ if (!updateAccess)
35
+ return;
36
+ if (!req)
37
+ throw accessDenied();
38
+ const result = await updateAccess({ req, id });
39
+ if (result === false)
40
+ throw accessDenied();
41
+ if (result !== true) {
42
+ const scoped = await find(config, db, {
43
+ where: { and: [{ id: { equals: id } }, result] },
44
+ limit: 1,
45
+ req,
46
+ overrideAccess: true,
47
+ });
48
+ if (scoped.docs.length === 0)
49
+ throw accessDenied();
50
+ }
51
+ }
52
+ export async function createSnapshot(config, db, options) {
53
+ const { id, req, changeDescription } = options;
54
+ await assertWriteAccess(config, db, id, req, options.overrideAccess);
55
+ const seam = db?.collectionStorage?.snapshot;
56
+ if (!seam)
57
+ throw snapshotUnsupported(config.slug);
58
+ const revision = await seam(config, {
59
+ id,
60
+ ...(req ? { req } : {}),
61
+ ...(changeDescription !== undefined ? { changeDescription } : {}),
62
+ });
63
+ if (revision === undefined)
64
+ throw snapshotUnsupported(config.slug);
65
+ return revision;
66
+ }
67
+ export async function restoreSnapshot(config, db, options) {
68
+ const { id, revisionId, req } = options;
69
+ await assertWriteAccess(config, db, id, req, options.overrideAccess);
70
+ const seam = db?.collectionStorage?.restore;
71
+ if (!seam)
72
+ throw snapshotUnsupported(config.slug);
73
+ const restored = await seam(config, {
74
+ id,
75
+ revisionId,
76
+ ...(req ? { req } : {}),
77
+ });
78
+ if (restored === undefined)
79
+ throw snapshotUnsupported(config.slug);
80
+ return restored;
81
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/collections/operations/update.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EACV,wBAAwB,EACxB,sBAAsB,EACtB,cAAc,EAGd,mBAAmB,EAEpB,MAAM,sBAAsB,CAAC;AAmF9B,wBAAsB,MAAM,CAC1B,MAAM,EAAE,sBAAsB,EAC9B,EAAE,EAAE,wBAAwB,GAAG,IAAI,EACnC,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,cAAc,CAAC,CAgNzB"}
1
+ {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/collections/operations/update.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EACV,wBAAwB,EACxB,sBAAsB,EACtB,cAAc,EAGd,mBAAmB,EAEpB,MAAM,sBAAsB,CAAC;AAoF9B,wBAAsB,MAAM,CAC1B,MAAM,EAAE,sBAAsB,EAC9B,EAAE,EAAE,wBAAwB,GAAG,IAAI,EACnC,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,cAAc,CAAC,CAsOzB"}
@@ -8,6 +8,7 @@ import { defaultLogger } from '../../instance/logger.js';
8
8
  import { collectJsonFields, serializeValueForDatabase } from '../../utils/json-parsing.js';
9
9
  import { flattenFields, isJsonFieldType } from '../../utils/type-guards.js';
10
10
  import { runBeforeFieldHooks } from './fieldHooks.js';
11
+ import { runFieldValidators } from './fieldValidation.js';
11
12
  import { find } from './find.js';
12
13
  import { findByID } from './findById.js';
13
14
  import { checkExistsByIdQuery, selectJsonByIdQuery, updateByIdQuery, updateByIdWithVersionQuery, } from './sqlAdapter.js';
@@ -109,6 +110,10 @@ export async function update(config, db, options) {
109
110
  }
110
111
  }
111
112
  }
113
+ // Run field-level `validate` predicates for the fields present in this patch,
114
+ // after the built-in email check and before beforeChange hooks. Throws a
115
+ // ValidationError (HTTP 400) on the first failing field.
116
+ await runFieldValidators(config, data, 'update', options.req);
112
117
  // Run beforeChange field hooks after validation but before the DB write.
113
118
  await runBeforeFieldHooks(config, data, 'update', 'beforeChange', undefined, options.req);
114
119
  // Hash password if present and not already hashed (doesn't start with $2a$ or $2b$)
@@ -116,6 +121,21 @@ export async function update(config, db, options) {
116
121
  const saltRounds = 12;
117
122
  data.password = await bcrypt.hash(data.password, saltRounds);
118
123
  }
124
+ // Typed-storage write seam: a registered collectionStorage adapter may own
125
+ // this collection's writes. It receives the hook-processed `data` and returns
126
+ // the updated document, throws for not-found / optimistic-lock 409, or returns
127
+ // `undefined` to defer to the dynamic-SQL path below (same not-handled
128
+ // contract as the read seam).
129
+ if (db?.collectionStorage?.update) {
130
+ const doc = await db.collectionStorage.update(config, {
131
+ id,
132
+ data,
133
+ ...(options.req ? { req: options.req } : {}),
134
+ });
135
+ if (doc !== undefined) {
136
+ return doc;
137
+ }
138
+ }
119
139
  if (db?.query) {
120
140
  // Dynamic collection storage is quarantined in sqlAdapter.ts until this
121
141
  // layer is redesigned around typed tables that Drizzle can model directly.
@@ -135,6 +155,7 @@ export async function update(config, db, options) {
135
155
  'created_at',
136
156
  'updated_at',
137
157
  '_json',
158
+ '_status',
138
159
  'password',
139
160
  ]);
140
161
  if (config.fields) {
@@ -1 +1 @@
1
- {"version":3,"file":"error-boundary.d.ts","sourceRoot":"","sources":["../../src/error-handling/error-boundary.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGzD,MAAM,WAAW,SAAS;IACxB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,SAAS,KAAK,SAAS,CAAC,CAAC;IAC5E,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EA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AAED,qBAAa,eAAgB,SAAQ,KAAK;IAG/B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;gBADtC,OAAO,EAAE,MAAM,EACR,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,YAAA;CAKzC;AAED,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,aAAc,SAAQ,KAAK;IAG7B,QAAQ,CAAC,EAAE,MAAM;gBADxB,OAAO,EAAE,MAAM,EACR,QAAQ,CAAC,EAAE,MAAM,YAAA;CAK3B;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAEpE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAI1E;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,mBAAmB,CAKlF;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAItE;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;AAEnE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,aAAa,CAO5D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAStD"}
@@ -79,33 +79,37 @@ export class ErrorBoundary extends Component {
79
79
  }
80
80
  function DefaultErrorFallback({ error, errorInfo, onReset, isolate, }) {
81
81
  if (isolate) {
82
- return (_jsx("div", { style: { padding: '16px', border: '1px solid #f44336', borderRadius: '4px' }, children: _jsx("p", { style: { color: '#f44336', fontWeight: 'bold' }, children: "Something went wrong" }) }));
82
+ return (_jsx("div", { style: {
83
+ padding: '16px',
84
+ border: '1px solid var(--rvui-error, #f44336)',
85
+ borderRadius: '4px',
86
+ }, children: _jsx("p", { style: { color: 'var(--rvui-error, #f44336)', fontWeight: 'bold' }, children: "Something went wrong" }) }));
83
87
  }
84
88
  return (_jsxs("div", { role: "alert", style: {
85
89
  padding: '24px',
86
90
  maxWidth: '600px',
87
91
  margin: '40px auto',
88
- backgroundColor: '#fff',
89
- border: '1px solid #f44336',
92
+ backgroundColor: 'var(--rvui-surface-0, #fff)',
93
+ border: '1px solid var(--rvui-error, #f44336)',
90
94
  borderRadius: '8px',
91
- }, children: [_jsx("h2", { style: { color: '#f44336', marginTop: 0 }, children: "Something went wrong" }), _jsx("p", { style: { color: '#666' }, children: "An error occurred while rendering this component." }), process.env.NODE_ENV === 'development' && (_jsxs("details", { style: { marginTop: '16px' }, children: [_jsx("summary", { style: { cursor: 'pointer', fontWeight: 'bold' }, children: "Error details" }), _jsx("pre", { style: {
95
+ }, children: [_jsx("h2", { style: { color: 'var(--rvui-error, #f44336)', marginTop: 0 }, children: "Something went wrong" }), _jsx("p", { style: { color: 'var(--rvui-text-2, #666)' }, children: "An error occurred while rendering this component." }), process.env.NODE_ENV === 'development' && (_jsxs("details", { style: { marginTop: '16px' }, children: [_jsx("summary", { style: { cursor: 'pointer', fontWeight: 'bold' }, children: "Error details" }), _jsx("pre", { style: {
92
96
  marginTop: '8px',
93
97
  padding: '12px',
94
- backgroundColor: '#f5f5f5',
98
+ backgroundColor: 'var(--rvui-surface-2, #f5f5f5)',
95
99
  borderRadius: '4px',
96
100
  overflow: 'auto',
97
101
  fontSize: '12px',
98
102
  }, children: error.toString() }), _jsx("pre", { style: {
99
103
  marginTop: '8px',
100
104
  padding: '12px',
101
- backgroundColor: '#f5f5f5',
105
+ backgroundColor: 'var(--rvui-surface-2, #f5f5f5)',
102
106
  borderRadius: '4px',
103
107
  overflow: 'auto',
104
108
  fontSize: '12px',
105
109
  }, children: errorInfo?.componentStack })] })), _jsx("button", { type: "button", onClick: onReset, style: {
106
110
  marginTop: '16px',
107
111
  padding: '8px 16px',
108
- backgroundColor: '#2196f3',
112
+ backgroundColor: 'var(--rvui-brand, #2196f3)',
109
113
  color: '#fff',
110
114
  border: 'none',
111
115
  borderRadius: '4px',
@@ -1 +1 @@
1
- {"version":3,"file":"fallback-components.d.ts","sourceRoot":"","sources":["../../src/error-handling/fallback-components.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,OAAO,EACP,SAAS,EACT,KAA8B,EAC9B,OAAO,EACP,WAAoD,EACpD,OAAe,GAChB,EAAE,kBAAkB,GAAG,KAAK,CAAC,YAAY,CA6HzC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,OAAO,EACP,OAAmF,GACpF,EAAE;IACD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,KAAK,CAAC,YAAY,CAiCrB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,KAAwB,EACxB,OAAwD,EACxD,QAAQ,GACT,EAAE;IACD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,GAAG,KAAK,CAAC,YAAY,CAiCrB;AAED;;GAEG;AACH,wB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E,MAAM,IAAI,CAAC;CACxB,GAAG,KAAK,CAAC,YAAY,CA0DrB;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,EACvB,KAAc,EACd,MAAe,EACf,YAAoB,GACrB,EAAE;IACD,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,KAAK,CAAC,YAAY,CAqBrB"}
1
+ {"version":3,"file":"fallback-components.d.ts","sourceRoot":"","sources":["../../src/error-handling/fallback-components.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,OAAO,EACP,SAAS,EACT,KAA8B,EAC9B,OAAO,EACP,WAAoD,EACpD,OAAe,GAChB,EAAE,kBAAkB,GAAG,KAAK,CAAC,YAAY,CA6HzC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,OAAO,EACP,OAAmF,GACpF,EAAE;IACD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,KAAK,CAAC,YAAY,CAiCrB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,KAAwB,EACxB,OAAwD,EACxD,QAA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Ae,EACf,SAAS,GACV,EAAE;IACD,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,GAAG,KAAK,CAAC,YAAY,CA8ErB;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,EACvB,KAAc,EACd,MAAe,EACf,YAAoB,GACrB,EAAE;IACD,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,KAAK,CAAC,YAAY,CAqBrB"}
@@ -13,15 +13,15 @@ export function ErrorFallback({ error, onRetry, onDismiss, title = 'Something we
13
13
  if (compact) {
14
14
  return (_jsxs("div", { style: {
15
15
  padding: '12px',
16
- backgroundColor: '#fee',
17
- border: '1px solid #fcc',
16
+ backgroundColor: 'var(--rvui-error-subtle, #fee)',
17
+ border: '1px solid var(--rvui-error, #fcc)',
18
18
  borderRadius: '4px',
19
- color: '#c00',
19
+ color: 'var(--rvui-error, #c00)',
20
20
  }, children: [_jsx("strong", { children: title }), message && _jsx("p", { style: { margin: '4px 0 0 0', fontSize: '14px' }, children: message }), onRetry && (_jsx("button", { type: "button", onClick: onRetry, style: {
21
21
  marginTop: '8px',
22
22
  padding: '4px 12px',
23
23
  fontSize: '12px',
24
- backgroundColor: '#c00',
24
+ backgroundColor: 'var(--rvui-error, #c00)',
25
25
  color: '#fff',
26
26
  border: 'none',
27
27
  borderRadius: '4px',
@@ -32,28 +32,28 @@ export function ErrorFallback({ error, onRetry, onDismiss, title = 'Something we
32
32
  padding: '24px',
33
33
  maxWidth: '600px',
34
34
  margin: '40px auto',
35
- backgroundColor: '#fff',
36
- border: '2px solid #f44336',
35
+ backgroundColor: 'var(--rvui-surface-0, #fff)',
36
+ border: '2px solid var(--rvui-error, #f44336)',
37
37
  borderRadius: '8px',
38
38
  boxShadow: '0 2px 8px rgba(0,0,0,0.1)',
39
- }, children: [_jsx("h2", { style: { color: '#f44336', marginTop: 0 }, children: title }), _jsx("p", { style: { color: '#666', lineHeight: 1.6 }, children: message || 'An unexpected error occurred. Please try again.' }), showDetails && error && (_jsxs("details", { style: { marginTop: '16px' }, children: [_jsx("summary", { style: {
39
+ }, children: [_jsx("h2", { style: { color: 'var(--rvui-error, #f44336)', marginTop: 0 }, children: title }), _jsx("p", { style: { color: 'var(--rvui-text-2, #666)', lineHeight: 1.6 }, children: message || 'An unexpected error occurred. Please try again.' }), showDetails && error && (_jsxs("details", { style: { marginTop: '16px' }, children: [_jsx("summary", { style: {
40
40
  cursor: 'pointer',
41
41
  fontWeight: 'bold',
42
- color: '#333',
42
+ color: 'var(--rvui-text-1, #333)',
43
43
  padding: '8px',
44
- backgroundColor: '#f5f5f5',
44
+ backgroundColor: 'var(--rvui-surface-2, #f5f5f5)',
45
45
  borderRadius: '4px',
46
46
  }, children: "Error details" }), _jsxs("pre", { style: {
47
47
  marginTop: '8px',
48
48
  padding: '12px',
49
- backgroundColor: '#f5f5f5',
49
+ backgroundColor: 'var(--rvui-surface-2, #f5f5f5)',
50
50
  borderRadius: '4px',
51
51
  overflow: 'auto',
52
52
  fontSize: '12px',
53
- color: '#c00',
53
+ color: 'var(--rvui-error, #c00)',
54
54
  }, children: [error.name, ": ", error.message, error.stack && `\n\n${error.stack}`] })] })), _jsxs("div", { style: { marginTop: '24px', display: 'flex', gap: '12px' }, children: [onRetry && (_jsx("button", { type: "button", onClick: onRetry, style: {
55
55
  padding: '10px 20px',
56
- backgroundColor: '#2196f3',
56
+ backgroundColor: 'var(--rvui-brand, #2196f3)',
57
57
  color: '#fff',
58
58
  border: 'none',
59
59
  borderRadius: '4px',
@@ -61,9 +61,9 @@ export function ErrorFallback({ error, onRetry, onDismiss, title = 'Something we
61
61
  fontWeight: 'bold',
62
62
  }, children: "Try Again" })), onDismiss && (_jsx("button", { type: "button", onClick: onDismiss, style: {
63
63
  padding: '10px 20px',
64
- backgroundColor: '#fff',
65
- color: '#666',
66
- border: '1px solid #ddd',
64
+ backgroundColor: 'var(--rvui-surface-0, #fff)',
65
+ color: 'var(--rvui-text-2, #666)',
66
+ border: '1px solid var(--rvui-border, #ddd)',
67
67
  borderRadius: '4px',
68
68
  cursor: 'pointer',
69
69
  }, children: "Dismiss" }))] })] }));
@@ -77,10 +77,10 @@ export function NetworkErrorFallback({ onRetry, message = 'Unable to connect to
77
77
  textAlign: 'center',
78
78
  maxWidth: '400px',
79
79
  margin: '40px auto',
80
- }, children: [_jsx("div", { style: { fontSize: '48px', marginBottom: '16px' }, children: "\uD83D\uDCE1" }), _jsx("h3", { style: { color: '#333', marginTop: 0 }, children: "Connection Error" }), _jsx("p", { style: { color: '#666', lineHeight: 1.6 }, children: message }), onRetry && (_jsx("button", { type: "button", onClick: onRetry, style: {
80
+ }, children: [_jsx("div", { style: { fontSize: '48px', marginBottom: '16px' }, children: "\uD83D\uDCE1" }), _jsx("h3", { style: { color: 'var(--rvui-text-1, #333)', marginTop: 0 }, children: "Connection Error" }), _jsx("p", { style: { color: 'var(--rvui-text-2, #666)', lineHeight: 1.6 }, children: message }), onRetry && (_jsx("button", { type: "button", onClick: onRetry, style: {
81
81
  marginTop: '16px',
82
82
  padding: '10px 20px',
83
- backgroundColor: '#2196f3',
83
+ backgroundColor: 'var(--rvui-brand, #2196f3)',
84
84
  color: '#fff',
85
85
  border: 'none',
86
86
  borderRadius: '4px',
@@ -97,10 +97,10 @@ export function NotFoundFallback({ title = 'Page Not Found', message = 'The page
97
97
  textAlign: 'center',
98
98
  maxWidth: '400px',
99
99
  margin: '40px auto',
100
- }, children: [_jsx("div", { style: { fontSize: '72px', marginBottom: '16px' }, children: "404" }), _jsx("h2", { style: { color: '#333', marginTop: 0 }, children: title }), _jsx("p", { style: { color: '#666', lineHeight: 1.6 }, children: message }), onGoHome && (_jsx("button", { type: "button", onClick: onGoHome, style: {
100
+ }, children: [_jsx("div", { style: { fontSize: '72px', marginBottom: '16px' }, children: "404" }), _jsx("h2", { style: { color: 'var(--rvui-text-1, #333)', marginTop: 0 }, children: title }), _jsx("p", { style: { color: 'var(--rvui-text-2, #666)', lineHeight: 1.6 }, children: message }), onGoHome && (_jsx("button", { type: "button", onClick: onGoHome, style: {
101
101
  marginTop: '16px',
102
102
  padding: '10px 20px',
103
- backgroundColor: '#2196f3',
103
+ backgroundColor: 'var(--rvui-brand, #2196f3)',
104
104
  color: '#fff',
105
105
  border: 'none',
106
106
  borderRadius: '4px',
@@ -135,11 +135,11 @@ export function LoadingFallback({ message = 'Loading...', timeout, onTimeout, })
135
135
  width: '40px',
136
136
  height: '40px',
137
137
  margin: '0 auto 16px',
138
- border: '4px solid #f3f3f3',
139
- borderTop: '4px solid #2196f3',
138
+ border: '4px solid var(--rvui-surface-2, #f3f3f3)',
139
+ borderTop: '4px solid var(--rvui-brand, #2196f3)',
140
140
  borderRadius: '50%',
141
141
  animation: 'spin 1s linear infinite',
142
- } }), _jsx("p", { style: { color: '#666' }, children: message }), _jsx("style", { children: `
142
+ } }), _jsx("p", { style: { color: 'var(--rvui-text-2, #666)' }, children: message }), _jsx("style", { children: `
143
143
  @keyframes spin {
144
144
  0% { transform: rotate(0deg); }
145
145
  100% { transform: rotate(360deg); }
@@ -152,10 +152,10 @@ export function LoadingFallback({ message = 'Loading...', timeout, onTimeout, })
152
152
  export function OfflineFallback({ message = 'You are currently offline. Some features may be unavailable.', children, }) {
153
153
  return (_jsxs("div", { children: [_jsxs("div", { style: {
154
154
  padding: '12px 16px',
155
- backgroundColor: '#fff3cd',
156
- borderBottom: '1px solid #ffc107',
155
+ backgroundColor: 'var(--rvui-warning-subtle, #fff3cd)',
156
+ borderBottom: '1px solid var(--rvui-warning, #ffc107)',
157
157
  textAlign: 'center',
158
- color: '#856404',
158
+ color: 'var(--rvui-warning-text, #856404)',
159
159
  }, children: [_jsx("strong", { children: "\u26A0\uFE0F Offline Mode" }), _jsx("span", { style: { marginLeft: '8px', fontSize: '14px' }, children: message })] }), children] }));
160
160
  }
161
161
  /**
@@ -168,10 +168,10 @@ export function DegradedServiceFallback({ serviceName, message, children, }) {
168
168
  : 'Some services are experiencing issues. Functionality may be limited.');
169
169
  return (_jsxs("div", { children: [_jsxs("div", { style: {
170
170
  padding: '12px 16px',
171
- backgroundColor: '#fff3cd',
172
- borderBottom: '1px solid #ffc107',
171
+ backgroundColor: 'var(--rvui-warning-subtle, #fff3cd)',
172
+ borderBottom: '1px solid var(--rvui-warning, #ffc107)',
173
173
  textAlign: 'center',
174
- color: '#856404',
174
+ color: 'var(--rvui-warning-text, #856404)',
175
175
  }, children: [_jsx("strong", { children: "\u26A0\uFE0F Service Degraded" }), _jsx("span", { style: { marginLeft: '8px', fontSize: '14px' }, children: displayMessage })] }), children] }));
176
176
  }
177
177
  /**
@@ -183,7 +183,7 @@ export function MaintenanceFallback({ title = 'Under Maintenance', message = 'We
183
183
  textAlign: 'center',
184
184
  maxWidth: '500px',
185
185
  margin: '40px auto',
186
- }, children: [_jsx("div", { style: { fontSize: '64px', marginBottom: '24px' }, children: "\uD83D\uDD27" }), _jsx("h1", { style: { color: '#333', marginTop: 0 }, children: title }), _jsx("p", { style: { color: '#666', lineHeight: 1.6, fontSize: '16px' }, children: message }), estimatedTime && (_jsxs("p", { style: { color: '#999', marginTop: '16px' }, children: ["Estimated completion: ", estimatedTime] }))] }));
186
+ }, children: [_jsx("div", { style: { fontSize: '64px', marginBottom: '24px' }, children: "\uD83D\uDD27" }), _jsx("h1", { style: { color: 'var(--rvui-text-1, #333)', marginTop: 0 }, children: title }), _jsx("p", { style: { color: 'var(--rvui-text-2, #666)', lineHeight: 1.6, fontSize: '16px' }, children: message }), estimatedTime && (_jsxs("p", { style: { color: 'var(--rvui-text-2, #999)', marginTop: '16px' }, children: ["Estimated completion: ", estimatedTime] }))] }));
187
187
  }
188
188
  /**
189
189
  * Permission denied fallback
@@ -194,9 +194,9 @@ export function PermissionDeniedFallback({ message = 'You do not have permission
194
194
  textAlign: 'center',
195
195
  maxWidth: '400px',
196
196
  margin: '40px auto',
197
- }, children: [_jsx("div", { style: { fontSize: '64px', marginBottom: '16px' }, children: "\uD83D\uDD12" }), _jsx("h2", { style: { color: '#333', marginTop: 0 }, children: "Access Denied" }), _jsx("p", { style: { color: '#666', lineHeight: 1.6 }, children: message }), _jsxs("div", { style: { marginTop: '24px', display: 'flex', gap: '12px', justifyContent: 'center' }, children: [onRequestAccess && (_jsx("button", { type: "button", onClick: onRequestAccess, style: {
197
+ }, children: [_jsx("div", { style: { fontSize: '64px', marginBottom: '16px' }, children: "\uD83D\uDD12" }), _jsx("h2", { style: { color: 'var(--rvui-text-1, #333)', marginTop: 0 }, children: "Access Denied" }), _jsx("p", { style: { color: 'var(--rvui-text-2, #666)', lineHeight: 1.6 }, children: message }), _jsxs("div", { style: { marginTop: '24px', display: 'flex', gap: '12px', justifyContent: 'center' }, children: [onRequestAccess && (_jsx("button", { type: "button", onClick: onRequestAccess, style: {
198
198
  padding: '10px 20px',
199
- backgroundColor: '#2196f3',
199
+ backgroundColor: 'var(--rvui-brand, #2196f3)',
200
200
  color: '#fff',
201
201
  border: 'none',
202
202
  borderRadius: '4px',
@@ -204,9 +204,9 @@ export function PermissionDeniedFallback({ message = 'You do not have permission
204
204
  fontWeight: 'bold',
205
205
  }, children: "Request Access" })), onGoBack && (_jsx("button", { type: "button", onClick: onGoBack, style: {
206
206
  padding: '10px 20px',
207
- backgroundColor: '#fff',
208
- color: '#666',
209
- border: '1px solid #ddd',
207
+ backgroundColor: 'var(--rvui-surface-0, #fff)',
208
+ color: 'var(--rvui-text-2, #666)',
209
+ border: '1px solid var(--rvui-border, #ddd)',
210
210
  borderRadius: '4px',
211
211
  cursor: 'pointer',
212
212
  }, children: "Go Back" }))] })] }));
@@ -264,7 +264,7 @@ export function FeatureUnavailableFallback({ featureName, message, }) {
264
264
  textAlign: 'center',
265
265
  maxWidth: '400px',
266
266
  margin: '40px auto',
267
- }, children: [_jsx("div", { style: { fontSize: '48px', marginBottom: '16px' }, children: "\uD83D\uDEA7" }), _jsx("h3", { style: { color: '#333', marginTop: 0 }, children: "Feature Unavailable" }), _jsx("p", { style: { color: '#666', lineHeight: 1.6 }, children: message || `The "${featureName}" feature is currently unavailable.` })] }));
267
+ }, children: [_jsx("div", { style: { fontSize: '48px', marginBottom: '16px' }, children: "\uD83D\uDEA7" }), _jsx("h3", { style: { color: 'var(--rvui-text-1, #333)', marginTop: 0 }, children: "Feature Unavailable" }), _jsx("p", { style: { color: 'var(--rvui-text-2, #666)', lineHeight: 1.6 }, children: message || `The "${featureName}" feature is currently unavailable.` })] }));
268
268
  }
269
269
  /**
270
270
  * Inline error message
@@ -272,17 +272,17 @@ export function FeatureUnavailableFallback({ featureName, message, }) {
272
272
  export function InlineError({ message, onDismiss, }) {
273
273
  return (_jsxs("div", { role: "alert", style: {
274
274
  padding: '12px 16px',
275
- backgroundColor: '#fee',
276
- border: '1px solid #fcc',
275
+ backgroundColor: 'var(--rvui-error-subtle, #fee)',
276
+ border: '1px solid var(--rvui-error, #fcc)',
277
277
  borderRadius: '4px',
278
- color: '#c00',
278
+ color: 'var(--rvui-error, #c00)',
279
279
  display: 'flex',
280
280
  alignItems: 'center',
281
281
  justifyContent: 'space-between',
282
282
  }, children: [_jsxs("span", { style: { display: 'flex', alignItems: 'center' }, children: [_jsx("span", { style: { marginRight: '8px' }, children: "\u26A0\uFE0F" }), message] }), onDismiss && (_jsx("button", { type: "button", onClick: onDismiss, style: {
283
283
  background: 'none',
284
284
  border: 'none',
285
- color: '#c00',
285
+ color: 'var(--rvui-error, #c00)',
286
286
  cursor: 'pointer',
287
287
  fontSize: '18px',
288
288
  padding: '0 4px',
@@ -294,17 +294,17 @@ export function InlineError({ message, onDismiss, }) {
294
294
  export function SuccessMessage({ message, onDismiss, }) {
295
295
  return (_jsxs("output", { style: {
296
296
  padding: '12px 16px',
297
- backgroundColor: '#efe',
298
- border: '1px solid #cec',
297
+ backgroundColor: 'var(--rvui-success-subtle, #efe)',
298
+ border: '1px solid var(--rvui-success, #cec)',
299
299
  borderRadius: '4px',
300
- color: '#060',
300
+ color: 'var(--rvui-success, #060)',
301
301
  display: 'flex',
302
302
  alignItems: 'center',
303
303
  justifyContent: 'space-between',
304
304
  }, children: [_jsxs("span", { style: { display: 'flex', alignItems: 'center' }, children: [_jsx("span", { style: { marginRight: '8px' }, children: "\u2713" }), message] }), onDismiss && (_jsx("button", { type: "button", onClick: onDismiss, style: {
305
305
  background: 'none',
306
306
  border: 'none',
307
- color: '#060',
307
+ color: 'var(--rvui-success, #060)',
308
308
  cursor: 'pointer',
309
309
  fontSize: '18px',
310
310
  padding: '0 4px',
@@ -322,10 +322,30 @@ export function Toast({ type = 'info', message, duration = 5000, onDismiss, }) {
322
322
  return undefined;
323
323
  }, [duration, onDismiss]);
324
324
  const colors = {
325
- success: { bg: '#efe', border: '#cec', text: '#060', icon: '✓' },
326
- error: { bg: '#fee', border: '#fcc', text: '#c00', icon: '✗' },
327
- warning: { bg: '#fff3cd', border: '#ffc107', text: '#856404', icon: '!' },
328
- info: { bg: '#e7f3ff', border: '#2196f3', text: '#0c5393', icon: 'i' },
325
+ success: {
326
+ bg: 'var(--rvui-success-subtle, #efe)',
327
+ border: 'var(--rvui-success, #cec)',
328
+ text: 'var(--rvui-success, #060)',
329
+ icon: '✓',
330
+ },
331
+ error: {
332
+ bg: 'var(--rvui-error-subtle, #fee)',
333
+ border: 'var(--rvui-error, #fcc)',
334
+ text: 'var(--rvui-error, #c00)',
335
+ icon: '✗',
336
+ },
337
+ warning: {
338
+ bg: 'var(--rvui-warning-subtle, #fff3cd)',
339
+ border: 'var(--rvui-warning, #ffc107)',
340
+ text: 'var(--rvui-warning-text, #856404)',
341
+ icon: '!',
342
+ },
343
+ info: {
344
+ bg: 'var(--rvui-info-subtle, #e7f3ff)',
345
+ border: 'var(--rvui-brand, #2196f3)',
346
+ text: 'var(--rvui-brand, #0c5393)',
347
+ icon: 'i',
348
+ },
329
349
  };
330
350
  const color = colors[type];
331
351
  return (_jsxs("div", { style: {
@@ -360,7 +380,7 @@ export function Skeleton({ width = '100%', height = '20px', borderRadius = '4px'
360
380
  width,
361
381
  height,
362
382
  borderRadius,
363
- backgroundColor: '#e0e0e0',
383
+ backgroundColor: 'var(--rvui-surface-2, #e0e0e0)',
364
384
  animation: 'pulse 1.5s ease-in-out infinite',
365
385
  }, children: _jsx("style", { children: `
366
386
  @keyframes pulse {