neba 1.7.0 → 1.8.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 +7 -7
- package/dist/components/app-logo/AppLogo.d.ts +148 -0
- package/dist/components/app-logo/AppLogo.js +1 -0
- package/dist/components/app-logo/index.d.ts +2 -0
- package/dist/components/app-logo/index.js +1 -0
- package/dist/components/avatar/Avatar.js +1 -1
- package/dist/components/bottom-navigation/BottomNavigation.js +1 -1
- package/dist/components/code-block/CodeBlock.d.ts +170 -0
- package/dist/components/code-block/CodeBlock.js +1 -0
- package/dist/components/code-block/index.d.ts +2 -0
- package/dist/components/code-block/index.js +1 -0
- package/dist/components/color-picker/ColorPicker.d.ts +1 -1
- package/dist/components/drawer/Drawer.js +1 -1
- package/dist/components/footer/Footer.d.ts +85 -0
- package/dist/components/footer/Footer.js +1 -0
- package/dist/components/footer/index.d.ts +2 -0
- package/dist/components/footer/index.js +1 -0
- package/dist/components/header/Header.d.ts +114 -0
- package/dist/components/header/Header.js +1 -0
- package/dist/components/header/index.d.ts +2 -0
- package/dist/components/header/index.js +1 -0
- package/dist/components/how-to-steps/HowToSteps.d.ts +167 -0
- package/dist/components/how-to-steps/HowToSteps.js +1 -0
- package/dist/components/how-to-steps/index.d.ts +2 -0
- package/dist/components/how-to-steps/index.js +1 -0
- package/dist/components/page-layout/PageLayout.d.ts +144 -0
- package/dist/components/page-layout/PageLayout.js +1 -0
- package/dist/components/page-layout/index.d.ts +2 -0
- package/dist/components/page-layout/index.js +1 -0
- package/dist/components/sidebar/Sidebar.d.ts +144 -0
- package/dist/components/sidebar/Sidebar.js +1 -0
- package/dist/components/sidebar/SidebarTrigger.d.ts +36 -0
- package/dist/components/sidebar/SidebarTrigger.js +1 -0
- package/dist/components/sidebar/index.d.ts +4 -0
- package/dist/components/sidebar/index.js +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +1 -1
- package/dist/internal/bottom-navigation.d.ts +4 -3
- package/dist/internal/chart.d.ts +3 -2
- package/dist/internal/color.d.ts +2 -2
- package/dist/internal/date.d.ts +3 -4
- package/dist/internal/highlight.d.ts +97 -0
- package/dist/internal/highlight.js +1 -0
- package/dist/internal/i18n.d.ts +85 -0
- package/dist/internal/i18n.js +1 -1
- package/dist/internal/icons.d.ts +20 -0
- package/dist/internal/icons.js +1 -1
- package/dist/internal/initials.d.ts +24 -0
- package/dist/internal/initials.js +1 -0
- package/dist/internal/page-layout.d.ts +143 -0
- package/dist/internal/page-layout.js +1 -0
- package/dist/internal/styles.d.ts +11 -0
- package/dist/internal/styles.js +1 -1
- package/dist/locales/ar.js +1 -1
- package/dist/locales/de.js +1 -1
- package/dist/locales/es.js +1 -1
- package/dist/locales/fr.js +1 -1
- package/dist/locales/hi.js +1 -1
- package/dist/locales/id.js +1 -1
- package/dist/locales/it.js +1 -1
- package/dist/locales/ja.js +1 -1
- package/dist/locales/ko.js +1 -1
- package/dist/locales/nl.js +1 -1
- package/dist/locales/pl.js +1 -1
- package/dist/locales/pt.js +1 -1
- package/dist/locales/ru.js +1 -1
- package/dist/locales/th.js +1 -1
- package/dist/locales/tr.js +1 -1
- package/dist/locales/vi.js +1 -1
- package/dist/locales/zh-hans.js +1 -1
- package/dist/locales/zh-hant.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +473 -0
- package/package.json +8 -7
package/dist/tailwind.css
CHANGED
|
@@ -846,6 +846,479 @@
|
|
|
846
846
|
text-decoration-color: var(--n-underline-hover);
|
|
847
847
|
}
|
|
848
848
|
|
|
849
|
+
/* ---------------------------------------------------------------------------
|
|
850
|
+
* Code blocks
|
|
851
|
+
*
|
|
852
|
+
* A CodeBlock is the one surface in the library that does **not** take the
|
|
853
|
+
* page's palette. Code is read against a background that was chosen for code,
|
|
854
|
+
* and a block that turned white because the page did would throw away the only
|
|
855
|
+
* thing a reader is using to tell a keyword from a string. So the sheet carries
|
|
856
|
+
* its own slots, `theme` picks which set fills them, and `auto` is the opt-in
|
|
857
|
+
* for a block that would rather follow the page.
|
|
858
|
+
*
|
|
859
|
+
* They are custom properties on the block rather than a stylesheet per theme
|
|
860
|
+
* for `animate.ts`'s reason: nothing here is generated, the component only
|
|
861
|
+
* fills slots, and a thirteenth theme is a block of declarations rather than a
|
|
862
|
+
* second copy of the token map below. That is also why `theme` accepts any
|
|
863
|
+
* string: a consumer who writes `[data-code-theme='ours']` in their own CSS has
|
|
864
|
+
* a theme, with nothing to register and nothing to import.
|
|
865
|
+
*
|
|
866
|
+
* **Five of the slots are derived and are never written per theme.** `dim`,
|
|
867
|
+
* `rule` and `hover` are a fixed mix of the ground and the ink, and `mark` and
|
|
868
|
+
* `mark-edge` are the same for the highlighted-line background. A custom
|
|
869
|
+
* property resolves its `var()`s on the element that declares it, and every
|
|
870
|
+
* theme below declares its `fg` and `bg` on that same element — so the derived
|
|
871
|
+
* five follow whichever theme won without being restated fourteen times.
|
|
872
|
+
*
|
|
873
|
+
* The two dark palettes at the top are written twice on purpose — once for
|
|
874
|
+
* `dark`, once for `auto` inside a dark page — because a media query cannot be
|
|
875
|
+
* folded into a selector list. It is the same repetition the theme roots at the
|
|
876
|
+
* top of this file make, for the same reason.
|
|
877
|
+
*
|
|
878
|
+
* Every hue in the house themes is solved against its own background rather
|
|
879
|
+
* than flipped: the light set runs dark and saturated on near-white, the dark
|
|
880
|
+
* set light and desaturated on near-black. The pairs that have to stay apart
|
|
881
|
+
* are the ones that sit next to each other in real code — a string beside a
|
|
882
|
+
* number, a type beside a function name. The eight named themes below them are
|
|
883
|
+
* ports and keep their own published values, because a Dracula that had been
|
|
884
|
+
* re-solved would not be Dracula.
|
|
885
|
+
* ------------------------------------------------------------------------- */
|
|
886
|
+
|
|
887
|
+
.neba-code {
|
|
888
|
+
/* The light set, which is also what `auto` and `light` start from. */
|
|
889
|
+
--n-code-bg: oklch(98.4% 0.003 262);
|
|
890
|
+
--n-code-fg: oklch(30% 0.016 262);
|
|
891
|
+
|
|
892
|
+
--n-code-comment: oklch(58% 0.022 262);
|
|
893
|
+
--n-code-keyword: oklch(48% 0.19 322);
|
|
894
|
+
--n-code-string: oklch(46% 0.12 148);
|
|
895
|
+
--n-code-number: oklch(50% 0.14 48);
|
|
896
|
+
--n-code-function: oklch(48% 0.17 264);
|
|
897
|
+
--n-code-type: oklch(45% 0.1 214);
|
|
898
|
+
--n-code-variable: oklch(45% 0.12 28);
|
|
899
|
+
--n-code-tag: oklch(48% 0.18 22);
|
|
900
|
+
--n-code-attr: oklch(47% 0.13 82);
|
|
901
|
+
--n-code-meta: oklch(52% 0.05 262);
|
|
902
|
+
--n-code-add: oklch(45% 0.14 152);
|
|
903
|
+
--n-code-del: oklch(48% 0.18 25);
|
|
904
|
+
|
|
905
|
+
/* The derived five. Declared once here and never in a theme: they are a mix
|
|
906
|
+
of that theme's own ground and ink, which resolves on this element. */
|
|
907
|
+
--n-code-dim: color-mix(in oklab, var(--n-code-fg) 58%, var(--n-code-bg));
|
|
908
|
+
--n-code-rule: color-mix(in oklab, var(--n-code-fg) 14%, transparent);
|
|
909
|
+
--n-code-hover: color-mix(in oklab, var(--n-code-fg) 9%, transparent);
|
|
910
|
+
|
|
911
|
+
/* A marked line is neutral rather than dyed with the page's accent family:
|
|
912
|
+
the block has deliberately refused the page's palette, and a primary-blue
|
|
913
|
+
wash over Dracula would be the one colour on it nobody chose. Mixed from
|
|
914
|
+
the theme's own ink, it is legible on all twelve. */
|
|
915
|
+
--n-code-mark: color-mix(in oklab, var(--n-code-fg) 10%, transparent);
|
|
916
|
+
--n-code-mark-edge: color-mix(in oklab, var(--n-code-fg) 45%, transparent);
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
.neba-code[data-code-theme='dark'],
|
|
920
|
+
:where(.dark, [data-theme='dark']) .neba-code[data-code-theme='auto'] {
|
|
921
|
+
--n-code-bg: oklch(19.5% 0.014 262);
|
|
922
|
+
--n-code-fg: oklch(90% 0.012 262);
|
|
923
|
+
|
|
924
|
+
--n-code-comment: oklch(60% 0.024 262);
|
|
925
|
+
--n-code-keyword: oklch(76% 0.13 324);
|
|
926
|
+
--n-code-string: oklch(80% 0.13 148);
|
|
927
|
+
--n-code-number: oklch(81% 0.12 62);
|
|
928
|
+
--n-code-function: oklch(78% 0.12 258);
|
|
929
|
+
--n-code-type: oklch(82% 0.1 210);
|
|
930
|
+
--n-code-variable: oklch(82% 0.09 32);
|
|
931
|
+
--n-code-tag: oklch(77% 0.13 22);
|
|
932
|
+
--n-code-attr: oklch(85% 0.11 92);
|
|
933
|
+
--n-code-meta: oklch(70% 0.05 262);
|
|
934
|
+
--n-code-add: oklch(80% 0.14 152);
|
|
935
|
+
--n-code-del: oklch(75% 0.15 25);
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
@media (prefers-color-scheme: dark) {
|
|
939
|
+
:root:not([data-theme='light']) .neba-code[data-code-theme='auto'] {
|
|
940
|
+
--n-code-bg: oklch(19.5% 0.014 262);
|
|
941
|
+
--n-code-fg: oklch(90% 0.012 262);
|
|
942
|
+
|
|
943
|
+
--n-code-comment: oklch(60% 0.024 262);
|
|
944
|
+
--n-code-keyword: oklch(76% 0.13 324);
|
|
945
|
+
--n-code-string: oklch(80% 0.13 148);
|
|
946
|
+
--n-code-number: oklch(81% 0.12 62);
|
|
947
|
+
--n-code-function: oklch(78% 0.12 258);
|
|
948
|
+
--n-code-type: oklch(82% 0.1 210);
|
|
949
|
+
--n-code-variable: oklch(82% 0.09 32);
|
|
950
|
+
--n-code-tag: oklch(77% 0.13 22);
|
|
951
|
+
--n-code-attr: oklch(85% 0.11 92);
|
|
952
|
+
--n-code-meta: oklch(70% 0.05 262);
|
|
953
|
+
--n-code-add: oklch(80% 0.14 152);
|
|
954
|
+
--n-code-del: oklch(75% 0.15 25);
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
/*
|
|
959
|
+
* `mono` is the one theme that follows the page, and the only one with no hue
|
|
960
|
+
* in it at all: the structure is carried by weight and by how far a run is
|
|
961
|
+
* muted. It is what a block printed on paper, or read by someone who cannot
|
|
962
|
+
* separate the hues above, is left with — so it has to stay legible on its own
|
|
963
|
+
* rather than being a degraded copy of a colour theme.
|
|
964
|
+
*/
|
|
965
|
+
.neba-code[data-code-theme='mono'] {
|
|
966
|
+
--n-code-bg: color-mix(in oklab, var(--neba-fg) 4%, var(--neba-surface));
|
|
967
|
+
--n-code-fg: var(--neba-fg);
|
|
968
|
+
|
|
969
|
+
--n-code-comment: var(--neba-muted-fg);
|
|
970
|
+
--n-code-keyword: var(--neba-fg);
|
|
971
|
+
--n-code-string: var(--neba-muted-fg);
|
|
972
|
+
--n-code-number: var(--neba-muted-fg);
|
|
973
|
+
--n-code-function: var(--neba-fg);
|
|
974
|
+
--n-code-type: var(--neba-fg);
|
|
975
|
+
--n-code-variable: var(--neba-fg);
|
|
976
|
+
--n-code-tag: var(--neba-fg);
|
|
977
|
+
--n-code-attr: var(--neba-muted-fg);
|
|
978
|
+
--n-code-meta: var(--neba-muted-fg);
|
|
979
|
+
--n-code-add: var(--neba-fg);
|
|
980
|
+
--n-code-del: var(--neba-muted-fg);
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
.neba-code[data-code-theme='mono'] .hljs-keyword,
|
|
984
|
+
.neba-code[data-code-theme='mono'] .hljs-selector-tag,
|
|
985
|
+
.neba-code[data-code-theme='mono'] .hljs-title,
|
|
986
|
+
.neba-code[data-code-theme='mono'] .hljs-tag,
|
|
987
|
+
.neba-code[data-code-theme='mono'] .hljs-type,
|
|
988
|
+
.neba-code[data-code-theme='mono'] .hljs-built_in {
|
|
989
|
+
font-weight: 600;
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
/*
|
|
993
|
+
* The eight ports.
|
|
994
|
+
*
|
|
995
|
+
* They exist because a code block is the one component whose colours a reader
|
|
996
|
+
* already has an opinion about: someone who writes in One Dark all day reads a
|
|
997
|
+
* Dracula block as a different product's documentation. The published values
|
|
998
|
+
* are kept exactly, in the hex they were published in, rather than re-solved
|
|
999
|
+
* into the oklch the rest of this file uses — a Dracula that had been corrected
|
|
1000
|
+
* against Neba's own ground would be a theme nobody recognises and nobody
|
|
1001
|
+
* asked for.
|
|
1002
|
+
*
|
|
1003
|
+
* Six dark and two light, which is the ratio of how they are used. Each is
|
|
1004
|
+
* fourteen declarations, because the muted, the rule, the hover and the two
|
|
1005
|
+
* marked-line slots are all derived from the two at the top of it.
|
|
1006
|
+
*/
|
|
1007
|
+
.neba-code[data-code-theme='one-dark'] {
|
|
1008
|
+
--n-code-bg: #282c34;
|
|
1009
|
+
--n-code-fg: #abb2bf;
|
|
1010
|
+
|
|
1011
|
+
--n-code-comment: #5c6370;
|
|
1012
|
+
--n-code-keyword: #c678dd;
|
|
1013
|
+
--n-code-string: #98c379;
|
|
1014
|
+
--n-code-number: #d19a66;
|
|
1015
|
+
--n-code-function: #61afef;
|
|
1016
|
+
--n-code-type: #e5c07b;
|
|
1017
|
+
--n-code-variable: #e06c75;
|
|
1018
|
+
--n-code-tag: #e06c75;
|
|
1019
|
+
--n-code-attr: #d19a66;
|
|
1020
|
+
--n-code-meta: #56b6c2;
|
|
1021
|
+
--n-code-add: #98c379;
|
|
1022
|
+
--n-code-del: #e06c75;
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
.neba-code[data-code-theme='dracula'] {
|
|
1026
|
+
--n-code-bg: #282a36;
|
|
1027
|
+
--n-code-fg: #f8f8f2;
|
|
1028
|
+
|
|
1029
|
+
--n-code-comment: #6272a4;
|
|
1030
|
+
--n-code-keyword: #ff79c6;
|
|
1031
|
+
--n-code-string: #f1fa8c;
|
|
1032
|
+
--n-code-number: #bd93f9;
|
|
1033
|
+
--n-code-function: #50fa7b;
|
|
1034
|
+
--n-code-type: #8be9fd;
|
|
1035
|
+
--n-code-variable: #f8f8f2;
|
|
1036
|
+
--n-code-tag: #ff79c6;
|
|
1037
|
+
--n-code-attr: #50fa7b;
|
|
1038
|
+
--n-code-meta: #6272a4;
|
|
1039
|
+
--n-code-add: #50fa7b;
|
|
1040
|
+
--n-code-del: #ff5555;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
.neba-code[data-code-theme='monokai'] {
|
|
1044
|
+
--n-code-bg: #272822;
|
|
1045
|
+
--n-code-fg: #f8f8f2;
|
|
1046
|
+
|
|
1047
|
+
--n-code-comment: #75715e;
|
|
1048
|
+
--n-code-keyword: #f92672;
|
|
1049
|
+
--n-code-string: #e6db74;
|
|
1050
|
+
--n-code-number: #ae81ff;
|
|
1051
|
+
--n-code-function: #a6e22e;
|
|
1052
|
+
--n-code-type: #66d9ef;
|
|
1053
|
+
--n-code-variable: #f8f8f2;
|
|
1054
|
+
--n-code-tag: #f92672;
|
|
1055
|
+
--n-code-attr: #a6e22e;
|
|
1056
|
+
--n-code-meta: #75715e;
|
|
1057
|
+
--n-code-add: #a6e22e;
|
|
1058
|
+
--n-code-del: #f92672;
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
.neba-code[data-code-theme='nord'] {
|
|
1062
|
+
--n-code-bg: #2e3440;
|
|
1063
|
+
--n-code-fg: #d8dee9;
|
|
1064
|
+
|
|
1065
|
+
--n-code-comment: #616e88;
|
|
1066
|
+
--n-code-keyword: #81a1c1;
|
|
1067
|
+
--n-code-string: #a3be8c;
|
|
1068
|
+
--n-code-number: #b48ead;
|
|
1069
|
+
--n-code-function: #88c0d0;
|
|
1070
|
+
--n-code-type: #8fbcbb;
|
|
1071
|
+
--n-code-variable: #d8dee9;
|
|
1072
|
+
--n-code-tag: #81a1c1;
|
|
1073
|
+
--n-code-attr: #8fbcbb;
|
|
1074
|
+
--n-code-meta: #5e81ac;
|
|
1075
|
+
--n-code-add: #a3be8c;
|
|
1076
|
+
--n-code-del: #bf616a;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
.neba-code[data-code-theme='night-owl'] {
|
|
1080
|
+
--n-code-bg: #011627;
|
|
1081
|
+
--n-code-fg: #d6deeb;
|
|
1082
|
+
|
|
1083
|
+
--n-code-comment: #637777;
|
|
1084
|
+
--n-code-keyword: #c792ea;
|
|
1085
|
+
--n-code-string: #ecc48d;
|
|
1086
|
+
--n-code-number: #f78c6c;
|
|
1087
|
+
--n-code-function: #82aaff;
|
|
1088
|
+
--n-code-type: #ffcb8b;
|
|
1089
|
+
--n-code-variable: #addb67;
|
|
1090
|
+
--n-code-tag: #7fdbca;
|
|
1091
|
+
--n-code-attr: #addb67;
|
|
1092
|
+
--n-code-meta: #82aaff;
|
|
1093
|
+
--n-code-add: #addb67;
|
|
1094
|
+
--n-code-del: #ef5350;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
.neba-code[data-code-theme='gruvbox'] {
|
|
1098
|
+
--n-code-bg: #282828;
|
|
1099
|
+
--n-code-fg: #ebdbb2;
|
|
1100
|
+
|
|
1101
|
+
--n-code-comment: #928374;
|
|
1102
|
+
--n-code-keyword: #fb4934;
|
|
1103
|
+
--n-code-string: #b8bb26;
|
|
1104
|
+
--n-code-number: #d3869b;
|
|
1105
|
+
--n-code-function: #b8bb26;
|
|
1106
|
+
--n-code-type: #fabd2f;
|
|
1107
|
+
--n-code-variable: #83a598;
|
|
1108
|
+
--n-code-tag: #8ec07c;
|
|
1109
|
+
--n-code-attr: #fabd2f;
|
|
1110
|
+
--n-code-meta: #928374;
|
|
1111
|
+
--n-code-add: #b8bb26;
|
|
1112
|
+
--n-code-del: #fb4934;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
.neba-code[data-code-theme='github'] {
|
|
1116
|
+
--n-code-bg: #ffffff;
|
|
1117
|
+
--n-code-fg: #24292f;
|
|
1118
|
+
|
|
1119
|
+
--n-code-comment: #6e7781;
|
|
1120
|
+
--n-code-keyword: #cf222e;
|
|
1121
|
+
--n-code-string: #0a3069;
|
|
1122
|
+
--n-code-number: #0550ae;
|
|
1123
|
+
--n-code-function: #8250df;
|
|
1124
|
+
--n-code-type: #953800;
|
|
1125
|
+
--n-code-variable: #953800;
|
|
1126
|
+
--n-code-tag: #116329;
|
|
1127
|
+
--n-code-attr: #0550ae;
|
|
1128
|
+
--n-code-meta: #6e7781;
|
|
1129
|
+
--n-code-add: #116329;
|
|
1130
|
+
--n-code-del: #82071e;
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
.neba-code[data-code-theme='solarized-light'] {
|
|
1134
|
+
--n-code-bg: #fdf6e3;
|
|
1135
|
+
--n-code-fg: #657b83;
|
|
1136
|
+
|
|
1137
|
+
--n-code-comment: #93a1a1;
|
|
1138
|
+
--n-code-keyword: #859900;
|
|
1139
|
+
--n-code-string: #2aa198;
|
|
1140
|
+
--n-code-number: #d33682;
|
|
1141
|
+
--n-code-function: #268bd2;
|
|
1142
|
+
--n-code-type: #b58900;
|
|
1143
|
+
--n-code-variable: #268bd2;
|
|
1144
|
+
--n-code-tag: #268bd2;
|
|
1145
|
+
--n-code-attr: #b58900;
|
|
1146
|
+
--n-code-meta: #cb4b16;
|
|
1147
|
+
--n-code-add: #859900;
|
|
1148
|
+
--n-code-del: #dc322f;
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
/*
|
|
1152
|
+
* A line, and the two things in front of it that are not code.
|
|
1153
|
+
*
|
|
1154
|
+
* The number and the prompt are generated content off a `data-*` attribute, not
|
|
1155
|
+
* text nodes, and that is the whole point: a `$` a reader drags across and
|
|
1156
|
+
* pastes into their shell is a `$` their shell chokes on. Generated content
|
|
1157
|
+
* cannot be selected, cannot be found by find-in-page and never reaches the
|
|
1158
|
+
* clipboard — `user-select: none` is only *usually* true of all three. The
|
|
1159
|
+
* `order` is what lets one pseudo-element sit in front of the other and both in
|
|
1160
|
+
* front of the code, since `::after` would otherwise draw last.
|
|
1161
|
+
*
|
|
1162
|
+
* `min-height` keeps a blank line a line high. A flex row with nothing in it is
|
|
1163
|
+
* zero pixels tall, and a code block that closed up its own paragraph breaks
|
|
1164
|
+
* would be reflowing the reader's file.
|
|
1165
|
+
*/
|
|
1166
|
+
.neba-code-line {
|
|
1167
|
+
display: flex;
|
|
1168
|
+
min-height: 1.5em;
|
|
1169
|
+
min-height: 1lh;
|
|
1170
|
+
/*
|
|
1171
|
+
* Transparent on every line, coloured on a marked one. A border rather than
|
|
1172
|
+
* an inset `box-shadow` because `box-shadow` has no logical form and this one
|
|
1173
|
+
* has to sit on the *start* edge in both writing directions; drawn on all of
|
|
1174
|
+
* them so marking a line does not shift its text two pixels sideways.
|
|
1175
|
+
*/
|
|
1176
|
+
border-inline-start: 2px solid transparent;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
/*
|
|
1180
|
+
* A marked line, and the reason its horizontal padding is on the line rather
|
|
1181
|
+
* than on the box that scrolls it.
|
|
1182
|
+
*
|
|
1183
|
+
* A highlight that stopped at the padding would be a stripe floating inside the
|
|
1184
|
+
* block instead of a marked row. With the padding here the line box *is* the
|
|
1185
|
+
* row, so the tint reaches both edges — and because the lines sit in a
|
|
1186
|
+
* `w-max min-w-full` block, every one of them reaches the same edge whether the
|
|
1187
|
+
* code is narrower than the block or scrolled sideways within it.
|
|
1188
|
+
*/
|
|
1189
|
+
.neba-code-line[data-mark] {
|
|
1190
|
+
background: var(--n-code-mark);
|
|
1191
|
+
border-inline-start-color: var(--n-code-mark-edge);
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
.neba-code-line[data-line]::before {
|
|
1195
|
+
content: attr(data-line);
|
|
1196
|
+
order: 0;
|
|
1197
|
+
flex: none;
|
|
1198
|
+
width: var(--n-code-gutter, 2ch);
|
|
1199
|
+
margin-inline-end: 1.25em;
|
|
1200
|
+
text-align: end;
|
|
1201
|
+
color: var(--n-code-dim);
|
|
1202
|
+
-webkit-user-select: none;
|
|
1203
|
+
user-select: none;
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
.neba-code-line[data-prompt]::after {
|
|
1207
|
+
content: attr(data-prompt);
|
|
1208
|
+
order: 1;
|
|
1209
|
+
flex: none;
|
|
1210
|
+
margin-inline-end: 0.75em;
|
|
1211
|
+
color: var(--n-code-dim);
|
|
1212
|
+
-webkit-user-select: none;
|
|
1213
|
+
user-select: none;
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
.neba-code-line > code {
|
|
1217
|
+
order: 2;
|
|
1218
|
+
min-width: 0;
|
|
1219
|
+
font: inherit;
|
|
1220
|
+
background: none;
|
|
1221
|
+
padding: 0;
|
|
1222
|
+
white-space: pre;
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
.neba-code[data-code-wrap='true'] .neba-code-line > code {
|
|
1226
|
+
white-space: pre-wrap;
|
|
1227
|
+
overflow-wrap: anywhere;
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
/*
|
|
1231
|
+
* highlight.js's scopes, mapped onto the sixteen slots.
|
|
1232
|
+
*
|
|
1233
|
+
* Grouped by what a run *is* rather than by what highlight.js calls it, because
|
|
1234
|
+
* the names are the union of a hundred and ninety grammars and half of them are
|
|
1235
|
+
* one language's word for another language's idea — `selector-tag` and `tag`
|
|
1236
|
+
* and `name` are all "the thing being declared". The point of the mapping is
|
|
1237
|
+
* that the same idea gets the same colour whatever file it appears in.
|
|
1238
|
+
*/
|
|
1239
|
+
.neba-code .hljs-comment,
|
|
1240
|
+
.neba-code .hljs-quote {
|
|
1241
|
+
color: var(--n-code-comment);
|
|
1242
|
+
font-style: italic;
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
.neba-code .hljs-keyword,
|
|
1246
|
+
.neba-code .hljs-literal,
|
|
1247
|
+
.neba-code .hljs-selector-tag,
|
|
1248
|
+
.neba-code .hljs-operator,
|
|
1249
|
+
.neba-code .hljs-doctag,
|
|
1250
|
+
.neba-code .hljs-formula {
|
|
1251
|
+
color: var(--n-code-keyword);
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
.neba-code .hljs-string,
|
|
1255
|
+
.neba-code .hljs-regexp,
|
|
1256
|
+
.neba-code .hljs-char,
|
|
1257
|
+
.neba-code .hljs-link {
|
|
1258
|
+
color: var(--n-code-string);
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
.neba-code .hljs-number,
|
|
1262
|
+
.neba-code .hljs-symbol,
|
|
1263
|
+
.neba-code .hljs-bullet {
|
|
1264
|
+
color: var(--n-code-number);
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
.neba-code .hljs-title,
|
|
1268
|
+
.neba-code .hljs-section,
|
|
1269
|
+
.neba-code .hljs-name,
|
|
1270
|
+
.neba-code .hljs-selector-id,
|
|
1271
|
+
.neba-code .hljs-selector-class {
|
|
1272
|
+
color: var(--n-code-function);
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
.neba-code .hljs-type,
|
|
1276
|
+
.neba-code .hljs-built_in,
|
|
1277
|
+
.neba-code .hljs-class {
|
|
1278
|
+
color: var(--n-code-type);
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
.neba-code .hljs-variable,
|
|
1282
|
+
.neba-code .hljs-template-variable,
|
|
1283
|
+
.neba-code .hljs-params,
|
|
1284
|
+
.neba-code .hljs-subst {
|
|
1285
|
+
color: var(--n-code-variable);
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
.neba-code .hljs-tag,
|
|
1289
|
+
.neba-code .hljs-template-tag {
|
|
1290
|
+
color: var(--n-code-tag);
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
.neba-code .hljs-attr,
|
|
1294
|
+
.neba-code .hljs-attribute,
|
|
1295
|
+
.neba-code .hljs-property,
|
|
1296
|
+
.neba-code .hljs-selector-attr,
|
|
1297
|
+
.neba-code .hljs-selector-pseudo {
|
|
1298
|
+
color: var(--n-code-attr);
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
.neba-code .hljs-meta,
|
|
1302
|
+
.neba-code .hljs-punctuation {
|
|
1303
|
+
color: var(--n-code-meta);
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
.neba-code .hljs-addition {
|
|
1307
|
+
color: var(--n-code-add);
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1310
|
+
.neba-code .hljs-deletion {
|
|
1311
|
+
color: var(--n-code-del);
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
.neba-code .hljs-emphasis {
|
|
1315
|
+
font-style: italic;
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
.neba-code .hljs-strong {
|
|
1319
|
+
font-weight: 700;
|
|
1320
|
+
}
|
|
1321
|
+
|
|
849
1322
|
/* ---------------------------------------------------------------------------
|
|
850
1323
|
* Grid
|
|
851
1324
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neba",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "A comprehensive React UI component library — buttons, fields, menus, dialogs, tables and much more — accessible and themeable, sharing one prop vocabulary and a translucent acrylic design language. ESM only, types included, dark mode built in.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -133,11 +133,11 @@
|
|
|
133
133
|
"devDependencies": {
|
|
134
134
|
"@eslint/js": "^9.39.1",
|
|
135
135
|
"@tailwindcss/postcss": "^4.3.3",
|
|
136
|
-
"@types/node": "^26.
|
|
136
|
+
"@types/node": "^26.4.0",
|
|
137
137
|
"@types/react": "^19.2.18",
|
|
138
138
|
"@types/react-dom": "^19.2.5",
|
|
139
|
-
"@typescript-eslint/parser": "^8.
|
|
140
|
-
"@vitejs/plugin-react": "^6.1.
|
|
139
|
+
"@typescript-eslint/parser": "^8.68.0",
|
|
140
|
+
"@vitejs/plugin-react": "^6.1.1",
|
|
141
141
|
"@vitest/browser": "^4.1.11",
|
|
142
142
|
"@vitest/browser-playwright": "^4.1.11",
|
|
143
143
|
"eslint": "^9.39.1",
|
|
@@ -156,16 +156,17 @@
|
|
|
156
156
|
"terser-glob": "^1.2.1",
|
|
157
157
|
"tsx": "^4.23.12",
|
|
158
158
|
"typescript": "^6.0.3",
|
|
159
|
-
"typescript-eslint": "^8.
|
|
159
|
+
"typescript-eslint": "^8.68.0",
|
|
160
160
|
"vite": "^8.2.2",
|
|
161
161
|
"vitepress": "^1.6.4",
|
|
162
|
-
"vitepress-i18n": "^1.
|
|
162
|
+
"vitepress-i18n": "^1.4.0",
|
|
163
163
|
"vitepress-sidebar": "^1.39.0",
|
|
164
164
|
"vitest": "^4.1.11",
|
|
165
165
|
"vitest-browser-react": "^2.2.0"
|
|
166
166
|
},
|
|
167
167
|
"dependencies": {
|
|
168
|
-
"@base-ui/react": "^1.7.0"
|
|
168
|
+
"@base-ui/react": "^1.7.0",
|
|
169
|
+
"highlight.js": "^11.12.0"
|
|
169
170
|
},
|
|
170
171
|
"peerDependencies": {
|
|
171
172
|
"@types/react": "^18.0.0 || ^19.0.0",
|