Commit Graph

588 Commits

Author SHA1 Message Date
hykocx 6cb968c005 chore: bump version to 1.4.210 2026-04-26 20:38:33 -04:00
hykocx e5b21c0d54 feat(media): extract media details into reusable modal component
- add `MediaDetailsModal.client.js` with support for `media={…}` or `slug="…"` props
- add `GET /zen/api/media/by-slug/:slug` route for slug-based lookup
- refactor `MediaPage.client.js` to use the new modal instead of inline details panel
- export `MediaDetailsModal` as `./features/media/details-modal` in package.json
- update `BlockEditor` image block to open `MediaDetailsModal` for media editing
- update media feature README to document new component and route
2026-04-26 20:38:29 -04:00
hykocx e9a5750928 chore: bump version to 1.4.209 2026-04-26 20:22:26 -04:00
hykocx 31d0359163 docs(BlockEditor): document mediaSlug media library link and add server helpers
- update image block schema in README table to include `mediaSlug?` and clarify fields
- add "Liaison avec la médiathèque" section documenting mediaSlug behavior, read-only alt/caption, and internal `_` fields
- document new server helpers (`normalizeImageBlocks`, `enrichBlocksWithMedia`, `syncBlockImageReferences`) with usage examples
- add `block_image` field convention to media feature README with cross-references
- implement `mediaLink.server.js` with the three server-side helpers
- store `mediaSlug` on image block at insertion time in `Image.client.js`
- persist `mediaSlug` through clipboard paste/duplicate in `clipboard.js`
- export `mediaLink` entry point in `package.json` exports map
2026-04-26 20:22:22 -04:00
hykocx 8c5c3baec4 chore: bump version to 1.4.208 2026-04-26 19:44:12 -04:00
hykocx cb576f1036 fix(media): replace EyeIcon with UserGroupIcon for public visibility indicator 2026-04-26 19:44:09 -04:00
hykocx 3e9d1b22fd chore: bump version to 1.4.207 2026-04-26 19:40:47 -04:00
hykocx fbcaed6816 docs(admin): document active item and breadcrumb logic for nav registration
- add note in DEV.md explaining basePath auto-deduction and breadcrumb slug convention
- update README.md to document new `basePath` param in `registerNavItem` and detail active item/breadcrumb behavior
- update navigation file listing in README.md to include new exported helpers
- implement `getNavItemBasePath` and `findActiveNavContext` in navigation.js
- use `basePath` in AdminSidebar to determine active item via longest-prefix match
- use `basePath` in AdminTop to build breadcrumb with section, item, and action labels
- expose new navigation helpers from admin index.js and registry.js
2026-04-26 19:40:40 -04:00
hykocx 2d76b56deb chore: bump version to 1.4.206 2026-04-26 19:24:20 -04:00
hykocx 5ff1e0cd3c fix(media): apply fill positioning classes to private image fallback 2026-04-26 19:24:17 -04:00
hykocx c7ec34c560 chore: bump version to 1.4.205 2026-04-26 19:22:58 -04:00
hykocx 66ced30d8f perf(media): memoize toast context and improve loading state UX
- wrap ToastContext value in useMemo to prevent unnecessary re-renders
- show skeleton only on initial load, use opacity transition for subsequent fetches
- destructure toastError from toast context to stabilize fetchItems dependency
2026-04-26 19:22:55 -04:00
hykocx 87e5889b76 chore: bump version to 1.4.204 2026-04-26 19:18:39 -04:00
hykocx 8e37eb53ff feat(media): add MediaImage wrapper to handle public/private image rendering
- add `MediaImage.client.js` component that routes to `next/image` for public media and native `<img>` for private media to prevent CDN cache leaking private content
- replace direct `<img>` usage in `MediaGrid` and `MediaPage` with `MediaImage`
- document `MediaImage` usage and rationale in `src/features/media/README.md`
- update `docs/dev/ARCHITECTURE.md` to reference the `MediaImage` wrapper convention
2026-04-26 19:18:35 -04:00
hykocx 90e172f571 chore: bump version to 1.4.203 2026-04-26 17:41:05 -04:00
hykocx 56c334684f feat(ui): add MediaPicker integration to BlockEditor image block
- import MediaPicker from features/media to avoid circular dependency with @zen/core
- add "Choisir un média" button in ImageUrlForm alongside existing URL input
- insert image block with `/zen/api/media/file/<slug>` src on media selection
- update README to document dual-source form (external URL + media library) and revise known limitations
2026-04-26 17:40:58 -04:00
hykocx 9723f40df2 chore: bump version to 1.4.202 2026-04-26 17:12:47 -04:00
hykocx 3cc5a49518 refactor(media): promote media nav item to top-level sidebar entry
- replace generic "Contenu" section with a dedicated "media" section sharing the same id/label as the item
- update sectionId and order to trigger shouldRenderAsDirectLink in AdminSidebar
- update README to reflect top-level entry instead of nested section
2026-04-26 17:12:43 -04:00
hykocx 1070bd7874 chore: bump version to 1.4.201 2026-04-26 17:10:26 -04:00
hykocx fcb1a192ba refactor(media): remove redundant card wrappers from media page 2026-04-26 17:10:22 -04:00
hykocx 73529b5caf docs(config): reorder env example variables and clean up comments 2026-04-26 17:07:55 -04:00
hykocx 621d1b48ee chore: bump version to 1.4.200 2026-04-26 17:07:22 -04:00
hykocx c9f7b23498 feat(media): add media management feature module
- add `ZEN_MEDIA` env flag and document it in `.env.example`
- add media schema, server routes, and API handlers (`api.server.js`, `routes.server.js`, `schema.server.js`)
- add `MediaPage`, `MediaGrid`, `MediaFilters`, and `MediaPicker` client components
- expose `@zen/core/features/media` and `@zen/core/features/media/picker` package exports
- register media navigation and permissions; wire module into `init.js`
- document media API, client picker usage, and boundary rules in `MODULES.md` and `ARCHITECTURE.md`
- add `src/features/media/README.md`
2026-04-26 17:07:19 -04:00
hykocx f5d627f324 chore: bump version to 1.4.199 2026-04-26 16:28:44 -04:00
hykocx 67274687a3 style(ui): simplify image caption and alt input layout using full-width utility class 2026-04-26 16:28:40 -04:00
hykocx c3b54d9361 chore: bump version to 1.4.198 2026-04-26 16:26:44 -04:00
hykocx d66b107636 feat(BlockEditor): add image alignment, link, and replace/delete controls
- add align (left/center/right/full), href, newTab fields to image block
- render floating toolbar on image hover with alignment buttons and link popover
- add replace and delete actions to image toolbar
- wrap image in <a> in disabled mode and HTML export when href is set
- update htmlToBlocks/blocksToHtml to serialize/parse align, href, newTab
- guard handleContainerMouseDown to prevent multi-block selection on input/textarea focus
- add alignment and link icons to shared icons index
- update README with image block spec and toolbar behaviour
2026-04-26 16:26:41 -04:00
hykocx 83490de15d chore: bump version to 1.4.197 2026-04-26 16:03:31 -04:00
hykocx 5ecbf13348 fix(ui): replace form submit with explicit key and click handlers in image block
- remove form element and onSubmit in favor of a plain div
- add handleKeyDown to trigger submit on Enter key press
- attach onClick handler directly to the insert button with type="button"
2026-04-26 16:03:28 -04:00
hykocx b721574e58 chore: bump version to 1.4.196 2026-04-26 16:01:56 -04:00
hykocx a1bcc4bfb9 fix(ui): add null guard for missing element in caret utils 2026-04-26 16:01:53 -04:00
hykocx 688ae224ab chore: bump version to 1.4.195 2026-04-26 15:57:20 -04:00
hykocx 7ac4caea23 feat(ui): add current block type label to actions menu 2026-04-26 15:57:18 -04:00
hykocx d983635491 chore: bump version to 1.4.194 2026-04-26 15:53:25 -04:00
hykocx 543c4f5029 refactor(BlockEditor): replace hover-based submenu open/close with click-toggle
- remove timer-based submenu close logic (scheduleSubmenuClose, cancelSubmenuClose, submenuTimerRef) from BlockActionsMenu
- replace onMouseEnter/onMouseLeave handlers with onClick toggle on submenu trigger
- remove SUBMENU_CLOSE_DELAY constant and hover handlers from inline Toolbar submenus
- update README to reflect click-to-open/close-on-outside-click behavior for all submenus
2026-04-26 15:53:21 -04:00
hykocx d7e723770f chore: bump version to 1.4.193 2026-04-26 15:46:54 -04:00
hykocx b54dce9445 fix(ui): remove autofocus from link form url input 2026-04-26 15:46:52 -04:00
hykocx 42f1c47624 chore: bump version to 1.4.192 2026-04-26 15:45:21 -04:00
hykocx ff10c2ffea fix(ui): prevent inline toolbar from hiding when interacting with submenus
- keep toolbar visible when focus moves to an element inside `[data-inline-toolbar]`
- unpin toolbar on cleanup when submenu closes to avoid stale pinned state
2026-04-26 15:45:18 -04:00
hykocx be5bdf15b7 chore: bump version to 1.4.191 2026-04-26 15:39:45 -04:00
hykocx db468b56b5 refactor(block-editor): extract shared menu styles into dedicated module
- add `menuStyles.js` with reusable `BOX_CLASS`, `ITEM_CLASS`, `ITEM_DANGER_CLASS`, and `SEPARATOR_CLASS` constants
- replace inline tailwind strings in `Block.client.js` with imported style constants
- update `BlockEditor.client.js`, `LinkPopover.client.js`, and `Toolbar.client.js` to use shared menu styles
- update `README.md` to document the new `menuStyles.js` file
2026-04-26 15:39:41 -04:00
hykocx 3e90ef8c5d chore: bump version to 1.4.190 2026-04-26 15:19:38 -04:00
hykocx 94a7bcf44d feat(ui): add link popover component for inline link editing
- add LinkPopover.client.js component for creating, editing, and removing links
- replace autoOpenLink ref-based approach with dedicated linkPopover state
- import and integrate removeMark utility in BlockEditor
- wire up handleLinkPopoverSet and handleLinkPopoverRemove handlers
- open link popover on link click instead of expanding caret range
- close link popover on mousedown outside popover and toolbar
- refactor InlineToolbar to delegate link editing to linkPopover
2026-04-26 15:19:35 -04:00
hykocx 4a755d347c chore: bump version to 1.4.189 2026-04-26 15:11:03 -04:00
hykocx 8159b5316a feat(BlockEditor): auto-open link popover when clicking on existing link
- add `linkRangeAt` import to detect link span under caret
- handle `mouseup` on container to detect collapsed click inside a link mark
- set `autoOpenLink` flag via ref and expand selection to full link range
- pass `autoOpenLink` to toolbar state and use `initialPopover='link'` prop
- initialize toolbar popover state from `initialPopover` prop
- pre-fill link url and new-tab from existing mark when `initialPopover` is set
- add `linkRangeAt` helper in `types.js` to find enclosing link range at offset
2026-04-26 15:11:00 -04:00
hykocx 33ee62e908 chore: bump version to 1.4.188 2026-04-26 15:06:34 -04:00
hykocx 9f328bc818 feat(BlockEditor): add setMark utility and wire link submission to it
- add `setMark` helper in `types.js` that removes then applies a mark, replacing existing marks of the same type without toggling
- expose `applySetMark` in `BlockEditor.client.js` and pass it as `onSetMark` prop to `InlineToolbar`
- switch `handleLinkSubmit` in `Toolbar.client.js` to use `onSetMark` instead of `onToggleMark` so re-submitting a link always applies the new href
2026-04-26 15:06:31 -04:00
hykocx 0941994e44 chore: bump version to 1.4.187 2026-04-26 15:03:19 -04:00
hykocx 62cfb76d99 fix(ui): replace form with div in link popover to prevent unintended submit behavior
- swap `<form>` wrapper for `<div>` to avoid native form submission
- add `onKeyDown` handler on input to trigger submit on Enter key
- change button type from `submit` to `button` with explicit `onClick` handler
2026-04-26 15:03:17 -04:00
hykocx 43d2328082 chore: bump version to 1.4.186 2026-04-26 12:12:08 -04:00