@mnstry/atelier 0.2.0-alpha.16 → 0.2.0-alpha.18

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.0-alpha.18
4
+
5
+ - Carousel autoplay keeps running under the pointer. It now holds for a press (any click, tap or drag), keyboard focus (not focus from a click), a wheel, an expanded slide, a hidden tab or the carousel being off screen, and resumes `data-resume` ms (default 2000) after the reader lets go; a smooth drift eases back to speed instead of jumping.
6
+ - A thrown drifting strip coasts longer and stops where it stops: nothing pulls it back to a card or to its earlier resting place, and the loop renumbers invisibly over its clones while coasting. A scrub, or a slide brought to the centre, also stays put until an arrow or a drag moves it.
7
+ - Opening a `<details>` inside a slide (a quick view, for example) brings that slide to the centre and holds autoplay until every expanded panel in the strip is closed.
8
+ - In a loop, the scroll bar's end now shows the last slide at the viewport's inner end edge (measured, so side insets are respected), and the thumb wraps: as the strip drifts it leaves the right end and re-enters on the left. `renderCarouselControls` emits a second thumb segment for this; an enhancer adds it to older markup.
9
+ - New pure helpers: `loopThumbGeometry`, `rampFactor`, `resumeDelay`.
10
+
11
+ ## 0.2.0-alpha.17
12
+
13
+ - Add UI primitives (`@mnstry/atelier/ui/primitives` and `/ui/primitives/browser`), the shared behaviour layer beside the control system. The carousel provides seamless loops over inert clones, horizontal drag intent, flick steps, focus kept off inert slides, page dots and thumbnails, a polite live status, height that follows the slide, receding neighbours and a still row when every card fits, and a crossfade mode, plus a draggable scroll bar, capped momentum for multi-card strips, page stepping that never reads as backwards in a short loop, and discrete or smooth autoplay with a pause control that holds on hover, focus, touch, wheel, drag, a hidden tab or off screen and never runs under reduced motion. A `visible` selection mode keeps every on-screen card interactive for product strips. Also: interruptible `<details>` disclosures, the counted layout-stable scroll lock from the portable presentation contract (measured from the body's laid-out width, so it holds with `scrollbar-gutter: stable`), and one motion owner. Pure state is exported for Node; tenants theme through `--system-carousel-*`. See the [UI primitives reference](docs/reference/ui-primitives.md).
14
+
3
15
  ## 0.2.0-alpha.16
4
16
 
5
17
  - Rename the graph workspace's room from constellation to **map** and its middle layer from coach to **distribution**. The runtime already holds *constellation* as an identity canonical (a grouping of people), and Atelier already defines the distribution tier. New names: `ROOMS` is `map`, `workbench`, `review`; `LAYERS` is `atelier`, `distribution`, `owner`; `planMap`, `createMap`, the shell handle's `map` and `backToMap`, `setBy: 'distribution'`; interface text says "map". The alpha.15 names keep working for this release and are removed in the next: `room: 'constellation'` (listed in the new `DEPRECATED_ROOMS`), `composeRecipes({ coach })` (giving both `coach` and `distribution` refuses), `planConstellation`, `createConstellation`, the handle's `constellation` and `backToConstellation`, and the element's `constellation` class.
@@ -316,6 +328,7 @@
316
328
 
317
329
  ## Unreleased
318
330
 
331
+ - Document how a host locks page scrolling around the presentation's modal confirmation without shifting the layout (pay the hidden scrollbar back as body end padding, count locks), and test that the browser binding itself never changes the host page's overflow, padding or scroll position.
319
332
  - Patch the fast-uri dependency and override from 3.1.7 to 3.1.8, the patched
320
333
  3.x release for GHSA-hrr3-gc8f-f4qj (3.1.7 is in the affected range; whether
321
334
  Atelier's use was exploitable is not established). The direct dependency
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # MNSTRY Atelier
2
2
 
3
- `0.2.0-alpha.16` renames the [graph workspace](docs/guides/graph-workspace.md)'s room to the map and its middle layer to distribution, keeping the alpha.15 names for one release. `0.2.0-alpha.15` added the workspace (a map of every readable record, a focused authoring workbench and a review room, built from primitives distributions and owners can compose), renderer-neutral graph views and an [extension SDK and Postgres project workflow](docs/guides/extensions.md). Native host qualification remains a separate gate.
3
+ `0.2.0-alpha.18` refines carousel motion (gentle resume, coasting throws, centred expanded slides, a looping scroll bar). `0.2.0-alpha.17` adds shared [UI primitives](docs/reference/ui-primitives.md): one carousel, disclosure, scroll lock and motion layer for Atelier-built sites. `0.2.0-alpha.16` renames the [graph workspace](docs/guides/graph-workspace.md)'s room to the map and its middle layer to distribution, keeping the alpha.15 names for one release. `0.2.0-alpha.15` added the workspace (a map of every readable record, a focused authoring workbench and a review room, built from primitives distributions and owners can compose), renderer-neutral graph views and an [extension SDK and Postgres project workflow](docs/guides/extensions.md). Native host qualification remains a separate gate.
4
4
 
5
5
  **Turn a repository into a living, governed system.**
6
6
 
@@ -9,6 +9,20 @@ workspace between Atelier package releases. The flow is local-only: it does not
9
9
  provision repositories, contact a Git host, mutate the MNSTRY runtime, or write
10
10
  through a browser view.
11
11
 
12
+ ## Upgrading to 0.2.0-alpha.18
13
+
14
+ Carousel autoplay no longer holds on hover; it holds for a press, keyboard
15
+ focus, a wheel or an expanded slide and resumes after `data-resume` ms. A site
16
+ that relied on hover to pause autoplay should rely on the pause control. No
17
+ stored record changes format.
18
+
19
+ ## Upgrading to 0.2.0-alpha.17
20
+
21
+ This release only adds `@mnstry/atelier/ui/primitives` and
22
+ `@mnstry/atelier/ui/primitives/browser`; nothing existing changes and no stored
23
+ record changes format. The alpha.15 graph workspace names that alpha.16 kept
24
+ for one release are still accepted here; their removal moves to a later release.
25
+
12
26
  ## Upgrading to 0.2.0-alpha.16
13
27
 
14
28
  This release renames two graph workspace names; nothing else changes and no
@@ -119,6 +119,15 @@ request port because native has no browser default. A web host with unsaved work
119
119
  must omit item hrefs until safe navigation is available through its existing
120
120
  route/draft authority; this module does not install an unsaved-work route guard.
121
121
  Do not infer identical web/native navigation interception from shared labels.
122
+
123
+ The confirmation is a native modal `<dialog>`. The binding never changes the
124
+ host document's overflow, padding or scroll position, so opening it cannot
125
+ shift the page. A host that also locks page scrolling while it is open owns that
126
+ lock and must not let it shift the layout: measure the scrollbar it is about to
127
+ hide (`innerWidth - documentElement.clientWidth`, zero for overlay scrollbars),
128
+ add that width to the body's existing end padding, expose it as a custom
129
+ property for fixed or sticky elements, and restore both when the last lock is
130
+ released. Count locks so one closing overlay cannot release another. `lockScroll` and `unlockScroll` in [UI primitives](ui-primitives.md) implement this lock.
122
131
  Media resolves only local paths; hosts must prevent
123
132
  those routes from redirecting outside their intended boundary. The model is not
124
133
  a network-security boundary for a consumer's asset server.
@@ -0,0 +1,128 @@
1
+ # UI primitives
2
+
3
+ `@mnstry/atelier/ui/primitives` is the shared behaviour layer for sites and apps
4
+ built with Atelier. It sits beside the control system (`@mnstry/atelier/ui`) and
5
+ follows the same rules: no tenant content, plain HTML contracts that work
6
+ without script, and theming only through `--system-*` custom properties.
7
+
8
+ | Import | Runs in | Provides |
9
+ | --- | --- | --- |
10
+ | `@mnstry/atelier/ui/primitives` | Node and browsers | Pure state functions, `carouselStyles`, `renderCarouselControls` |
11
+ | `@mnstry/atelier/ui/primitives/browser` | Browsers | `enhanceCarousels`, `enhanceDisclosures`, `lockScroll` and `unlockScroll`, the motion owner |
12
+
13
+ The carousel covers slideshows and multi-card strips: seamless loops, drag
14
+ intent, focus safety, page dots and thumbnails, live status, height that follows
15
+ the slide, receding neighbours, still rows, a draggable scroll bar, momentum,
16
+ autoplay and a pause control.
17
+
18
+ ## Carousel
19
+
20
+ ### Markup contract
21
+
22
+ ```html
23
+ <div class="system-carousel" data-carousel="track" data-select="visible" data-loop
24
+ data-autoplay="discrete" data-interval="6000"
25
+ role="region" aria-roledescription="carousel" aria-label="Featured collection">
26
+ <div data-carousel-viewport tabindex="0" aria-label="Featured collection, scroll horizontally">
27
+ <div data-carousel-track>
28
+ <article>…</article>
29
+ <article>…</article>
30
+ </div>
31
+ </div>
32
+ <!-- optional: page dots or thumbnails -->
33
+ <div class="system-carousel__pages">
34
+ <button type="button" class="system-carousel__page" data-page aria-label="Show slide 1">…</button>
35
+ </div>
36
+ <!-- controls and status: renderCarouselControls({ label, autoplay }) -->
37
+ </div>
38
+ ```
39
+
40
+ Without script, the viewport is a native horizontal scroller with snap points,
41
+ so touch, trackpad, wheel and keyboard scrolling all work. Slides are the
42
+ track's children; if any child carries `data-slide`, only those count.
43
+
44
+ ### Options (attributes on the root)
45
+
46
+ | Attribute | Values | Effect |
47
+ | --- | --- | --- |
48
+ | `data-carousel` | `track` (default), `fade` | Scrolling strip, or slides crossfading in one grid cell |
49
+ | `data-select` | `current` (default), `visible` | `current` makes every slide except the current one inert (slideshows); `visible` keeps every card on screen interactive (product strips) |
50
+ | `data-step` | `item`, `page` | What an arrow moves. Defaults to `page` for `visible` and `item` for `current`. A loop barely longer than a page steps by the hidden remainder |
51
+ | `data-loop` | present | Seamless loop over inert clones; arrows never stop |
52
+ | `data-peek` | present | Centre-aligned slides; neighbours recede (`--d` from 0 to 1) and clicking one centres it; a still row when every card fits at `data-row-min` (default 400px) |
53
+ | `data-fit` | `current` | The viewport height follows the slide in view, blending as slides pass |
54
+ | `data-autoplay` | `off` (default), `discrete`, `smooth` | Advance one page every `data-interval` ms (at least 2500), or drift continuously at `data-speed` px/s |
55
+ | `data-resume` | ms, default 2000 | How long autoplay waits after the reader lets go before easing back in |
56
+
57
+ ### Behaviour
58
+
59
+ - **Mouse drag** on the slides: a drag starts only once horizontal movement
60
+ clearly dominates, so vertical page scrolling is never taken over. Clicks at
61
+ the end of a drag are swallowed; a plain click still follows its link.
62
+ Slideshows step one slide (distance or flick); `visible` strips glide with
63
+ capped momentum and settle on a card.
64
+ - **Scroll bar** (`[data-scrollbar]`): click to jump, or drag the thumb. It
65
+ covers one set of slides in a loop.
66
+ - **Arrows, pages and keys:** Previous, Next, page buttons, and Left, Right,
67
+ Home and End on the carousel. Reader-initiated moves are announced politely in
68
+ `[data-status]`; autoplay moves are not.
69
+ - **Autoplay** never runs under reduced motion. It keeps running under the
70
+ pointer, and holds for a press (any click, tap or drag), keyboard focus inside
71
+ the carousel, a wheel, an expanded slide, a hidden tab or the carousel being
72
+ off screen. It resumes `data-resume` ms after the reader lets go, and a smooth
73
+ drift eases back to speed over about a second. The rendered toggle pauses and
74
+ resumes it. `data-autoplay-state` reads `playing`, `held`, `paused` or `off`.
75
+ - **Throws and resting places:** in a drifting strip, a thrown strip coasts to a
76
+ stop where it stops; nothing pulls it back to a card or to where it was. A
77
+ scrub, or a slide brought to the centre, also stays where the reader left it
78
+ until an arrow or a drag moves it again.
79
+ - **Expanded slides:** opening a `<details>` inside a slide (a quick view, for
80
+ example) brings that slide to the centre and holds autoplay until every
81
+ expanded panel in the strip is closed again.
82
+ - **Looping scroll bar:** in a loop the thumb is a window over one period. As the
83
+ strip drifts, the thumb leaves the right end and re-enters on the left.
84
+ Dragging the thumb to the right end shows the last slide at the right edge.
85
+ - **Focus:** before a slide becomes inert, focus moves to its page button or
86
+ another control, so it is never lost.
87
+
88
+ The enhancer sets `data-ready`, `data-overflow`, `data-row`, `data-dragging`
89
+ and `data-scrubbing` for styling, and hides the controls when nothing overflows.
90
+ `enhanceCarousel(root)` returns `{ go, goTo, pause, play }`.
91
+
92
+ ### Theming
93
+
94
+ Use `carouselStyles` once per page (for example
95
+ `<style set:html={carouselStyles}>`) and set custom properties on the carousel:
96
+
97
+ `--system-carousel-gap`, `-slide` (slide width), `-inset` (full-bleed side
98
+ padding), `-align`, `-ease`, `-focus`, `-button-size`, `-button-border`,
99
+ `-button-radius`, `-button-background`, `-button-hover-background`,
100
+ `-button-hover-border`, `-controls-justify`, `-controls-gap`,
101
+ `-controls-offset`, `-scrollbar-width`, `-scrollbar-thickness`,
102
+ `-scrollbar-track`, `-scrollbar-thumb`, `-thumb-width`, `-thumb-height`,
103
+ `-thumb-current`, `-recede-scale`, `-recede-fade`, `-fade-ms`.
104
+
105
+ ## Disclosures
106
+
107
+ `enhanceDisclosures(root)` animates native `<details>`: open and close can be
108
+ reversed mid-way, `data-state` (`open` or `closed`) follows the reader's intent
109
+ at once so icons turn with the click, and reduced motion opens instantly.
110
+ Keyboard and no-script behaviour stay native.
111
+
112
+ ## Scroll lock
113
+
114
+ `lockScroll(owner)` and `unlockScroll(owner)` implement the layout-stable host
115
+ lock described in [portable presentation](portable-presentation.md). The lock
116
+ hides page scrolling, pays the hidden scrollbar back as body end padding,
117
+ exposes it as `--scroll-lock-gap` for fixed and sticky elements (for example
118
+ `right: var(--scroll-lock-gap, 0px)` on a fixed panel), and counts owners so one
119
+ closing overlay cannot release another. The gap is measured as the growth of the
120
+ body's laid-out width, which stays correct with `scrollbar-gutter: stable` and
121
+ with overlay scrollbars.
122
+
123
+ ## Motion
124
+
125
+ `animationAllowed()`, `onMotionChange(listener)` and `animate(element, frames,
126
+ options)` give one owner for motion: the reduced-motion preference and hidden
127
+ tabs stop every effect started through them. `startMotionWatch()` begins
128
+ watching; the carousel and disclosures call it as needed.
@@ -70,7 +70,9 @@
70
70
  "0.2.0-alpha.13",
71
71
  "0.2.0-alpha.14",
72
72
  "0.2.0-alpha.15",
73
- "0.2.0-alpha.16"
73
+ "0.2.0-alpha.16",
74
+ "0.2.0-alpha.17",
75
+ "0.2.0-alpha.18"
74
76
  ],
75
77
  "packRefs": []
76
78
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mnstry/atelier",
3
- "version": "0.2.0-alpha.16",
3
+ "version": "0.2.0-alpha.18",
4
4
  "private": false,
5
5
  "description": "Local toolkit that turns a Git repository into an ontology-governed knowledge graph, enforcement layer, and runtime for people, agents, and tools. No telemetry or required hosted account; optional host-bound vault adapters.",
6
6
  "keywords": [
@@ -64,6 +64,8 @@
64
64
  "./readiness-protocols": "./src/readiness-protocols/bundled-pack.mjs",
65
65
  "./server": "./src/server/local-sidecar.mjs",
66
66
  "./ui": "./src/ui/control-system.mjs",
67
+ "./ui/primitives": "./src/ui/primitives/index.mjs",
68
+ "./ui/primitives/browser": "./src/ui/primitives/browser.mjs",
67
69
  "./harness": "./src/harness/context.mjs",
68
70
  "./collaboration": "./src/collaboration/index.mjs",
69
71
  "./support": "./src/support/support-bundle.mjs",
@@ -0,0 +1,6 @@
1
+ /** Atelier UI primitives for the browser. */
2
+ export { enhanceCarousels, enhanceCarousel } from './carousel.mjs'
3
+ export { enhanceDisclosures } from './disclosure.mjs'
4
+ export { lockScroll, unlockScroll, scrollLocked } from './scroll-lock.mjs'
5
+ export { animate, animationAllowed, onMotionChange, startMotionWatch } from './motion.mjs'
6
+ export * from './state.mjs'