@gramlot/gramlot 0.3.20 → 0.3.26
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/dist/components/chat/__init__.py +13 -0
- package/dist/components/chat/assets/collection.js +9 -0
- package/dist/components/chat/assets/index.js +3 -0
- package/dist/components/chat/commands.json +7 -0
- package/dist/components/chat/grammar.json +48 -0
- package/dist/components/editors/__init__.py +2 -2
- package/dist/components/editors/assets/collection.js +26 -120912
- package/dist/components/editors/assets/index.js +2 -1
- package/dist/components/editors/assets/modules/chunk-74O4WKIV.js +1 -0
- package/dist/components/editors/assets/modules/chunk-AU4HFPIY.js +1 -0
- package/dist/components/editors/assets/modules/chunk-YSGSC7KM.js +1 -0
- package/dist/components/editors/assets/modules/code-mirror-engine-RWQTR5G5.js +92 -0
- package/dist/components/editors/assets/modules/jodit-engine-MTSA4GZ3.js +1853 -0
- package/dist/components/editors/assets/modules/markdown-document-VFC23FAY.js +1 -0
- package/dist/components/editors/assets/modules/prose-mirror-engine-GMZPJPNN.js +24 -0
- package/dist/components/grid/__init__.py +14 -0
- package/dist/components/grid/assets/collection.js +262 -0
- package/dist/components/grid/assets/index.js +3 -0
- package/dist/components/grid/commands.json +7 -0
- package/dist/components/grid/grammar.json +770 -0
- package/dist/components/grouplets/__init__.py +13 -0
- package/dist/components/grouplets/assets/collection.js +185 -0
- package/dist/components/grouplets/assets/index.js +3 -0
- package/dist/components/grouplets/assets/modules/chunk-BLMUM44K.js +1 -0
- package/dist/components/grouplets/assets/modules/markdown-document-YWNZTOKK.js +1 -0
- package/dist/components/grouplets/commands.json +7 -0
- package/dist/components/grouplets/grammar.json +355 -0
- package/dist/components/inputs/__init__.py +1 -1
- package/dist/components/inputs/assets/collection.js +65 -24511
- package/dist/components/inputs/assets/index.js +2 -1
- package/dist/components/inputs/grammar.json +278 -6
- package/dist/components/layout/__init__.py +1 -1
- package/dist/components/layout/assets/collection.js +68 -26732
- package/dist/components/layout/assets/index.js +2 -1
- package/dist/components/layout/grammar.json +39 -0
- package/dist/components/selection_trial/__init__.py +13 -0
- package/dist/components/selection_trial/assets/collection.js +4 -0
- package/dist/components/selection_trial/assets/index.js +3 -0
- package/dist/components/selection_trial/commands.json +7 -0
- package/dist/components/selection_trial/grammar.json +587 -0
- package/dist/components/tree/__init__.py +1 -1
- package/dist/components/tree/assets/collection.js +27 -24612
- package/dist/components/tree/assets/index.js +2 -1
- package/dist/components/tree/grammar.json +341 -1
- package/dist/components/typst/__init__.py +2 -2
- package/dist/components/typst/assets/collection.js +12 -4
- package/dist/components/typst/assets/index.js +2 -1
- package/dist/components/typst/assets/modules/chunk-BLMUM44K.js +1 -0
- package/dist/components/typst/assets/modules/typst-client-JHC6UVYG.js +4 -0
- package/dist/components/uploads/__init__.py +13 -0
- package/dist/components/uploads/assets/collection.js +67 -0
- package/dist/components/uploads/assets/index.js +3 -0
- package/dist/components/uploads/commands.json +7 -0
- package/dist/components/uploads/grammar.json +789 -0
- package/dist/gramlot-markdown.js +16 -0
- package/dist/gramlot.js +6861 -1395
- package/dist/gramlot.min.js +1595 -46
- package/dist/runtime-notices.json +28 -0
- package/package.json +10 -3
- package/src/binding/grid-struct.js +63 -0
- package/src/binding/installation.js +5 -2
- package/src/binding/providers.js +4 -1
- package/src/binding/remote-resolver.js +1 -8
- package/src/binding/runtime.js +90 -6
- package/src/binding/validation-context.js +40 -0
- package/src/browser-camera-provider.d.ts +8 -0
- package/src/browser-camera-provider.js +104 -0
- package/src/builder/gramlot-builder.d.ts +5 -0
- package/src/builder/gramlot-builder.js +16 -0
- package/src/builder/source.js +34 -0
- package/src/chat.d.ts +12 -0
- package/src/chat.js +198 -0
- package/src/collection-artifact.js +1 -1
- package/src/components/attachment-manager.js +160 -0
- package/src/components/bases.js +19 -6
- package/src/components/border-container.js +86 -8
- package/src/components/buttons.js +11 -1
- package/src/components/chat.js +28 -0
- package/src/components/choice-editor.js +106 -38
- package/src/components/database-choices.js +133 -9
- package/src/components/editing-status-styles.js +26 -0
- package/src/components/editing-status.js +115 -0
- package/src/components/field-state.js +42 -54
- package/src/components/grid-cell-editor.js +181 -0
- package/src/components/grid-grammar.json +258 -0
- package/src/components/grid-header-interaction.js +196 -0
- package/src/components/grid-row-interaction.js +184 -0
- package/src/components/grid-row-layout.js +96 -0
- package/src/components/grid-rows.js +28 -0
- package/src/components/grid-search-box.js +142 -0
- package/src/components/grid-search-styles.js +42 -0
- package/src/components/grid-search.js +37 -0
- package/src/components/grid-structure.js +85 -0
- package/src/components/grid-styles.js +201 -0
- package/src/components/grid.js +666 -0
- package/src/components/grouplet-card.js +445 -0
- package/src/components/grouplets.js +17 -0
- package/src/components/html-preview.js +17 -4
- package/src/components/image-crop-dialog.js +272 -0
- package/src/components/image-crop.js +79 -0
- package/src/components/image-uploader.js +252 -0
- package/src/components/inputs.js +2 -1
- package/src/components/jodit-engine.js +1 -1
- package/src/components/markdown-document.js +2 -2
- package/src/components/menus.js +1 -0
- package/src/components/registry.js +4 -3
- package/src/components/screen-capture.js +43 -0
- package/src/components/selected-container.js +6 -2
- package/src/components/tray-pane.js +32 -4
- package/src/components/tree.js +416 -17
- package/src/components/typed-editor.js +23 -11
- package/src/components/upload-engine.js +156 -0
- package/src/components/uploader.js +208 -0
- package/src/components/uploads.js +7 -0
- package/src/editing-session.d.ts +25 -0
- package/src/editing-session.js +396 -0
- package/src/experiments/selection-transfer.js +78 -0
- package/src/experiments/selection-trial.js +64 -0
- package/src/experiments/window-selection.js +124 -0
- package/src/format.js +22 -7
- package/src/gramlot.d.ts +2 -0
- package/src/gramlot.js +2 -1
- package/src/handlers/device-handler.d.ts +2 -1
- package/src/handlers/rpc-handler.d.ts +3 -3
- package/src/index-page-styles.js +2 -1
- package/src/index.d.ts +16 -1
- package/src/index.js +16 -1
- package/src/inout.d.ts +2 -0
- package/src/inout.js +6 -0
- package/src/markdown-loader.d.ts +1 -0
- package/src/markdown-loader.js +4 -0
- package/src/markdown.d.ts +1 -0
- package/src/markdown.js +2 -0
- package/src/media-frame.js +9 -0
- package/src/renderer/attributes.js +7 -1
- package/src/renderer/gramlot-renderer.d.ts +2 -0
- package/src/renderer/gramlot-renderer.js +39 -3
- package/src/server/assets.d.ts +1 -1
- package/src/server/assets.js +1 -1
- package/src/server/gramlot-server.d.ts +10 -1
- package/src/server/gramlot-server.js +96 -8
- package/src/server/index.d.ts +2 -0
- package/src/server/index.js +2 -0
- package/src/server/page-base.js +17 -4
- package/src/server/page.d.ts +13 -1
- package/src/server/page.js +6 -0
- package/src/server/source-import.d.ts +2 -0
- package/src/server/source-import.js +31 -0
- package/src/server/upload.d.ts +20 -0
- package/src/server/upload.js +142 -0
- package/src/server/visual-editor.d.ts +11 -0
- package/src/server/visual-editor.js +149 -0
- package/src/source-picker.d.ts +9 -0
- package/src/source-picker.js +57 -0
- package/src/stores/bag-collection-store.js +51 -0
- package/src/stores/bag-collection-view.js +127 -0
- package/src/stores/collection-filter.js +77 -0
- package/src/tree-store.d.ts +24 -0
- package/src/tree-store.js +193 -0
- package/src/validation-run.js +50 -0
- package/src/view/button.js +8 -5
- package/src/view/controls.js +31 -32
- package/src/view/grouplet-card.js +54 -0
- package/src/view/html.js +29 -4
- package/src/view/labelbox.js +7 -3
- package/src/visual-editor-icons.js +10 -0
- package/src/visual-editor.d.ts +56 -0
- package/src/visual-editor.js +844 -0
- package/themes/gramlot-base/theme.css +127 -0
- package/themes/gramlot-compact/theme.css +8 -0
- package/themes/joanna/theme.css +8 -0
- package/themes/mimi/theme.css +8 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/** Grid geometry and token consumption. Themes own the palette and density.
|
|
2
|
+
* A JS stylesheet module keeps the same source usable in Node and browser builds.
|
|
3
|
+
*/
|
|
4
|
+
export const gridStyles = `
|
|
5
|
+
.control-box{position:relative}
|
|
6
|
+
.cell-editor{
|
|
7
|
+
position:absolute;z-index:4;height:var(--grid-editor-height);
|
|
8
|
+
background:var(--gramlot-grid-background,var(--gramlot-surface,Canvas));
|
|
9
|
+
--gramlot-field-height:0px;
|
|
10
|
+
--gramlot-field-block-size:var(--grid-editor-height);
|
|
11
|
+
--gramlot-field-padding:var(--gramlot-grid-cell-padding,.3rem .6rem);
|
|
12
|
+
--gramlot-field-font-size:1em;
|
|
13
|
+
--gramlot-field-line-height:var(--gramlot-grid-line-height,1.35);
|
|
14
|
+
--gramlot-field-radius:0px;
|
|
15
|
+
--gramlot-field-focus-outline:1px solid var(--gramlot-focus-ring,Highlight);
|
|
16
|
+
--gramlot-field-focus-offset:-1px;
|
|
17
|
+
--gramlot-field-resize:none;
|
|
18
|
+
}
|
|
19
|
+
.cell-editor[hidden]{display:none}
|
|
20
|
+
.invalid-cell{background:var(--gramlot-error-background,#fff1f0)!important}
|
|
21
|
+
.draft-cell{box-shadow:inset 0 -2px var(--gramlot-warning,#805600)}
|
|
22
|
+
|
|
23
|
+
:host {
|
|
24
|
+
min-block-size: 0;
|
|
25
|
+
color: var(--gramlot-grid-color, var(--gramlot-ink, CanvasText));
|
|
26
|
+
font-family: var(--gramlot-font-ui, inherit);
|
|
27
|
+
font-size: var(--gramlot-grid-font-size, inherit);
|
|
28
|
+
line-height: var(--gramlot-grid-line-height, 1.35);
|
|
29
|
+
}
|
|
30
|
+
.control-box {
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
block-size: 100%;
|
|
34
|
+
min-block-size: 0;
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
border: 1px solid var(--gramlot-grid-border-color, var(--gramlot-border, ButtonBorder));
|
|
37
|
+
border-radius: var(--gramlot-grid-radius, var(--gramlot-radius-sm, 0));
|
|
38
|
+
background: var(--gramlot-grid-background, var(--gramlot-surface, Canvas));
|
|
39
|
+
}
|
|
40
|
+
.header-frame {
|
|
41
|
+
flex: none;
|
|
42
|
+
min-inline-size: 0;
|
|
43
|
+
padding-inline-end: var(--grid-scrollbar-width, 0px);
|
|
44
|
+
background: var(--gramlot-grid-header-background, var(--gramlot-surface-subtle, ButtonFace));
|
|
45
|
+
border-block-end: 1px solid var(--gramlot-grid-border-color, var(--gramlot-border, ButtonBorder));
|
|
46
|
+
}
|
|
47
|
+
.header-viewport { overflow: hidden; min-inline-size: 0; }
|
|
48
|
+
.body-frame {
|
|
49
|
+
flex: 1 1 auto;
|
|
50
|
+
min-block-size: 0;
|
|
51
|
+
min-inline-size: 0;
|
|
52
|
+
display: grid;
|
|
53
|
+
grid-template: minmax(0, 1fr) / minmax(0, 1fr);
|
|
54
|
+
}
|
|
55
|
+
.loading-status {
|
|
56
|
+
grid-area: 1 / 1;
|
|
57
|
+
place-self: center;
|
|
58
|
+
z-index: 3;
|
|
59
|
+
padding: .5rem;
|
|
60
|
+
border-radius: 50%;
|
|
61
|
+
background: var(--gramlot-grid-background, var(--gramlot-surface, Canvas));
|
|
62
|
+
color: var(--gramlot-text-secondary, GrayText);
|
|
63
|
+
pointer-events: none;
|
|
64
|
+
opacity: 0;
|
|
65
|
+
animation: grid-loading-reveal 0s 200ms forwards;
|
|
66
|
+
}
|
|
67
|
+
.loading-status svg {
|
|
68
|
+
display: block;
|
|
69
|
+
inline-size: 1.5rem;
|
|
70
|
+
block-size: 1.5rem;
|
|
71
|
+
fill: none;
|
|
72
|
+
stroke: currentColor;
|
|
73
|
+
stroke-width: 2;
|
|
74
|
+
stroke-linecap: round;
|
|
75
|
+
animation: grid-loading-spin .9s linear infinite;
|
|
76
|
+
}
|
|
77
|
+
@keyframes grid-loading-reveal { to { opacity: 1; } }
|
|
78
|
+
@keyframes grid-loading-spin { to { transform: rotate(360deg); } }
|
|
79
|
+
@media (prefers-reduced-motion: reduce) { .loading-status svg { animation: none; } }
|
|
80
|
+
.body-viewport {
|
|
81
|
+
grid-area: 1 / 1;
|
|
82
|
+
min-block-size: 0;
|
|
83
|
+
min-inline-size: 0;
|
|
84
|
+
overflow: auto;
|
|
85
|
+
background: var(--gramlot-surface-subtle, Canvas);
|
|
86
|
+
scrollbar-gutter: stable;
|
|
87
|
+
overscroll-behavior: contain;
|
|
88
|
+
overflow-anchor: none;
|
|
89
|
+
}
|
|
90
|
+
.row-space { pointer-events: none; inline-size: 1px; }
|
|
91
|
+
.body-viewport:focus-visible {
|
|
92
|
+
outline: 2px solid var(--gramlot-focus-ring, Highlight);
|
|
93
|
+
outline-offset: -2px;
|
|
94
|
+
}
|
|
95
|
+
table {
|
|
96
|
+
border-spacing: 0;
|
|
97
|
+
table-layout: fixed;
|
|
98
|
+
inline-size: var(--grid-columns-width);
|
|
99
|
+
font: inherit;
|
|
100
|
+
color: inherit;
|
|
101
|
+
}
|
|
102
|
+
th, td {
|
|
103
|
+
padding: var(--gramlot-grid-cell-padding, .3rem .6rem);
|
|
104
|
+
overflow: hidden;
|
|
105
|
+
text-overflow: ellipsis;
|
|
106
|
+
white-space: nowrap;
|
|
107
|
+
vertical-align: middle;
|
|
108
|
+
border-inline-end: 1px solid var(--gramlot-grid-column-border-color, var(--gramlot-border, ButtonBorder));
|
|
109
|
+
}
|
|
110
|
+
th {
|
|
111
|
+
position: relative;
|
|
112
|
+
block-size: var(--gramlot-grid-header-height, 2rem);
|
|
113
|
+
color: var(--gramlot-grid-header-color, var(--gramlot-ink, ButtonText));
|
|
114
|
+
background: var(--gramlot-grid-header-background, var(--gramlot-surface-subtle, ButtonFace));
|
|
115
|
+
font-weight: var(--gramlot-grid-header-weight, 600);
|
|
116
|
+
text-align: start;
|
|
117
|
+
}
|
|
118
|
+
th[scope=col], th.row-heading {
|
|
119
|
+
background-image: linear-gradient(to bottom, var(--gramlot-grid-header-highlight), transparent 65%);
|
|
120
|
+
border-inline-end-color: var(--gramlot-grid-header-border-color, ButtonBorder);
|
|
121
|
+
box-shadow: inset 0 1px var(--gramlot-grid-header-highlight), inset 0 -1px var(--gramlot-grid-header-border-color, ButtonBorder);
|
|
122
|
+
}
|
|
123
|
+
.group-spacer, th[scope=colgroup] {
|
|
124
|
+
box-sizing: border-box;
|
|
125
|
+
block-size: var(--gramlot-grid-group-height, 1.5rem);
|
|
126
|
+
padding-block: 0;
|
|
127
|
+
}
|
|
128
|
+
.group-spacer { background: var(--gramlot-grid-header-background); border: 0; }
|
|
129
|
+
th[scope=colgroup] {
|
|
130
|
+
border-start-start-radius: var(--gramlot-radius-lg, 10px);
|
|
131
|
+
border-start-end-radius: var(--gramlot-radius-lg, 10px);
|
|
132
|
+
border-inline-start: 2px solid var(--gramlot-grid-header-background);
|
|
133
|
+
background-clip: padding-box;
|
|
134
|
+
background: var(--gramlot-grid-group-background, var(--gramlot-surface-subtle, ButtonFace));
|
|
135
|
+
color: var(--gramlot-grid-group-color, var(--gramlot-ink, ButtonText));
|
|
136
|
+
border-block-end: 1px solid var(--gramlot-grid-border-color, var(--gramlot-border, ButtonBorder));
|
|
137
|
+
}
|
|
138
|
+
td {
|
|
139
|
+
vertical-align: top;
|
|
140
|
+
block-size: var(--gramlot-grid-row-height, 2rem);
|
|
141
|
+
border-block-end: 1px solid var(--gramlot-grid-row-border-color, var(--gramlot-border, ButtonBorder));
|
|
142
|
+
}
|
|
143
|
+
tbody tr { background: var(--gramlot-grid-background, var(--gramlot-surface, Canvas)); }
|
|
144
|
+
tbody tr.alternate { background: var(--gramlot-grid-row-alt-background, var(--gramlot-surface-subtle, Canvas)); }
|
|
145
|
+
tbody tr:hover { background: var(--gramlot-grid-row-hover-background, var(--gramlot-selected, Highlight)); }
|
|
146
|
+
th[data-field] { padding-inline-end: 14px; cursor: grab; user-select: none; }
|
|
147
|
+
th[data-field]:hover { background-color: color-mix(in srgb, var(--gramlot-grid-header-background) 92%, var(--gramlot-grid-header-color)); }
|
|
148
|
+
th:focus-visible, .column-resize:focus-visible { outline: 2px solid var(--gramlot-focus-ring, Highlight); outline-offset: -2px; }
|
|
149
|
+
.column-caption { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
150
|
+
th[data-sort-direction] .column-caption { padding-inline-end: 24px; }
|
|
151
|
+
.sort-indicator { display: none; position: absolute; inset-inline-end: 14px; top: calc(50% - 7px); inline-size: 14px; block-size: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; }
|
|
152
|
+
th[data-sort-direction] .sort-indicator { display: inline-block; }
|
|
153
|
+
th[data-sort-direction=descending] .sort-indicator { transform: rotate(180deg); }
|
|
154
|
+
th[data-sort-priority]::after { content: attr(data-sort-priority); position: absolute; inset-inline-end: 7px; top: calc(50% - .8em); font-size: .7em; opacity: .8; }
|
|
155
|
+
.column-resize { position: absolute; inset: 0 -4px 0 auto; inline-size: 9px; z-index: 1; cursor: col-resize; touch-action: none; }
|
|
156
|
+
.column-resize::after { content: ''; position: absolute; inset: 20% 4px; background: transparent; }
|
|
157
|
+
th:hover .column-resize::after, .column-resize:focus-visible::after { background: var(--gramlot-focus-ring, Highlight); }
|
|
158
|
+
.resizing, .resizing * { cursor: col-resize; user-select: none; }
|
|
159
|
+
th.column-dragging { opacity: .45; }
|
|
160
|
+
th[data-drop=before] { box-shadow: inset 3px 0 var(--gramlot-focus-ring, Highlight); }
|
|
161
|
+
th[data-drop=after] { box-shadow: inset -3px 0 var(--gramlot-focus-ring, Highlight); }
|
|
162
|
+
th.row-heading {
|
|
163
|
+
font-variant-numeric: tabular-nums;
|
|
164
|
+
position: sticky;
|
|
165
|
+
inset-inline-start: 0;
|
|
166
|
+
z-index: 2;
|
|
167
|
+
text-align: end;
|
|
168
|
+
font-weight: 400;
|
|
169
|
+
vertical-align: top;
|
|
170
|
+
user-select: none;
|
|
171
|
+
block-size: var(--gramlot-grid-row-height, 2rem);
|
|
172
|
+
}
|
|
173
|
+
thead th.row-heading { vertical-align: middle; font-weight: var(--gramlot-grid-header-weight, 600); }
|
|
174
|
+
.row-number-measure {
|
|
175
|
+
position: absolute;
|
|
176
|
+
visibility: hidden;
|
|
177
|
+
pointer-events: none;
|
|
178
|
+
inline-size: max-content;
|
|
179
|
+
padding-inline: inherit;
|
|
180
|
+
border-inline-end: inherit;
|
|
181
|
+
font-weight: 400;
|
|
182
|
+
}
|
|
183
|
+
.row-height-handle {
|
|
184
|
+
position: absolute;
|
|
185
|
+
inset: auto 0 0;
|
|
186
|
+
block-size: 7px;
|
|
187
|
+
cursor: row-resize;
|
|
188
|
+
touch-action: none;
|
|
189
|
+
}
|
|
190
|
+
.row-height-handle:hover, .row-height-handle:focus-visible {
|
|
191
|
+
background: color-mix(in srgb, var(--gramlot-focus-ring, Highlight) 35%, transparent);
|
|
192
|
+
}
|
|
193
|
+
.row-height-handle:focus-visible { outline: 2px solid var(--gramlot-focus-ring, Highlight); outline-offset: -2px; }
|
|
194
|
+
.resizing-row, .resizing-row * { cursor: row-resize; user-select: none; }
|
|
195
|
+
tbody tr[draggable=true] { cursor: grab; }
|
|
196
|
+
tbody tr.row-dragging { opacity: .45; }
|
|
197
|
+
tbody tr[data-row-drop=before] > * { box-shadow: inset 0 2px var(--gramlot-focus-ring, Highlight); }
|
|
198
|
+
tbody tr[data-row-drop=after] > * { box-shadow: inset 0 -2px var(--gramlot-focus-ring, Highlight); }
|
|
199
|
+
.numeric { font-variant-numeric: tabular-nums; }
|
|
200
|
+
.empty { text-align: center; color: var(--gramlot-text-secondary, GrayText); }
|
|
201
|
+
`;
|