@powerhousedao/knowledge-note 1.0.3 → 1.0.4

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 (30) hide show
  1. package/README.md +359 -122
  2. package/dist/editors/knowledge-vault/components/DriveExplorer.d.ts.map +1 -1
  3. package/dist/editors/knowledge-vault/components/DriveExplorer.js +8 -2
  4. package/dist/editors/knowledge-vault/components/SearchView.d.ts +2 -0
  5. package/dist/editors/knowledge-vault/components/SearchView.d.ts.map +1 -0
  6. package/dist/editors/knowledge-vault/components/SearchView.js +96 -0
  7. package/dist/editors/knowledge-vault/hooks/use-graph-search.d.ts +25 -0
  8. package/dist/editors/knowledge-vault/hooks/use-graph-search.d.ts.map +1 -0
  9. package/dist/editors/knowledge-vault/hooks/use-graph-search.js +198 -0
  10. package/dist/package.json +2 -1
  11. package/dist/processors/graph-indexer/embedder.d.ts +5 -0
  12. package/dist/processors/graph-indexer/embedder.d.ts.map +1 -0
  13. package/dist/processors/graph-indexer/embedder.js +27 -0
  14. package/dist/processors/graph-indexer/embedding-store.d.ts +11 -0
  15. package/dist/processors/graph-indexer/embedding-store.d.ts.map +1 -0
  16. package/dist/processors/graph-indexer/embedding-store.js +70 -0
  17. package/dist/processors/graph-indexer/index.d.ts.map +1 -1
  18. package/dist/processors/graph-indexer/index.js +48 -0
  19. package/dist/processors/graph-indexer/migrations.d.ts.map +1 -1
  20. package/dist/processors/graph-indexer/migrations.js +35 -0
  21. package/dist/processors/graph-indexer/query.d.ts +21 -0
  22. package/dist/processors/graph-indexer/query.d.ts.map +1 -1
  23. package/dist/processors/graph-indexer/query.js +154 -13
  24. package/dist/processors/graph-indexer/schema.d.ts +11 -0
  25. package/dist/processors/graph-indexer/schema.d.ts.map +1 -1
  26. package/dist/style.css +63 -0
  27. package/dist/subgraphs/knowledge-graph/subgraph.d.ts +321 -12
  28. package/dist/subgraphs/knowledge-graph/subgraph.d.ts.map +1 -1
  29. package/dist/subgraphs/knowledge-graph/subgraph.js +237 -15
  30. package/package.json +2 -1
@@ -7,6 +7,10 @@ export interface GraphNodeResult {
7
7
  description: string | null;
8
8
  noteType: string | null;
9
9
  status: string | null;
10
+ content: string | null;
11
+ author: string | null;
12
+ sourceOrigin: string | null;
13
+ createdAt: string | null;
10
14
  updatedAt: string;
11
15
  }
12
16
  export interface GraphEdgeResult {
@@ -27,6 +31,15 @@ export interface ConnectionResult {
27
31
  depth: number;
28
32
  viaLinkType: string | null;
29
33
  }
34
+ export interface TopicStatsResult {
35
+ name: string;
36
+ noteCount: number;
37
+ }
38
+ export interface RelatedByTopicResult {
39
+ node: GraphNodeResult;
40
+ sharedTopics: string[];
41
+ sharedTopicCount: number;
42
+ }
30
43
  export declare function createGraphQuery(db: Kysely<DB>): {
31
44
  allNodes(): Promise<GraphNodeResult[]>;
32
45
  allEdges(): Promise<GraphEdgeResult[]>;
@@ -45,5 +58,13 @@ export declare function createGraphQuery(db: Kysely<DB>): {
45
58
  sharedTarget: GraphNodeResult;
46
59
  }>>;
47
60
  bridges(): Promise<GraphNodeResult[]>;
61
+ topicStats(): Promise<TopicStatsResult[]>;
62
+ topicsForNode(documentId: string): Promise<string[]>;
63
+ nodesByTopic(topic: string): Promise<GraphNodeResult[]>;
64
+ relatedByTopic(documentId: string, limit?: number): Promise<RelatedByTopicResult[]>;
65
+ fullSearch(query: string, limit?: number): Promise<GraphNodeResult[]>;
66
+ nodesByAuthor(author: string): Promise<GraphNodeResult[]>;
67
+ nodesByOrigin(origin: string): Promise<GraphNodeResult[]>;
68
+ recentNodes(limit?: number, since?: string): Promise<GraphNodeResult[]>;
48
69
  };
49
70
  //# sourceMappingURL=query.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../processors/graph-indexer/query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,KAAK,EAAE,EAAE,EAAwB,MAAM,aAA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;8BAcf,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;wBAShC,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;+BAe/C,MAAM,mBAEjB,OAAO,CAAC,oBAAoB,EAAE,CAAC;sBAoDV,MAAM,mBAAe,OAAO,CAAC,eAAe,EAAE,CAAC;0BAiB3C,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;0BASnC,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;wCASzB,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;EAe5E"}
@@ -1,3 +1,4 @@
1
+ import { sql } from "kysely";
1
2
  function rowToNode(row) {
2
3
  return {
3
4
  id: row.id,
@@ -6,6 +7,10 @@ function rowToNode(row) {
6
7
  description: row.description,
7
8
  noteType: row.note_type,
8
9
  status: row.status,
10
+ content: row.content,
11
+ author: row.author,
12
+ sourceOrigin: row.source_origin,
13
+ createdAt: row.created_at,
9
14
  updatedAt: row.updated_at,
10
15
  };
11
16
  }
@@ -55,14 +60,24 @@ export function createGraphQuery(db) {
55
60
  return rows.map(rowToNode);
56
61
  },
57
62
  async stats() {
58
- const nodes = await db.selectFrom("graph_nodes").selectAll().execute();
59
- const edges = await db.selectFrom("graph_edges").selectAll().execute();
60
- const targetIds = new Set(edges.map((e) => e.target_document_id));
61
- const orphanCount = nodes.filter((n) => !targetIds.has(n.document_id)).length;
63
+ const nodeCountResult = await db
64
+ .selectFrom("graph_nodes")
65
+ .select(sql `count(*)`.as("cnt"))
66
+ .executeTakeFirstOrThrow();
67
+ const edgeCountResult = await db
68
+ .selectFrom("graph_edges")
69
+ .select(sql `count(*)`.as("cnt"))
70
+ .executeTakeFirstOrThrow();
71
+ // Orphans: nodes not targeted by any edge
72
+ const orphanResult = await db
73
+ .selectFrom("graph_nodes")
74
+ .select(sql `count(*)`.as("cnt"))
75
+ .where("document_id", "not in", db.selectFrom("graph_edges").select("target_document_id"))
76
+ .executeTakeFirstOrThrow();
62
77
  return {
63
- nodeCount: nodes.length,
64
- edgeCount: edges.length,
65
- orphanCount,
78
+ nodeCount: Number(nodeCountResult.cnt),
79
+ edgeCount: Number(edgeCountResult.cnt),
80
+ orphanCount: Number(orphanResult.cnt),
66
81
  };
67
82
  },
68
83
  async connections(documentId, maxDepth = 2) {
@@ -110,11 +125,19 @@ export function createGraphQuery(db) {
110
125
  return rows.map(rowToEdge);
111
126
  },
112
127
  async density() {
113
- const nodes = await db.selectFrom("graph_nodes").selectAll().execute();
114
- const edges = await db.selectFrom("graph_edges").selectAll().execute();
115
- if (nodes.length <= 1)
128
+ const nodeCountResult = await db
129
+ .selectFrom("graph_nodes")
130
+ .select(sql `count(*)`.as("cnt"))
131
+ .executeTakeFirstOrThrow();
132
+ const edgeCountResult = await db
133
+ .selectFrom("graph_edges")
134
+ .select(sql `count(*)`.as("cnt"))
135
+ .executeTakeFirstOrThrow();
136
+ const nodeCount = Number(nodeCountResult.cnt);
137
+ const edgeCount = Number(edgeCountResult.cnt);
138
+ if (nodeCount <= 1)
116
139
  return 0;
117
- return edges.length / (nodes.length * (nodes.length - 1));
140
+ return edgeCount / (nodeCount * (nodeCount - 1));
118
141
  },
119
142
  async searchNodes(query, limit = 50) {
120
143
  const q = `%${query.toLowerCase()}%`;
@@ -142,7 +165,7 @@ export function createGraphQuery(db) {
142
165
  const edges = await db.selectFrom("graph_edges").selectAll().execute();
143
166
  const nodeRows = await db.selectFrom("graph_nodes").selectAll().execute();
144
167
  const nodeMap = new Map(nodeRows.map((n) => [n.document_id, rowToNode(n)]));
145
- // Build incoming map: target [source1, source2, ...]
168
+ // Build incoming map: target -> [source1, source2, ...]
146
169
  const incoming = new Map();
147
170
  const edgeSet = new Set();
148
171
  for (const e of edges) {
@@ -162,7 +185,7 @@ export function createGraphQuery(db) {
162
185
  for (let j = i + 1; j < sources.length && results.length < limit; j++) {
163
186
  const aId = sources[i];
164
187
  const bId = sources[j];
165
- // Check if AB or BA exists
188
+ // Check if A->B or B->A exists
166
189
  if (!edgeSet.has(`${aId}->${bId}`) &&
167
190
  !edgeSet.has(`${bId}->${aId}`)) {
168
191
  const a = nodeMap.get(aId);
@@ -231,5 +254,123 @@ export function createGraphQuery(db) {
231
254
  }
232
255
  return bridgeNodes;
233
256
  },
257
+ // --- Phase 1: topics, content, provenance queries ---
258
+ async topicStats() {
259
+ const rows = await db
260
+ .selectFrom("graph_topics")
261
+ .select(["name"])
262
+ .select(sql `count(*)`.as("note_count"))
263
+ .groupBy("name")
264
+ .orderBy(sql `count(*)`, "desc")
265
+ .execute();
266
+ return rows.map((r) => ({
267
+ name: r.name,
268
+ noteCount: Number(r.note_count),
269
+ }));
270
+ },
271
+ async topicsForNode(documentId) {
272
+ const rows = await db
273
+ .selectFrom("graph_topics")
274
+ .where("document_id", "=", documentId)
275
+ .select("name")
276
+ .execute();
277
+ return rows.map((r) => r.name);
278
+ },
279
+ async nodesByTopic(topic) {
280
+ const rows = await db
281
+ .selectFrom("graph_nodes")
282
+ .innerJoin("graph_topics", "graph_nodes.document_id", "graph_topics.document_id")
283
+ .where("graph_topics.name", "=", topic)
284
+ .selectAll("graph_nodes")
285
+ .execute();
286
+ return rows.map(rowToNode);
287
+ },
288
+ async relatedByTopic(documentId, limit = 10) {
289
+ // Get topics of the source document
290
+ const sourceTopics = await db
291
+ .selectFrom("graph_topics")
292
+ .where("document_id", "=", documentId)
293
+ .select("name")
294
+ .execute();
295
+ if (sourceTopics.length === 0)
296
+ return [];
297
+ const topicNames = sourceTopics.map((t) => t.name);
298
+ // Find other documents sharing those topics
299
+ const rows = await db
300
+ .selectFrom("graph_topics")
301
+ .where("document_id", "!=", documentId)
302
+ .where("name", "in", topicNames)
303
+ .select(["document_id", "name"])
304
+ .execute();
305
+ // Group by document_id
306
+ const docTopics = new Map();
307
+ for (const row of rows) {
308
+ const existing = docTopics.get(row.document_id) ?? [];
309
+ existing.push(row.name);
310
+ docTopics.set(row.document_id, existing);
311
+ }
312
+ // Sort by shared topic count descending
313
+ const sorted = [...docTopics.entries()]
314
+ .sort((a, b) => b[1].length - a[1].length)
315
+ .slice(0, limit);
316
+ const results = [];
317
+ for (const [docId, shared] of sorted) {
318
+ const node = await db
319
+ .selectFrom("graph_nodes")
320
+ .where("document_id", "=", docId)
321
+ .selectAll()
322
+ .executeTakeFirst();
323
+ if (node) {
324
+ results.push({
325
+ node: rowToNode(node),
326
+ sharedTopics: shared,
327
+ sharedTopicCount: shared.length,
328
+ });
329
+ }
330
+ }
331
+ return results;
332
+ },
333
+ async fullSearch(query, limit = 50) {
334
+ const q = `%${query.toLowerCase()}%`;
335
+ const rows = await db
336
+ .selectFrom("graph_nodes")
337
+ .where((eb) => eb.or([
338
+ eb(eb.fn("lower", ["title"]), "like", q),
339
+ eb(eb.fn("lower", ["description"]), "like", q),
340
+ eb(eb.fn("lower", ["content"]), "like", q),
341
+ ]))
342
+ .selectAll()
343
+ .limit(limit)
344
+ .execute();
345
+ return rows.map(rowToNode);
346
+ },
347
+ async nodesByAuthor(author) {
348
+ const rows = await db
349
+ .selectFrom("graph_nodes")
350
+ .where("author", "=", author)
351
+ .selectAll()
352
+ .execute();
353
+ return rows.map(rowToNode);
354
+ },
355
+ async nodesByOrigin(origin) {
356
+ const rows = await db
357
+ .selectFrom("graph_nodes")
358
+ .where("source_origin", "=", origin)
359
+ .selectAll()
360
+ .execute();
361
+ return rows.map(rowToNode);
362
+ },
363
+ async recentNodes(limit = 20, since) {
364
+ let query = db
365
+ .selectFrom("graph_nodes")
366
+ .selectAll()
367
+ .orderBy("created_at", "desc")
368
+ .limit(limit);
369
+ if (since) {
370
+ query = query.where("created_at", ">", since);
371
+ }
372
+ const rows = await query.execute();
373
+ return rows.map(rowToNode);
374
+ },
234
375
  };
235
376
  }
@@ -5,6 +5,16 @@ export interface GraphNode {
5
5
  description: string | null;
6
6
  note_type: string | null;
7
7
  status: string | null;
8
+ content: string | null;
9
+ author: string | null;
10
+ source_origin: string | null;
11
+ created_at: string | null;
12
+ updated_at: string;
13
+ }
14
+ export interface GraphTopic {
15
+ id: string;
16
+ document_id: string;
17
+ name: string;
8
18
  updated_at: string;
9
19
  }
10
20
  export interface GraphEdge {
@@ -18,5 +28,6 @@ export interface GraphEdge {
18
28
  export interface DB {
19
29
  graph_nodes: GraphNode;
20
30
  graph_edges: GraphEdge;
31
+ graph_topics: GraphTopic;
21
32
  }
22
33
  //# sourceMappingURL=schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../processors/graph-indexer/schema.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,kBAAkB,EAAE,MAAM,CAAC;IAC3B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,EAAE;IACjB,WAAW,EAAE,SAAS,CAAC;IACvB,WAAW,EAAE,SAAS,CAAC;CACxB"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../processors/graph-indexer/schema.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,kBAAkB,EAAE,MAAM,CAAC;IAC3B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,EAAE;IACjB,WAAW,EAAE,SAAS,CAAC;IACvB,WAAW,EAAE,SAAS,CAAC;IACvB,YAAY,EAAE,UAAU,CAAC;CAC1B"}
package/dist/style.css CHANGED
@@ -51,6 +51,7 @@
51
51
  --color-black: hsl(0 0% 0%);
52
52
  --color-white: hsl(0 0% 100%);
53
53
  --spacing: 0.25rem;
54
+ --container-md: 28rem;
54
55
  --container-2xl: 42rem;
55
56
  --container-3xl: 48rem;
56
57
  --container-4xl: 56rem;
@@ -275,12 +276,18 @@
275
276
  .top-0 {
276
277
  top: calc(var(--spacing) * 0);
277
278
  }
279
+ .top-1\/2 {
280
+ top: calc(1 / 2 * 100%);
281
+ }
278
282
  .top-4 {
279
283
  top: calc(var(--spacing) * 4);
280
284
  }
281
285
  .right-0 {
282
286
  right: calc(var(--spacing) * 0);
283
287
  }
288
+ .right-3 {
289
+ right: calc(var(--spacing) * 3);
290
+ }
284
291
  .right-4 {
285
292
  right: calc(var(--spacing) * 4);
286
293
  }
@@ -290,6 +297,9 @@
290
297
  .bottom-4 {
291
298
  bottom: calc(var(--spacing) * 4);
292
299
  }
300
+ .left-3 {
301
+ left: calc(var(--spacing) * 3);
302
+ }
293
303
  .left-4 {
294
304
  left: calc(var(--spacing) * 4);
295
305
  }
@@ -380,6 +390,9 @@
380
390
  .mb-4 {
381
391
  margin-bottom: calc(var(--spacing) * 4);
382
392
  }
393
+ .mb-6 {
394
+ margin-bottom: calc(var(--spacing) * 6);
395
+ }
383
396
  .ml-0\.5 {
384
397
  margin-left: calc(var(--spacing) * 0.5);
385
398
  }
@@ -548,6 +561,9 @@
548
561
  .w-10 {
549
562
  width: calc(var(--spacing) * 10);
550
563
  }
564
+ .w-12 {
565
+ width: calc(var(--spacing) * 12);
566
+ }
551
567
  .w-16 {
552
568
  width: calc(var(--spacing) * 16);
553
569
  }
@@ -614,6 +630,9 @@
614
630
  .max-w-full {
615
631
  max-width: 100%;
616
632
  }
633
+ .max-w-md {
634
+ max-width: var(--container-md);
635
+ }
617
636
  .min-w-0 {
618
637
  min-width: calc(var(--spacing) * 0);
619
638
  }
@@ -635,6 +654,10 @@
635
654
  .border-collapse {
636
655
  border-collapse: collapse;
637
656
  }
657
+ .-translate-y-1\/2 {
658
+ --tw-translate-y: calc(calc(1 / 2 * 100%) * -1);
659
+ translate: var(--tw-translate-x) var(--tw-translate-y);
660
+ }
638
661
  .rotate-90 {
639
662
  rotate: 90deg;
640
663
  }
@@ -1102,6 +1125,9 @@
1102
1125
  background-color: color-mix(in oklab, var(--color-white) 10%, transparent);
1103
1126
  }
1104
1127
  }
1128
+ .p-0\.5 {
1129
+ padding: calc(var(--spacing) * 0.5);
1130
+ }
1105
1131
  .p-1 {
1106
1132
  padding: calc(var(--spacing) * 1);
1107
1133
  }
@@ -1183,6 +1209,12 @@
1183
1209
  .pt-2 {
1184
1210
  padding-top: calc(var(--spacing) * 2);
1185
1211
  }
1212
+ .pt-16 {
1213
+ padding-top: calc(var(--spacing) * 16);
1214
+ }
1215
+ .pr-10 {
1216
+ padding-right: calc(var(--spacing) * 10);
1217
+ }
1186
1218
  .pb-1 {
1187
1219
  padding-bottom: calc(var(--spacing) * 1);
1188
1220
  }
@@ -1195,6 +1227,9 @@
1195
1227
  .pb-12 {
1196
1228
  padding-bottom: calc(var(--spacing) * 12);
1197
1229
  }
1230
+ .pl-10 {
1231
+ padding-left: calc(var(--spacing) * 10);
1232
+ }
1198
1233
  .pl-18 {
1199
1234
  padding-left: calc(var(--spacing) * 18);
1200
1235
  }
@@ -1377,6 +1412,9 @@
1377
1412
  .opacity-0 {
1378
1413
  opacity: 0%;
1379
1414
  }
1415
+ .opacity-50 {
1416
+ opacity: 50%;
1417
+ }
1380
1418
  .opacity-60 {
1381
1419
  opacity: 60%;
1382
1420
  }
@@ -1471,6 +1509,13 @@
1471
1509
  }
1472
1510
  }
1473
1511
  }
1512
+ .group-hover\:opacity-60 {
1513
+ &:is(:where(.group):hover *) {
1514
+ @media (hover: hover) {
1515
+ opacity: 60%;
1516
+ }
1517
+ }
1518
+ }
1474
1519
  .group-hover\:opacity-100 {
1475
1520
  &:is(:where(.group):hover *) {
1476
1521
  @media (hover: hover) {
@@ -1862,6 +1907,21 @@
1862
1907
  [data-bai-theme="dark"] #document-editor-context[data-document-type^="bai/"] hr {
1863
1908
  border-color: var(--bai-border) !important;
1864
1909
  }
1910
+ @property --tw-translate-x {
1911
+ syntax: "*";
1912
+ inherits: false;
1913
+ initial-value: 0;
1914
+ }
1915
+ @property --tw-translate-y {
1916
+ syntax: "*";
1917
+ inherits: false;
1918
+ initial-value: 0;
1919
+ }
1920
+ @property --tw-translate-z {
1921
+ syntax: "*";
1922
+ inherits: false;
1923
+ initial-value: 0;
1924
+ }
1865
1925
  @property --tw-rotate-x {
1866
1926
  syntax: "*";
1867
1927
  inherits: false;
@@ -2091,6 +2151,9 @@
2091
2151
  @layer properties {
2092
2152
  @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
2093
2153
  *, ::before, ::after, ::backdrop {
2154
+ --tw-translate-x: 0;
2155
+ --tw-translate-y: 0;
2156
+ --tw-translate-z: 0;
2094
2157
  --tw-rotate-x: initial;
2095
2158
  --tw-rotate-y: initial;
2096
2159
  --tw-rotate-z: initial;