@entifix/docs-engine 0.0.0-bootstrap.0 → 0.23.6

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.
Files changed (80) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +95 -1
  3. package/dist/directives.d.ts +25 -0
  4. package/dist/directives.d.ts.map +1 -0
  5. package/dist/directives.js +107 -0
  6. package/dist/directives.js.map +1 -0
  7. package/dist/errors.d.ts +15 -0
  8. package/dist/errors.d.ts.map +1 -0
  9. package/dist/errors.js +13 -0
  10. package/dist/errors.js.map +1 -0
  11. package/dist/index.d.ts +14 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +9 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/links.d.ts +19 -0
  16. package/dist/links.d.ts.map +1 -0
  17. package/dist/links.js +17 -0
  18. package/dist/links.js.map +1 -0
  19. package/dist/markdown.d.ts +24 -0
  20. package/dist/markdown.d.ts.map +1 -0
  21. package/dist/markdown.js +47 -0
  22. package/dist/markdown.js.map +1 -0
  23. package/dist/references.d.ts +20 -0
  24. package/dist/references.d.ts.map +1 -0
  25. package/dist/references.js +16 -0
  26. package/dist/references.js.map +1 -0
  27. package/dist/site.d.ts +46 -0
  28. package/dist/site.d.ts.map +1 -0
  29. package/dist/site.js +90 -0
  30. package/dist/site.js.map +1 -0
  31. package/dist/sources.d.ts +65 -0
  32. package/dist/sources.d.ts.map +1 -0
  33. package/dist/sources.js +115 -0
  34. package/dist/sources.js.map +1 -0
  35. package/dist/spec-support.d.ts +6 -0
  36. package/dist/spec-support.d.ts.map +1 -0
  37. package/dist/spec-support.js +17 -0
  38. package/dist/spec-support.js.map +1 -0
  39. package/dist/ui/head.d.ts +16 -0
  40. package/dist/ui/head.d.ts.map +1 -0
  41. package/dist/ui/head.js +29 -0
  42. package/dist/ui/head.js.map +1 -0
  43. package/dist/ui/index.d.ts +13 -0
  44. package/dist/ui/index.d.ts.map +1 -0
  45. package/dist/ui/index.js +9 -0
  46. package/dist/ui/index.js.map +1 -0
  47. package/dist/ui/layout.d.ts +15 -0
  48. package/dist/ui/layout.d.ts.map +1 -0
  49. package/dist/ui/layout.js +30 -0
  50. package/dist/ui/layout.js.map +1 -0
  51. package/dist/ui/page.d.ts +21 -0
  52. package/dist/ui/page.d.ts.map +1 -0
  53. package/dist/ui/page.js +70 -0
  54. package/dist/ui/page.js.map +1 -0
  55. package/dist/ui/pagefind.d.ts +37 -0
  56. package/dist/ui/pagefind.d.ts.map +1 -0
  57. package/dist/ui/pagefind.js +48 -0
  58. package/dist/ui/pagefind.js.map +1 -0
  59. package/dist/ui/root.d.ts +22 -0
  60. package/dist/ui/root.d.ts.map +1 -0
  61. package/dist/ui/root.js +85 -0
  62. package/dist/ui/root.js.map +1 -0
  63. package/dist/ui/scheme.d.ts +12 -0
  64. package/dist/ui/scheme.d.ts.map +1 -0
  65. package/dist/ui/scheme.js +17 -0
  66. package/dist/ui/scheme.js.map +1 -0
  67. package/dist/ui/search-dialog.d.ts +15 -0
  68. package/dist/ui/search-dialog.d.ts.map +1 -0
  69. package/dist/ui/search-dialog.js +60 -0
  70. package/dist/ui/search-dialog.js.map +1 -0
  71. package/dist/ui/skip-link.d.ts +7 -0
  72. package/dist/ui/skip-link.d.ts.map +1 -0
  73. package/dist/ui/skip-link.js +17 -0
  74. package/dist/ui/skip-link.js.map +1 -0
  75. package/dist/ui/translations.d.ts +12 -0
  76. package/dist/ui/translations.d.ts.map +1 -0
  77. package/dist/ui/translations.js +48 -0
  78. package/dist/ui/translations.js.map +1 -0
  79. package/package.json +87 -3
  80. package/src/ui/docs.css +154 -0
@@ -0,0 +1,154 @@
1
+ /*
2
+ * @entifix/docs-engine — fumadocs-ui under entifix's tokens (ADR 0031 §4).
3
+ *
4
+ * Import it after tailwindcss and @entifix/style's tokens and presets, from the
5
+ * host's global stylesheet, and point a `@source` at fumadocs-ui's `dist` and
6
+ * at this package's, so Tailwind emits the utilities their components use.
7
+ *
8
+ * Only fumadocs' `preset.css` is imported: `neutral.css` and `style.css` declare
9
+ * fumadocs' own grey palette, which would be a second set of colours.
10
+ */
11
+ @import 'fumadocs-ui/css/preset.css';
12
+
13
+ /*
14
+ * One owner of dark mode: `data-theme`. A palette the host declares dark sets
15
+ * `data-scheme="dark"`, and fumadocs' `dark:` follows that attribute instead of
16
+ * next-themes' `.dark` class.
17
+ */
18
+ @custom-variant dark (&:where([data-scheme='dark'], [data-scheme='dark'] *));
19
+
20
+ @theme inline {
21
+ --color-fd-background: var(--color-surface);
22
+ --color-fd-foreground: var(--color-content);
23
+ --color-fd-muted: var(--color-surface-elevated);
24
+ --color-fd-muted-foreground: var(--color-content-muted);
25
+ --color-fd-popover: var(--color-surface-elevated);
26
+ --color-fd-popover-foreground: var(--color-content);
27
+ --color-fd-card: var(--color-surface-elevated);
28
+ --color-fd-card-foreground: var(--color-content);
29
+ --color-fd-secondary: var(--color-surface-elevated);
30
+ --color-fd-secondary-foreground: var(--color-content);
31
+ --color-fd-accent: color-mix(in srgb, var(--color-primary) 14%, transparent);
32
+ --color-fd-accent-foreground: var(--color-content);
33
+ /* Decorative only: dividers and card edges. Controls are drawn below. */
34
+ --color-fd-border: var(--color-border);
35
+ /*
36
+ * Primary text on a primary tint is not a pair in the token contract's table
37
+ * (entifix ADR 0025), and measured 4.09–4.36:1 in the spike. Mixed toward the
38
+ * content colour it clears 4.5:1 on both palettes.
39
+ */
40
+ --color-fd-primary: color-mix(
41
+ in srgb,
42
+ var(--color-primary) 75%,
43
+ var(--color-content)
44
+ );
45
+ --color-fd-primary-foreground: var(--color-primary-content);
46
+ --color-fd-ring: var(--color-focus-ring);
47
+ --color-fd-overlay: var(--color-scrim);
48
+ --color-fd-info: var(--color-info);
49
+ --color-fd-warning: var(--color-warning);
50
+ --color-fd-error: var(--color-danger);
51
+ --color-fd-success: var(--color-success);
52
+ --color-fd-idea: var(--color-warning);
53
+ --color-fd-diff-add: color-mix(
54
+ in srgb,
55
+ var(--color-success) 15%,
56
+ transparent
57
+ );
58
+ --color-fd-diff-add-symbol: var(--color-success);
59
+ --color-fd-diff-remove: color-mix(
60
+ in srgb,
61
+ var(--color-danger) 15%,
62
+ transparent
63
+ );
64
+ --color-fd-diff-remove-symbol: var(--color-danger);
65
+ }
66
+
67
+ /* The code blocks' dark theme follows the scheme, not `.dark`. */
68
+ [data-scheme='dark'] .shiki:not(.not-fumadocs-codeblock *) code span,
69
+ [data-scheme='dark'] code.shiki:not(.not-fumadocs-code *) span {
70
+ color: var(--shiki-dark);
71
+ font-style: var(--shiki-dark-font-style);
72
+ }
73
+ [data-scheme='dark'] .shiki:not(.not-fumadocs-codeblock *) {
74
+ background-color: var(--shiki-dark-bg, var(--color-fd-card));
75
+ }
76
+
77
+ /*
78
+ * Unlayered, so it wins over every fumadocs utility whatever its specificity.
79
+ *
80
+ * One focus indicator per control (ADR 0031 §4.5): the token's ring as an
81
+ * outline on everything, and fumadocs' own box-shadow ring switched off where
82
+ * it draws one — otherwise those controls showed both.
83
+ */
84
+ :focus-visible {
85
+ outline: var(--border-width-strong, 2px) solid var(--color-focus-ring);
86
+ outline-offset: 2px;
87
+ --tw-ring-shadow: 0 0 #0000;
88
+ }
89
+
90
+ /*
91
+ * Control boundaries at 3:1 (WCAG 1.4.11, ADR 0031 §4.2). fumadocs draws its
92
+ * search triggers and inputs with the decorative border, which is not a
93
+ * control's.
94
+ */
95
+ [data-search],
96
+ [data-search-full],
97
+ #nd-docs-layout input,
98
+ #nd-docs-layout select,
99
+ #nd-docs-layout textarea,
100
+ [role='dialog'] input {
101
+ border-color: var(--color-border-control);
102
+ }
103
+ [data-search],
104
+ [data-search-full] {
105
+ border-width: 1px;
106
+ border-style: solid;
107
+ }
108
+
109
+ /*
110
+ * The sticky header must never cover what has focus, nor the heading an anchor
111
+ * jumps to (WCAG 2.4.11, ADR 0031 §4.4).
112
+ */
113
+ /*
114
+ * fumadocs scopes `--fd-header-height` to its layout element, where <html>'s
115
+ * scroll padding cannot read it, so the padding is its tallest value: the
116
+ * mobile header (3.5rem) and the table-of-contents bar under it (2.5rem), and
117
+ * a margin.
118
+ */
119
+ html {
120
+ scroll-padding-top: 7rem;
121
+ }
122
+
123
+ /* Forced colours: every control keeps an edge, and focus stays visible. */
124
+ @media (forced-colors: active) {
125
+ :focus-visible {
126
+ outline-color: Highlight;
127
+ }
128
+ [data-search],
129
+ [data-search-full],
130
+ #nd-docs-layout button {
131
+ border: 1px solid ButtonText;
132
+ }
133
+ }
134
+
135
+ /* A citation of an id: monospace, as the id is code. */
136
+ .docs-citation {
137
+ font-family: var(--font-mono, ui-monospace, monospace);
138
+ font-size: 0.9em;
139
+ }
140
+
141
+ /* A callout from `:::note`, `:::tip` or `:::warning`. */
142
+ .docs-callout {
143
+ margin-block: 1rem;
144
+ border-inline-start: 4px solid var(--color-info);
145
+ border-radius: 0.5rem;
146
+ background: var(--color-surface-elevated);
147
+ padding: 0.75rem 1rem;
148
+ }
149
+ .docs-callout-tip {
150
+ border-inline-start-color: var(--color-success);
151
+ }
152
+ .docs-callout-warning {
153
+ border-inline-start-color: var(--color-warning);
154
+ }