@nulib/canopy 0.0.0 → 2.0.1
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/bin/canopy.js +16 -0
- package/lib/AGENTS.md +107 -0
- package/lib/base-path.js +67 -0
- package/lib/build/appearance.js +76 -0
- package/lib/build/assets.js +30 -0
- package/lib/build/build.js +350 -0
- package/lib/build/dev.js +1355 -0
- package/lib/build/devtoast.config.json +6 -0
- package/lib/build/devtoast.css +14 -0
- package/lib/build/facets.js +19 -0
- package/lib/build/fonts.js +105 -0
- package/lib/build/iiif.js +2990 -0
- package/lib/build/log.js +31 -0
- package/lib/build/mdx.js +1967 -0
- package/lib/build/package-names.js +111 -0
- package/lib/build/pages.js +420 -0
- package/lib/build/rehype-task-list-labels.js +54 -0
- package/lib/build/runtimes.js +141 -0
- package/lib/build/search-index.js +55 -0
- package/lib/build/search-text.js +160 -0
- package/lib/build/search-workflow.js +72 -0
- package/lib/build/search.js +302 -0
- package/lib/build/sitemap.js +197 -0
- package/lib/build/styles.js +140 -0
- package/lib/build/theme-tokens.js +78 -0
- package/lib/build/ui-styles.js +25 -0
- package/lib/build/upgrade-notices.js +121 -0
- package/lib/cli.js +64 -0
- package/lib/common.js +580 -0
- package/lib/components/bibliography.js +197 -0
- package/lib/components/featured.js +237 -0
- package/lib/components/hero-slider-runtime.js +215 -0
- package/lib/components/image-story-runtime-entry.js +249 -0
- package/lib/components/map-runtime.js +114 -0
- package/lib/components/metadata-index.js +32 -0
- package/lib/components/nav-place.js +227 -0
- package/lib/components/navigation.js +381 -0
- package/lib/components/referenced.js +217 -0
- package/lib/components/slider-runtime-entry.js +106 -0
- package/lib/components/timeline-runtime.js +80 -0
- package/lib/components/viewer-runtime-entry.js +88 -0
- package/lib/config-path.js +78 -0
- package/lib/default-locale.js +113 -0
- package/lib/discovery/browser-loader.js +107 -0
- package/lib/discovery/browser.js +115 -0
- package/lib/discovery/config.js +25 -0
- package/lib/discovery/envelope.js +124 -0
- package/lib/discovery/export.js +226 -0
- package/lib/discovery/ingestion.js +62 -0
- package/lib/discovery/pagination.js +66 -0
- package/lib/discovery/provenance.js +79 -0
- package/lib/discovery/search.js +81 -0
- package/lib/discovery/tools.js +155 -0
- package/lib/discovery/validation.js +121 -0
- package/lib/head.js +154 -0
- package/lib/iiif/thumbnail.js +402 -0
- package/lib/index.js +9 -0
- package/lib/locale-runtime.js +69 -0
- package/lib/locales.js +203 -0
- package/lib/orchestrator.js +231 -0
- package/lib/page-context.js +24 -0
- package/lib/search/bundle.js +25 -0
- package/lib/search/data.js +202 -0
- package/lib/search/engine.js +86 -0
- package/lib/search/index-cache.js +95 -0
- package/lib/search/search-app.jsx +835 -0
- package/lib/search/search-engine-runtime.js +44 -0
- package/lib/search/search-form-runtime.js +462 -0
- package/lib/search/search.js +676 -0
- package/package.json +109 -3
- package/types/base-path.d.ts +4 -0
- package/types/orchestrator.d.ts +17 -0
- package/ui/dist/index.mjs +7358 -0
- package/ui/dist/index.mjs.map +7 -0
- package/ui/dist/server.mjs +12731 -0
- package/ui/dist/server.mjs.map +7 -0
- package/ui/fonts/OFL.txt +98 -0
- package/ui/fonts/google-sans-flex-latin-ext.woff2 +0 -0
- package/ui/fonts/google-sans-flex-latin.woff2 +0 -0
- package/ui/fonts/source-serif-4-italic-latin-ext.woff2 +0 -0
- package/ui/fonts/source-serif-4-italic-latin.woff2 +0 -0
- package/ui/fonts/source-serif-4-latin-ext.woff2 +0 -0
- package/ui/fonts/source-serif-4-latin.woff2 +0 -0
- package/ui/styles/base/_common.scss +97 -0
- package/ui/styles/base/_heading.scss +61 -0
- package/ui/styles/base/_markdown.scss +188 -0
- package/ui/styles/base/_type.scss +51 -0
- package/ui/styles/base/_utilities.scss +7 -0
- package/ui/styles/base/index.scss +5 -0
- package/ui/styles/components/_article-card.scss +108 -0
- package/ui/styles/components/_band.scss +104 -0
- package/ui/styles/components/_bibliography.scss +88 -0
- package/ui/styles/components/_buttons.scss +143 -0
- package/ui/styles/components/_card.scss +109 -0
- package/ui/styles/components/_diagram.scss +76 -0
- package/ui/styles/components/_feature.scss +66 -0
- package/ui/styles/components/_footer.scss +136 -0
- package/ui/styles/components/_gallery.scss +476 -0
- package/ui/styles/components/_image-story.scss +56 -0
- package/ui/styles/components/_interstitial-hero.scss +625 -0
- package/ui/styles/components/_layout.scss +83 -0
- package/ui/styles/components/_map.scss +296 -0
- package/ui/styles/components/_metadata-index.scss +68 -0
- package/ui/styles/components/_nav-tree.scss +80 -0
- package/ui/styles/components/_referenced-items.scss +69 -0
- package/ui/styles/components/_sub-navigation.scss +208 -0
- package/ui/styles/components/_swoosh.scss +50 -0
- package/ui/styles/components/_timeline.scss +350 -0
- package/ui/styles/components/_work.scss +71 -0
- package/ui/styles/components/header/_header.scss +294 -0
- package/ui/styles/components/header/_logo.scss +99 -0
- package/ui/styles/components/header/_navbar.scss +143 -0
- package/ui/styles/components/header/index.scss +3 -0
- package/ui/styles/components/iiif/_image.scss +32 -0
- package/ui/styles/components/iiif/_slider.scss +5 -0
- package/ui/styles/components/iiif/index.scss +2 -0
- package/ui/styles/components/index.scss +25 -0
- package/ui/styles/components/modal/_modal.scss +130 -0
- package/ui/styles/components/modal/index.scss +1 -0
- package/ui/styles/components/search/_filters.scss +259 -0
- package/ui/styles/components/search/_form.scss +187 -0
- package/ui/styles/components/search/_panel.scss +7 -0
- package/ui/styles/components/search/_results.scss +241 -0
- package/ui/styles/components/search/_tabs.scss +60 -0
- package/ui/styles/components/search/index.scss +4 -0
- package/ui/styles/index.css +5007 -0
- package/ui/styles/index.scss +11 -0
- package/ui/styles/settings/_breakpoints.scss +7 -0
- package/ui/styles/settings/_focus.scss +15 -0
- package/ui/styles/settings/_tokens.scss +170 -0
- package/ui/styles/settings/_type.scss +126 -0
- package/ui/styles/version-parity.css +116 -0
- package/ui/tailwind-canopy-iiif-plugin.js +39 -0
- package/ui/tailwind-canopy-iiif-preset.js +32 -0
- package/ui/tailwind-config.d.ts +29 -0
- package/ui/tailwind-config.js +159 -0
- package/ui/tailwind-default.config.mjs +4 -0
- package/ui/theme-color.js +130 -0
- package/ui/theme-palette.js +337 -0
- package/ui/theme.js +153 -0
- package/README.md +0 -3
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
@use "../buttons" as buttons;
|
|
2
|
+
@use "../../settings/type";
|
|
3
|
+
|
|
4
|
+
.canopy-search-tabs-wrapper {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-wrap: wrap;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: space-between;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.canopy-search-results {
|
|
12
|
+
padding: 1.618rem;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.canopy-search-tabs {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
gap: 0.5rem;
|
|
19
|
+
margin-bottom: 1rem;
|
|
20
|
+
|
|
21
|
+
button {
|
|
22
|
+
@include buttons.canopy-button-base(0.382rem, 0.618rem);
|
|
23
|
+
@include type.ui;
|
|
24
|
+
border: none;
|
|
25
|
+
color: var(--color-gray-muted);
|
|
26
|
+
transition:
|
|
27
|
+
background-color 0.12s ease,
|
|
28
|
+
color 0.12s ease;
|
|
29
|
+
|
|
30
|
+
// A fill under the pointer, the page's text on it: the accent's text step is held on
|
|
31
|
+
// the page, not on a tint.
|
|
32
|
+
&.active,
|
|
33
|
+
&:hover {
|
|
34
|
+
color: var(--color-gray-900);
|
|
35
|
+
background-color: var(--canopy-surface);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.canopy-search-form-modal {
|
|
41
|
+
.canopy-search-form-modal__trigger {
|
|
42
|
+
@include buttons.canopy-button-base(0.25rem, 0.5rem);
|
|
43
|
+
gap: 0.25rem;
|
|
44
|
+
border-color: var(--color-gray-200);
|
|
45
|
+
color: var(--color-gray-muted);
|
|
46
|
+
background: var(--color-gray-100);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.canopy-search-form-modal__overlay {
|
|
50
|
+
position: fixed;
|
|
51
|
+
inset: 0;
|
|
52
|
+
display: none;
|
|
53
|
+
align-items: flex-start;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
background: rgba(0, 0, 0, 0.3);
|
|
56
|
+
z-index: 9999;
|
|
57
|
+
padding-top: 10vh;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.canopy-search-form-modal__panel {
|
|
61
|
+
position: relative;
|
|
62
|
+
background: var(--color-gray-100);
|
|
63
|
+
min-width: 320px;
|
|
64
|
+
max-width: 720px;
|
|
65
|
+
width: 90%;
|
|
66
|
+
overflow: hidden;
|
|
67
|
+
font-family: var(
|
|
68
|
+
--canopy-font-sans,
|
|
69
|
+
system-ui,
|
|
70
|
+
-apple-system,
|
|
71
|
+
"Segoe UI",
|
|
72
|
+
"Helvetica Neue",
|
|
73
|
+
Helvetica,
|
|
74
|
+
Arial,
|
|
75
|
+
sans-serif
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.canopy-search-form-modal__close {
|
|
80
|
+
@include buttons.canopy-button-base(0.125rem, 0.5rem);
|
|
81
|
+
position: absolute;
|
|
82
|
+
top: 8px;
|
|
83
|
+
right: 8px;
|
|
84
|
+
border-color: var(--color-gray-200);
|
|
85
|
+
background: var(--color-gray-100);
|
|
86
|
+
padding: 2px 6px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.canopy-search-form-modal__inputWrap {
|
|
90
|
+
padding: 10px 12px;
|
|
91
|
+
border-bottom: 1px solid var(--color-gray-200);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.canopy-search-form-modal__input {
|
|
95
|
+
width: 100%;
|
|
96
|
+
padding: 8px 10px;
|
|
97
|
+
border: 1px solid var(--color-gray-200);
|
|
98
|
+
outline: none;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.canopy-search-form-modal__list {
|
|
102
|
+
max-height: 50vh;
|
|
103
|
+
overflow: auto;
|
|
104
|
+
padding: 6px 0;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.canopy-search-form-modal__item {
|
|
108
|
+
display: flex;
|
|
109
|
+
align-items: center;
|
|
110
|
+
gap: 8px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.canopy-search-form-modal__thumb {
|
|
114
|
+
width: 40px;
|
|
115
|
+
height: 40px;
|
|
116
|
+
object-fit: cover;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.canopy-search-form-modal__title {
|
|
120
|
+
@include type.ui-sm(bold);
|
|
121
|
+
color: var(--color-gray-900);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
[data-canopy-search-form-panel] {
|
|
126
|
+
display: none;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// The field's suggestions under it (`search-form-runtime.js`): a raised card, its items
|
|
130
|
+
// rows with a fill under the pointer and the focus ring on the one in focus (2.4.7;
|
|
131
|
+
// ACCESSIBILITY.md C32).
|
|
132
|
+
.canopy-search-teaser {
|
|
133
|
+
position: absolute;
|
|
134
|
+
left: 0;
|
|
135
|
+
right: 0;
|
|
136
|
+
top: calc(100% + 0.382rem);
|
|
137
|
+
background: var(--canopy-surface-raised);
|
|
138
|
+
border-radius: var(--canopy-radius-lg);
|
|
139
|
+
box-shadow:
|
|
140
|
+
0 0 0 1px var(--canopy-edge),
|
|
141
|
+
var(--canopy-shadow-lg);
|
|
142
|
+
z-index: 1000;
|
|
143
|
+
overflow: auto;
|
|
144
|
+
max-height: 60vh;
|
|
145
|
+
padding: 0.382rem 0;
|
|
146
|
+
display: none;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.canopy-search-teaser__list {
|
|
150
|
+
display: flex;
|
|
151
|
+
flex-direction: column;
|
|
152
|
+
gap: 0.236rem;
|
|
153
|
+
padding: 0.382rem 0.618rem;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Each type's suggestions, a group named by its label.
|
|
157
|
+
.canopy-search-teaser__group {
|
|
158
|
+
display: flex;
|
|
159
|
+
flex-direction: column;
|
|
160
|
+
gap: 0.236rem;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.canopy-search-teaser__label {
|
|
164
|
+
padding: 0.382rem 0.618rem;
|
|
165
|
+
font-weight: var(--canopy-weight-bold);
|
|
166
|
+
font-size: var(--canopy-text-label);
|
|
167
|
+
color: var(--color-gray-muted);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.canopy-search-teaser__item {
|
|
171
|
+
display: flex;
|
|
172
|
+
align-items: center;
|
|
173
|
+
gap: 0.618rem;
|
|
174
|
+
padding: 0.382rem;
|
|
175
|
+
border-radius: var(--canopy-radius-md);
|
|
176
|
+
background: transparent;
|
|
177
|
+
box-shadow: none;
|
|
178
|
+
text-decoration: none;
|
|
179
|
+
color: var(--color-gray-900);
|
|
180
|
+
transition: background 120ms ease;
|
|
181
|
+
|
|
182
|
+
// A row, not a card: none of `.canopy-card`'s lift.
|
|
183
|
+
&:hover {
|
|
184
|
+
background: var(--canopy-surface);
|
|
185
|
+
box-shadow: none;
|
|
186
|
+
transform: none;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
&:focus-visible {
|
|
190
|
+
background: var(--canopy-surface);
|
|
191
|
+
outline: 2px solid var(--color-accent-default);
|
|
192
|
+
outline-offset: -2px;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.canopy-search-teaser__thumb {
|
|
197
|
+
flex: 0 0 48px;
|
|
198
|
+
height: 48px;
|
|
199
|
+
overflow: hidden;
|
|
200
|
+
border-radius: var(--canopy-radius-sm);
|
|
201
|
+
background: var(--canopy-surface);
|
|
202
|
+
display: flex;
|
|
203
|
+
align-items: center;
|
|
204
|
+
justify-content: center;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.canopy-search-teaser__thumb-img {
|
|
208
|
+
width: 100%;
|
|
209
|
+
height: 100%;
|
|
210
|
+
object-fit: cover;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.canopy-search-teaser__text {
|
|
214
|
+
display: flex;
|
|
215
|
+
flex-direction: column;
|
|
216
|
+
gap: 0.15rem;
|
|
217
|
+
min-width: 0;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.canopy-search-teaser__title {
|
|
221
|
+
font-weight: var(--canopy-weight-bold);
|
|
222
|
+
font-size: var(--canopy-text-sm);
|
|
223
|
+
line-height: 1.3;
|
|
224
|
+
color: var(--color-gray-900);
|
|
225
|
+
white-space: nowrap;
|
|
226
|
+
overflow: hidden;
|
|
227
|
+
text-overflow: ellipsis;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.canopy-search-teaser__meta {
|
|
231
|
+
font-size: var(--canopy-text-label);
|
|
232
|
+
color: var(--color-gray-muted);
|
|
233
|
+
white-space: nowrap;
|
|
234
|
+
overflow: hidden;
|
|
235
|
+
text-overflow: ellipsis;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.relative[data-canopy-search-form-auto="1"]:focus-within
|
|
239
|
+
[data-canopy-search-form-panel] {
|
|
240
|
+
display: block;
|
|
241
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
@use "../buttons" as buttons;
|
|
2
|
+
@use "../../settings/focus";
|
|
3
|
+
|
|
4
|
+
.canopy-search-tabs {
|
|
5
|
+
position: relative;
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
gap: 0.5rem;
|
|
8
|
+
border-bottom: 3px solid var(--canopy-edge);
|
|
9
|
+
padding-bottom: 0.25rem;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.canopy-search-tab {
|
|
13
|
+
@include buttons.canopy-button-base(0.25rem, 0.75rem);
|
|
14
|
+
position: relative;
|
|
15
|
+
border: none;
|
|
16
|
+
padding-bottom: 0.5rem;
|
|
17
|
+
font-size: var(--canopy-text-sm);
|
|
18
|
+
color: var(--color-gray-muted);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// The tab in use: the page's text, bold, and the accent's bar under it.
|
|
22
|
+
.canopy-search-tab.is-active {
|
|
23
|
+
color: var(--color-gray-900);
|
|
24
|
+
font-weight: var(--canopy-weight-bold);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.canopy-search-tab:focus-visible {
|
|
28
|
+
outline: 2px solid var(--color-accent-default);
|
|
29
|
+
outline-offset: 2px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.canopy-search-tabs__highlight {
|
|
33
|
+
position: absolute;
|
|
34
|
+
bottom: -3px;
|
|
35
|
+
left: 0;
|
|
36
|
+
height: 3px; /* underline */
|
|
37
|
+
background: var(--color-accent-default);
|
|
38
|
+
pointer-events: none;
|
|
39
|
+
opacity: 0;
|
|
40
|
+
transform: translateX(0);
|
|
41
|
+
transition-property: transform, width, opacity;
|
|
42
|
+
transition-timing-function: ease-out;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.canopy-search-tabs__filters-button {
|
|
46
|
+
display: inline-flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
gap: 0.35rem;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.canopy-search-tabs__filters-count {
|
|
52
|
+
font-weight: var(--canopy-weight-bold);
|
|
53
|
+
opacity: 0.8;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// The results as the selected tab's panel (`SearchResults`): with no matches it takes
|
|
57
|
+
// focus itself, and shows it (2.4.7).
|
|
58
|
+
.canopy-search-results__panel:focus-visible {
|
|
59
|
+
@include focus.focus-ring;
|
|
60
|
+
}
|