@crewlethq/ui 0.17.1 → 0.19.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.
- package/README.md +55 -3
- package/dist/AccessDeniedCard/AccessDeniedCard.d.ts +39 -0
- package/dist/AccessDeniedCard/index.d.ts +3 -0
- package/dist/AccessDeniedCard/index.js +8 -0
- package/dist/AccessDeniedCard-WXM5DBDZ.css +8 -0
- package/dist/AppShell/index.js +2 -2
- package/dist/ArrangeBoard/ArrangeBoard.d.ts +32 -0
- package/dist/ArrangeBoard/index.d.ts +3 -0
- package/dist/ArrangeBoard/index.js +2 -0
- package/dist/ArrangeBoard-MQE35P6Z.css +80 -0
- package/dist/ArrangeFrame/ArrangeFrame.d.ts +82 -0
- package/dist/ArrangeFrame/index.d.ts +5 -0
- package/dist/ArrangeFrame/index.js +5 -0
- package/dist/ArrangeFrame/useGridResize.d.ts +66 -0
- package/dist/ArrangeFrame-3PLZAG22.css +329 -0
- package/dist/ArrangeGroup/ArrangeGroup.d.ts +42 -0
- package/dist/ArrangeGroup/index.d.ts +3 -0
- package/dist/ArrangeGroup/index.js +4 -0
- package/dist/ArrangeGroup-SHFHA7BE.css +170 -0
- package/dist/ArrangeList/ArrangeList.d.ts +64 -0
- package/dist/ArrangeList/index.d.ts +3 -0
- package/dist/ArrangeList/index.js +10 -0
- package/dist/ArrangeList-NNRTDFI5.css +94 -0
- package/dist/ArtifactCard/ArtifactCard.d.ts +61 -0
- package/dist/ArtifactCard/index.d.ts +3 -0
- package/dist/ArtifactCard/index.js +12 -0
- package/dist/ArtifactCard-EXVAEBV6.css +109 -0
- package/dist/AuthLayout/index.js +2 -2
- package/dist/AvatarPicker/index.js +5 -5
- package/dist/Canvas/index.js +2 -2
- package/dist/Card/index.js +1 -1
- package/dist/ChangeMark/ChangeMark.d.ts +26 -0
- package/dist/ChangeMark/index.d.ts +3 -0
- package/dist/ChangeMark/index.js +8 -0
- package/dist/ChangeMark-3VMTW7MT.css +22 -0
- package/dist/Checkbox/index.js +3 -3
- package/dist/Combobox/index.js +3 -3
- package/dist/CommandPalette/index.js +5 -5
- package/dist/Composer/index.js +3 -3
- package/dist/ConfirmField/index.js +3 -3
- package/dist/CursorFlag/CursorFlag.d.ts +34 -0
- package/dist/CursorFlag/index.d.ts +3 -0
- package/dist/CursorFlag/index.js +3 -0
- package/dist/CursorFlag-AJQJBUGY.css +61 -0
- package/dist/DataTable/index.js +7 -7
- package/dist/DataView/index.js +13 -13
- package/dist/DateTimePicker/index.js +2 -2
- package/dist/Divider/Divider.d.ts +15 -0
- package/dist/Divider/index.d.ts +3 -0
- package/dist/Divider/index.js +2 -0
- package/dist/Divider-3Z77ZAJH.css +37 -0
- package/dist/FollowBanner/FollowBanner.d.ts +35 -0
- package/dist/FollowBanner/index.d.ts +2 -0
- package/dist/FollowBanner/index.js +7 -0
- package/dist/FrameProtocol/index.d.ts +2 -0
- package/dist/FrameProtocol/index.js +2 -0
- package/dist/FrameProtocol/protocol.d.ts +164 -0
- package/dist/HuePicker/HuePicker.d.ts +16 -4
- package/dist/HuePicker/index.js +3 -3
- package/dist/{HuePicker-5QIUR6L7.css → HuePicker-PAIGH6LR.css} +6 -0
- package/dist/IconTile/IconTile.d.ts +23 -0
- package/dist/IconTile/index.d.ts +3 -0
- package/dist/IconTile/index.js +2 -0
- package/dist/IconTile-4GNWTLAW.css +30 -0
- package/dist/Input/index.js +2 -2
- package/dist/LinkInterstitial/LinkInterstitial.d.ts +41 -0
- package/dist/LinkInterstitial/index.d.ts +3 -0
- package/dist/LinkInterstitial/index.js +11 -0
- package/dist/LinkInterstitial-ET4MSVSV.css +34 -0
- package/dist/ListInput/index.js +4 -4
- package/dist/LiveCursor/LiveCursor.d.ts +34 -0
- package/dist/LiveCursor/index.d.ts +3 -0
- package/dist/LiveCursor/index.js +4 -0
- package/dist/LiveCursor-DZHGIYWE.css +47 -0
- package/dist/MarkdownEditor/index.js +3 -3
- package/dist/Menu/index.js +2 -2
- package/dist/Modal/Modal.d.ts +20 -0
- package/dist/Modal/index.js +2 -2
- package/dist/{Modal-RQAYGG4L.css → Modal-XOSV6FAH.css} +14 -0
- package/dist/Note/Note.d.ts +23 -0
- package/dist/Note/index.d.ts +3 -0
- package/dist/Note/index.js +2 -0
- package/dist/Note-RT4L6VUT.css +58 -0
- package/dist/OrgTable/index.js +5 -5
- package/dist/PinTile/PinTile.d.ts +37 -0
- package/dist/PinTile/index.d.ts +3 -0
- package/dist/PinTile/index.js +4 -0
- package/dist/PinTile-IIA25MNZ.css +141 -0
- package/dist/PresenceModel/index.d.ts +2 -0
- package/dist/PresenceModel/index.js +3 -0
- package/dist/PresenceModel/presence.d.ts +80 -0
- package/dist/PresenceRing/PresenceRing.d.ts +31 -0
- package/dist/PresenceRing/index.d.ts +3 -0
- package/dist/PresenceRing/index.js +2 -0
- package/dist/PresenceRing-M4C22Q6U.css +68 -0
- package/dist/PresenceStack/PresenceStack.d.ts +36 -0
- package/dist/PresenceStack/index.d.ts +3 -0
- package/dist/PresenceStack/index.js +9 -0
- package/dist/PresenceStack-QSXQJND5.css +59 -0
- package/dist/PricingCard/index.js +2 -2
- package/dist/Principal/Principal.d.ts +35 -0
- package/dist/Principal/index.d.ts +2 -0
- package/dist/Principal/index.js +4 -0
- package/dist/PrincipalPicker/PrincipalPicker.d.ts +45 -0
- package/dist/PrincipalPicker/index.d.ts +3 -0
- package/dist/PrincipalPicker/index.js +12 -0
- package/dist/PrincipalPicker-7NNZTGUP.css +41 -0
- package/dist/Reorder/index.d.ts +2 -0
- package/dist/Reorder/index.js +4 -0
- package/dist/Reorder/useReorder.d.ts +138 -0
- package/dist/SandboxedFrame/SandboxedFrame.d.ts +142 -0
- package/dist/SandboxedFrame/index.d.ts +3 -0
- package/dist/SandboxedFrame/index.js +8 -0
- package/dist/SandboxedFrame-L6HBQZCD.css +50 -0
- package/dist/ShareDialog/ShareDialog.d.ts +101 -0
- package/dist/ShareDialog/index.d.ts +5 -0
- package/dist/ShareDialog/index.js +19 -0
- package/dist/ShareDialog/roles.d.ts +10 -0
- package/dist/ShareDialog-YZ4F37MW.css +146 -0
- package/dist/SheetGrid/SheetGrid.d.ts +78 -0
- package/dist/SheetGrid/cells.d.ts +117 -0
- package/dist/SheetGrid/index.d.ts +5 -0
- package/dist/SheetGrid/index.js +18 -0
- package/dist/SheetGrid-4HOXDVIB.css +595 -0
- package/dist/SheetModel/clipboard.d.ts +37 -0
- package/dist/SheetModel/edits.d.ts +68 -0
- package/dist/SheetModel/index.d.ts +14 -0
- package/dist/SheetModel/index.js +3 -0
- package/dist/SheetModel/labels.d.ts +71 -0
- package/dist/SheetModel/navigation.d.ts +79 -0
- package/dist/SheetModel/options.d.ts +28 -0
- package/dist/SheetModel/types.d.ts +126 -0
- package/dist/SheetModel/values.d.ts +76 -0
- package/dist/SheetModel/view.d.ts +32 -0
- package/dist/StatGroup/StatGroup.d.ts +7 -1
- package/dist/StatGroup/index.js +1 -1
- package/dist/{StatGroup-HVG6O62W.css → StatGroup-PADTJCUQ.css} +7 -0
- package/dist/Switcher/index.js +8 -8
- package/dist/Tag/Tag.d.ts +13 -0
- package/dist/Tag/index.js +1 -1
- package/dist/{Tag-4BRQS6GN.css → Tag-SRGTK5KI.css} +42 -0
- package/dist/TagsInput/index.js +4 -4
- package/dist/ThemeSwitcher/apply.d.ts +43 -0
- package/dist/ThemeSwitcher/index.d.ts +4 -2
- package/dist/ThemeSwitcher/index.js +3 -2
- package/dist/ThemeSwitcher/preferences.d.ts +2 -19
- package/dist/ThemeToggle/index.js +3 -2
- package/dist/TimeWindowPicker/index.js +4 -4
- package/dist/Timeline/Timeline.d.ts +7 -2
- package/dist/Timeline/index.js +1 -1
- package/dist/TreeCanvas/index.js +3 -3
- package/dist/TreeGrid/index.js +2 -2
- package/dist/VersionTimeline/VersionTimeline.d.ts +76 -0
- package/dist/VersionTimeline/index.d.ts +3 -0
- package/dist/VersionTimeline/index.js +10 -0
- package/dist/VersionTimeline-EBJ6MIPJ.css +108 -0
- package/dist/{chunk-SBRE7IML.js → chunk-2ONWEDQT.js} +1 -1
- package/dist/chunk-35XVR5JQ.js +81 -0
- package/dist/chunk-3BYIWOTV.js +29 -0
- package/dist/chunk-4KP4RC3O.js +25 -0
- package/dist/chunk-5XACKNYR.js +53 -0
- package/dist/chunk-63WJLRB2.js +24 -0
- package/dist/{chunk-L4ZLXYPO.js → chunk-6A7P6II6.js} +1 -1
- package/dist/chunk-6KWNXIDE.js +18 -0
- package/dist/chunk-6MIXD6IW.js +49 -0
- package/dist/{chunk-FA2V2VT6.js → chunk-7FQEUNHX.js} +4 -4
- package/dist/{chunk-DEEVA6TV.js → chunk-7IJARUIF.js} +17 -4
- package/dist/{chunk-JCO3SIST.js → chunk-7ZNKEPLN.js} +2 -2
- package/dist/chunk-AIVZVKYZ.js +126 -0
- package/dist/{chunk-FSKTOIYC.js → chunk-AJESMWJS.js} +5 -5
- package/dist/{chunk-O67VF5MS.js → chunk-AUQPBL4O.js} +2 -2
- package/dist/chunk-CENOOTAV.js +1 -0
- package/dist/chunk-DEJHAOC5.js +279 -0
- package/dist/{chunk-UCYIRDND.js → chunk-DQSXWQMJ.js} +1 -1
- package/dist/{chunk-JF7X673Z.js → chunk-EIGEIT4O.js} +2 -2
- package/dist/chunk-F6V2PTN6.js +142 -0
- package/dist/chunk-FFMCMSJB.js +1 -0
- package/dist/chunk-FW7HN6AP.js +40 -0
- package/dist/chunk-G3EEUNZQ.js +46 -0
- package/dist/{chunk-LOECRMHA.js → chunk-GFV4LJHH.js} +4 -3
- package/dist/chunk-HTCJSUIZ.js +216 -0
- package/dist/{chunk-75CLJNDQ.js → chunk-I6NZKJGK.js} +1 -1
- package/dist/chunk-I6POAB4V.js +20 -0
- package/dist/chunk-IXJHTFXG.js +17 -0
- package/dist/chunk-JEDWC3GI.js +98 -0
- package/dist/{chunk-QVAFL2LE.js → chunk-JXRI5YD2.js} +3 -3
- package/dist/{chunk-ZFH7H7GS.js → chunk-LOLELDBW.js} +1 -1
- package/dist/{chunk-6TSZCBID.js → chunk-NP2C4Y4E.js} +1 -1
- package/dist/{chunk-6NN2F7GM.js → chunk-OIMAK5AE.js} +6 -6
- package/dist/chunk-PPAQFGS2.js +12 -0
- package/dist/chunk-PUQY4WXR.js +1235 -0
- package/dist/chunk-QO7QEQKV.js +24 -0
- package/dist/chunk-RT323I4I.js +49 -0
- package/dist/chunk-S35G6PNC.js +80 -0
- package/dist/{chunk-HENOTGUV.js → chunk-T7ICFXEC.js} +2 -2
- package/dist/{chunk-2OLCUNG7.js → chunk-TBIZSQHB.js} +1 -1
- package/dist/chunk-TODND5AD.js +99 -0
- package/dist/{chunk-PQ63NLFC.js → chunk-UXELEORU.js} +3 -3
- package/dist/{chunk-6NIMZ5XC.js → chunk-VJLYGPPE.js} +1 -1
- package/dist/chunk-VYDFB6PJ.js +243 -0
- package/dist/{chunk-7QFAORCY.js → chunk-WHZFDS62.js} +1 -1
- package/dist/chunk-WXAULPBH.js +135 -0
- package/dist/chunk-XJ2QEBMM.js +277 -0
- package/dist/{chunk-NXDEPUVG.js → chunk-XU4ZUGLE.js} +20 -5
- package/dist/chunk-YM3GJHGW.js +69 -0
- package/dist/{chunk-T3ZWBZ65.js → chunk-YSJYWQSP.js} +2 -2
- package/dist/{chunk-CXBAIVYZ.js → chunk-YSY6UJ4F.js} +1 -1
- package/dist/chunk-YYZRLLLY.js +822 -0
- package/dist/{chunk-EG6NYWVK.js → chunk-YZCJ63JF.js} +1 -1
- package/dist/{chunk-K3OWD7BJ.js → chunk-Z24ZUSTX.js} +4 -19
- package/dist/chunk-ZXXDZJQN.js +36 -0
- package/dist/generated/index.d.ts +27 -0
- package/dist/generated/index.js +98 -69
- package/dist/index.js +98 -69
- package/dist/styles.css +13625 -11206
- package/dist/utils/index.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-EXHQ2QVW.js +0 -1
- package/dist/{chunk-CRVETI5L.js → chunk-4Z7PW3L6.js} +0 -0
- package/dist/{chunk-OYOQU7O5.js → chunk-EDGCPVVD.js} +1 -1
- package/dist/{chunk-NS7BVLL3.js → chunk-JULMZNGT.js} +1 -1
- package/dist/{chunk-2UU5IGZI.js → chunk-L4H7SSWF.js} +1 -1
- package/dist/{chunk-4GB57WIT.js → chunk-Q55TXPA3.js} +1 -1
- package/dist/{chunk-77IEHFY4.js → chunk-QQGWES46.js} +1 -1
- package/dist/{chunk-B2Z2CDM5.js → chunk-T5TFZ2JB.js} +1 -1
- package/dist/{chunk-AMH67MLM.js → chunk-TXAFKH2A.js} +1 -1
|
@@ -0,0 +1,595 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The editable sheet (SheetGrid.tsx) and its cells (cells.tsx).
|
|
3
|
+
*
|
|
4
|
+
* ONE EDGE PER CELL. Each cell draws its trailing and bottom hairline only, so
|
|
5
|
+
* two neighbours never draw two lines between them, and every mark laid over a
|
|
6
|
+
* cell (the active cell's ring, a collaborator's ring, a selection) is inset
|
|
7
|
+
* inside that edge rather than doubling it.
|
|
8
|
+
*
|
|
9
|
+
* The rows are positioned in a body as tall as every row together, and only
|
|
10
|
+
* the rows in view are in the document. Every row is a grid on the one column
|
|
11
|
+
* template the component writes, so a cell is exactly as wide as its header.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
.crewlet-sheet-grid {
|
|
15
|
+
--crewlet-sheet-row-height: var(--size-sheet-row);
|
|
16
|
+
position: relative;
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
min-width: 0;
|
|
20
|
+
min-height: 0;
|
|
21
|
+
color: var(--color-text-primary);
|
|
22
|
+
font-family: var(--font-family-sans);
|
|
23
|
+
font-size: var(--font-size-sm);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* Measured by the component: the resolved row height at the current density. */
|
|
27
|
+
.crewlet-sheet-grid__probe {
|
|
28
|
+
position: absolute;
|
|
29
|
+
width: 0;
|
|
30
|
+
height: var(--size-sheet-row);
|
|
31
|
+
visibility: hidden;
|
|
32
|
+
pointer-events: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.crewlet-sheet-grid__scroller {
|
|
36
|
+
position: relative;
|
|
37
|
+
flex: 1 1 auto;
|
|
38
|
+
min-height: 0;
|
|
39
|
+
max-width: 100%;
|
|
40
|
+
overflow: auto;
|
|
41
|
+
border: 1px solid var(--color-border-default);
|
|
42
|
+
border-radius: var(--radius-md);
|
|
43
|
+
background: var(--color-surface-background);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.crewlet-sheet-grid__grid {
|
|
47
|
+
position: relative;
|
|
48
|
+
min-width: 100%;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.crewlet-sheet-grid__row {
|
|
52
|
+
display: grid;
|
|
53
|
+
grid-template-columns: var(--crewlet-sheet-columns);
|
|
54
|
+
height: var(--crewlet-sheet-row-height);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.crewlet-sheet-grid__head {
|
|
58
|
+
position: sticky;
|
|
59
|
+
top: 0;
|
|
60
|
+
z-index: var(--z-index-sticky);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.crewlet-sheet-grid__body {
|
|
64
|
+
position: relative;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.crewlet-sheet-grid__body > .crewlet-sheet-grid__row {
|
|
68
|
+
position: absolute;
|
|
69
|
+
right: 0;
|
|
70
|
+
left: 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.crewlet-sheet-grid__corner,
|
|
74
|
+
.crewlet-sheet-grid__header,
|
|
75
|
+
.crewlet-sheet-grid__rownum,
|
|
76
|
+
.crewlet-sheet-grid__cell {
|
|
77
|
+
position: relative;
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
box-sizing: border-box;
|
|
81
|
+
min-width: 0;
|
|
82
|
+
border-right: 1px solid var(--color-border-default);
|
|
83
|
+
border-bottom: 1px solid var(--color-border-default);
|
|
84
|
+
background: var(--color-surface-background);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.crewlet-sheet-grid__corner,
|
|
88
|
+
.crewlet-sheet-grid__header {
|
|
89
|
+
background: var(--color-surface-subtle);
|
|
90
|
+
color: var(--color-text-secondary);
|
|
91
|
+
font-size: var(--font-size-xs);
|
|
92
|
+
font-weight: var(--font-weight-semibold);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.crewlet-sheet-grid__corner,
|
|
96
|
+
.crewlet-sheet-grid__rownum {
|
|
97
|
+
position: sticky;
|
|
98
|
+
inset-inline-start: 0;
|
|
99
|
+
z-index: var(--z-index-raised);
|
|
100
|
+
justify-content: center;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.crewlet-sheet-grid__corner {
|
|
104
|
+
z-index: var(--z-index-sticky);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.crewlet-sheet-grid__header {
|
|
108
|
+
gap: var(--spacing-1);
|
|
109
|
+
padding: 0 var(--spacing-2);
|
|
110
|
+
cursor: default;
|
|
111
|
+
user-select: none;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.crewlet-sheet-grid__header-label {
|
|
115
|
+
overflow: hidden;
|
|
116
|
+
text-overflow: ellipsis;
|
|
117
|
+
white-space: nowrap;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.crewlet-sheet-grid__sort {
|
|
121
|
+
display: inline-flex;
|
|
122
|
+
flex: none;
|
|
123
|
+
color: var(--color-text-tertiary);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.crewlet-sheet-grid__header-presence {
|
|
127
|
+
display: inline-flex;
|
|
128
|
+
flex: none;
|
|
129
|
+
gap: var(--spacing-1);
|
|
130
|
+
margin-inline-start: auto;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.crewlet-sheet-grid .crewlet-sheet-grid__header-badge {
|
|
134
|
+
box-shadow: 0 0 0 2px var(--crewlet-presence-hue);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.crewlet-sheet-grid__rownum {
|
|
138
|
+
color: var(--color-text-tertiary);
|
|
139
|
+
font-size: var(--font-size-xs);
|
|
140
|
+
font-variant-numeric: tabular-nums;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* The bar at a row's leading edge while somebody has it selected. */
|
|
144
|
+
.crewlet-sheet-grid__rownum--present::before {
|
|
145
|
+
position: absolute;
|
|
146
|
+
top: 0;
|
|
147
|
+
bottom: 0;
|
|
148
|
+
inset-inline-start: 0;
|
|
149
|
+
width: 3px;
|
|
150
|
+
background: var(--crewlet-presence-hue);
|
|
151
|
+
content: '';
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.crewlet-sheet-grid__cell {
|
|
155
|
+
padding: 0 var(--spacing-2);
|
|
156
|
+
outline: none;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.crewlet-sheet-grid__cell--frozen,
|
|
160
|
+
.crewlet-sheet-grid__header.crewlet-sheet-grid__cell--frozen {
|
|
161
|
+
position: sticky;
|
|
162
|
+
z-index: var(--z-index-raised);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.crewlet-sheet-grid__header.crewlet-sheet-grid__cell--frozen {
|
|
166
|
+
z-index: var(--z-index-sticky);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.crewlet-sheet-grid__cell--number,
|
|
170
|
+
.crewlet-sheet-grid__cell--rating {
|
|
171
|
+
justify-content: flex-end;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.crewlet-sheet-grid__cell--checkbox {
|
|
175
|
+
justify-content: center;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.crewlet-sheet-grid__cell--selected {
|
|
179
|
+
background: var(--color-brand-accent-soft);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.crewlet-sheet-grid__cell:focus-visible,
|
|
183
|
+
.crewlet-sheet-grid__header:focus-visible {
|
|
184
|
+
outline: 2px solid var(--color-focus);
|
|
185
|
+
/* Inside a box that scrolls, an outset ring is clipped by the scroller and
|
|
186
|
+
painted over by the next row. */
|
|
187
|
+
outline-offset: var(--size-focus-ring-inset-offset);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.crewlet-sheet-grid__cell--editing {
|
|
191
|
+
z-index: var(--z-index-presence);
|
|
192
|
+
overflow: visible;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.crewlet-sheet-grid__value {
|
|
196
|
+
display: flex;
|
|
197
|
+
align-items: center;
|
|
198
|
+
min-width: 0;
|
|
199
|
+
max-width: 100%;
|
|
200
|
+
overflow: hidden;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.crewlet-sheet-grid__cell--editing > .crewlet-sheet-grid__value {
|
|
204
|
+
visibility: hidden;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/* PENDING (D23): the reader's value, drawn at once, underlined dashed until
|
|
208
|
+
the engine confirms it. The word is in the cell's description and the strip. */
|
|
209
|
+
.crewlet-sheet-grid__cell--pending > .crewlet-sheet-grid__value {
|
|
210
|
+
text-decoration: underline dashed var(--color-text-tertiary);
|
|
211
|
+
text-underline-offset: 3px;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.crewlet-sheet-grid__cell--pending > .crewlet-sheet-grid__value::after {
|
|
215
|
+
position: absolute;
|
|
216
|
+
right: var(--spacing-1);
|
|
217
|
+
bottom: 2px;
|
|
218
|
+
left: var(--spacing-1);
|
|
219
|
+
border-bottom: 1px dashed var(--color-text-tertiary);
|
|
220
|
+
content: '';
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.crewlet-sheet-grid__refused {
|
|
224
|
+
display: inline-flex;
|
|
225
|
+
flex: none;
|
|
226
|
+
margin-inline-start: auto;
|
|
227
|
+
padding-inline-start: var(--spacing-1);
|
|
228
|
+
color: var(--color-feedback-danger-ink);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.crewlet-sheet-grid__message {
|
|
232
|
+
position: absolute;
|
|
233
|
+
top: 100%;
|
|
234
|
+
inset-inline-start: 0;
|
|
235
|
+
z-index: var(--z-index-presence);
|
|
236
|
+
box-sizing: border-box;
|
|
237
|
+
width: max-content;
|
|
238
|
+
max-width: 20rem;
|
|
239
|
+
padding: var(--spacing-1) var(--spacing-2);
|
|
240
|
+
border: 1px solid var(--color-feedback-danger-line);
|
|
241
|
+
border-radius: var(--radius-sm);
|
|
242
|
+
background: var(--color-surface-elevated);
|
|
243
|
+
box-shadow: var(--shadow-md);
|
|
244
|
+
color: var(--color-feedback-danger-ink);
|
|
245
|
+
font-size: var(--font-size-xs);
|
|
246
|
+
white-space: normal;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.crewlet-sheet-grid__history {
|
|
250
|
+
position: absolute;
|
|
251
|
+
top: 50%;
|
|
252
|
+
inset-inline-end: var(--spacing-1);
|
|
253
|
+
display: inline-flex;
|
|
254
|
+
align-items: center;
|
|
255
|
+
justify-content: center;
|
|
256
|
+
padding: var(--spacing-1);
|
|
257
|
+
border: 0;
|
|
258
|
+
border-radius: var(--radius-sm);
|
|
259
|
+
background: var(--color-surface-elevated);
|
|
260
|
+
color: var(--color-text-secondary);
|
|
261
|
+
transform: translateY(-50%);
|
|
262
|
+
cursor: pointer;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.crewlet-sheet-grid__history:hover {
|
|
266
|
+
color: var(--color-text-primary);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.crewlet-sheet-grid__foot {
|
|
270
|
+
display: flex;
|
|
271
|
+
flex-wrap: wrap;
|
|
272
|
+
align-items: center;
|
|
273
|
+
justify-content: space-between;
|
|
274
|
+
gap: var(--spacing-2);
|
|
275
|
+
padding: var(--spacing-2) 0;
|
|
276
|
+
color: var(--color-text-tertiary);
|
|
277
|
+
font-size: var(--font-size-xs);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.crewlet-sheet-grid__sync {
|
|
281
|
+
display: inline-flex;
|
|
282
|
+
align-items: center;
|
|
283
|
+
gap: var(--spacing-2);
|
|
284
|
+
margin-inline-start: auto;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.crewlet-sheet-grid__sync--failed {
|
|
288
|
+
color: var(--color-feedback-danger-ink);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/* ── the cells, alone or in the grid ─────────────────────────────────────── */
|
|
292
|
+
|
|
293
|
+
.crewlet-sheet-cell__text {
|
|
294
|
+
overflow: hidden;
|
|
295
|
+
text-overflow: ellipsis;
|
|
296
|
+
white-space: nowrap;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.crewlet-sheet-cell__number {
|
|
300
|
+
font-variant-numeric: tabular-nums;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.crewlet-sheet-cell__muted {
|
|
304
|
+
color: var(--color-text-tertiary);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.crewlet-sheet-cell__chips {
|
|
308
|
+
display: inline-flex;
|
|
309
|
+
gap: var(--spacing-1);
|
|
310
|
+
min-width: 0;
|
|
311
|
+
overflow: hidden;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.crewlet-sheet-cell__person {
|
|
315
|
+
display: inline-flex;
|
|
316
|
+
align-items: center;
|
|
317
|
+
gap: var(--spacing-1);
|
|
318
|
+
min-width: 0;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.crewlet-sheet-cell__link {
|
|
322
|
+
overflow: hidden;
|
|
323
|
+
color: var(--color-text-link-quiet);
|
|
324
|
+
text-overflow: ellipsis;
|
|
325
|
+
white-space: nowrap;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.crewlet-sheet-cell__link:hover {
|
|
329
|
+
color: var(--color-brand-accent-ink);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.crewlet-sheet-cell__checkbox {
|
|
333
|
+
display: inline-flex;
|
|
334
|
+
align-items: center;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.crewlet-sheet-cell__check {
|
|
338
|
+
display: inline-flex;
|
|
339
|
+
align-items: center;
|
|
340
|
+
justify-content: center;
|
|
341
|
+
box-sizing: border-box;
|
|
342
|
+
width: var(--spacing-4);
|
|
343
|
+
height: var(--spacing-4);
|
|
344
|
+
border: 1px solid var(--color-border-control);
|
|
345
|
+
border-radius: var(--radius-xs);
|
|
346
|
+
background: var(--color-surface-background);
|
|
347
|
+
color: var(--color-text-on-accent);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.crewlet-sheet-cell__check--on {
|
|
351
|
+
border-color: var(--color-brand-accent);
|
|
352
|
+
background: var(--color-brand-accent);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.crewlet-sheet-cell__rating,
|
|
356
|
+
.crewlet-sheet-cell__stars {
|
|
357
|
+
display: inline-flex;
|
|
358
|
+
align-items: center;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.crewlet-sheet-cell__star {
|
|
362
|
+
color: var(--color-text-tertiary);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.crewlet-sheet-cell__star--on {
|
|
366
|
+
color: var(--color-feedback-warning);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.crewlet-sheet-cell {
|
|
370
|
+
position: relative;
|
|
371
|
+
display: inline-flex;
|
|
372
|
+
flex-direction: column;
|
|
373
|
+
gap: var(--spacing-1);
|
|
374
|
+
min-width: 0;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.crewlet-sheet-cell__face {
|
|
378
|
+
display: inline-flex;
|
|
379
|
+
align-items: center;
|
|
380
|
+
box-sizing: border-box;
|
|
381
|
+
min-height: var(--size-control-md);
|
|
382
|
+
padding: 0 var(--spacing-2);
|
|
383
|
+
border: 1px solid var(--color-border-control);
|
|
384
|
+
border-radius: var(--radius-md);
|
|
385
|
+
background: var(--color-surface-background);
|
|
386
|
+
color: inherit;
|
|
387
|
+
font: inherit;
|
|
388
|
+
text-align: start;
|
|
389
|
+
cursor: pointer;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.crewlet-sheet-cell__face[aria-disabled='true'] {
|
|
393
|
+
cursor: default;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
.crewlet-sheet-cell__face:focus-visible {
|
|
397
|
+
outline: 2px solid var(--color-focus);
|
|
398
|
+
outline-offset: var(--size-focus-ring-inset-offset);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
.crewlet-sheet-cell--pending .crewlet-sheet-cell__face {
|
|
402
|
+
border-style: dashed;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.crewlet-sheet-cell__refusal {
|
|
406
|
+
display: inline-flex;
|
|
407
|
+
align-items: center;
|
|
408
|
+
gap: var(--spacing-1);
|
|
409
|
+
color: var(--color-feedback-danger-ink);
|
|
410
|
+
font-size: var(--font-size-xs);
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/* ── the editors ─────────────────────────────────────────────────────────── */
|
|
414
|
+
|
|
415
|
+
.crewlet-sheet-editor {
|
|
416
|
+
position: absolute;
|
|
417
|
+
inset: 0;
|
|
418
|
+
z-index: var(--z-index-presence);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
.crewlet-sheet-cell .crewlet-sheet-editor {
|
|
422
|
+
position: relative;
|
|
423
|
+
inset: auto;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
.crewlet-sheet-editor__input {
|
|
427
|
+
box-sizing: border-box;
|
|
428
|
+
width: 100%;
|
|
429
|
+
height: 100%;
|
|
430
|
+
min-height: var(--size-control-md);
|
|
431
|
+
padding: 0 var(--spacing-2);
|
|
432
|
+
border: 0;
|
|
433
|
+
border-radius: 0;
|
|
434
|
+
background: var(--color-surface-elevated);
|
|
435
|
+
box-shadow: inset 0 0 0 2px var(--color-focus);
|
|
436
|
+
color: var(--color-text-primary);
|
|
437
|
+
font: inherit;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.crewlet-sheet-editor__input:focus-visible,
|
|
441
|
+
.crewlet-sheet-editor__filter:focus-visible,
|
|
442
|
+
.crewlet-sheet-editor__textarea:focus-visible {
|
|
443
|
+
outline: 2px solid var(--color-focus);
|
|
444
|
+
outline-offset: var(--size-focus-ring-inset-offset);
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.crewlet-sheet-editor__panel {
|
|
448
|
+
position: absolute;
|
|
449
|
+
top: 100%;
|
|
450
|
+
inset-inline-start: 0;
|
|
451
|
+
z-index: var(--z-index-presence);
|
|
452
|
+
display: flex;
|
|
453
|
+
flex-direction: column;
|
|
454
|
+
gap: var(--spacing-2);
|
|
455
|
+
box-sizing: border-box;
|
|
456
|
+
min-width: 100%;
|
|
457
|
+
width: max-content;
|
|
458
|
+
max-width: min(24rem, 90vw);
|
|
459
|
+
padding: var(--spacing-2);
|
|
460
|
+
border: 1px solid var(--color-border-default);
|
|
461
|
+
border-radius: var(--radius-md);
|
|
462
|
+
background: var(--color-surface-elevated);
|
|
463
|
+
box-shadow: var(--shadow-lg);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.crewlet-sheet-editor--above .crewlet-sheet-editor__panel {
|
|
467
|
+
top: auto;
|
|
468
|
+
bottom: 100%;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.crewlet-sheet-editor--list .crewlet-sheet-editor__panel,
|
|
472
|
+
.crewlet-sheet-editor--long .crewlet-sheet-editor__panel {
|
|
473
|
+
top: 0;
|
|
474
|
+
min-width: max(100%, 14rem);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
.crewlet-sheet-editor--list.crewlet-sheet-editor--above .crewlet-sheet-editor__panel,
|
|
478
|
+
.crewlet-sheet-editor--long.crewlet-sheet-editor--above .crewlet-sheet-editor__panel {
|
|
479
|
+
top: auto;
|
|
480
|
+
bottom: 0;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.crewlet-sheet-editor__filter,
|
|
484
|
+
.crewlet-sheet-editor__textarea {
|
|
485
|
+
box-sizing: border-box;
|
|
486
|
+
width: 100%;
|
|
487
|
+
padding: var(--spacing-1) var(--spacing-2);
|
|
488
|
+
border: 1px solid var(--color-border-control);
|
|
489
|
+
border-radius: var(--radius-sm);
|
|
490
|
+
background: var(--color-surface-background);
|
|
491
|
+
color: var(--color-text-primary);
|
|
492
|
+
font: inherit;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.crewlet-sheet-editor__textarea {
|
|
496
|
+
min-width: 20rem;
|
|
497
|
+
max-width: 100%;
|
|
498
|
+
resize: vertical;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.crewlet-sheet-editor__list {
|
|
502
|
+
display: flex;
|
|
503
|
+
flex-direction: column;
|
|
504
|
+
max-height: 16rem;
|
|
505
|
+
margin: 0;
|
|
506
|
+
padding: 0;
|
|
507
|
+
overflow-y: auto;
|
|
508
|
+
list-style: none;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
.crewlet-sheet-editor__option {
|
|
512
|
+
display: flex;
|
|
513
|
+
align-items: center;
|
|
514
|
+
gap: var(--spacing-2);
|
|
515
|
+
min-height: var(--size-row-sm);
|
|
516
|
+
padding: 0 var(--spacing-2);
|
|
517
|
+
border-radius: var(--radius-sm);
|
|
518
|
+
cursor: pointer;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
.crewlet-sheet-editor__option--highlight {
|
|
522
|
+
background: var(--color-surface-hover);
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
.crewlet-sheet-editor__mark {
|
|
526
|
+
display: inline-flex;
|
|
527
|
+
flex: none;
|
|
528
|
+
width: var(--spacing-3);
|
|
529
|
+
color: var(--color-brand-accent-ink);
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
.crewlet-sheet-editor__empty {
|
|
533
|
+
padding: var(--spacing-2);
|
|
534
|
+
color: var(--color-text-tertiary);
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
.crewlet-sheet-editor__error {
|
|
538
|
+
display: flex;
|
|
539
|
+
align-items: center;
|
|
540
|
+
gap: var(--spacing-1);
|
|
541
|
+
margin: 0;
|
|
542
|
+
color: var(--color-feedback-danger-ink);
|
|
543
|
+
font-size: var(--font-size-xs);
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
.crewlet-sheet-editor__conflict {
|
|
547
|
+
display: flex;
|
|
548
|
+
flex-direction: column;
|
|
549
|
+
gap: var(--spacing-2);
|
|
550
|
+
padding-top: var(--spacing-2);
|
|
551
|
+
border-top: 1px solid var(--color-border-default);
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
.crewlet-sheet-editor__conflict-text {
|
|
555
|
+
margin: 0;
|
|
556
|
+
color: var(--color-text-secondary);
|
|
557
|
+
font-size: var(--font-size-xs);
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
.crewlet-sheet-editor__conflict-actions {
|
|
561
|
+
display: flex;
|
|
562
|
+
flex-wrap: wrap;
|
|
563
|
+
gap: var(--spacing-2);
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
/* A PHONE: the list and long text editors open as a sheet from the bottom of
|
|
567
|
+
the screen rather than from a cell a thumb has to keep in view. */
|
|
568
|
+
@media (width < 640px) {
|
|
569
|
+
.crewlet-sheet-grid .crewlet-sheet-editor--list .crewlet-sheet-editor__panel,
|
|
570
|
+
.crewlet-sheet-grid .crewlet-sheet-editor--long .crewlet-sheet-editor__panel {
|
|
571
|
+
position: fixed;
|
|
572
|
+
top: auto;
|
|
573
|
+
right: 0;
|
|
574
|
+
bottom: 0;
|
|
575
|
+
left: 0;
|
|
576
|
+
width: auto;
|
|
577
|
+
max-width: none;
|
|
578
|
+
border-radius: var(--radius-lg) var(--radius-lg) 0 0;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
.crewlet-sheet-editor__textarea {
|
|
582
|
+
min-width: 0;
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
@media (forced-colors: active) {
|
|
587
|
+
.crewlet-sheet-grid__cell--selected {
|
|
588
|
+
background: Highlight;
|
|
589
|
+
color: HighlightText;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
.crewlet-sheet-grid__rownum--present::before {
|
|
593
|
+
background: Highlight;
|
|
594
|
+
}
|
|
595
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copy and paste as tab-separated values, the format every spreadsheet puts on
|
|
3
|
+
* the clipboard and reads back from it.
|
|
4
|
+
*
|
|
5
|
+
* A field holding a tab, a newline or a quote is quoted, with its quotes
|
|
6
|
+
* doubled, which is how a long text with paragraphs survives a round trip
|
|
7
|
+
* through another spreadsheet.
|
|
8
|
+
*/
|
|
9
|
+
import { type SheetValueContext } from './values.js';
|
|
10
|
+
import type { SheetRange } from './navigation.js';
|
|
11
|
+
import type { SheetColumn, SheetEdit, SheetRow } from './types.js';
|
|
12
|
+
/** The cells a range covers, as TSV. */
|
|
13
|
+
export declare function toTSV(columns: readonly SheetColumn[], rows: readonly SheetRow[], range: SheetRange, context: SheetValueContext): string;
|
|
14
|
+
/** TSV read into rows of fields. A trailing line break is not an extra empty row. */
|
|
15
|
+
export declare function parseTSV(text: string): string[][];
|
|
16
|
+
/** What a paste would write, and the cells it could not. */
|
|
17
|
+
export interface SheetPastePlan {
|
|
18
|
+
edits: SheetEdit[];
|
|
19
|
+
refused: {
|
|
20
|
+
rowId: string;
|
|
21
|
+
field: string;
|
|
22
|
+
error: string;
|
|
23
|
+
}[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The edits pasting a block of fields at a cell makes. A single field pasted
|
|
27
|
+
* over a range fills the range, as a spreadsheet does. Read-only columns and
|
|
28
|
+
* rows past the end are skipped; a field that does not fit its column is
|
|
29
|
+
* refused with the reason, and the rest of the paste still lands.
|
|
30
|
+
*/
|
|
31
|
+
export declare function planPaste(columns: readonly SheetColumn[], rows: readonly SheetRow[], target: SheetRange, block: readonly (readonly string[])[], context: SheetValueContext): SheetPastePlan;
|
|
32
|
+
/**
|
|
33
|
+
* The edits that clear every writable cell of a range: a checkbox unchecks, a
|
|
34
|
+
* list empties. A required cell is refused with the reason rather than
|
|
35
|
+
* cleared, and the rest of the range still clears.
|
|
36
|
+
*/
|
|
37
|
+
export declare function planClear(columns: readonly SheetColumn[], rows: readonly SheetRow[], range: SheetRange, context: SheetValueContext): SheetPastePlan;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The honest instant edit (D23), as bookkeeping a host keeps beside its data.
|
|
3
|
+
*
|
|
4
|
+
* A sheet draws the reader's value straight away, MARKED AS PENDING, and makes
|
|
5
|
+
* it solid when the engine confirms it. A refusal reverts the cell (the host's
|
|
6
|
+
* data never took the value) and says why on the cell. What is drawn solid is
|
|
7
|
+
* what the engine holds; the pending mark is the one place the sheet draws
|
|
8
|
+
* something the engine has not confirmed, and it says so.
|
|
9
|
+
*
|
|
10
|
+
* The host's data layer keeps the values; this keeps which cells are waiting
|
|
11
|
+
* and which were refused, so every host (the dashboard's native sheet, the
|
|
12
|
+
* artifact kit) draws the same states from the same rules.
|
|
13
|
+
*/
|
|
14
|
+
import type { SheetLabels } from './labels.js';
|
|
15
|
+
import type { SheetChange, SheetRow, SheetSyncState, SheetValue } from './types.js';
|
|
16
|
+
/** The refusal codes the runtime answers a write with (`crewlet.data`). Unknown codes are generic failures. */
|
|
17
|
+
export type SheetRefusalCode = 'invalid_value' | 'superseded' | 'conflict' | 'not_found' | 'forbidden' | 'collection_full' | 'too_large' | 'rate_limited' | 'rebase_window_exceeded' | 'capability_not_declared' | 'unavailable';
|
|
18
|
+
/**
|
|
19
|
+
* What a refusal says on the cell. A permission refusal says the reader cannot
|
|
20
|
+
* edit, in the sheet's own words, whatever the detail; every other refusal
|
|
21
|
+
* says the engine's detail when there is one.
|
|
22
|
+
*/
|
|
23
|
+
export declare function refusalText(code: string, detail: string | undefined, labels: SheetLabels): string;
|
|
24
|
+
/** How a write ended, as the host learned it. */
|
|
25
|
+
export type SheetSettle = {
|
|
26
|
+
ok: true;
|
|
27
|
+
} | {
|
|
28
|
+
ok: false;
|
|
29
|
+
message: string;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Which cells are waiting on the engine and which were refused.
|
|
33
|
+
*
|
|
34
|
+
* Several edits of one cell can be in flight at once (a quick double toggle),
|
|
35
|
+
* so a cell is pending until every one of them has settled. A refusal stays on
|
|
36
|
+
* its cell until the reader edits that cell again or it is dismissed.
|
|
37
|
+
*/
|
|
38
|
+
export declare class SheetPendingEdits {
|
|
39
|
+
private readonly waiting;
|
|
40
|
+
private readonly refusals;
|
|
41
|
+
private readonly listeners;
|
|
42
|
+
private failed;
|
|
43
|
+
/** Marks a cell pending, and hands back the one function that settles this edit. Calling it twice does nothing. */
|
|
44
|
+
begin(rowId: string, field: string): (outcome: SheetSettle) => void;
|
|
45
|
+
isPending(rowId: string, field: string): boolean;
|
|
46
|
+
refusal(rowId: string, field: string): string | undefined;
|
|
47
|
+
/** Clears a cell's refusal, once its reason has been read or acted on. */
|
|
48
|
+
dismiss(rowId: string, field: string): void;
|
|
49
|
+
/** Edits sent and not yet settled, for the sync strip. */
|
|
50
|
+
get saving(): number;
|
|
51
|
+
/** The sync strip's state. Refusals are said on their cells, so they do not count as failures to retry. */
|
|
52
|
+
sync(offline?: boolean): SheetSyncState;
|
|
53
|
+
/** Every refusal since the last `resetFailures`, for a host that reports them. */
|
|
54
|
+
get failures(): number;
|
|
55
|
+
resetFailures(): void;
|
|
56
|
+
/** The host's rows with each one's pending and refused cells attached. */
|
|
57
|
+
decorate(rows: readonly SheetRow[]): SheetRow[];
|
|
58
|
+
subscribe(listener: () => void): () => void;
|
|
59
|
+
private emit;
|
|
60
|
+
}
|
|
61
|
+
/** A change mark's time, in the reader's locale: "10:42". */
|
|
62
|
+
export declare function changeTime(at: SheetChange['at'], locale?: string): string;
|
|
63
|
+
/** A change mark's words: "Changed by Maya Ortiz, 10:42. Was 6.8." `previous` is the formatted old value. */
|
|
64
|
+
export declare function changeText(change: SheetChange, labels: SheetLabels, previous: string | null, locale?: string): string;
|
|
65
|
+
/** Whether a value counts as a "was" worth saying: a change mark says nothing of an empty previous value. */
|
|
66
|
+
export declare const hasPrevious: (change: SheetChange) => change is SheetChange & {
|
|
67
|
+
previous: SheetValue;
|
|
68
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { SHEET_COLUMN_TYPES, isSheetColumnType } from './types.js';
|
|
2
|
+
export type { SheetCellPresence, SheetChange, SheetColumn, SheetColumnType, SheetEdit, SheetNumberStyle, SheetOption, SheetPerson, SheetRow, SheetSort, SheetStatusCategory, SheetSyncState, SheetValue, } from './types.js';
|
|
3
|
+
export { SHEET_LABELS, sheetLabels } from './labels.js';
|
|
4
|
+
export type { SheetLabels } from './labels.js';
|
|
5
|
+
export { findOption, liveOptions, optionHue, parseOptionList, statusTone } from './options.js';
|
|
6
|
+
export { LONGTEXT_MAX_DEFAULT, RATING_MAX_CEILING, RATING_MAX_DEFAULT, TEXT_MAX_DEFAULT, URL_MAX, checkValue, compareValues, displayText, editText, findPerson, isEmptyValue, normalizeValue, parseText, ratingMax, sameValue, spokenText, textMax, } from './values.js';
|
|
7
|
+
export type { SheetParse, SheetValueContext } from './values.js';
|
|
8
|
+
export { SHEET_COLUMN_WIDTHS, SHEET_ROW_HEIGHT, SHEET_ROW_NUMBER_WIDTH, columnOffsets, columnWidth, drawnColumns, editorSide, inRange, isMod, isMultiCell, isTypingKey, moveFrom, rangeOf, scrollToRow, visibleRows, } from './navigation.js';
|
|
9
|
+
export type { SheetBounds, SheetKey, SheetPosition, SheetRange } from './navigation.js';
|
|
10
|
+
export { parseTSV, planClear, planPaste, toTSV } from './clipboard.js';
|
|
11
|
+
export type { SheetPastePlan } from './clipboard.js';
|
|
12
|
+
export { SheetPendingEdits, changeText, changeTime, hasPrevious, refusalText } from './edits.js';
|
|
13
|
+
export type { SheetRefusalCode, SheetSettle } from './edits.js';
|
|
14
|
+
export { cellDescription, cellKey, cellSpeech, flagText, nextSort, presenceByCell, presenceByColumn, presenceByRow, rowName, sortRows, } from './view.js';
|