deepspace 0.10.1 → 0.10.2

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 (71) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/chunk-T7V4GUIN.js +1638 -0
  3. package/dist/chunk-T7V4GUIN.js.map +1 -0
  4. package/dist/cli.js +731 -324
  5. package/dist/cli.js.map +1 -1
  6. package/dist/documentation-client-core.d.ts +18 -0
  7. package/dist/documentation-client-core.js +395 -0
  8. package/dist/documentation-client-core.js.map +1 -0
  9. package/dist/documentation-default-renderer.cjs +124 -0
  10. package/dist/documentation-react.d.ts +2 -0
  11. package/dist/documentation-react.js +35 -0
  12. package/dist/documentation-react.js.map +1 -0
  13. package/dist/documentation-runtime.js +71 -0
  14. package/dist/documentation-server-core.d.ts +11 -0
  15. package/dist/documentation-server-core.js +48 -0
  16. package/dist/documentation-server-core.js.map +1 -0
  17. package/dist/documentation.d.ts +366 -0
  18. package/dist/documentation.js +3953 -0
  19. package/dist/documentation.js.map +1 -0
  20. package/dist/feature-installer.js +145 -0
  21. package/dist/feature-installer.js.map +1 -1
  22. package/dist/index.d.ts +177 -1
  23. package/dist/index.js +133 -0
  24. package/dist/index.js.map +1 -1
  25. package/dist/public-BGRX_Cjd.d.ts +234 -0
  26. package/dist/schema.d.ts +186 -0
  27. package/dist/schema.js +610 -0
  28. package/dist/schema.js.map +1 -0
  29. package/dist/server.d.ts +83 -4
  30. package/dist/server.js +296 -1
  31. package/dist/server.js.map +1 -1
  32. package/dist/testing.d.ts +5 -8
  33. package/dist/testing.js +48 -14
  34. package/dist/testing.js.map +1 -1
  35. package/dist/worker.d.ts +249 -5
  36. package/dist/worker.js +1438 -19
  37. package/dist/worker.js.map +1 -1
  38. package/features/admin-page/src/admin-schema.ts +1 -1
  39. package/features/ai-chat/feature.json +2 -2
  40. package/features/ai-chat/src/ChatPanel.tsx +6 -11
  41. package/features/ai-chat/src/ai-chat-schema.ts +1 -2
  42. package/features/canvas/src/canvas-schema.ts +1 -1
  43. package/features/documentation/content/index.mdx +14 -0
  44. package/features/documentation/content/quickstart.mdx +12 -0
  45. package/features/documentation/documentation.json +18 -0
  46. package/features/documentation/feature.json +68 -0
  47. package/features/{docs → documents}/feature.json +27 -27
  48. package/features/{docs/src/DocsEditorPage.tsx → documents/src/DocumentsEditorPage.tsx} +74 -74
  49. package/features/{docs/src/DocsListPage.tsx → documents/src/DocumentsListPage.tsx} +102 -102
  50. package/features/{docs/src/DocsOutlinePanel.tsx → documents/src/DocumentsOutlinePanel.tsx} +9 -9
  51. package/features/{docs/src/DocsPresence.tsx → documents/src/DocumentsPresence.tsx} +18 -18
  52. package/features/{docs → documents}/src/InviteDialog.tsx +21 -21
  53. package/features/{docs → documents}/src/LibrarySidebar.tsx +25 -25
  54. package/features/documents/src/__tests__/documents-presence-access.test.ts +71 -0
  55. package/features/{docs/src/docs-library-types.ts → documents/src/documents-library-types.ts} +3 -3
  56. package/features/{docs/src/docs-schema.ts → documents/src/documents-schema.ts} +6 -6
  57. package/features/{docs/src/docs-ui.css → documents/src/documents-ui.css} +89 -89
  58. package/features/{docs → documents}/src/editor/DocEditorSurface.tsx +11 -11
  59. package/features/{docs/src/editor/DocsTiptapToolbar.tsx → documents/src/editor/DocumentsTiptapToolbar.tsx} +21 -21
  60. package/features/{docs → documents}/src/editor/useDocEditor.ts +4 -4
  61. package/features/{docs/src/use-docs-presence-access.ts → documents/src/use-documents-presence-access.ts} +51 -51
  62. package/features/file-attachments/src/attachments-schema.ts +1 -1
  63. package/features/items/src/items-schema.ts +1 -1
  64. package/features/leaderboard/src/leaderboard-schema.ts +1 -1
  65. package/features/messaging/src/ChatMultiPage.tsx +1 -1
  66. package/features/messaging/src/ChatPage.tsx +1 -1
  67. package/features/messaging/src/messaging-schema.ts +2 -2
  68. package/features/tasks/src/tasks-schema.ts +1 -1
  69. package/features/testing/src/test-schema.ts +2 -2
  70. package/package.json +26 -1
  71. package/features/docs/src/__tests__/docs-presence-access.test.ts +0 -71
@@ -1,6 +1,6 @@
1
1
  /**
2
- * DocsListPage — docs2-style library: sidebar, folders, favorites, grid/list.
3
- * New docs default to “Untitled Document”; rename in editor (no modal).
2
+ * DocumentsListPage — documents2-style library: sidebar, folders, favorites, grid/list.
3
+ * New documents default to “Untitled Document”; rename in editor (no modal).
4
4
  */
5
5
 
6
6
  import { useMemo, useState, useCallback, useEffect, useRef } from 'react'
@@ -26,12 +26,12 @@ import {
26
26
  } from 'lucide-react'
27
27
  import { LibrarySidebar, readSidebarCollapsed, writeSidebarCollapsed } from './LibrarySidebar'
28
28
  import {
29
- parseDocsIdList,
29
+ parseDocumentsIdList,
30
30
  type DocFolderFields,
31
- type DocsDocumentFields,
31
+ type DocumentsDocumentFields,
32
32
  type LibraryNavSelection,
33
- } from './docs-library-types'
34
- import './docs-ui.css'
33
+ } from './documents-library-types'
34
+ import './documents-ui.css'
35
35
 
36
36
  type SortOption = 'lastEdited' | 'titleAZ' | 'titleZA'
37
37
  type ViewMode = 'grid' | 'list'
@@ -43,12 +43,12 @@ const SORT_OPTIONS: { value: SortOption; label: string }[] = [
43
43
  ]
44
44
 
45
45
  const UNTITLED = 'Untitled Document'
46
- const FAVORITES_KEY = 'deepspace-docs-favorites'
46
+ const FAVORITES_KEY = 'deepspace-documents-favorites'
47
47
 
48
48
  function readFavorites(): Set<string> {
49
49
  try {
50
50
  const stored = localStorage.getItem(FAVORITES_KEY)
51
- return new Set(parseDocsIdList(stored ?? undefined))
51
+ return new Set(parseDocumentsIdList(stored ?? undefined))
52
52
  } catch {
53
53
  return new Set()
54
54
  }
@@ -77,7 +77,7 @@ function formatDate(iso: string): string {
77
77
  })
78
78
  }
79
79
 
80
- export default function DocsListPage() {
80
+ export default function DocumentsListPage() {
81
81
  const { user } = useUser()
82
82
  const navigate = useNavigate()
83
83
  const userRole = (user?.role ?? ROLES.VIEWER) as Role
@@ -97,11 +97,11 @@ export default function DocsListPage() {
97
97
  const [moveMenuId, setMoveMenuId] = useState<string | null>(null)
98
98
  const [actionsMenuId, setActionsMenuId] = useState<string | null>(null)
99
99
 
100
- const { records: documents, status } = useQuery<DocsDocumentFields>('documents', {
100
+ const { records: documents, status } = useQuery<DocumentsDocumentFields>('documents', {
101
101
  orderBy: 'createdAt',
102
102
  orderDir: 'desc',
103
103
  })
104
- const { create, remove, put } = useMutations<DocsDocumentFields>('documents')
104
+ const { create, remove, put } = useMutations<DocumentsDocumentFields>('documents')
105
105
 
106
106
  const { records: folderRecords } = useQuery<DocFolderFields>('doc_folders', {
107
107
  orderBy: 'createdAt',
@@ -132,16 +132,16 @@ export default function DocsListPage() {
132
132
  const displayFirstName = user?.name?.trim().split(/\s+/)[0] ?? 'there'
133
133
 
134
134
  const isOwnedDocument = useCallback(
135
- (d: RecordData<DocsDocumentFields>) => d.data.ownerId === user?.id,
135
+ (d: RecordData<DocumentsDocumentFields>) => d.data.ownerId === user?.id,
136
136
  [user?.id],
137
137
  )
138
138
 
139
139
  const isSharedWithCurrentUser = useCallback(
140
- (d: RecordData<DocsDocumentFields>) =>
140
+ (d: RecordData<DocumentsDocumentFields>) =>
141
141
  Boolean(
142
142
  user?.id &&
143
143
  d.data.ownerId !== user.id &&
144
- parseDocsIdList(d.data.collaborators).includes(user.id),
144
+ parseDocumentsIdList(d.data.collaborators).includes(user.id),
145
145
  ),
146
146
  [user?.id],
147
147
  )
@@ -164,7 +164,7 @@ export default function DocsListPage() {
164
164
  }, [libraryNav, sortedFolders])
165
165
 
166
166
  const matchesNav = useCallback(
167
- (d: RecordData<DocsDocumentFields>) => {
167
+ (d: RecordData<DocumentsDocumentFields>) => {
168
168
  const fid = d.data.folderId ?? ''
169
169
  if (libraryNav.kind === 'all') return isOwnedDocument(d)
170
170
  if (libraryNav.kind === 'shared') return isSharedWithCurrentUser(d)
@@ -225,7 +225,7 @@ export default function DocsListPage() {
225
225
  editors: '[]',
226
226
  folderId: folderIdForNew,
227
227
  })
228
- navigate(`/docs/${id}`)
228
+ navigate(`/documents/${id}`)
229
229
  }, [canCreate, create, folderIdForNew, navigate, user])
230
230
 
231
231
  const handleDelete = useCallback(
@@ -308,8 +308,8 @@ export default function DocsListPage() {
308
308
 
309
309
  return (
310
310
  <div
311
- className="docs-feature-scope flex min-h-full overflow-hidden"
312
- style={{ backgroundColor: 'var(--docs-el-bg)', color: 'var(--docs-el-text)' }}
311
+ className="documents-feature-scope flex min-h-full overflow-hidden"
312
+ style={{ backgroundColor: 'var(--documents-el-bg)', color: 'var(--documents-el-text)' }}
313
313
  >
314
314
  {user ? (
315
315
  <LibrarySidebar
@@ -337,12 +337,12 @@ export default function DocsListPage() {
337
337
  <div className="mb-1 flex min-w-0 items-center justify-between gap-4">
338
338
  <h1
339
339
  className="min-w-0 text-3xl font-bold leading-tight tracking-tight sm:text-4xl"
340
- style={{ color: 'var(--docs-el-text)' }}
340
+ style={{ color: 'var(--documents-el-text)' }}
341
341
  >
342
342
  {greetingForTime()}, {displayFirstName}
343
343
  </h1>
344
344
  </div>
345
- <p className="mb-8 text-[13px] font-medium" style={{ color: 'var(--docs-el-muted)' }}>
345
+ <p className="mb-8 text-[13px] font-medium" style={{ color: 'var(--documents-el-muted)' }}>
346
346
  {ownedDocumentCount} {ownedDocumentCount === 1 ? 'document' : 'documents'} in your
347
347
  documents.
348
348
  </p>
@@ -351,7 +351,7 @@ export default function DocsListPage() {
351
351
  <div className="relative min-w-0 max-w-md flex-1">
352
352
  <Search
353
353
  className="pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2"
354
- style={{ color: 'var(--docs-el-muted)' }}
354
+ style={{ color: 'var(--documents-el-muted)' }}
355
355
  strokeWidth={2}
356
356
  aria-hidden
357
357
  />
@@ -362,18 +362,18 @@ export default function DocsListPage() {
362
362
  placeholder="Search your library..."
363
363
  className="h-auto w-full rounded-lg py-2 pl-10 pr-10 text-[13px] shadow-sm outline-none focus-visible:ring-2 focus-visible:ring-ring/25"
364
364
  style={{
365
- backgroundColor: 'var(--docs-el-surface)',
365
+ backgroundColor: 'var(--documents-el-surface)',
366
366
  borderWidth: 1,
367
367
  borderStyle: 'solid',
368
- borderColor: 'var(--docs-el-line)',
369
- color: 'var(--docs-el-text)',
368
+ borderColor: 'var(--documents-el-line)',
369
+ color: 'var(--documents-el-text)',
370
370
  }}
371
371
  />
372
372
  {searchQuery ? (
373
373
  <button
374
374
  type="button"
375
375
  className="absolute right-2 top-1/2 -translate-y-1/2 rounded-md px-2 py-1 text-[11px] font-medium"
376
- style={{ color: 'var(--docs-el-muted)' }}
376
+ style={{ color: 'var(--documents-el-muted)' }}
377
377
  onClick={() => setSearchQuery('')}
378
378
  >
379
379
  Clear
@@ -386,7 +386,7 @@ export default function DocsListPage() {
386
386
  type="button"
387
387
  onClick={() => void handleNewDocument()}
388
388
  className={accentBtn}
389
- style={{ backgroundColor: 'var(--docs-el-accent)' }}
389
+ style={{ backgroundColor: 'var(--documents-el-accent)' }}
390
390
  >
391
391
  <Plus className="h-4 w-4" strokeWidth={2.5} />
392
392
  New Document
@@ -408,19 +408,19 @@ export default function DocsListPage() {
408
408
  className="group flex min-w-0 items-center rounded-xl border p-3.5 text-left shadow-sm transition-all"
409
409
  style={{
410
410
  borderColor: selected
411
- ? 'color-mix(in srgb, var(--docs-el-accent) 50%, transparent)'
412
- : 'var(--docs-el-line)',
413
- backgroundColor: 'var(--docs-el-surface)',
411
+ ? 'color-mix(in srgb, var(--documents-el-accent) 50%, transparent)'
412
+ : 'var(--documents-el-line)',
413
+ backgroundColor: 'var(--documents-el-surface)',
414
414
  boxShadow: selected
415
- ? '0 0 0 2px color-mix(in srgb, var(--docs-el-accent) 15%, transparent)'
415
+ ? '0 0 0 2px color-mix(in srgb, var(--documents-el-accent) 15%, transparent)'
416
416
  : undefined,
417
417
  }}
418
418
  >
419
419
  <div
420
- className="rounded-lg p-2 transition-all group-hover:bg-[color-mix(in_srgb,var(--docs-el-accent)_5%,transparent)]"
420
+ className="rounded-lg p-2 transition-all group-hover:bg-[color-mix(in_srgb,var(--documents-el-accent)_5%,transparent)]"
421
421
  style={{
422
- backgroundColor: 'var(--docs-el-bg)',
423
- color: 'var(--docs-el-muted)',
422
+ backgroundColor: 'var(--documents-el-bg)',
423
+ color: 'var(--documents-el-muted)',
424
424
  }}
425
425
  >
426
426
  <Folder className="h-4 w-4" />
@@ -438,7 +438,7 @@ export default function DocsListPage() {
438
438
  <div className="mb-6 flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
439
439
  <h2
440
440
  className="text-[11px] font-bold uppercase tracking-widest"
441
- style={{ color: 'var(--docs-el-muted)' }}
441
+ style={{ color: 'var(--documents-el-muted)' }}
442
442
  >
443
443
  {listHeading}
444
444
  </h2>
@@ -449,9 +449,9 @@ export default function DocsListPage() {
449
449
  onClick={() => setSortOpen(!sortOpen)}
450
450
  className={ghostBtn}
451
451
  style={{
452
- borderColor: 'var(--docs-el-line)',
453
- backgroundColor: 'var(--docs-el-surface)',
454
- color: 'var(--docs-el-muted)',
452
+ borderColor: 'var(--documents-el-line)',
453
+ backgroundColor: 'var(--documents-el-surface)',
454
+ color: 'var(--documents-el-muted)',
455
455
  }}
456
456
  >
457
457
  <SortAsc className="h-3.5 w-3.5" />
@@ -468,8 +468,8 @@ export default function DocsListPage() {
468
468
  <div
469
469
  className="absolute right-0 top-full z-50 mt-1 min-w-[168px] rounded-lg border py-1 shadow-lg"
470
470
  style={{
471
- borderColor: 'var(--docs-el-line)',
472
- backgroundColor: 'var(--docs-el-surface)',
471
+ borderColor: 'var(--documents-el-line)',
472
+ backgroundColor: 'var(--documents-el-surface)',
473
473
  }}
474
474
  >
475
475
  {SORT_OPTIONS.map((opt) => (
@@ -484,8 +484,8 @@ export default function DocsListPage() {
484
484
  style={{
485
485
  color:
486
486
  sortBy === opt.value
487
- ? 'var(--docs-el-accent)'
488
- : 'var(--docs-el-text)',
487
+ ? 'var(--documents-el-accent)'
488
+ : 'var(--documents-el-text)',
489
489
  fontWeight: sortBy === opt.value ? 600 : 400,
490
490
  }}
491
491
  >
@@ -502,8 +502,8 @@ export default function DocsListPage() {
502
502
  style={{
503
503
  borderWidth: 1,
504
504
  borderStyle: 'solid',
505
- borderColor: 'var(--docs-el-line)',
506
- backgroundColor: 'color-mix(in srgb, var(--docs-el-text) 5%, transparent)',
505
+ borderColor: 'var(--documents-el-line)',
506
+ backgroundColor: 'color-mix(in srgb, var(--documents-el-text) 5%, transparent)',
507
507
  }}
508
508
  >
509
509
  <button
@@ -513,11 +513,11 @@ export default function DocsListPage() {
513
513
  style={
514
514
  viewMode === 'grid'
515
515
  ? {
516
- backgroundColor: 'var(--docs-el-surface)',
517
- color: 'var(--docs-el-text)',
516
+ backgroundColor: 'var(--documents-el-surface)',
517
+ color: 'var(--documents-el-text)',
518
518
  boxShadow: '0 1px 2px rgba(0,0,0,0.06)',
519
519
  }
520
- : { color: 'var(--docs-el-muted)' }
520
+ : { color: 'var(--documents-el-muted)' }
521
521
  }
522
522
  title="Grid view"
523
523
  >
@@ -530,11 +530,11 @@ export default function DocsListPage() {
530
530
  style={
531
531
  viewMode === 'list'
532
532
  ? {
533
- backgroundColor: 'var(--docs-el-surface)',
534
- color: 'var(--docs-el-text)',
533
+ backgroundColor: 'var(--documents-el-surface)',
534
+ color: 'var(--documents-el-text)',
535
535
  boxShadow: '0 1px 2px rgba(0,0,0,0.06)',
536
536
  }
537
- : { color: 'var(--docs-el-muted)' }
537
+ : { color: 'var(--documents-el-muted)' }
538
538
  }
539
539
  title="List view"
540
540
  >
@@ -549,8 +549,8 @@ export default function DocsListPage() {
549
549
  <div
550
550
  className="h-10 w-10 animate-spin rounded-full border-2"
551
551
  style={{
552
- borderColor: 'var(--docs-el-line)',
553
- borderTopColor: 'var(--docs-el-accent)',
552
+ borderColor: 'var(--documents-el-line)',
553
+ borderTopColor: 'var(--documents-el-accent)',
554
554
  }}
555
555
  />
556
556
  </div>
@@ -559,22 +559,22 @@ export default function DocsListPage() {
559
559
  <div
560
560
  className="mb-5 flex h-16 w-16 items-center justify-center rounded-2xl"
561
561
  style={{
562
- backgroundColor: 'var(--docs-el-surface)',
562
+ backgroundColor: 'var(--documents-el-surface)',
563
563
  boxShadow:
564
- '0 0 0 1px var(--docs-el-line), 0 1px 2px color-mix(in srgb, var(--docs-el-text) 8%, transparent)',
564
+ '0 0 0 1px var(--documents-el-line), 0 1px 2px color-mix(in srgb, var(--documents-el-text) 8%, transparent)',
565
565
  }}
566
566
  >
567
567
  <FileText
568
568
  className="h-8 w-8"
569
569
  strokeWidth={1.5}
570
- style={{ color: 'var(--docs-el-muted)' }}
570
+ style={{ color: 'var(--documents-el-muted)' }}
571
571
  aria-hidden
572
572
  />
573
573
  </div>
574
- <h3 className="mb-2 text-lg font-semibold" style={{ color: 'var(--docs-el-text)' }}>
574
+ <h3 className="mb-2 text-lg font-semibold" style={{ color: 'var(--documents-el-text)' }}>
575
575
  {searchQuery ? 'No matches' : 'No documents yet'}
576
576
  </h3>
577
- <p className="mb-6 max-w-sm text-sm" style={{ color: 'var(--docs-el-muted)' }}>
577
+ <p className="mb-6 max-w-sm text-sm" style={{ color: 'var(--documents-el-muted)' }}>
578
578
  {canCreate && !searchQuery
579
579
  ? 'Create your first document with New Document above'
580
580
  : searchQuery
@@ -590,24 +590,24 @@ export default function DocsListPage() {
590
590
  onClick={() => void handleNewDocument()}
591
591
  className="group w-full cursor-pointer rounded-xl border-2 border-dashed p-4 text-left shadow-sm transition-all hover:shadow-md"
592
592
  style={{
593
- borderColor: 'var(--docs-el-line)',
594
- backgroundColor: 'color-mix(in srgb, var(--docs-el-surface) 20%, transparent)',
593
+ borderColor: 'var(--documents-el-line)',
594
+ backgroundColor: 'color-mix(in srgb, var(--documents-el-surface) 20%, transparent)',
595
595
  }}
596
596
  >
597
597
  <div
598
598
  className="relative mb-4 aspect-[3/4] w-full overflow-hidden rounded-lg border shadow-sm"
599
599
  style={{
600
- borderColor: 'var(--docs-el-line)',
601
- backgroundColor: 'var(--docs-el-bg)',
600
+ borderColor: 'var(--documents-el-line)',
601
+ backgroundColor: 'var(--documents-el-bg)',
602
602
  }}
603
603
  >
604
604
  <div className="flex h-full w-full items-center justify-center">
605
605
  <div
606
- className="flex h-10 w-10 items-center justify-center rounded-full ring-1 transition-colors group-hover:text-[color:var(--docs-el-accent)]"
606
+ className="flex h-10 w-10 items-center justify-center rounded-full ring-1 transition-colors group-hover:text-[color:var(--documents-el-accent)]"
607
607
  style={{
608
- backgroundColor: 'var(--docs-el-surface)',
609
- color: 'var(--docs-el-muted)',
610
- boxShadow: '0 0 0 1px var(--docs-el-line)',
608
+ backgroundColor: 'var(--documents-el-surface)',
609
+ color: 'var(--documents-el-muted)',
610
+ boxShadow: '0 0 0 1px var(--documents-el-line)',
611
611
  }}
612
612
  >
613
613
  <Plus className="h-5 w-5" strokeWidth={2.5} />
@@ -615,14 +615,14 @@ export default function DocsListPage() {
615
615
  </div>
616
616
  </div>
617
617
  <h3
618
- className="truncate text-[13px] font-semibold leading-snug transition-colors group-hover:text-[color:var(--docs-el-accent)]"
619
- style={{ color: 'var(--docs-el-text)' }}
618
+ className="truncate text-[13px] font-semibold leading-snug transition-colors group-hover:text-[color:var(--documents-el-accent)]"
619
+ style={{ color: 'var(--documents-el-text)' }}
620
620
  >
621
621
  Blank doc
622
622
  </h3>
623
623
  <p
624
624
  className="mt-0.5 text-[10px] font-medium"
625
- style={{ color: 'var(--docs-el-muted)' }}
625
+ style={{ color: 'var(--documents-el-muted)' }}
626
626
  >
627
627
  Creates “{UNTITLED}” — rename in editor
628
628
  </p>
@@ -642,22 +642,22 @@ export default function DocsListPage() {
642
642
  tabIndex={0}
643
643
  className="group relative cursor-pointer rounded-xl border p-4 shadow-sm transition-all hover:-translate-y-0.5 hover:shadow-md"
644
644
  style={{
645
- borderColor: 'var(--docs-el-line)',
646
- backgroundColor: 'var(--docs-el-surface)',
645
+ borderColor: 'var(--documents-el-line)',
646
+ backgroundColor: 'var(--documents-el-surface)',
647
647
  }}
648
- onClick={() => navigate(`/docs/${doc.recordId}`)}
648
+ onClick={() => navigate(`/documents/${doc.recordId}`)}
649
649
  onKeyDown={(e) => {
650
650
  if (e.key === 'Enter' || e.key === ' ') {
651
651
  e.preventDefault()
652
- navigate(`/docs/${doc.recordId}`)
652
+ navigate(`/documents/${doc.recordId}`)
653
653
  }
654
654
  }}
655
655
  >
656
656
  <div
657
657
  className="relative mb-4 aspect-[3/4] w-full overflow-hidden rounded-lg border shadow-sm"
658
658
  style={{
659
- borderColor: 'var(--docs-el-line)',
660
- backgroundColor: 'var(--docs-el-bg)',
659
+ borderColor: 'var(--documents-el-line)',
660
+ backgroundColor: 'var(--documents-el-bg)',
661
661
  }}
662
662
  >
663
663
  <div className="flex h-full w-full items-center justify-center">
@@ -678,23 +678,23 @@ export default function DocsListPage() {
678
678
  onClick={(e) => e.stopPropagation()}
679
679
  className="mb-0.5 w-full rounded-md border px-2 py-1 text-[13px] font-semibold outline-none focus-visible:ring-2 focus-visible:ring-ring/30"
680
680
  style={{
681
- borderColor: 'var(--docs-el-line)',
682
- backgroundColor: 'var(--docs-el-bg)',
683
- color: 'var(--docs-el-text)',
681
+ borderColor: 'var(--documents-el-line)',
682
+ backgroundColor: 'var(--documents-el-bg)',
683
+ color: 'var(--documents-el-text)',
684
684
  }}
685
685
  autoFocus
686
686
  />
687
687
  ) : (
688
688
  <h3
689
- className="truncate text-[13px] font-semibold leading-snug transition-colors group-hover:text-[color:var(--docs-el-accent)]"
690
- style={{ color: 'var(--docs-el-text)' }}
689
+ className="truncate text-[13px] font-semibold leading-snug transition-colors group-hover:text-[color:var(--documents-el-accent)]"
690
+ style={{ color: 'var(--documents-el-text)' }}
691
691
  >
692
692
  {doc.data.title}
693
693
  </h3>
694
694
  )}
695
695
  <p
696
696
  className="mt-0.5 text-[10px] font-medium leading-4 tracking-tight"
697
- style={{ color: 'var(--docs-el-muted)' }}
697
+ style={{ color: 'var(--documents-el-muted)' }}
698
698
  >
699
699
  {dateLabel}
700
700
  {isOwner ? ' · You' : ''}
@@ -714,7 +714,7 @@ export default function DocsListPage() {
714
714
  toggleFavorite(doc.recordId)
715
715
  }}
716
716
  className="rounded-lg p-1.5 transition-colors hover:bg-black/[0.05] dark:hover:bg-white/[0.06]"
717
- style={{ color: 'var(--docs-el-muted)' }}
717
+ style={{ color: 'var(--documents-el-muted)' }}
718
718
  >
719
719
  <Star
720
720
  className={`h-4 w-4 ${isFav ? 'fill-yellow-500 text-yellow-500' : ''}`}
@@ -732,7 +732,7 @@ export default function DocsListPage() {
732
732
  setMoveMenuId(null)
733
733
  }}
734
734
  className="rounded-lg p-1.5"
735
- style={{ color: 'var(--docs-el-muted)' }}
735
+ style={{ color: 'var(--documents-el-muted)' }}
736
736
  >
737
737
  <MoreVertical className="h-4 w-4" />
738
738
  </button>
@@ -750,9 +750,9 @@ export default function DocsListPage() {
750
750
  <div
751
751
  className="absolute right-0 top-full z-50 mt-1 min-w-[160px] rounded-lg border py-1 shadow-lg"
752
752
  style={{
753
- borderColor: 'var(--docs-el-line)',
754
- backgroundColor: 'var(--docs-el-surface)',
755
- color: 'var(--docs-el-text)',
753
+ borderColor: 'var(--documents-el-line)',
754
+ backgroundColor: 'var(--documents-el-surface)',
755
+ color: 'var(--documents-el-text)',
756
756
  }}
757
757
  onClick={(e) => e.stopPropagation()}
758
758
  >
@@ -781,7 +781,7 @@ export default function DocsListPage() {
781
781
  {moveMenuId === doc.recordId ? (
782
782
  <div
783
783
  className="border-t px-2 py-1"
784
- style={{ borderColor: 'var(--docs-el-line)' }}
784
+ style={{ borderColor: 'var(--documents-el-line)' }}
785
785
  >
786
786
  <button
787
787
  type="button"
@@ -831,16 +831,16 @@ export default function DocsListPage() {
831
831
  <div
832
832
  className="overflow-hidden rounded-xl border shadow-sm"
833
833
  style={{
834
- borderColor: 'var(--docs-el-line)',
835
- backgroundColor: 'var(--docs-el-surface)',
834
+ borderColor: 'var(--documents-el-line)',
835
+ backgroundColor: 'var(--documents-el-surface)',
836
836
  }}
837
837
  >
838
838
  <div
839
839
  className="flex items-center gap-4 border-b px-4 py-2 text-[10px] font-bold uppercase tracking-widest"
840
840
  style={{
841
- borderColor: 'var(--docs-el-line)',
842
- backgroundColor: 'color-mix(in srgb, var(--docs-el-text) 3%, transparent)',
843
- color: 'var(--docs-el-muted)',
841
+ borderColor: 'var(--documents-el-line)',
842
+ backgroundColor: 'color-mix(in srgb, var(--documents-el-text) 3%, transparent)',
843
+ color: 'var(--documents-el-muted)',
844
844
  }}
845
845
  >
846
846
  <div className="min-w-0 flex-1">Name</div>
@@ -863,12 +863,12 @@ export default function DocsListPage() {
863
863
  role="button"
864
864
  tabIndex={0}
865
865
  className="group flex cursor-pointer items-center gap-4 border-b px-4 py-3 transition-colors last:border-b-0 hover:bg-black/[0.02] dark:hover:bg-white/[0.03]"
866
- style={{ borderColor: 'var(--docs-el-line)' }}
867
- onClick={() => navigate(`/docs/${doc.recordId}`)}
866
+ style={{ borderColor: 'var(--documents-el-line)' }}
867
+ onClick={() => navigate(`/documents/${doc.recordId}`)}
868
868
  onKeyDown={(e) => {
869
869
  if (e.key === 'Enter' || e.key === ' ') {
870
870
  e.preventDefault()
871
- navigate(`/docs/${doc.recordId}`)
871
+ navigate(`/documents/${doc.recordId}`)
872
872
  }
873
873
  }}
874
874
  >
@@ -876,8 +876,8 @@ export default function DocsListPage() {
876
876
  <div
877
877
  className="hidden h-14 w-11 shrink-0 overflow-hidden rounded-md border sm:block"
878
878
  style={{
879
- borderColor: 'var(--docs-el-line)',
880
- backgroundColor: 'var(--docs-el-bg)',
879
+ borderColor: 'var(--documents-el-line)',
880
+ backgroundColor: 'var(--documents-el-bg)',
881
881
  }}
882
882
  >
883
883
  <div className="flex h-full w-full items-center justify-center">
@@ -886,14 +886,14 @@ export default function DocsListPage() {
886
886
  </div>
887
887
  <div className="min-w-0 flex-1">
888
888
  <h4
889
- className="line-clamp-2 text-[13px] font-semibold leading-snug transition-colors group-hover:text-[color:var(--docs-el-accent)]"
890
- style={{ color: 'var(--docs-el-text)' }}
889
+ className="line-clamp-2 text-[13px] font-semibold leading-snug transition-colors group-hover:text-[color:var(--documents-el-accent)]"
890
+ style={{ color: 'var(--documents-el-text)' }}
891
891
  >
892
892
  {doc.data.title}
893
893
  </h4>
894
894
  <p
895
895
  className="mt-0.5 text-[10px] font-medium md:hidden"
896
- style={{ color: 'var(--docs-el-muted)' }}
896
+ style={{ color: 'var(--documents-el-muted)' }}
897
897
  >
898
898
  {dateLabel}
899
899
  {isOwner ? ' · You' : ' · Shared with you'}
@@ -903,13 +903,13 @@ export default function DocsListPage() {
903
903
  </div>
904
904
  <div
905
905
  className="hidden w-28 shrink-0 truncate text-[12px] md:block"
906
- style={{ color: 'var(--docs-el-muted)' }}
906
+ style={{ color: 'var(--documents-el-muted)' }}
907
907
  >
908
908
  {folderLabel}
909
909
  </div>
910
910
  <div
911
911
  className="hidden w-36 shrink-0 text-right text-[12px] md:block"
912
- style={{ color: 'var(--docs-el-muted)' }}
912
+ style={{ color: 'var(--documents-el-muted)' }}
913
913
  >
914
914
  {dateLabel}
915
915
  </div>
@@ -923,7 +923,7 @@ export default function DocsListPage() {
923
923
  toggleFavorite(doc.recordId)
924
924
  }}
925
925
  className="rounded-lg p-1.5"
926
- style={{ color: 'var(--docs-el-muted)' }}
926
+ style={{ color: 'var(--documents-el-muted)' }}
927
927
  >
928
928
  <Star
929
929
  className={`h-4 w-4 ${isFav ? 'fill-yellow-500 text-yellow-500' : ''}`}
@@ -936,7 +936,7 @@ export default function DocsListPage() {
936
936
  void handleDelete(doc.recordId)
937
937
  }}
938
938
  className="rounded-lg p-1.5 opacity-0 transition-opacity group-hover:opacity-100"
939
- style={{ color: 'var(--docs-el-muted)' }}
939
+ style={{ color: 'var(--documents-el-muted)' }}
940
940
  >
941
941
  <Trash2 className="h-4 w-4" />
942
942
  </button>
@@ -6,7 +6,7 @@
6
6
  * here. Clicking an entry jumps the caret to that node's position.
7
7
  */
8
8
 
9
- /** Matches docs2 outline width + toggle positioning beside the panel */
9
+ /** Matches documents2 outline width + toggle positioning beside the panel */
10
10
  export const DOCUMENT_OUTLINE_WIDTH_PX = 220
11
11
 
12
12
  export interface OutlineEntry {
@@ -16,30 +16,30 @@ export interface OutlineEntry {
16
16
  pos: number
17
17
  }
18
18
 
19
- export interface DocsOutlinePanelProps {
19
+ export interface DocumentsOutlinePanelProps {
20
20
  entries: OutlineEntry[]
21
21
  onJumpTo: (pos: number) => void
22
22
  }
23
23
 
24
- export function DocsOutlinePanel({ entries, onJumpTo }: DocsOutlinePanelProps) {
24
+ export function DocumentsOutlinePanel({ entries, onJumpTo }: DocumentsOutlinePanelProps) {
25
25
  return (
26
26
  <aside
27
27
  data-testid="document-outline-panel"
28
28
  className="absolute bottom-0 left-0 top-0 z-[34] flex flex-col overflow-hidden border-r print:hidden"
29
29
  style={{
30
30
  width: DOCUMENT_OUTLINE_WIDTH_PX,
31
- borderColor: 'var(--docs-el-line)',
32
- backgroundColor: 'color-mix(in srgb, var(--docs-el-surface) 95%, transparent)',
31
+ borderColor: 'var(--documents-el-line)',
32
+ backgroundColor: 'color-mix(in srgb, var(--documents-el-surface) 95%, transparent)',
33
33
  }}
34
34
  >
35
- <div className="shrink-0 border-b px-3 py-3" style={{ borderColor: 'var(--docs-el-line)' }}>
36
- <h2 className="truncate pl-1 text-left text-sm font-normal leading-5 text-[color:var(--docs-el-muted)]">
35
+ <div className="shrink-0 border-b px-3 py-3" style={{ borderColor: 'var(--documents-el-line)' }}>
36
+ <h2 className="truncate pl-1 text-left text-sm font-normal leading-5 text-[color:var(--documents-el-muted)]">
37
37
  Document outline
38
38
  </h2>
39
39
  </div>
40
40
  <nav className="flex-1 overflow-y-auto px-2 py-2">
41
41
  {entries.length === 0 ? (
42
- <p className="px-2 py-4 text-[12px] leading-snug text-[color:var(--docs-el-muted)]">
42
+ <p className="px-2 py-4 text-[12px] leading-snug text-[color:var(--documents-el-muted)]">
43
43
  Headings you add to the document appear here. Use the H1 / H2 / H3 buttons in the
44
44
  toolbar.
45
45
  </p>
@@ -53,7 +53,7 @@ export function DocsOutlinePanel({ entries, onJumpTo }: DocsOutlinePanelProps) {
53
53
  className="w-full rounded-md px-2 py-1.5 text-left text-[12px] leading-snug transition-colors hover:bg-black/[0.05] dark:hover:bg-white/[0.06]"
54
54
  style={{
55
55
  paddingLeft: 8 + (e.level - 1) * 10,
56
- color: 'var(--docs-el-text)',
56
+ color: 'var(--documents-el-text)',
57
57
  }}
58
58
  >
59
59
  {e.title}