@copilotz/work 0.0.0-stage → 1.0.0-rc.34
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/LICENSE +21 -0
- package/README.md +56 -2
- package/boards/actions/create-board.d.ts +1 -0
- package/boards/actions/create-board.js +47 -0
- package/boards/actions/create-card.d.ts +1 -0
- package/boards/actions/create-card.js +83 -0
- package/boards/actions/delete-board.d.ts +1 -0
- package/boards/actions/delete-board.js +30 -0
- package/boards/actions/delete-card.d.ts +1 -0
- package/boards/actions/delete-card.js +24 -0
- package/boards/actions/move-card.d.ts +1 -0
- package/boards/actions/move-card.js +85 -0
- package/boards/actions/update-board.d.ts +1 -0
- package/boards/actions/update-board.js +110 -0
- package/boards/actions/update-card.d.ts +1 -0
- package/boards/actions/update-card.js +67 -0
- package/boards/collections/board.d.ts +71 -0
- package/boards/collections/board.js +32 -0
- package/boards/collections/card.d.ts +74 -0
- package/boards/collections/card.js +29 -0
- package/boards/contract.d.ts +67 -0
- package/boards/contract.js +20 -0
- package/boards/mod.d.ts +34 -0
- package/boards/mod.js +72 -0
- package/boards/resources/tools.d.ts +2 -0
- package/boards/resources/tools.js +414 -0
- package/boards/shared/columns.d.ts +39 -0
- package/boards/shared/columns.js +88 -0
- package/boards/shared/dates.d.ts +11 -0
- package/boards/shared/dates.js +22 -0
- package/boards/shared/errors.d.ts +24 -0
- package/boards/shared/errors.js +20 -0
- package/boards/shared/fields.d.ts +65 -0
- package/boards/shared/fields.js +44 -0
- package/boards/shared/load.d.ts +22 -0
- package/boards/shared/load.js +32 -0
- package/boards/shared/order.d.ts +30 -0
- package/boards/shared/order.js +47 -0
- package/boards/shared/people.d.ts +30 -0
- package/boards/shared/people.js +87 -0
- package/boards/shared/said.d.ts +28 -0
- package/boards/shared/said.js +30 -0
- package/boards/views/web/board-head.d.ts +62 -0
- package/boards/views/web/board-head.js +170 -0
- package/boards/views/web/board-page.d.ts +17 -0
- package/boards/views/web/board-page.js +97 -0
- package/boards/views/web/board-view.d.ts +40 -0
- package/boards/views/web/board-view.js +341 -0
- package/boards/views/web/boards-tab.d.ts +13 -0
- package/boards/views/web/boards-tab.js +109 -0
- package/boards/views/web/card-sheet.d.ts +47 -0
- package/boards/views/web/card-sheet.js +314 -0
- package/boards/views/web/card-tile.d.ts +29 -0
- package/boards/views/web/card-tile.js +20 -0
- package/boards/views/web/column.d.ts +38 -0
- package/boards/views/web/column.js +171 -0
- package/boards/views/web/drag.d.ts +36 -0
- package/boards/views/web/drag.js +276 -0
- package/boards/views/web/glyphs.d.ts +29 -0
- package/boards/views/web/glyphs.js +25 -0
- package/boards/views/web/load.d.ts +32 -0
- package/boards/views/web/load.js +33 -0
- package/boards/views/web/palette.d.ts +15 -0
- package/boards/views/web/palette.js +180 -0
- package/boards/views/web/pickers.d.ts +45 -0
- package/boards/views/web/pickers.js +83 -0
- package/boards/views/web/shown.d.ts +77 -0
- package/boards/views/web/shown.js +136 -0
- package/boards/views/web/step.d.ts +13 -0
- package/boards/views/web/step.js +41 -0
- package/boards/views/web/style.d.ts +10 -0
- package/boards/views/web/style.js +380 -0
- package/boards/views/web/toolbar.d.ts +21 -0
- package/boards/views/web/toolbar.js +39 -0
- package/boards/web.d.ts +26 -0
- package/boards/web.js +52 -0
- package/contract.d.ts +7 -0
- package/contract.js +7 -0
- package/documents/actions/create.d.ts +1 -0
- package/documents/actions/create.js +28 -0
- package/documents/actions/delete.d.ts +1 -0
- package/documents/actions/delete.js +32 -0
- package/documents/actions/presence.d.ts +1 -0
- package/documents/actions/presence.js +45 -0
- package/documents/actions/rename.d.ts +1 -0
- package/documents/actions/rename.js +33 -0
- package/documents/actions/restore.d.ts +1 -0
- package/documents/actions/restore.js +39 -0
- package/documents/actions/save.d.ts +1 -0
- package/documents/actions/save.js +78 -0
- package/documents/collections/document-presence.d.ts +79 -0
- package/documents/collections/document-presence.js +25 -0
- package/documents/collections/document-version.d.ts +166 -0
- package/documents/collections/document-version.js +60 -0
- package/documents/collections/document.d.ts +131 -0
- package/documents/collections/document.js +72 -0
- package/documents/contract.d.ts +17 -0
- package/documents/contract.js +1 -0
- package/documents/mod.d.ts +38 -0
- package/documents/mod.js +75 -0
- package/documents/resources/tools.d.ts +2 -0
- package/documents/resources/tools.js +253 -0
- package/documents/shared/diff.d.ts +37 -0
- package/documents/shared/diff.js +148 -0
- package/documents/shared/merge.d.ts +29 -0
- package/documents/shared/merge.js +120 -0
- package/documents/shared/presence.d.ts +7 -0
- package/documents/shared/presence.js +7 -0
- package/documents/shared/text.d.ts +36 -0
- package/documents/shared/text.js +67 -0
- package/documents/shared/who.d.ts +23 -0
- package/documents/shared/who.js +39 -0
- package/documents/shared/write.d.ts +54 -0
- package/documents/shared/write.js +123 -0
- package/documents/views/web/changes.d.ts +22 -0
- package/documents/views/web/changes.js +57 -0
- package/documents/views/web/conflict.d.ts +38 -0
- package/documents/views/web/conflict.js +96 -0
- package/documents/views/web/draft.d.ts +18 -0
- package/documents/views/web/draft.js +32 -0
- package/documents/views/web/editor.d.ts +57 -0
- package/documents/views/web/editor.js +268 -0
- package/documents/views/web/format.d.ts +56 -0
- package/documents/views/web/format.js +245 -0
- package/documents/views/web/history.d.ts +23 -0
- package/documents/views/web/history.js +118 -0
- package/documents/views/web/list.d.ts +37 -0
- package/documents/views/web/list.js +211 -0
- package/documents/views/web/page.d.ts +35 -0
- package/documents/views/web/page.js +416 -0
- package/documents/views/web/palette.d.ts +16 -0
- package/documents/views/web/palette.js +168 -0
- package/documents/views/web/people.d.ts +60 -0
- package/documents/views/web/people.js +63 -0
- package/documents/views/web/presence.d.ts +30 -0
- package/documents/views/web/presence.js +75 -0
- package/documents/views/web/step.d.ts +25 -0
- package/documents/views/web/step.js +81 -0
- package/documents/views/web/style.d.ts +7 -0
- package/documents/views/web/style.js +266 -0
- package/documents/web.d.ts +18 -0
- package/documents/web.js +46 -0
- package/mod.d.ts +18 -0
- package/mod.js +18 -0
- package/package.json +61 -4
- package/web.d.ts +13 -0
- package/web.js +13 -0
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Documents' layout on the web, on the theme's variables only: the space's
|
|
3
|
+
* list, a document's page (its title in place, the sticky toolbar, the
|
|
4
|
+
* writing surface and the preview beside it, who's here), the conflict
|
|
5
|
+
* screen, History's drawer, the reader beside a chat, and agents' cards.
|
|
6
|
+
*/
|
|
7
|
+
export const STYLE = `
|
|
8
|
+
.doc-page.copilotz-page-fill > .copilotz-page-inner { max-width: 1480px; }
|
|
9
|
+
.doc-page .copilotz-page-title { font-size: 32px; letter-spacing: -.03em; }
|
|
10
|
+
.doc-page .copilotz-page-head { align-items: start; }
|
|
11
|
+
.doc-page .copilotz-page-actions { padding-top: 3px; }
|
|
12
|
+
.doc-page .copilotz-page-description { max-width: none; margin-top: 10px; }
|
|
13
|
+
.doc-page .copilotz-page-body { margin-top: 16px; }
|
|
14
|
+
|
|
15
|
+
.doc-title-grow { display: grid; width: 100%; }
|
|
16
|
+
.doc-title-grow::after { content: attr(data-value); visibility: hidden; white-space: pre-wrap;
|
|
17
|
+
overflow-wrap: anywhere; grid-area: 1 / 1 / 2 / 2; font: inherit; letter-spacing: inherit; }
|
|
18
|
+
.doc-title-input { grid-area: 1 / 1 / 2 / 2; width: 100%; min-width: 0; margin: 0; padding: 0; border: 0;
|
|
19
|
+
background: transparent; color: inherit; font: inherit; letter-spacing: inherit; line-height: inherit;
|
|
20
|
+
resize: none; overflow: hidden; outline: none; }
|
|
21
|
+
.doc-title-input::placeholder { color: var(--muted-foreground); opacity: .55; }
|
|
22
|
+
|
|
23
|
+
.doc-under { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; min-height: 22px; font-size: 13px; }
|
|
24
|
+
.doc-status { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted-foreground); }
|
|
25
|
+
.doc-status[data-state=dirty], .doc-status[data-state=warning] { color: var(--warning-text); }
|
|
26
|
+
.doc-status[data-state=success] { color: var(--success-text); }
|
|
27
|
+
.doc-status[data-state=info] { color: var(--info-text); }
|
|
28
|
+
.doc-status[data-state=failed] { color: var(--destructive-text); }
|
|
29
|
+
.doc-status .copilotz-time { font-size: 13px; }
|
|
30
|
+
.doc-status-quiet { display: inline-flex; align-items: center; gap: 3px; color: var(--muted-foreground); }
|
|
31
|
+
.doc-status-quiet .copilotz-kbd { font-size: 11px; }
|
|
32
|
+
.doc-dot { width: 7px; height: 7px; border-radius: var(--radius-full); background: var(--warning); }
|
|
33
|
+
.doc-save { min-width: 76px; }
|
|
34
|
+
.doc-history-button { gap: 7px; }
|
|
35
|
+
.doc-glyph { flex: none; }
|
|
36
|
+
@container copilotz-page (max-width: 640px) {
|
|
37
|
+
.doc-wide { display: none; }
|
|
38
|
+
.doc-history-button { padding-inline: 9px; }
|
|
39
|
+
.doc-page .copilotz-page-title { font-size: 24px; letter-spacing: -.02em; }
|
|
40
|
+
.doc-status-quiet { display: none; }
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.doc-here { display: inline-flex; align-items: center; padding-left: 6px; margin-right: 2px; }
|
|
44
|
+
.doc-here-face { position: relative; display: inline-flex; margin-left: -6px; border-radius: var(--radius-full);
|
|
45
|
+
outline: 2px solid var(--background); }
|
|
46
|
+
.doc-here-face:focus-visible { outline-color: var(--ring); }
|
|
47
|
+
.doc-here-pen { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 15px;
|
|
48
|
+
height: 15px; border-radius: var(--radius-full); background: var(--primary); color: var(--primary-foreground);
|
|
49
|
+
outline: 2px solid var(--background); }
|
|
50
|
+
.doc-here-more { margin-left: 5px; color: var(--muted-foreground); font-size: 12px; font-weight: 600; }
|
|
51
|
+
|
|
52
|
+
.doc-body { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
|
|
53
|
+
.doc-banner { margin-bottom: 14px; }
|
|
54
|
+
.doc-banner-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; }
|
|
55
|
+
|
|
56
|
+
.doc-bar { position: sticky; top: 0; z-index: 3; margin: 0 -10px 20px; padding: 8px 10px;
|
|
57
|
+
border-bottom: 1px solid var(--border); background: color-mix(in oklab, var(--background) 90%, transparent);
|
|
58
|
+
backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
|
|
59
|
+
.doc-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
|
|
60
|
+
.doc-tools { display: flex; flex: 1; min-width: 0; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
|
|
61
|
+
.doc-tools::-webkit-scrollbar { display: none; }
|
|
62
|
+
.doc-tool { display: inline-grid; flex: none; place-items: center; width: 32px; height: 32px; padding: 0; border: 0;
|
|
63
|
+
border-radius: var(--radius-md); background: transparent; color: var(--muted-foreground); cursor: pointer;
|
|
64
|
+
transition: background-color .12s, color .12s; }
|
|
65
|
+
.doc-tool:hover:not(:disabled), .doc-tool[aria-expanded=true] { background: var(--accent); color: var(--accent-foreground); }
|
|
66
|
+
.doc-tool:disabled { opacity: .35; cursor: default; }
|
|
67
|
+
.doc-tools-gap { flex: none; width: 1px; height: 18px; margin: 0 6px; background: var(--border); }
|
|
68
|
+
.doc-modes { flex: none; }
|
|
69
|
+
.doc-mode-toggle { flex: none; }
|
|
70
|
+
.doc-keys { display: inline-flex; gap: 2px; margin-left: 6px; vertical-align: middle; }
|
|
71
|
+
.doc-help { padding: 6px 8px 4px; }
|
|
72
|
+
.doc-help-title { margin: 0 0 8px; font-family: var(--font-display); font-weight: 650; }
|
|
73
|
+
.doc-help dl { display: grid; gap: 6px; margin: 0; }
|
|
74
|
+
.doc-help dl > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; }
|
|
75
|
+
.doc-help dd { margin: 0; }
|
|
76
|
+
.doc-help-note { margin: 10px 0 2px; color: var(--muted-foreground); font-size: 12.5px; line-height: 1.45; }
|
|
77
|
+
@container copilotz-page (max-width: 640px) {
|
|
78
|
+
.doc-bar { margin: 0 -16px 16px; padding: 6px 12px 6px max(12px, var(--copilotz-page-inset, 0px)); }
|
|
79
|
+
.doc-toolbar { gap: 8px; }
|
|
80
|
+
.doc-tool { width: 36px; height: 36px; }
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.doc-surface { font: 400 16.5px/1.75 var(--font-sans); color: var(--foreground); min-width: 0; }
|
|
84
|
+
.doc-grow { display: grid; min-width: 0; }
|
|
85
|
+
.doc-grow::after { content: attr(data-value); visibility: hidden; white-space: pre-wrap; overflow-wrap: anywhere;
|
|
86
|
+
grid-area: 1 / 1 / 2 / 2; font: inherit; tab-size: 4; min-height: 52vh; }
|
|
87
|
+
.doc-input.copilotz-textarea { grid-area: 1 / 1 / 2 / 2; min-height: 52vh; overflow: hidden; resize: none;
|
|
88
|
+
font: inherit; line-height: inherit; color: inherit; tab-size: 4; caret-color: var(--primary-text);
|
|
89
|
+
overflow-wrap: anywhere; }
|
|
90
|
+
.doc-input.copilotz-textarea::placeholder { color: var(--muted-foreground); opacity: .7; }
|
|
91
|
+
.doc-surface-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
|
|
92
|
+
.doc-surface-split .doc-grow { padding-right: 36px; }
|
|
93
|
+
.doc-surface-split .doc-preview { position: sticky; top: 62px; max-height: calc(100dvh - 86px); overflow: auto;
|
|
94
|
+
padding: 0 4px 24px 36px; border-left: 1px solid var(--border); overscroll-behavior: contain;
|
|
95
|
+
scrollbar-width: thin; scrollbar-color: var(--input) transparent; }
|
|
96
|
+
.doc-surface-preview .doc-preview { min-height: 40vh; padding-top: 10px; }
|
|
97
|
+
.doc-empty-preview { margin: 0; color: var(--muted-foreground); font-style: italic; }
|
|
98
|
+
|
|
99
|
+
.doc-md { font-size: 16.5px; line-height: 1.75; }
|
|
100
|
+
.doc-md :is(h3, h4, h5, h6) { font-family: var(--font-display); letter-spacing: -.02em; line-height: 1.25; }
|
|
101
|
+
.doc-md h3 { margin: 1.5em 0 .5em; font-size: 1.75em; font-weight: 700; }
|
|
102
|
+
.doc-md h4 { margin: 1.5em 0 .45em; font-size: 1.32em; font-weight: 660; }
|
|
103
|
+
.doc-md h5 { margin: 1.3em 0 .4em; font-size: 1.1em; font-weight: 650; }
|
|
104
|
+
.doc-md > :is(p, ul, ol, blockquote) { margin-bottom: .95em; }
|
|
105
|
+
.doc-md > :first-child { margin-top: 0; }
|
|
106
|
+
.doc-md-small { font-size: 14.5px; line-height: 1.65; }
|
|
107
|
+
.doc-md-small h3 { font-size: 1.45em; }
|
|
108
|
+
.doc-md-small h4 { font-size: 1.2em; }
|
|
109
|
+
|
|
110
|
+
.doc-foot { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 28px; padding-top: 14px;
|
|
111
|
+
border-top: 1px solid var(--border); color: var(--muted-foreground); font-size: 12.5px; }
|
|
112
|
+
.doc-foot .copilotz-time { font-size: 12.5px; }
|
|
113
|
+
.doc-loading { display: grid; gap: 14px; }
|
|
114
|
+
|
|
115
|
+
.doc-counts { display: inline-flex; gap: 6px; font: 600 12px/1 var(--font-mono); font-variant-numeric: tabular-nums;
|
|
116
|
+
font-variant-ligatures: none; white-space: nowrap; }
|
|
117
|
+
.doc-added { color: var(--success-text); }
|
|
118
|
+
.doc-removed { color: var(--destructive-text); }
|
|
119
|
+
.doc-diff { width: 100%; }
|
|
120
|
+
|
|
121
|
+
.doc-conflict { display: grid; gap: 18px; min-width: 0; }
|
|
122
|
+
.doc-conflict-head { display: flex; gap: 14px; padding: 16px 18px; border: 1px solid var(--warning-border);
|
|
123
|
+
border-radius: var(--radius-xl); background: var(--warning-soft); }
|
|
124
|
+
.doc-conflict-icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px;
|
|
125
|
+
border-radius: var(--radius-lg); background: color-mix(in oklab, var(--warning) 22%, var(--background));
|
|
126
|
+
color: var(--warning-text); }
|
|
127
|
+
.doc-conflict-head h2 { margin: 2px 0 6px; font-family: var(--font-display); font-size: 17px; font-weight: 660;
|
|
128
|
+
line-height: 1.3; letter-spacing: -.01em; }
|
|
129
|
+
.doc-conflict-head p { margin: 0; color: var(--foreground); font-size: 14px; line-height: 1.6; }
|
|
130
|
+
.doc-conflict-head p .copilotz-avatar { vertical-align: -4px; }
|
|
131
|
+
.doc-conflict-head p .copilotz-time { font-size: 14px; }
|
|
132
|
+
.doc-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
|
|
133
|
+
.doc-choice { display: grid; align-content: start; gap: 6px; padding: 14px 16px; border: 1px solid var(--border);
|
|
134
|
+
border-radius: var(--radius-lg); background: var(--card); color: var(--card-foreground); font: inherit;
|
|
135
|
+
text-align: left; cursor: pointer; transition: border-color .15s, background-color .15s; }
|
|
136
|
+
.doc-choice:hover:not(:disabled) { border-color: var(--primary-border);
|
|
137
|
+
background: color-mix(in oklab, var(--primary-soft) 45%, var(--card)); }
|
|
138
|
+
.doc-choice:disabled { opacity: .6; cursor: progress; }
|
|
139
|
+
.doc-choice-primary { border-color: var(--primary-border); }
|
|
140
|
+
.doc-choice-name { display: flex; align-items: center; gap: 7px; font-weight: 650; font-size: 14.5px; }
|
|
141
|
+
.doc-choice-says { color: var(--muted-foreground); font-size: 13px; line-height: 1.45; }
|
|
142
|
+
.doc-conflict-diff { display: grid; gap: 12px; min-width: 0; }
|
|
143
|
+
.doc-conflict-titles { margin: 0; color: var(--muted-foreground); font-size: 13.5px; }
|
|
144
|
+
.doc-hand { display: grid; gap: 14px; min-width: 0; }
|
|
145
|
+
.doc-hand-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
|
|
146
|
+
.doc-hand-head p { margin: 0; color: var(--muted-foreground); font-size: 13.5px; }
|
|
147
|
+
.doc-clash { overflow: hidden; transition: border-color .15s; }
|
|
148
|
+
.doc-clash[data-settled] { border-color: var(--success-border); }
|
|
149
|
+
.doc-clash-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 14px;
|
|
150
|
+
border-bottom: 1px solid var(--border); font-size: 13.5px; }
|
|
151
|
+
.doc-clash-near { flex: 1; min-width: 0; overflow: hidden; color: var(--muted-foreground); text-overflow: ellipsis;
|
|
152
|
+
white-space: nowrap; }
|
|
153
|
+
.doc-clash-sides { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding: 12px 14px 0; }
|
|
154
|
+
.doc-clash-picks { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px 14px; }
|
|
155
|
+
.doc-own { display: grid; gap: 0; padding: 12px 14px 0; }
|
|
156
|
+
.doc-own .doc-clash-picks { padding-inline: 0; }
|
|
157
|
+
.doc-hand-foot { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
|
|
158
|
+
@container copilotz-page (max-width: 720px) {
|
|
159
|
+
.doc-choices, .doc-clash-sides { grid-template-columns: minmax(0, 1fr); }
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.copilotz-drawer:has(> .doc-history) { width: min(100vw, 620px); }
|
|
163
|
+
.doc-history { padding-bottom: 16px; }
|
|
164
|
+
.doc-history-list { list-style: none; display: grid; gap: 2px; margin: 0; padding: 2px 10px 16px; }
|
|
165
|
+
.doc-version-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 12px;
|
|
166
|
+
width: 100%; padding: 10px; border: 0; border-radius: var(--radius-lg); background: transparent; color: inherit;
|
|
167
|
+
font: inherit; text-align: left; cursor: pointer; transition: background-color .12s; }
|
|
168
|
+
.doc-version-row:hover { background: var(--accent); }
|
|
169
|
+
.doc-version-row[aria-current] { background: color-mix(in oklab, var(--primary-soft) 60%, transparent); }
|
|
170
|
+
.doc-version-text { display: grid; gap: 2px; min-width: 0; }
|
|
171
|
+
.doc-version-top { display: flex; align-items: center; gap: 6px; font-size: 14px; }
|
|
172
|
+
.doc-version-what { overflow: hidden; color: var(--muted-foreground); font-size: 12.5px; text-overflow: ellipsis;
|
|
173
|
+
white-space: nowrap; }
|
|
174
|
+
.doc-version-end { display: grid; justify-items: end; gap: 4px; color: var(--muted-foreground); font-size: 12px; }
|
|
175
|
+
.doc-version-end .copilotz-time { font-size: 12px; }
|
|
176
|
+
.doc-history-one { display: grid; justify-items: start; gap: 10px; padding: 0 18px 16px 14px; }
|
|
177
|
+
.doc-version { display: grid; gap: 14px; width: 100%; min-width: 0; }
|
|
178
|
+
.doc-version-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
|
|
179
|
+
.doc-version-head h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-family: var(--font-display);
|
|
180
|
+
font-size: 17px; font-weight: 660; }
|
|
181
|
+
.doc-version-head p { margin: 2px 0 0; color: var(--muted-foreground); font-size: 13px; }
|
|
182
|
+
.doc-version-head .copilotz-time { font-size: 13px; }
|
|
183
|
+
.doc-version-renamed { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--muted-foreground);
|
|
184
|
+
font-size: 13px; }
|
|
185
|
+
.doc-version-read { position: relative; padding: 16px 18px; border: 1px solid var(--border);
|
|
186
|
+
border-radius: var(--radius-lg); background: var(--card); }
|
|
187
|
+
.doc-version-copy { position: absolute; top: 8px; right: 8px; }
|
|
188
|
+
.doc-version-title { margin: 0 40px 12px 0; font-family: var(--font-display); font-size: 21px; font-weight: 680;
|
|
189
|
+
letter-spacing: -.02em; overflow-wrap: anywhere; }
|
|
190
|
+
.doc-version-foot { display: grid; justify-items: start; }
|
|
191
|
+
.doc-version-ask { display: inline-flex; gap: 6px; }
|
|
192
|
+
|
|
193
|
+
.docs { display: grid; gap: 14px; min-width: 0; }
|
|
194
|
+
.docs-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
|
|
195
|
+
.docs-intro { margin: 0; max-width: 560px; color: var(--muted-foreground); font-size: 14px; line-height: 1.5; }
|
|
196
|
+
.docs-search { flex: 1; min-width: 180px; }
|
|
197
|
+
.docs-list { list-style: none; display: grid; gap: 8px; margin: 0; padding: 0; }
|
|
198
|
+
.docs-item { position: relative; }
|
|
199
|
+
.docs-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: start; gap: 14px; width: 100%;
|
|
200
|
+
padding: 14px 54px 14px 14px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--card);
|
|
201
|
+
color: var(--card-foreground); font: inherit; text-align: left; text-decoration: none; cursor: pointer;
|
|
202
|
+
transition: border-color .15s, box-shadow .15s, background-color .15s; }
|
|
203
|
+
.docs-row:hover { border-color: color-mix(in oklab, var(--primary) 28%, var(--border)); box-shadow: var(--shadow-sm); }
|
|
204
|
+
.docs-row-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius-lg);
|
|
205
|
+
background: var(--primary-soft); color: var(--primary-text); }
|
|
206
|
+
.docs-row-text { display: grid; gap: 3px; min-width: 0; }
|
|
207
|
+
.docs-row-title { font-size: 15px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
|
|
208
|
+
.docs-row-excerpt { display: -webkit-box; overflow: hidden; color: var(--muted-foreground); font-size: 13.5px; line-height: 1.5;
|
|
209
|
+
-webkit-line-clamp: 2; -webkit-box-orient: vertical; }
|
|
210
|
+
.docs-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 4px;
|
|
211
|
+
color: var(--muted-foreground); font-size: 12.5px; }
|
|
212
|
+
.docs-row-meta .copilotz-time { font-size: 12.5px; }
|
|
213
|
+
.docs-row-here { display: flex; align-items: center; gap: 8px; align-self: center; }
|
|
214
|
+
.docs-row-editing { color: var(--warning-text); font-size: 12px; font-weight: 560; white-space: nowrap; }
|
|
215
|
+
.docs-row-menu { position: absolute; top: 13px; right: 10px; }
|
|
216
|
+
.docs-none { margin: 10px 0; color: var(--muted-foreground); text-align: center; }
|
|
217
|
+
.docs-empty { margin: 26px auto 4px; }
|
|
218
|
+
.docs-start { display: grid; justify-items: center; gap: 10px; text-align: center; }
|
|
219
|
+
.docs-start-label { margin: 0; color: var(--muted-foreground); font-size: 12px; font-weight: 650; letter-spacing: .06em;
|
|
220
|
+
text-transform: uppercase; }
|
|
221
|
+
.docs-start-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
|
|
222
|
+
.docs-start-hint { display: flex; align-items: flex-start; gap: 7px; max-width: 520px; margin: 8px auto 0;
|
|
223
|
+
color: var(--muted-foreground); font-size: 13px; line-height: 1.5; text-align: left; }
|
|
224
|
+
.docs-start-hint .copilotz-icon { flex: none; margin-top: 2px; color: var(--primary-text); }
|
|
225
|
+
@container copilotz-page (max-width: 560px) {
|
|
226
|
+
.docs-row { grid-template-columns: 32px minmax(0, 1fr); padding: 12px 46px 12px 12px; gap: 12px; }
|
|
227
|
+
.docs-row-icon { width: 32px; height: 32px; border-radius: var(--radius-md); }
|
|
228
|
+
.docs-row-here { grid-column: 2; align-self: start; }
|
|
229
|
+
.docs-row-menu { top: 10px; right: 6px; }
|
|
230
|
+
}
|
|
231
|
+
.docs-compact { gap: 10px; }
|
|
232
|
+
.docs-compact .docs-row { grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px;
|
|
233
|
+
padding: 9px 42px 9px 10px; border-radius: var(--radius-lg); }
|
|
234
|
+
.docs-compact .docs-row-icon { width: 28px; height: 28px; border-radius: var(--radius-md); }
|
|
235
|
+
.docs-compact .docs-row-title { font-size: 14px; }
|
|
236
|
+
.docs-compact .docs-row-meta { margin-top: 1px; font-size: 12px; }
|
|
237
|
+
.docs-compact .docs-row-menu { top: 50%; right: 6px; transform: translateY(-50%); }
|
|
238
|
+
.docs-compact .docs-empty { margin-top: 10px; }
|
|
239
|
+
.docs-reader-back { margin: -4px 0 -2px -8px; }
|
|
240
|
+
|
|
241
|
+
.doc-reader { display: grid; gap: 12px; min-width: 0; }
|
|
242
|
+
.doc-reader-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
|
|
243
|
+
padding-bottom: 12px; border-bottom: 1px solid var(--border); }
|
|
244
|
+
.doc-reader-head h2 { margin: 0; font-family: var(--font-display); font-size: 18px; font-weight: 680;
|
|
245
|
+
letter-spacing: -.015em; line-height: 1.3; overflow-wrap: anywhere; }
|
|
246
|
+
.doc-reader-head p { margin: 3px 0 0; color: var(--muted-foreground); font-size: 12.5px; }
|
|
247
|
+
.doc-reader-head .copilotz-time { font-size: 12.5px; }
|
|
248
|
+
|
|
249
|
+
.doc-step { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px;
|
|
250
|
+
max-width: 520px; padding: 9px 10px 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-lg);
|
|
251
|
+
background: var(--card); }
|
|
252
|
+
.doc-step-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-md);
|
|
253
|
+
background: var(--primary-soft); color: var(--primary-text); }
|
|
254
|
+
.doc-step-text { display: grid; gap: 2px; min-width: 0; }
|
|
255
|
+
.doc-step-title { overflow: hidden; color: var(--foreground); font-weight: 650; text-decoration: none;
|
|
256
|
+
text-overflow: ellipsis; white-space: nowrap; }
|
|
257
|
+
.doc-step-title:hover { text-decoration: underline; text-underline-offset: 2px; }
|
|
258
|
+
.doc-step-what { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--muted-foreground);
|
|
259
|
+
font-size: 12.5px; }
|
|
260
|
+
.doc-step-line { display: inline-flex; align-items: center; gap: 7px; color: var(--muted-foreground); font-size: 13px; }
|
|
261
|
+
.doc-step-line[data-failed] { color: var(--destructive-text); }
|
|
262
|
+
.doc-step-link { color: var(--primary-text); font-weight: 600; text-decoration: none; }
|
|
263
|
+
.doc-step-link:hover { text-decoration: underline; text-underline-offset: 2px; }
|
|
264
|
+
|
|
265
|
+
.doc-missing { display: grid; gap: 18px; max-width: 520px; margin: 14vh auto; padding: 0 16px; }
|
|
266
|
+
`;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Documents' web front end, for the browser: a space's Documents tab
|
|
3
|
+
* (spaces' `spaceTabs`: its documents, a new one in a click, and, beside a
|
|
4
|
+
* chat, the same compact, a document opening there to read), a document's
|
|
5
|
+
* page (`/document/<id>`: the title in place, a Markdown editor with
|
|
6
|
+
* Write / Preview / Split, ⌘S saving each version, a draft kept in the
|
|
7
|
+
* browser, who else is in it, the conflict screen when two saves clash, and
|
|
8
|
+
* History in a drawer: every version, its changes, restoring one), the
|
|
9
|
+
* command palette's (the web shell's `palette`: going to a document, a new
|
|
10
|
+
* one here, and what to do with the one open), and agents' calls to the
|
|
11
|
+
* documents tools in a conversation, as compact cards (chat's `toolViews`).
|
|
12
|
+
*
|
|
13
|
+
* ```ts
|
|
14
|
+
* await web({ plugins: [webShell, chatWeb, spacesWeb, documentsWeb], root });
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
import { type Plugin } from "copilotz";
|
|
18
|
+
export declare const documentsWeb: Plugin;
|
package/documents/web.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Documents' web front end, for the browser: a space's Documents tab
|
|
3
|
+
* (spaces' `spaceTabs`: its documents, a new one in a click, and, beside a
|
|
4
|
+
* chat, the same compact, a document opening there to read), a document's
|
|
5
|
+
* page (`/document/<id>`: the title in place, a Markdown editor with
|
|
6
|
+
* Write / Preview / Split, ⌘S saving each version, a draft kept in the
|
|
7
|
+
* browser, who else is in it, the conflict screen when two saves clash, and
|
|
8
|
+
* History in a drawer: every version, its changes, restoring one), the
|
|
9
|
+
* command palette's (the web shell's `palette`: going to a document, a new
|
|
10
|
+
* one here, and what to do with the one open), and agents' calls to the
|
|
11
|
+
* documents tools in a conversation, as compact cards (chat's `toolViews`).
|
|
12
|
+
*
|
|
13
|
+
* ```ts
|
|
14
|
+
* await web({ plugins: [webShell, chatWeb, spacesWeb, documentsWeb], root });
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
import { definePlugin } from "copilotz";
|
|
18
|
+
import { historyView, versionView } from "./views/web/history.js";
|
|
19
|
+
import { documentsView, readView } from "./views/web/list.js";
|
|
20
|
+
import { documentView } from "./views/web/page.js";
|
|
21
|
+
import { documentsPaletteView } from "./views/web/palette.js";
|
|
22
|
+
import { documentStepView } from "./views/web/step.js";
|
|
23
|
+
export const documentsWeb = definePlugin({
|
|
24
|
+
name: "documents-web",
|
|
25
|
+
requires: ["web-shell"],
|
|
26
|
+
views: {
|
|
27
|
+
documents: documentsView,
|
|
28
|
+
document: documentView,
|
|
29
|
+
"document.read": readView,
|
|
30
|
+
"document.history": historyView,
|
|
31
|
+
"document.version": versionView,
|
|
32
|
+
"document.palette": documentsPaletteView,
|
|
33
|
+
"document.step": documentStepView,
|
|
34
|
+
},
|
|
35
|
+
resources: {
|
|
36
|
+
spaceTabs: { documents: { title: "Documents", view: "documents", icon: "file", order: 30 } },
|
|
37
|
+
palette: { documents: { view: "document.palette", order: 32 } },
|
|
38
|
+
toolViews: {
|
|
39
|
+
list_documents: "document.step",
|
|
40
|
+
read_document: "document.step",
|
|
41
|
+
write_document: "document.step",
|
|
42
|
+
append_document: "document.step",
|
|
43
|
+
edit_document: "document.step",
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
});
|
package/mod.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Work (`@copilotz/work`): kanban boards and shared Markdown documents, in a
|
|
3
|
+
* space, for people and agents. `boards` (a board's columns and cards, and
|
|
4
|
+
* the tools agents move them with) and `documents` (Markdown with versions,
|
|
5
|
+
* merged when two edit at once, and who has one open), each a plugin of its
|
|
6
|
+
* own beside Copilotz's `chat` and `spaces`, which they require:
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { boards, documents } from "@copilotz/work";
|
|
10
|
+
*
|
|
11
|
+
* const runtime = await createRuntime({ store, plugins: [models, chat, ...access, boards, documents, app] });
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* Their web front ends are `@copilotz/work/web`; their shapes,
|
|
15
|
+
* `@copilotz/work/contract`.
|
|
16
|
+
*/
|
|
17
|
+
export * from "./boards/mod.js";
|
|
18
|
+
export * from "./documents/mod.js";
|
package/mod.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Work (`@copilotz/work`): kanban boards and shared Markdown documents, in a
|
|
3
|
+
* space, for people and agents. `boards` (a board's columns and cards, and
|
|
4
|
+
* the tools agents move them with) and `documents` (Markdown with versions,
|
|
5
|
+
* merged when two edit at once, and who has one open), each a plugin of its
|
|
6
|
+
* own beside Copilotz's `chat` and `spaces`, which they require:
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { boards, documents } from "@copilotz/work";
|
|
10
|
+
*
|
|
11
|
+
* const runtime = await createRuntime({ store, plugins: [models, chat, ...access, boards, documents, app] });
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* Their web front ends are `@copilotz/work/web`; their shapes,
|
|
15
|
+
* `@copilotz/work/contract`.
|
|
16
|
+
*/
|
|
17
|
+
export * from "./boards/mod.js";
|
|
18
|
+
export * from "./documents/mod.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,63 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@copilotz/work",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0-rc.34",
|
|
4
|
+
"description": "Kanban boards and shared Markdown documents, in a space, for people and agents: a Copilotz plugin.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"copilotz",
|
|
7
|
+
"agents",
|
|
8
|
+
"ai",
|
|
9
|
+
"plugin"
|
|
10
|
+
],
|
|
11
|
+
"homepage": "https://github.com/copilotzhq/copilotz/tree/main/packages/work#readme",
|
|
12
|
+
"bugs": "https://github.com/copilotzhq/copilotz/issues",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/copilotzhq/copilotz.git",
|
|
16
|
+
"directory": "packages/work"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"type": "module",
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=24"
|
|
22
|
+
},
|
|
23
|
+
"sideEffects": false,
|
|
24
|
+
"types": "./mod.d.ts",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./mod.d.ts",
|
|
28
|
+
"default": "./mod.js"
|
|
29
|
+
},
|
|
30
|
+
"./web": {
|
|
31
|
+
"types": "./web.d.ts",
|
|
32
|
+
"default": "./web.js"
|
|
33
|
+
},
|
|
34
|
+
"./contract": {
|
|
35
|
+
"types": "./contract.d.ts",
|
|
36
|
+
"default": "./contract.js"
|
|
37
|
+
},
|
|
38
|
+
"./package.json": "./package.json"
|
|
39
|
+
},
|
|
40
|
+
"files": [
|
|
41
|
+
"LICENSE",
|
|
42
|
+
"README.md",
|
|
43
|
+
"boards",
|
|
44
|
+
"contract.d.ts",
|
|
45
|
+
"contract.js",
|
|
46
|
+
"documents",
|
|
47
|
+
"mod.d.ts",
|
|
48
|
+
"mod.js",
|
|
49
|
+
"web.d.ts",
|
|
50
|
+
"web.js"
|
|
51
|
+
],
|
|
52
|
+
"dependencies": {},
|
|
53
|
+
"peerDependencies": {
|
|
54
|
+
"@types/react": "^19.3.0",
|
|
55
|
+
"copilotz": "1.0.0-rc.34",
|
|
56
|
+
"react": "^19.3.1"
|
|
57
|
+
},
|
|
58
|
+
"peerDependenciesMeta": {
|
|
59
|
+
"@types/react": {
|
|
60
|
+
"optional": true
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
package/web.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Work's front ends, for the browser (`@copilotz/work/web`): boards' (a space's Board tab, a
|
|
3
|
+
* board's page, cards) and documents' (a space's Documents tab, the editor, history). Add them
|
|
4
|
+
* beside the web shell's:
|
|
5
|
+
*
|
|
6
|
+
* ```ts
|
|
7
|
+
* import { boardsWeb, documentsWeb } from "@copilotz/work/web";
|
|
8
|
+
*
|
|
9
|
+
* await web({ plugins: [webShell, chatWeb, spacesWeb, boardsWeb, documentsWeb], root });
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export * from "./boards/web.js";
|
|
13
|
+
export * from "./documents/web.js";
|
package/web.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Work's front ends, for the browser (`@copilotz/work/web`): boards' (a space's Board tab, a
|
|
3
|
+
* board's page, cards) and documents' (a space's Documents tab, the editor, history). Add them
|
|
4
|
+
* beside the web shell's:
|
|
5
|
+
*
|
|
6
|
+
* ```ts
|
|
7
|
+
* import { boardsWeb, documentsWeb } from "@copilotz/work/web";
|
|
8
|
+
*
|
|
9
|
+
* await web({ plugins: [webShell, chatWeb, spacesWeb, boardsWeb, documentsWeb], root });
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export * from "./boards/web.js";
|
|
13
|
+
export * from "./documents/web.js";
|