@crisp-ui-kit/crisp 0.34.0 → 0.35.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/dist/cjs/components/datatable/datatable.js +65 -5
- package/dist/cjs/components/datatable/datatable.recipe.js +2 -0
- package/dist/cjs/components/filldoc/filldoc.js +102 -0
- package/dist/cjs/components/filldoc/filldoc.recipe.js +211 -0
- package/dist/cjs/components/filldoc/index.js +10 -0
- package/dist/cjs/components/filldoc/serialize.js +39 -0
- package/dist/cjs/components/fillsheet/fillsheet.js +719 -0
- package/dist/cjs/components/fillsheet/fillsheet.recipe.js +325 -0
- package/dist/cjs/components/fillsheet/index.js +12 -0
- package/dist/cjs/components/fillsheet/serialize.js +82 -0
- package/dist/cjs/index.js +2 -0
- package/dist/datatable.css +13 -5
- package/dist/datatable.layered.css +13 -5
- package/dist/esm/components/datatable/datatable.js +65 -5
- package/dist/esm/components/datatable/datatable.recipe.js +2 -0
- package/dist/esm/components/filldoc/filldoc.js +66 -0
- package/dist/esm/components/filldoc/filldoc.recipe.js +208 -0
- package/dist/esm/components/filldoc/index.js +3 -0
- package/dist/esm/components/filldoc/serialize.js +35 -0
- package/dist/esm/components/fillsheet/fillsheet.js +683 -0
- package/dist/esm/components/fillsheet/fillsheet.recipe.js +322 -0
- package/dist/esm/components/fillsheet/index.js +3 -0
- package/dist/esm/components/fillsheet/serialize.js +76 -0
- package/dist/esm/index.js +2 -0
- package/dist/filldoc.css +31 -0
- package/dist/filldoc.d.ts +7 -0
- package/dist/filldoc.layered.css +33 -0
- package/dist/fillsheet.css +29 -0
- package/dist/fillsheet.d.ts +7 -0
- package/dist/fillsheet.layered.css +31 -0
- package/dist/styles.css +75 -5
- package/dist/styles.layered.css +75 -5
- package/dist/types/components/datatable/datatable.d.ts +7 -1
- package/dist/types/components/filldoc/filldoc.d.ts +79 -0
- package/dist/types/components/filldoc/filldoc.recipe.d.ts +201 -0
- package/dist/types/components/filldoc/index.d.ts +3 -0
- package/dist/types/components/filldoc/serialize.d.ts +5 -0
- package/dist/types/components/fillsheet/fillsheet.d.ts +165 -0
- package/dist/types/components/fillsheet/fillsheet.recipe.d.ts +202 -0
- package/dist/types/components/fillsheet/index.d.ts +3 -0
- package/dist/types/components/fillsheet/serialize.d.ts +45 -0
- package/dist/types/index.d.ts +2 -0
- package/package.json +11 -1
package/dist/styles.css
CHANGED
|
@@ -511,6 +511,8 @@
|
|
|
511
511
|
& tbody tr[data-selected] td[data-sticky] { background: color-mix(in srgb, var(--crisp-bg-brand-solid) 10%, var(--crisp-bg-surface)); }
|
|
512
512
|
& tbody tr:hover td[data-sticky] { background: color-mix(in srgb, var(--crisp-fg-primary) 4%, var(--crisp-bg-surface)); }
|
|
513
513
|
& .crisp-table-scroll[data-scrolled-x] [data-sticky-edge] { clip-path: inset(0 -38px 0 0); box-shadow: 6px 0 16px 4px rgba(0,0,0,0.12); }
|
|
514
|
+
/* mirror of the rule above, for stickyLast's trailing column (#327) */
|
|
515
|
+
& .crisp-table-scroll[data-scrolled-x-end] [data-sticky-edge-end] { clip-path: inset(0 0 0 -38px); box-shadow: -6px 0 16px 4px rgba(0,0,0,0.12); }
|
|
514
516
|
/* add-row + summary footer */
|
|
515
517
|
& .crisp-datatable-addcell { padding: 0; border-top: none; }
|
|
516
518
|
& .crisp-datatable-addrow { display: flex; align-items: center; gap: var(--crisp-space-2); width: 100%; height: var(--crisp-size-tableRow); padding: 0 var(--crisp-space-2); border: none; border-top: 1px solid var(--crisp-border-subtle); background: var(--crisp-bg-surface); color: var(--crisp-fg-muted); font-family: inherit; font-size: var(--crisp-text-lg); cursor: pointer; transition: background-color .12s; }
|
|
@@ -534,7 +536,12 @@
|
|
|
534
536
|
& .crisp-datatable-entity { display: flex; align-items: center; gap: var(--crisp-space-1-5); min-width: 0; color: var(--crisp-fg-primary); font-weight: var(--crisp-weight-medium); }
|
|
535
537
|
& .crisp-datatable-entity-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
536
538
|
& .crisp-datatable-avatar { width: var(--crisp-size-icon); height: var(--crisp-size-icon); border-radius: var(--crisp-radius-sm); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; line-height: 1; font-weight: var(--crisp-weight-semibold); text-transform: uppercase; color: var(--crisp-fg-on-brand); background: var(--crisp-bg-brand-solid); }
|
|
537
|
-
& .crisp-datatable-avatar[data-tone="success"] { background: var(--crisp-bg-success); }
|
|
539
|
+
& .crisp-datatable-avatar[data-tone="success"] { background: var(--crisp-bg-success); }
|
|
540
|
+
& .crisp-datatable-avatar[data-tone="warning"] { background: var(--crisp-bg-warning); }
|
|
541
|
+
& .crisp-datatable-avatar[data-tone="danger"] { background: var(--crisp-bg-danger); }
|
|
542
|
+
& .crisp-datatable-avatar[data-tone="purple"] { background: var(--crisp-bg-purple); }
|
|
543
|
+
& .crisp-datatable-avatar[data-tone="cyan"] { background: var(--crisp-bg-cyan); }
|
|
544
|
+
& .crisp-datatable-avatar[data-tone="orange"] { background: var(--crisp-bg-orange); }
|
|
538
545
|
& .crisp-datatable-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
|
|
539
546
|
& .crisp-datatable-tags { display: flex; align-items: center; gap: var(--crisp-space-1); overflow: hidden; }
|
|
540
547
|
& .crisp-datatable-tag { display: inline-flex; align-items: center; height: var(--crisp-size-chip); padding: 0 var(--crisp-space-1); border-radius: var(--crisp-radius-chip); font-size: var(--crisp-text-lg); line-height: 20px; font-weight: var(--crisp-weight-medium); white-space: nowrap; background: color-mix(in srgb, var(--crisp-fg-primary) 6%, transparent); color: color-mix(in srgb, var(--crisp-fg-primary) 82%, transparent); }
|
|
@@ -547,10 +554,11 @@
|
|
|
547
554
|
& .crisp-datatable-tag[data-tone="orange"] { background: color-mix(in srgb, var(--crisp-bg-orange) 16%, transparent); color: color-mix(in srgb, var(--crisp-bg-orange) 82%, var(--crisp-fg-primary)); }
|
|
548
555
|
& .crisp-datatable-num { font-variant-numeric: tabular-nums; }
|
|
549
556
|
& .crisp-datatable-muted { color: var(--crisp-fg-muted); }
|
|
550
|
-
/* row drag-to-reorder -- a Settings > Objects > Attributes screen measures
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
(RecordsTable's reorderColumn) -- not a proprietary
|
|
557
|
+
/* row drag-to-reorder -- a Settings > Objects > Attributes screen measures a leading 20px grip column, a 16px grip icon, and the row's own
|
|
558
|
+
hairline doubling as the drop indicator (it tints toward the brand
|
|
559
|
+
colour as the active drop target). The affordance + geometry are
|
|
560
|
+
measured; the drag MECHANISM is crisp's existing house idiom -- HTML5 draggable + dataTransfer, the same one column reorder already uses (RecordsTable's reorderColumn) -- not a proprietary
|
|
561
|
+
pointer-events implementation. */
|
|
554
562
|
& .crisp-datatable-col-grip { width: 20px; padding: 0; text-align: center; }
|
|
555
563
|
& .crisp-datatable-grip { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 100%; margin: 0; border: none; border-radius: 0; background: none; font-family: inherit; color: var(--crisp-fg-muted); cursor: grab; }
|
|
556
564
|
& .crisp-datatable-grip:active { cursor: grabbing; }
|
|
@@ -836,6 +844,68 @@
|
|
|
836
844
|
}
|
|
837
845
|
}
|
|
838
846
|
|
|
847
|
+
.crisp-filldoc {
|
|
848
|
+
display: flex; flex-direction: column; gap: var(--crisp-space-4); box-sizing: border-box; width: 210mm; min-height: 297mm; padding: 20mm; margin: 0 auto; background: var(--crisp-bg-surface); font-family: var(--crisp-font-sans); font-size: var(--crisp-text-lg); line-height: 22px; color: var(--crisp-fg-primary); border-radius: 0; box-shadow: inset 0 0 0 1px var(--crisp-ring-popover), 0 0 0 1px var(--crisp-shadow-popover1), 0 4px 8px -4px var(--crisp-shadow-popover2), 0 4px 12px -2px var(--crisp-shadow-popover3);
|
|
849
|
+
&:focus, &:focus-visible { outline: none; }
|
|
850
|
+
& .crisp-filldoc-block { position: relative; }
|
|
851
|
+
& .crisp-filldoc-heading { margin: 0; font-size: var(--crisp-text-xl); font-weight: var(--crisp-weight-semibold); line-height: 26px; color: var(--crisp-fg-primary); white-space: pre-wrap; overflow-wrap: break-word; }
|
|
852
|
+
& .crisp-filldoc-text { margin: 0; font-size: var(--crisp-text-lg); line-height: 22px; color: var(--crisp-fg-primary); white-space: pre-wrap; overflow-wrap: break-word; }
|
|
853
|
+
& .crisp-filldoc-writer { display: block; width: 100%; margin: 0; padding: 0; border: none; outline: none; background: transparent; font-family: inherit; font-size: inherit; font-weight: inherit; line-height: inherit; color: inherit; resize: none; overflow: hidden; user-select: text; -webkit-user-select: text; }
|
|
854
|
+
& .crisp-filldoc-insert { position: absolute; inset-inline-start: 0; inset-inline-end: 0; inset-block-end: calc(var(--crisp-space-4) / -2); height: var(--crisp-space-4); display: flex; align-items: center; gap: var(--crisp-space-2); opacity: 0; transition: opacity .1s; cursor: pointer; }
|
|
855
|
+
& .crisp-filldoc-block:hover .crisp-filldoc-insert, & .crisp-filldoc-insert:focus-within { opacity: 1; }
|
|
856
|
+
& .crisp-filldoc-insert-rule { flex: 1; height: 1px; background: var(--crisp-border-default); }
|
|
857
|
+
& .crisp-filldoc-insert button { display: inline-flex; align-items: center; height: 20px; padding: 0 var(--crisp-space-1-5); border: none; border-radius: var(--crisp-radius-sm); background: var(--crisp-bg-raised); font-family: inherit; font-size: var(--crisp-text-sm); color: var(--crisp-fg-muted); cursor: pointer; }
|
|
858
|
+
& .crisp-filldoc-insert button:hover { background: var(--crisp-bg-neutral-weak); color: var(--crisp-fg-primary); }
|
|
859
|
+
& .crisp-filldoc-tools { position: absolute; inset-inline-end: 100%; inset-block-start: 0; padding-inline-end: var(--crisp-space-2); display: flex; gap: var(--crisp-space-1); opacity: 0; transition: opacity .1s; }
|
|
860
|
+
& .crisp-filldoc-block:hover .crisp-filldoc-tools, & .crisp-filldoc-tools:focus-within { opacity: 1; }
|
|
861
|
+
& .crisp-filldoc-tools button { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: none; border-radius: var(--crisp-radius-sm); background: transparent; font-family: inherit; font-size: var(--crisp-text-sm); color: var(--crisp-fg-muted); cursor: pointer; }
|
|
862
|
+
& .crisp-filldoc-tools button:hover { background: var(--crisp-bg-raised); color: var(--crisp-fg-primary); }
|
|
863
|
+
}
|
|
864
|
+
.crisp-filldoc--page_a4 {
|
|
865
|
+
|
|
866
|
+
}
|
|
867
|
+
.crisp-filldoc--page_auto {
|
|
868
|
+
width: 100%; min-height: 0; max-width: 210mm;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
@media (prefers-reduced-motion: reduce) {
|
|
872
|
+
.crisp-filldoc, .crisp-filldoc * {
|
|
873
|
+
animation-duration: 0.01ms !important;
|
|
874
|
+
animation-iteration-count: 1 !important;
|
|
875
|
+
transition-duration: 0.01ms !important;
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
.crisp-fillsheet {
|
|
880
|
+
display: grid; grid-template-columns: var(--crisp-fillsheet-cols); grid-template-rows: var(--crisp-fillsheet-rows); position: relative; overflow: auto; max-width: 100%; box-sizing: border-box; font-family: var(--crisp-font-sans); font-size: var(--crisp-text-md); color: var(--crisp-fg-primary); background: var(--crisp-bg-surface); border-radius: 0; border: 1px solid var(--crisp-border-default); user-select: none; -webkit-user-select: none;
|
|
881
|
+
&:focus, &:focus-visible { outline: none; }
|
|
882
|
+
& .crisp-fillsheet-cell { position: relative; display: flex; align-items: flex-start; min-width: 0; padding-inline: var(--crisp-space-3); padding-block: var(--crisp-space-3); border-inline-end: 1px solid var(--crisp-border-default); border-block-end: 1px solid var(--crisp-border-default); background: var(--crisp-bg-surface); white-space: pre-wrap; overflow-wrap: break-word; line-height: 20px; cursor: cell; }
|
|
883
|
+
& .crisp-fillsheet-cell[aria-readonly] { background: var(--crisp-bg-raised); color: var(--crisp-fg-muted); }
|
|
884
|
+
& .crisp-fillsheet-cell:last-child { border-inline-end: none; }
|
|
885
|
+
& > div:last-child .crisp-fillsheet-cell { border-block-end: none; }
|
|
886
|
+
& .crisp-fillsheet-cell[data-align="end"] { justify-content: flex-end; font-variant-numeric: tabular-nums; }
|
|
887
|
+
&[data-multi] .crisp-fillsheet-cell[data-range] { background: color-mix(in srgb, var(--crisp-fg-primary) 6%, transparent); }
|
|
888
|
+
&[data-keynav] .crisp-fillsheet-cell[data-selected] { background: color-mix(in srgb, var(--crisp-fg-primary) 6%, transparent); box-shadow: inset 0 -2px 0 var(--crisp-fg-primary); }
|
|
889
|
+
& .crisp-fillsheet-cell[data-editing] { background: var(--crisp-bg-surface); }
|
|
890
|
+
& .crisp-fillsheet-colresize { position: absolute; inset-block-start: 0; inset-block-end: 0; inset-inline-end: 0; z-index: 3; width: 5px; cursor: col-resize; touch-action: none; }
|
|
891
|
+
& .crisp-fillsheet-rowresize { position: absolute; inset-inline-start: 0; inset-inline-end: 0; inset-block-end: 0; z-index: 3; height: 5px; cursor: row-resize; touch-action: none; }
|
|
892
|
+
& .crisp-fillsheet-colresize:hover { background: linear-gradient(to right, transparent 0, transparent calc(50% - 1px), var(--crisp-fg-primary) calc(50% - 1px), var(--crisp-fg-primary) calc(50% + 1px), transparent calc(50% + 1px)); }
|
|
893
|
+
& .crisp-fillsheet-rowresize:hover { background: linear-gradient(to bottom, transparent 0, transparent calc(50% - 1px), var(--crisp-fg-primary) calc(50% - 1px), var(--crisp-fg-primary) calc(50% + 1px), transparent calc(50% + 1px)); }
|
|
894
|
+
& .crisp-fillsheet-editor { display: block; flex-grow: 1; width: 100%; min-width: 0; margin: 0; padding: 0; border: none; outline: none; background: transparent; font-family: inherit; font-size: inherit; line-height: 20px; color: inherit; resize: none; user-select: text; -webkit-user-select: text; overflow: hidden; }
|
|
895
|
+
& .crisp-fillsheet-select .crisp-select-trigger { width: 100%; height: 100%; padding: 0; border: none; background: transparent; box-shadow: none; font: inherit; color: inherit; }
|
|
896
|
+
& .crisp-fillsheet-select .crisp-select-trigger:hover, & .crisp-fillsheet-select .crisp-select-trigger[data-open] { background: transparent; box-shadow: none; }
|
|
897
|
+
& .crisp-fillsheet-select .crisp-select-chevron { display: none; }
|
|
898
|
+
}
|
|
899
|
+
.crisp-fillsheet--surface_panel {
|
|
900
|
+
|
|
901
|
+
}
|
|
902
|
+
.crisp-fillsheet--surface_paper {
|
|
903
|
+
box-shadow: inset 0 0 0 1px var(--crisp-ring-popover), 0 0 0 1px var(--crisp-shadow-popover1), 0 4px 8px -4px var(--crisp-shadow-popover2), 0 4px 12px -2px var(--crisp-shadow-popover3);
|
|
904
|
+
}
|
|
905
|
+
.crisp-fillsheet--surface_bare {
|
|
906
|
+
border: none;
|
|
907
|
+
}
|
|
908
|
+
|
|
839
909
|
.crisp-formfield {
|
|
840
910
|
display: flex; flex-direction: column; gap: var(--crisp-space-1-5); box-sizing: border-box; font-family: var(--crisp-font-sans);
|
|
841
911
|
& .crisp-formfield-label { display: inline-flex; align-items: center; gap: var(--crisp-space-1); font-size: var(--crisp-text-sm); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-muted); }
|
package/dist/styles.layered.css
CHANGED
|
@@ -512,6 +512,8 @@
|
|
|
512
512
|
& tbody tr[data-selected] td[data-sticky] { background: color-mix(in srgb, var(--crisp-bg-brand-solid) 10%, var(--crisp-bg-surface)); }
|
|
513
513
|
& tbody tr:hover td[data-sticky] { background: color-mix(in srgb, var(--crisp-fg-primary) 4%, var(--crisp-bg-surface)); }
|
|
514
514
|
& .crisp-table-scroll[data-scrolled-x] [data-sticky-edge] { clip-path: inset(0 -38px 0 0); box-shadow: 6px 0 16px 4px rgba(0,0,0,0.12); }
|
|
515
|
+
/* mirror of the rule above, for stickyLast's trailing column (#327) */
|
|
516
|
+
& .crisp-table-scroll[data-scrolled-x-end] [data-sticky-edge-end] { clip-path: inset(0 0 0 -38px); box-shadow: -6px 0 16px 4px rgba(0,0,0,0.12); }
|
|
515
517
|
/* add-row + summary footer */
|
|
516
518
|
& .crisp-datatable-addcell { padding: 0; border-top: none; }
|
|
517
519
|
& .crisp-datatable-addrow { display: flex; align-items: center; gap: var(--crisp-space-2); width: 100%; height: var(--crisp-size-tableRow); padding: 0 var(--crisp-space-2); border: none; border-top: 1px solid var(--crisp-border-subtle); background: var(--crisp-bg-surface); color: var(--crisp-fg-muted); font-family: inherit; font-size: var(--crisp-text-lg); cursor: pointer; transition: background-color .12s; }
|
|
@@ -535,7 +537,12 @@
|
|
|
535
537
|
& .crisp-datatable-entity { display: flex; align-items: center; gap: var(--crisp-space-1-5); min-width: 0; color: var(--crisp-fg-primary); font-weight: var(--crisp-weight-medium); }
|
|
536
538
|
& .crisp-datatable-entity-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
537
539
|
& .crisp-datatable-avatar { width: var(--crisp-size-icon); height: var(--crisp-size-icon); border-radius: var(--crisp-radius-sm); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; line-height: 1; font-weight: var(--crisp-weight-semibold); text-transform: uppercase; color: var(--crisp-fg-on-brand); background: var(--crisp-bg-brand-solid); }
|
|
538
|
-
& .crisp-datatable-avatar[data-tone="success"] { background: var(--crisp-bg-success); }
|
|
540
|
+
& .crisp-datatable-avatar[data-tone="success"] { background: var(--crisp-bg-success); }
|
|
541
|
+
& .crisp-datatable-avatar[data-tone="warning"] { background: var(--crisp-bg-warning); }
|
|
542
|
+
& .crisp-datatable-avatar[data-tone="danger"] { background: var(--crisp-bg-danger); }
|
|
543
|
+
& .crisp-datatable-avatar[data-tone="purple"] { background: var(--crisp-bg-purple); }
|
|
544
|
+
& .crisp-datatable-avatar[data-tone="cyan"] { background: var(--crisp-bg-cyan); }
|
|
545
|
+
& .crisp-datatable-avatar[data-tone="orange"] { background: var(--crisp-bg-orange); }
|
|
539
546
|
& .crisp-datatable-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
|
|
540
547
|
& .crisp-datatable-tags { display: flex; align-items: center; gap: var(--crisp-space-1); overflow: hidden; }
|
|
541
548
|
& .crisp-datatable-tag { display: inline-flex; align-items: center; height: var(--crisp-size-chip); padding: 0 var(--crisp-space-1); border-radius: var(--crisp-radius-chip); font-size: var(--crisp-text-lg); line-height: 20px; font-weight: var(--crisp-weight-medium); white-space: nowrap; background: color-mix(in srgb, var(--crisp-fg-primary) 6%, transparent); color: color-mix(in srgb, var(--crisp-fg-primary) 82%, transparent); }
|
|
@@ -548,10 +555,11 @@
|
|
|
548
555
|
& .crisp-datatable-tag[data-tone="orange"] { background: color-mix(in srgb, var(--crisp-bg-orange) 16%, transparent); color: color-mix(in srgb, var(--crisp-bg-orange) 82%, var(--crisp-fg-primary)); }
|
|
549
556
|
& .crisp-datatable-num { font-variant-numeric: tabular-nums; }
|
|
550
557
|
& .crisp-datatable-muted { color: var(--crisp-fg-muted); }
|
|
551
|
-
/* row drag-to-reorder -- a Settings > Objects > Attributes screen measures
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
(RecordsTable's reorderColumn) -- not a proprietary
|
|
558
|
+
/* row drag-to-reorder -- a Settings > Objects > Attributes screen measures a leading 20px grip column, a 16px grip icon, and the row's own
|
|
559
|
+
hairline doubling as the drop indicator (it tints toward the brand
|
|
560
|
+
colour as the active drop target). The affordance + geometry are
|
|
561
|
+
measured; the drag MECHANISM is crisp's existing house idiom -- HTML5 draggable + dataTransfer, the same one column reorder already uses (RecordsTable's reorderColumn) -- not a proprietary
|
|
562
|
+
pointer-events implementation. */
|
|
555
563
|
& .crisp-datatable-col-grip { width: 20px; padding: 0; text-align: center; }
|
|
556
564
|
& .crisp-datatable-grip { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 100%; margin: 0; border: none; border-radius: 0; background: none; font-family: inherit; color: var(--crisp-fg-muted); cursor: grab; }
|
|
557
565
|
& .crisp-datatable-grip:active { cursor: grabbing; }
|
|
@@ -837,6 +845,68 @@
|
|
|
837
845
|
}
|
|
838
846
|
}
|
|
839
847
|
|
|
848
|
+
.crisp-filldoc {
|
|
849
|
+
display: flex; flex-direction: column; gap: var(--crisp-space-4); box-sizing: border-box; width: 210mm; min-height: 297mm; padding: 20mm; margin: 0 auto; background: var(--crisp-bg-surface); font-family: var(--crisp-font-sans); font-size: var(--crisp-text-lg); line-height: 22px; color: var(--crisp-fg-primary); border-radius: 0; box-shadow: inset 0 0 0 1px var(--crisp-ring-popover), 0 0 0 1px var(--crisp-shadow-popover1), 0 4px 8px -4px var(--crisp-shadow-popover2), 0 4px 12px -2px var(--crisp-shadow-popover3);
|
|
850
|
+
&:focus, &:focus-visible { outline: none; }
|
|
851
|
+
& .crisp-filldoc-block { position: relative; }
|
|
852
|
+
& .crisp-filldoc-heading { margin: 0; font-size: var(--crisp-text-xl); font-weight: var(--crisp-weight-semibold); line-height: 26px; color: var(--crisp-fg-primary); white-space: pre-wrap; overflow-wrap: break-word; }
|
|
853
|
+
& .crisp-filldoc-text { margin: 0; font-size: var(--crisp-text-lg); line-height: 22px; color: var(--crisp-fg-primary); white-space: pre-wrap; overflow-wrap: break-word; }
|
|
854
|
+
& .crisp-filldoc-writer { display: block; width: 100%; margin: 0; padding: 0; border: none; outline: none; background: transparent; font-family: inherit; font-size: inherit; font-weight: inherit; line-height: inherit; color: inherit; resize: none; overflow: hidden; user-select: text; -webkit-user-select: text; }
|
|
855
|
+
& .crisp-filldoc-insert { position: absolute; inset-inline-start: 0; inset-inline-end: 0; inset-block-end: calc(var(--crisp-space-4) / -2); height: var(--crisp-space-4); display: flex; align-items: center; gap: var(--crisp-space-2); opacity: 0; transition: opacity .1s; cursor: pointer; }
|
|
856
|
+
& .crisp-filldoc-block:hover .crisp-filldoc-insert, & .crisp-filldoc-insert:focus-within { opacity: 1; }
|
|
857
|
+
& .crisp-filldoc-insert-rule { flex: 1; height: 1px; background: var(--crisp-border-default); }
|
|
858
|
+
& .crisp-filldoc-insert button { display: inline-flex; align-items: center; height: 20px; padding: 0 var(--crisp-space-1-5); border: none; border-radius: var(--crisp-radius-sm); background: var(--crisp-bg-raised); font-family: inherit; font-size: var(--crisp-text-sm); color: var(--crisp-fg-muted); cursor: pointer; }
|
|
859
|
+
& .crisp-filldoc-insert button:hover { background: var(--crisp-bg-neutral-weak); color: var(--crisp-fg-primary); }
|
|
860
|
+
& .crisp-filldoc-tools { position: absolute; inset-inline-end: 100%; inset-block-start: 0; padding-inline-end: var(--crisp-space-2); display: flex; gap: var(--crisp-space-1); opacity: 0; transition: opacity .1s; }
|
|
861
|
+
& .crisp-filldoc-block:hover .crisp-filldoc-tools, & .crisp-filldoc-tools:focus-within { opacity: 1; }
|
|
862
|
+
& .crisp-filldoc-tools button { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: none; border-radius: var(--crisp-radius-sm); background: transparent; font-family: inherit; font-size: var(--crisp-text-sm); color: var(--crisp-fg-muted); cursor: pointer; }
|
|
863
|
+
& .crisp-filldoc-tools button:hover { background: var(--crisp-bg-raised); color: var(--crisp-fg-primary); }
|
|
864
|
+
}
|
|
865
|
+
.crisp-filldoc--page_a4 {
|
|
866
|
+
|
|
867
|
+
}
|
|
868
|
+
.crisp-filldoc--page_auto {
|
|
869
|
+
width: 100%; min-height: 0; max-width: 210mm;
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
@media (prefers-reduced-motion: reduce) {
|
|
873
|
+
.crisp-filldoc, .crisp-filldoc * {
|
|
874
|
+
animation-duration: 0.01ms !important;
|
|
875
|
+
animation-iteration-count: 1 !important;
|
|
876
|
+
transition-duration: 0.01ms !important;
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
.crisp-fillsheet {
|
|
881
|
+
display: grid; grid-template-columns: var(--crisp-fillsheet-cols); grid-template-rows: var(--crisp-fillsheet-rows); position: relative; overflow: auto; max-width: 100%; box-sizing: border-box; font-family: var(--crisp-font-sans); font-size: var(--crisp-text-md); color: var(--crisp-fg-primary); background: var(--crisp-bg-surface); border-radius: 0; border: 1px solid var(--crisp-border-default); user-select: none; -webkit-user-select: none;
|
|
882
|
+
&:focus, &:focus-visible { outline: none; }
|
|
883
|
+
& .crisp-fillsheet-cell { position: relative; display: flex; align-items: flex-start; min-width: 0; padding-inline: var(--crisp-space-3); padding-block: var(--crisp-space-3); border-inline-end: 1px solid var(--crisp-border-default); border-block-end: 1px solid var(--crisp-border-default); background: var(--crisp-bg-surface); white-space: pre-wrap; overflow-wrap: break-word; line-height: 20px; cursor: cell; }
|
|
884
|
+
& .crisp-fillsheet-cell[aria-readonly] { background: var(--crisp-bg-raised); color: var(--crisp-fg-muted); }
|
|
885
|
+
& .crisp-fillsheet-cell:last-child { border-inline-end: none; }
|
|
886
|
+
& > div:last-child .crisp-fillsheet-cell { border-block-end: none; }
|
|
887
|
+
& .crisp-fillsheet-cell[data-align="end"] { justify-content: flex-end; font-variant-numeric: tabular-nums; }
|
|
888
|
+
&[data-multi] .crisp-fillsheet-cell[data-range] { background: color-mix(in srgb, var(--crisp-fg-primary) 6%, transparent); }
|
|
889
|
+
&[data-keynav] .crisp-fillsheet-cell[data-selected] { background: color-mix(in srgb, var(--crisp-fg-primary) 6%, transparent); box-shadow: inset 0 -2px 0 var(--crisp-fg-primary); }
|
|
890
|
+
& .crisp-fillsheet-cell[data-editing] { background: var(--crisp-bg-surface); }
|
|
891
|
+
& .crisp-fillsheet-colresize { position: absolute; inset-block-start: 0; inset-block-end: 0; inset-inline-end: 0; z-index: 3; width: 5px; cursor: col-resize; touch-action: none; }
|
|
892
|
+
& .crisp-fillsheet-rowresize { position: absolute; inset-inline-start: 0; inset-inline-end: 0; inset-block-end: 0; z-index: 3; height: 5px; cursor: row-resize; touch-action: none; }
|
|
893
|
+
& .crisp-fillsheet-colresize:hover { background: linear-gradient(to right, transparent 0, transparent calc(50% - 1px), var(--crisp-fg-primary) calc(50% - 1px), var(--crisp-fg-primary) calc(50% + 1px), transparent calc(50% + 1px)); }
|
|
894
|
+
& .crisp-fillsheet-rowresize:hover { background: linear-gradient(to bottom, transparent 0, transparent calc(50% - 1px), var(--crisp-fg-primary) calc(50% - 1px), var(--crisp-fg-primary) calc(50% + 1px), transparent calc(50% + 1px)); }
|
|
895
|
+
& .crisp-fillsheet-editor { display: block; flex-grow: 1; width: 100%; min-width: 0; margin: 0; padding: 0; border: none; outline: none; background: transparent; font-family: inherit; font-size: inherit; line-height: 20px; color: inherit; resize: none; user-select: text; -webkit-user-select: text; overflow: hidden; }
|
|
896
|
+
& .crisp-fillsheet-select .crisp-select-trigger { width: 100%; height: 100%; padding: 0; border: none; background: transparent; box-shadow: none; font: inherit; color: inherit; }
|
|
897
|
+
& .crisp-fillsheet-select .crisp-select-trigger:hover, & .crisp-fillsheet-select .crisp-select-trigger[data-open] { background: transparent; box-shadow: none; }
|
|
898
|
+
& .crisp-fillsheet-select .crisp-select-chevron { display: none; }
|
|
899
|
+
}
|
|
900
|
+
.crisp-fillsheet--surface_panel {
|
|
901
|
+
|
|
902
|
+
}
|
|
903
|
+
.crisp-fillsheet--surface_paper {
|
|
904
|
+
box-shadow: inset 0 0 0 1px var(--crisp-ring-popover), 0 0 0 1px var(--crisp-shadow-popover1), 0 4px 8px -4px var(--crisp-shadow-popover2), 0 4px 12px -2px var(--crisp-shadow-popover3);
|
|
905
|
+
}
|
|
906
|
+
.crisp-fillsheet--surface_bare {
|
|
907
|
+
border: none;
|
|
908
|
+
}
|
|
909
|
+
|
|
840
910
|
.crisp-formfield {
|
|
841
911
|
display: flex; flex-direction: column; gap: var(--crisp-space-1-5); box-sizing: border-box; font-family: var(--crisp-font-sans);
|
|
842
912
|
& .crisp-formfield-label { display: inline-flex; align-items: center; gap: var(--crisp-space-1); font-size: var(--crisp-text-sm); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-muted); }
|
|
@@ -129,6 +129,12 @@ export type DataTableProps<T extends {
|
|
|
129
129
|
onEdit?: (id: string, key: string, value: string) => void;
|
|
130
130
|
/** Sticky the first column(s) with a horizontal scroll shadow (default true). */
|
|
131
131
|
stickyFirst?: boolean;
|
|
132
|
+
/** Sticky the LAST column with a horizontal scroll shadow, mirroring
|
|
133
|
+
* `stickyFirst` (default false — additive, so an existing table's trailing
|
|
134
|
+
* column doesn't start pinning without being asked). Follows reading
|
|
135
|
+
* direction like `stickyFirst` does: it pins to the trailing edge, which is
|
|
136
|
+
* the left edge under `dir="rtl"` (#288). */
|
|
137
|
+
stickyLast?: boolean;
|
|
132
138
|
/** BCP 47 locale for the built-in `date`/`number`/`currency` renderers
|
|
133
139
|
* (default "en-US"). Formats the date and groups the number the way that
|
|
134
140
|
* locale's readers expect — e.g. "mn-MN" renders a date as "2026.09.12"
|
|
@@ -163,7 +169,7 @@ export type DataTableProps<T extends {
|
|
|
163
169
|
};
|
|
164
170
|
export declare function DataTable<T extends {
|
|
165
171
|
id: string;
|
|
166
|
-
}>({ columns: columnsProp, data, selectable, selectedIds, onSelectionChange, selectAllLabel, selectRowLabel, selectionAnnouncement, columnMenu, onColumnsChange, groupBy, onRowsReorder, error, sort: sortProp, defaultSort, onSortChange, filterable, searchPlaceholder, searchLabel, onEdit, stickyFirst, locale: localeProp, avatarTone, surface, interactive, onRowClick, onAddRow, addRowLabel, empty, showCount, countLabel, toolbar, className, reorderRowLabel, ...rest }: DataTableProps<T>): React.JSX.Element;
|
|
172
|
+
}>({ columns: columnsProp, data, selectable, selectedIds, onSelectionChange, selectAllLabel, selectRowLabel, selectionAnnouncement, columnMenu, onColumnsChange, groupBy, onRowsReorder, error, sort: sortProp, defaultSort, onSortChange, filterable, searchPlaceholder, searchLabel, onEdit, stickyFirst, stickyLast, locale: localeProp, avatarTone, surface, interactive, onRowClick, onAddRow, addRowLabel, empty, showCount, countLabel, toolbar, className, reorderRowLabel, ...rest }: DataTableProps<T>): React.JSX.Element;
|
|
167
173
|
export declare namespace DataTable {
|
|
168
174
|
var displayName: string;
|
|
169
175
|
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type FillSheetColumn } from "../fillsheet";
|
|
3
|
+
/** A heading, a paragraph, or a sheet. */
|
|
4
|
+
export type FillDocBlock = {
|
|
5
|
+
id: string;
|
|
6
|
+
type: "heading";
|
|
7
|
+
text: string;
|
|
8
|
+
} | {
|
|
9
|
+
id: string;
|
|
10
|
+
type: "text";
|
|
11
|
+
text: string;
|
|
12
|
+
} | {
|
|
13
|
+
id: string;
|
|
14
|
+
type: "table";
|
|
15
|
+
columns: FillSheetColumn[];
|
|
16
|
+
value: string[][];
|
|
17
|
+
/** The sheet's accessible name; see FillSheet's `label`. */
|
|
18
|
+
label?: string;
|
|
19
|
+
};
|
|
20
|
+
export type FillDocProps = {
|
|
21
|
+
/** The document, in order. */
|
|
22
|
+
blocks: FillDocBlock[];
|
|
23
|
+
/** Every edit comes back through here — typing, inserting, removing. */
|
|
24
|
+
onBlocksChange?: (next: FillDocBlock[]) => void;
|
|
25
|
+
/**
|
|
26
|
+
* `edit` is the person who MAKES the document: they can type anywhere and
|
|
27
|
+
* add or remove blocks. `fill` is the person who fills it in — the prose is
|
|
28
|
+
* fixed and only the sheets take input.
|
|
29
|
+
*/
|
|
30
|
+
mode?: "edit" | "fill";
|
|
31
|
+
/** `a4` is a real page; `auto` grows to its content. */
|
|
32
|
+
page?: "a4" | "auto";
|
|
33
|
+
/** The document's accessible name. No English default — see FillSheet. */
|
|
34
|
+
label?: string;
|
|
35
|
+
/** Copy for the insert controls. English defaults, overridable. */
|
|
36
|
+
addTextLabel?: string;
|
|
37
|
+
addHeadingLabel?: string;
|
|
38
|
+
addTableLabel?: string;
|
|
39
|
+
removeLabel?: string;
|
|
40
|
+
className?: string;
|
|
41
|
+
style?: React.CSSProperties;
|
|
42
|
+
} & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange" | "children">;
|
|
43
|
+
/**
|
|
44
|
+
* A page you can write on, of which a sheet is one block.
|
|
45
|
+
*
|
|
46
|
+
* FillSheet is the table; this is the document it sits in. The two share a
|
|
47
|
+
* look on purpose -- a real page, real margins, square corners, and nothing
|
|
48
|
+
* drawn that is not content -- and the same split between the person who
|
|
49
|
+
* MAKES a form and the person who fills it in: in `edit` you write the prose
|
|
50
|
+
* and add or remove blocks, in `fill` the prose is fixed and only the sheets
|
|
51
|
+
* take input.
|
|
52
|
+
*
|
|
53
|
+
* Every block's controls are hidden until the pointer is in that block. A
|
|
54
|
+
* page covered in handles and grips stops looking like a page, which is the
|
|
55
|
+
* whole thing this is for.
|
|
56
|
+
*/
|
|
57
|
+
export declare const FillDoc: React.ForwardRefExoticComponent<{
|
|
58
|
+
/** The document, in order. */
|
|
59
|
+
blocks: FillDocBlock[];
|
|
60
|
+
/** Every edit comes back through here — typing, inserting, removing. */
|
|
61
|
+
onBlocksChange?: (next: FillDocBlock[]) => void;
|
|
62
|
+
/**
|
|
63
|
+
* `edit` is the person who MAKES the document: they can type anywhere and
|
|
64
|
+
* add or remove blocks. `fill` is the person who fills it in — the prose is
|
|
65
|
+
* fixed and only the sheets take input.
|
|
66
|
+
*/
|
|
67
|
+
mode?: "edit" | "fill";
|
|
68
|
+
/** `a4` is a real page; `auto` grows to its content. */
|
|
69
|
+
page?: "a4" | "auto";
|
|
70
|
+
/** The document's accessible name. No English default — see FillSheet. */
|
|
71
|
+
label?: string;
|
|
72
|
+
/** Copy for the insert controls. English defaults, overridable. */
|
|
73
|
+
addTextLabel?: string;
|
|
74
|
+
addHeadingLabel?: string;
|
|
75
|
+
addTableLabel?: string;
|
|
76
|
+
removeLabel?: string;
|
|
77
|
+
className?: string;
|
|
78
|
+
style?: React.CSSProperties;
|
|
79
|
+
} & Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "onChange"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
declare const spec: {
|
|
2
|
+
readonly name: "filldoc";
|
|
3
|
+
readonly base: {
|
|
4
|
+
readonly display: "flex";
|
|
5
|
+
readonly flexDirection: "column";
|
|
6
|
+
readonly gap: `var(--${string})`;
|
|
7
|
+
readonly boxSizing: "border-box";
|
|
8
|
+
readonly width: "210mm";
|
|
9
|
+
readonly minHeight: "297mm";
|
|
10
|
+
readonly padding: "20mm";
|
|
11
|
+
readonly margin: "0 auto";
|
|
12
|
+
readonly background: `var(--${string})`;
|
|
13
|
+
readonly fontFamily: `var(--${string})`;
|
|
14
|
+
readonly fontSize: `var(--${string})`;
|
|
15
|
+
readonly lineHeight: "22px";
|
|
16
|
+
readonly color: `var(--${string})`;
|
|
17
|
+
readonly borderRadius: "0";
|
|
18
|
+
readonly boxShadow: `inset 0 0 0 1px var(--${string}), 0 0 0 1px var(--${string}), 0 4px 8px -4px var(--${string}), 0 4px 12px -2px var(--${string})`;
|
|
19
|
+
};
|
|
20
|
+
readonly parts: [{
|
|
21
|
+
readonly selector: "&:focus, &:focus-visible";
|
|
22
|
+
readonly decls: {
|
|
23
|
+
readonly outline: "none";
|
|
24
|
+
};
|
|
25
|
+
}, {
|
|
26
|
+
readonly slot: "block";
|
|
27
|
+
readonly selector: "& .crisp-filldoc-block";
|
|
28
|
+
readonly decls: {
|
|
29
|
+
readonly position: "relative";
|
|
30
|
+
};
|
|
31
|
+
}, {
|
|
32
|
+
readonly slot: "heading";
|
|
33
|
+
readonly selector: "& .crisp-filldoc-heading";
|
|
34
|
+
readonly decls: {
|
|
35
|
+
readonly margin: "0";
|
|
36
|
+
readonly fontSize: `var(--${string})`;
|
|
37
|
+
readonly fontWeight: `var(--${string})`;
|
|
38
|
+
readonly lineHeight: "26px";
|
|
39
|
+
readonly color: `var(--${string})`;
|
|
40
|
+
readonly whiteSpace: "pre-wrap";
|
|
41
|
+
readonly overflowWrap: "break-word";
|
|
42
|
+
};
|
|
43
|
+
}, {
|
|
44
|
+
readonly slot: "paragraph";
|
|
45
|
+
readonly selector: "& .crisp-filldoc-text";
|
|
46
|
+
readonly decls: {
|
|
47
|
+
readonly margin: "0";
|
|
48
|
+
readonly fontSize: `var(--${string})`;
|
|
49
|
+
readonly lineHeight: "22px";
|
|
50
|
+
readonly color: `var(--${string})`;
|
|
51
|
+
readonly whiteSpace: "pre-wrap";
|
|
52
|
+
readonly overflowWrap: "break-word";
|
|
53
|
+
};
|
|
54
|
+
}, {
|
|
55
|
+
readonly slot: "writer";
|
|
56
|
+
readonly selector: "& .crisp-filldoc-writer";
|
|
57
|
+
readonly decls: {
|
|
58
|
+
readonly display: "block";
|
|
59
|
+
readonly width: "100%";
|
|
60
|
+
readonly margin: "0";
|
|
61
|
+
readonly padding: "0";
|
|
62
|
+
readonly border: "none";
|
|
63
|
+
readonly outline: "none";
|
|
64
|
+
readonly background: "transparent";
|
|
65
|
+
readonly fontFamily: "inherit";
|
|
66
|
+
readonly fontSize: "inherit";
|
|
67
|
+
readonly fontWeight: "inherit";
|
|
68
|
+
readonly lineHeight: "inherit";
|
|
69
|
+
readonly color: "inherit";
|
|
70
|
+
readonly resize: "none";
|
|
71
|
+
readonly overflow: "hidden";
|
|
72
|
+
readonly userSelect: "text";
|
|
73
|
+
readonly WebkitUserSelect: "text";
|
|
74
|
+
};
|
|
75
|
+
}, {
|
|
76
|
+
readonly slot: "inserter";
|
|
77
|
+
readonly selector: "& .crisp-filldoc-insert";
|
|
78
|
+
readonly decls: {
|
|
79
|
+
readonly position: "absolute";
|
|
80
|
+
readonly insetInlineStart: "0";
|
|
81
|
+
readonly insetInlineEnd: "0";
|
|
82
|
+
readonly insetBlockEnd: `calc(var(--${string}) / -2)`;
|
|
83
|
+
readonly height: `var(--${string})`;
|
|
84
|
+
readonly display: "flex";
|
|
85
|
+
readonly alignItems: "center";
|
|
86
|
+
readonly gap: `var(--${string})`;
|
|
87
|
+
readonly opacity: "0";
|
|
88
|
+
readonly transition: "opacity .1s";
|
|
89
|
+
readonly cursor: "pointer";
|
|
90
|
+
};
|
|
91
|
+
}, {
|
|
92
|
+
readonly selector: "& .crisp-filldoc-block:hover .crisp-filldoc-insert, & .crisp-filldoc-insert:focus-within";
|
|
93
|
+
readonly decls: {
|
|
94
|
+
readonly opacity: "1";
|
|
95
|
+
};
|
|
96
|
+
}, {
|
|
97
|
+
readonly selector: "& .crisp-filldoc-insert-rule";
|
|
98
|
+
readonly decls: {
|
|
99
|
+
readonly flex: "1";
|
|
100
|
+
readonly height: "1px";
|
|
101
|
+
readonly background: `var(--${string})`;
|
|
102
|
+
};
|
|
103
|
+
}, {
|
|
104
|
+
readonly slot: "insertButton";
|
|
105
|
+
readonly selector: "& .crisp-filldoc-insert button";
|
|
106
|
+
readonly decls: {
|
|
107
|
+
readonly display: "inline-flex";
|
|
108
|
+
readonly alignItems: "center";
|
|
109
|
+
readonly height: "20px";
|
|
110
|
+
readonly padding: `0 var(--${string})`;
|
|
111
|
+
readonly border: "none";
|
|
112
|
+
readonly borderRadius: `var(--${string})`;
|
|
113
|
+
readonly background: `var(--${string})`;
|
|
114
|
+
readonly fontFamily: "inherit";
|
|
115
|
+
readonly fontSize: `var(--${string})`;
|
|
116
|
+
readonly color: `var(--${string})`;
|
|
117
|
+
readonly cursor: "pointer";
|
|
118
|
+
};
|
|
119
|
+
}, {
|
|
120
|
+
readonly selector: "& .crisp-filldoc-insert button:hover";
|
|
121
|
+
readonly decls: {
|
|
122
|
+
background: `var(--${string})`;
|
|
123
|
+
color: `var(--${string})`;
|
|
124
|
+
};
|
|
125
|
+
}, {
|
|
126
|
+
readonly slot: "blockTools";
|
|
127
|
+
readonly selector: "& .crisp-filldoc-tools";
|
|
128
|
+
readonly decls: {
|
|
129
|
+
readonly position: "absolute";
|
|
130
|
+
readonly insetInlineEnd: "100%";
|
|
131
|
+
readonly insetBlockStart: "0";
|
|
132
|
+
readonly paddingInlineEnd: `var(--${string})`;
|
|
133
|
+
readonly display: "flex";
|
|
134
|
+
readonly gap: `var(--${string})`;
|
|
135
|
+
readonly opacity: "0";
|
|
136
|
+
readonly transition: "opacity .1s";
|
|
137
|
+
};
|
|
138
|
+
}, {
|
|
139
|
+
readonly selector: "& .crisp-filldoc-block:hover .crisp-filldoc-tools, & .crisp-filldoc-tools:focus-within";
|
|
140
|
+
readonly decls: {
|
|
141
|
+
readonly opacity: "1";
|
|
142
|
+
};
|
|
143
|
+
}, {
|
|
144
|
+
readonly selector: "& .crisp-filldoc-tools button";
|
|
145
|
+
readonly decls: {
|
|
146
|
+
readonly width: "20px";
|
|
147
|
+
readonly height: "20px";
|
|
148
|
+
readonly display: "inline-flex";
|
|
149
|
+
readonly alignItems: "center";
|
|
150
|
+
readonly justifyContent: "center";
|
|
151
|
+
readonly padding: "0";
|
|
152
|
+
readonly border: "none";
|
|
153
|
+
readonly borderRadius: `var(--${string})`;
|
|
154
|
+
readonly background: "transparent";
|
|
155
|
+
readonly fontFamily: "inherit";
|
|
156
|
+
readonly fontSize: `var(--${string})`;
|
|
157
|
+
readonly color: `var(--${string})`;
|
|
158
|
+
readonly cursor: "pointer";
|
|
159
|
+
};
|
|
160
|
+
}, {
|
|
161
|
+
readonly selector: "& .crisp-filldoc-tools button:hover";
|
|
162
|
+
readonly decls: {
|
|
163
|
+
background: `var(--${string})`;
|
|
164
|
+
color: `var(--${string})`;
|
|
165
|
+
};
|
|
166
|
+
}];
|
|
167
|
+
readonly variants: {
|
|
168
|
+
readonly page: {
|
|
169
|
+
readonly a4: {};
|
|
170
|
+
readonly auto: {
|
|
171
|
+
readonly width: "100%";
|
|
172
|
+
readonly minHeight: "0";
|
|
173
|
+
readonly maxWidth: "210mm";
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
readonly defaultVariants: {
|
|
178
|
+
readonly page: "a4";
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
declare const config: import("../..").RecipeConfig<{
|
|
182
|
+
readonly page: {
|
|
183
|
+
readonly a4: string;
|
|
184
|
+
readonly auto: string;
|
|
185
|
+
};
|
|
186
|
+
}>;
|
|
187
|
+
export declare const filldocRecipe: import("../..").RecipeFn<{
|
|
188
|
+
readonly page: {
|
|
189
|
+
readonly a4: string;
|
|
190
|
+
readonly auto: string;
|
|
191
|
+
};
|
|
192
|
+
}> & {
|
|
193
|
+
config: import("../..").RecipeConfig<{
|
|
194
|
+
readonly page: {
|
|
195
|
+
readonly a4: string;
|
|
196
|
+
readonly auto: string;
|
|
197
|
+
};
|
|
198
|
+
}>;
|
|
199
|
+
};
|
|
200
|
+
export { spec };
|
|
201
|
+
export default config;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { FillDocBlock } from "./filldoc";
|
|
2
|
+
/** An HTML document body: what Word, Google Docs and Pages paste as a document. */
|
|
3
|
+
export declare function docToHTML(blocks: FillDocBlock[]): string;
|
|
4
|
+
/** The same document as Markdown. */
|
|
5
|
+
export declare function docToMarkdown(blocks: FillDocBlock[]): string;
|