@kolkrabbi/kol-framework 0.58.0 → 0.60.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/kol-framework.css CHANGED
@@ -211,6 +211,45 @@ body {
211
211
  line-height: 1;
212
212
  transition: transform 150ms ease, opacity 120ms ease, visibility 0s linear 120ms;
213
213
  }
214
+ /* THE SPLIT ROW (user 2026-10-28: "expand anywhere except the title"): a foldernote's row is two targets on one box.
215
+ * The caret button fills the row under the link (the Tooltip wrapper is the positioned box, so it covers the head and
216
+ * not the open list below), its chevron where the floated caret sat; the link above passes the pointer through except
217
+ * on its glyph and title. The row still brightens as one when either half is hovered. */
218
+ .kol-sidenav-hop-caret--row {
219
+ top: 0;
220
+ right: 0;
221
+ bottom: 0;
222
+ left: 0;
223
+ justify-content: flex-end;
224
+ align-items: flex-start;
225
+ /* the chevron's 12 from the top and 16 from the edge ride the element as utilities (`pt-3 pr-4`) — a padding here
226
+ * would lose to the utility layer, which is how the first cut put the chevron 12px high */
227
+ }
228
+ .kol-sidenav-hop-chevron {
229
+ display: inline-flex;
230
+ transition: transform 150ms ease;
231
+ }
232
+ .kol-sidenav-hop--split {
233
+ pointer-events: none;
234
+ }
235
+ .kol-sidenav-hop--split .kol-sidenav-hop-icon,
236
+ .kol-sidenav-hop--split .kol-sidenav-hop-title {
237
+ pointer-events: auto;
238
+ }
239
+ .kol-sidenav-hop-split:has(> .kol-sidenav-hop-caret--row:hover) .kol-sidenav-hop {
240
+ color: var(--kol-fg-96);
241
+ }
242
+ .kol-sidenav-hop-split:has(> .kol-sidenav-hop-caret--row:hover) .kol-sidenav-hop-icon {
243
+ color: var(--kol-surface-on-primary);
244
+ }
245
+ :root[data-sidenav="collapsed"] .kol-sidenav-hop--split { pointer-events: auto; }
246
+ /* THE TREE FADES AT ITS CLIP (user 2026-10-28: "we also are missing a fade when list clips in navrail") — the app rail's
247
+ * `.kol-shell-rail-list--fade` and the workshop rail's `.shell-rail`, the same 3rem ramp; the element's `pb-12` (a utility,
248
+ * which a components-layer padding here could not outrank) lets the last row scroll clear of it, so at the end of the list nothing stays faded. `NavRail variant="site" fade={false}` drops it. */
249
+ .kol-sidenav-scroll--fade {
250
+ -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 3rem), transparent);
251
+ mask-image: linear-gradient(to bottom, #000 calc(100% - 3rem), transparent);
252
+ }
214
253
  .kol-sidenav-list {
215
254
  display: flex;
216
255
  flex-direction: column;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kolkrabbi/kol-framework",
3
- "version": "0.58.0",
3
+ "version": "0.60.0",
4
4
  "description": "Site shell and page layout",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -23,9 +23,9 @@
23
23
  "react-router-dom": "^6.0.0 || ^7.0.0"
24
24
  },
25
25
  "devDependencies": {
26
- "@kolkrabbi/kol-component": "^0.307.0",
27
26
  "@kolkrabbi/kol-markdown": "0.2.0",
28
- "@kolkrabbi/kol-icons": "^0.48.0"
27
+ "@kolkrabbi/kol-component": "^0.308.0",
28
+ "@kolkrabbi/kol-icons": "^0.50.0"
29
29
  },
30
30
  "files": [
31
31
  "src",
@@ -0,0 +1,27 @@
1
+ import { kindOf, extOf } from '@kolkrabbi/kol-component'
2
+
3
+ /* DOCUMENT FILES — the files beside a folder's markdown (DocumentIndexFilesAndIcons049, kol-website 2026-10-28, a point
4
+ * of the MarkdownPage ticket: *"a folder may also hold PDFs and images; the contents index lists them beside the md
5
+ * pages and opens them in the DS QuickLook, not as pages"*). The consumer globs them as URLs and hands the modules over:
6
+ *
7
+ * documentFiles(import.meta.glob('./brand/business/**\/*.{pdf,png,jpg,jpeg,webp,svg}', { query: '?url', import: 'default', eager: true }))
8
+ * → [{ id, title, group, file, ext, kind }] in the glob's (path) order
9
+ *
10
+ * id the file's stem without a `NN-` prefix (`02-business-plan.pdf` → `business-plan`)
11
+ * title the stem, unprefixed and titlecased (`Business Plan`)
12
+ * group the file's parent folder, titlecased and unprefixed (`frumkvaedi-2024/` → `Frumkvaedi 2024`); '' at the root
13
+ * file the served URL; ext its extension; kind the DS's (`kindOf`: pdf · image · video · audio · …)
14
+ *
15
+ * A row is what `DocumentIndex` draws as a card in its part and opens in Quick Look. `documentTabs` is the markdown half. */
16
+ const unprefix = (s) => s.replace(/^\d+[-_.]\s*/, '')
17
+ const titleCase = (s) => s.replace(/[-_]+/g, ' ').replace(/\b\w/g, (c) => c.toUpperCase())
18
+
19
+ export default function documentFiles(modules = {}, { root = '' } = {}) {
20
+ return Object.entries(modules).map(([path, url]) => {
21
+ const rel = root && path.startsWith(root) ? path.slice(root.length) : path
22
+ const parts = rel.replace(/^\.?\//, '').split('/')
23
+ const name = parts.pop()
24
+ const stem = name.replace(/\.[a-z0-9]+$/i, '')
25
+ return { id: unprefix(stem), title: titleCase(unprefix(stem)), group: parts.length ? titleCase(unprefix(parts[parts.length - 1])) : '', file: typeof url === 'string' ? url : '', ext: extOf(name), kind: kindOf({ key: name }) }
26
+ })
27
+ }
package/src/index.js CHANGED
@@ -32,3 +32,4 @@ export { default as CategoryPage } from './CategoryPage.jsx'
32
32
  export { default as MarkdownPage } from './MarkdownPage.jsx'
33
33
  export { default as LinkPreview } from './LinkPreview.jsx'
34
34
  export { default as documentTabs } from './documentTabs.js'
35
+ export { default as documentFiles } from './documentFiles.js'