@entifix/docs-engine 0.0.0-stage → 0.23.7
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/LICENSE +21 -0
- package/README.md +96 -2
- package/dist/directives.d.ts +25 -0
- package/dist/directives.d.ts.map +1 -0
- package/dist/directives.js +107 -0
- package/dist/directives.js.map +1 -0
- package/dist/errors.d.ts +15 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +13 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/links.d.ts +19 -0
- package/dist/links.d.ts.map +1 -0
- package/dist/links.js +17 -0
- package/dist/links.js.map +1 -0
- package/dist/markdown.d.ts +24 -0
- package/dist/markdown.d.ts.map +1 -0
- package/dist/markdown.js +47 -0
- package/dist/markdown.js.map +1 -0
- package/dist/references.d.ts +20 -0
- package/dist/references.d.ts.map +1 -0
- package/dist/references.js +16 -0
- package/dist/references.js.map +1 -0
- package/dist/site.d.ts +46 -0
- package/dist/site.d.ts.map +1 -0
- package/dist/site.js +90 -0
- package/dist/site.js.map +1 -0
- package/dist/sources.d.ts +65 -0
- package/dist/sources.d.ts.map +1 -0
- package/dist/sources.js +115 -0
- package/dist/sources.js.map +1 -0
- package/dist/spec-support.d.ts +6 -0
- package/dist/spec-support.d.ts.map +1 -0
- package/dist/spec-support.js +17 -0
- package/dist/spec-support.js.map +1 -0
- package/dist/ui/head.d.ts +16 -0
- package/dist/ui/head.d.ts.map +1 -0
- package/dist/ui/head.js +29 -0
- package/dist/ui/head.js.map +1 -0
- package/dist/ui/index.d.ts +13 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +9 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/layout.d.ts +15 -0
- package/dist/ui/layout.d.ts.map +1 -0
- package/dist/ui/layout.js +30 -0
- package/dist/ui/layout.js.map +1 -0
- package/dist/ui/page.d.ts +21 -0
- package/dist/ui/page.d.ts.map +1 -0
- package/dist/ui/page.js +70 -0
- package/dist/ui/page.js.map +1 -0
- package/dist/ui/pagefind.d.ts +37 -0
- package/dist/ui/pagefind.d.ts.map +1 -0
- package/dist/ui/pagefind.js +48 -0
- package/dist/ui/pagefind.js.map +1 -0
- package/dist/ui/root.d.ts +22 -0
- package/dist/ui/root.d.ts.map +1 -0
- package/dist/ui/root.js +85 -0
- package/dist/ui/root.js.map +1 -0
- package/dist/ui/scheme.d.ts +12 -0
- package/dist/ui/scheme.d.ts.map +1 -0
- package/dist/ui/scheme.js +17 -0
- package/dist/ui/scheme.js.map +1 -0
- package/dist/ui/search-dialog.d.ts +15 -0
- package/dist/ui/search-dialog.d.ts.map +1 -0
- package/dist/ui/search-dialog.js +60 -0
- package/dist/ui/search-dialog.js.map +1 -0
- package/dist/ui/skip-link.d.ts +7 -0
- package/dist/ui/skip-link.d.ts.map +1 -0
- package/dist/ui/skip-link.js +17 -0
- package/dist/ui/skip-link.js.map +1 -0
- package/dist/ui/translations.d.ts +12 -0
- package/dist/ui/translations.d.ts.map +1 -0
- package/dist/ui/translations.js +48 -0
- package/dist/ui/translations.js.map +1 -0
- package/package.json +95 -3
- package/src/ui/docs.css +154 -0
package/src/ui/docs.css
ADDED
|
@@ -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
|
+
}
|