Commit Graph

473 Commits

Author SHA1 Message Date
hykocx b4bebfd1bd fix(BlockEditor): preserve selected index only when block id and query match 2026-04-25 19:16:09 -04:00
hykocx d859874122 fix(BlockEditor): trigger select-all blocks when block content is empty on Ctrl+A 2026-04-25 19:12:04 -04:00
hykocx 21634f5a38 chore: bump version to 1.4.153 2026-04-25 19:09:46 -04:00
hykocx c7b96f2e16 fix(ui): improve block editor placeholder visibility with fade transition
- remove unused `placeholder` prop from BlockEditor component
- add `block-editor--sole-empty` class when editor has a single empty block
- show placeholder via opacity transition instead of content injection
- always render `attr(data-placeholder)` content, toggle visibility with opacity
- add 150ms ease transition for smooth placeholder fade in/out
- show placeholder when block is focused, hovered, or editor is sole-empty
2026-04-25 19:09:41 -04:00
hykocx d225ff2e5f chore: bump version to 1.4.152 2026-04-25 18:55:54 -04:00
hykocx 0000f22066 feat(BlockEditor): add single block selection via drag handle click
- add `onSelectBlock` prop to Block component wired to drag handle click
- implement `selectBlock` function in BlockEditor to select a single block and clear text selection
2026-04-25 18:55:51 -04:00
hykocx 97ebaf0635 chore: bump version to 1.4.151 2026-04-25 18:53:03 -04:00
hykocx 219fb36da1 refactor(BlockEditor): replace emoji icons with react icon components and add free color picker support
- update blockRegistry to accept ReactNode icons instead of emoji strings
- replace emoji icons in all built-in block types with icon components from shared icons
- add `isHexColor` and `collectUsedColors` helpers to inline/types.js
- extend `color` and `highlight` marks to accept hex color strings in addition to palette keys
- pass `usedColors` (collected from document) to InlineToolbar
- update InlineToolbar color popover to show used colors and a free color input
- add new icons to shared icons index
- update README to reflect icon, color, and toolbar popover changes
2026-04-25 18:52:59 -04:00
hykocx 3f93503996 chore: bump version to 1.4.150 2026-04-25 18:35:15 -04:00
hykocx 9893ade233 fix(ui): move onMouseDown prevention to individual toolbar buttons and default linkNewTab to false
- move `e.preventDefault()` from toolbar container to each individual button to avoid broad focus prevention
- default `linkNewTab` state to `false` instead of `true` for new links
- add `onMouseDown` prevention to color grid buttons
2026-04-25 18:35:11 -04:00
hykocx 2666d1a7fd chore: bump version to 1.4.149 2026-04-25 18:32:25 -04:00
hykocx fdb36c39e5 feat(ui): add "open in new tab" option to block editor link toolbar
- add `linkNewTab` state (default true) in InlineToolbar
- pass `newTab` flag through `onToggleMark` on link submit and remove
- restore `newTab` value when reopening the link popover
- add checkbox ui in link popover to toggle new tab behavior
- update link serialization to render `target="_blank" rel="noopener noreferrer"` when `newTab` is set
- add `newTab` field to link mark type definition
2026-04-25 18:32:21 -04:00
hykocx 2c132b3a8a chore: bump version to 1.4.148 2026-04-25 18:30:17 -04:00
hykocx 7b6bf67f36 fix(ui): keep inline toolbar visible when popover is open
- add `toolbarPinnedRef` in BlockEditor to prevent toolbar from closing while a popover is focused
- pass `onPinChange` callback to InlineToolbar to toggle the pinned state
- notify parent via `onPinChange` whenever popover state changes
- remove rect-change effect that was incorrectly closing popovers on selection update
2026-04-25 18:30:02 -04:00
hykocx d9fbe29031 chore: bump version to 1.4.147 2026-04-25 18:27:24 -04:00
hykocx 5a8d2ad02f feat(BlockEditor): add inline formatting with rich content model
- migrate block content from plain strings to InlineNode[] structure
- add inline toolbar (bold, italic, code, color, link) on text selection
- add checklist block type with toggle support
- add image block type (URL-based, phase 2)
- add inline serialization helpers (inlineToDom, domToInline)
- add inline types and length utilities
- extend caret utils with range get/set support
- update block registry and all existing block types for new content model
- update demo blocks in ComponentsPage to use rich inline content
- update README to reflect new architecture
2026-04-25 18:27:20 -04:00
hykocx 3eeaebfa68 chore: bump version to 1.4.146 2026-04-25 18:08:02 -04:00
hykocx 4bc7319056 refactor(ui): replace PlusSignIcon with Add01Icon in BlockEditor
- swap PlusSignIcon for Add01Icon in Block.client.js add button
- remove PlusSignIcon export from shared icons index
- update README to reflect renamed icon
2026-04-25 18:07:59 -04:00
hykocx d7aa3532d1 chore: bump version to 1.4.145 2026-04-25 18:07:21 -04:00
hykocx 1fcd57807f refactor(BlockEditor): replace text symbols with icon components in block controls
- replace `+` and `⋮⋮` text with `PlusSignIcon` and `DragDropVerticalIcon` components
- add `Add01Icon` export to shared icons index
- update README to reference icon names and link to icons source
2026-04-25 18:07:18 -04:00
hykocx 4bd51bcd13 chore: bump version to 1.4.144 2026-04-25 18:05:36 -04:00
hykocx 980f9cc5a0 refactor(ui): implement mouse-driven multi-block selection with text and marquee modes
- add `sameSet` helper to compare two Sets for equality
- add `dragRef` to track drag state (mode, startBlockId, origin coords)
- replace `selectionchange`-based detection with `mousemove`/`mouseup` listeners
- support `text` mode: stay native until cursor leaves origin block, then switch to `block` mode
- support `block` mode: extend selection across blocks as cursor moves between them
- support `marquee` mode: rect-based selection when mousedown starts outside a contentEditable
- use `sameSet` to avoid redundant `setSelectedBlockIds` calls on unchanged selections
2026-04-25 18:05:34 -04:00
hykocx 1a132bb1af chore: bump version to 1.4.143 2026-04-25 18:01:22 -04:00
hykocx 0d7b654a2d feat(BlockEditor): add multi-block selection with ctrl+a and delete support
- add `isSelected` prop and overlay highlight to Block component
- implement double ctrl+a: first selects block content, second selects all blocks
- add `onSelectAllBlocks` callback prop to Block
- add `selectedBlockIds` state and `selectAllBlocks`/`deleteSelectedBlocks` helpers in BlockEditor
- detect cross-block native selection via `selectionchange` and convert to block selection
- handle backspace/delete key to remove all selected blocks
- clear block selection on click outside or focus change
- update README to document multi-block selection behaviour
- export new icons used by the feature
2026-04-25 18:01:18 -04:00
hykocx 8bed913459 chore: bump version to 1.4.142 2026-04-25 17:56:32 -04:00
hykocx 14c2c3d6bf fix(BlockEditor): prevent block merge when backspace pressed with active selection
- skip merge-with-previous-block trigger if selection is not collapsed
- update README to document the collapsed-selection guard on Backspace
2026-04-25 17:56:29 -04:00
hykocx 60689b8c4d chore: bump version to 1.4.141 2026-04-25 17:53:19 -04:00
hykocx 9df91bf412 fix(BlockEditor): constrain select-all to current block and resize slash menu
- intercept Ctrl/Cmd+A to select only the current block's content, preventing cross-block merge bug
- increase slash menu width from 280 to 375 and max-height from 320 to 360
- enlarge icon container, increase gap and padding, and upsize text in slash menu items
2026-04-25 17:53:16 -04:00
hykocx 489147d25d chore: bump version to 1.4.140 2026-04-25 17:49:12 -04:00
hykocx 9d155a28c9 refactor(ui): improve slash menu layout and add shortcut hints
- increase menu width and max height constants
- add SHORTCUT_HINT map displaying markdown shortcuts per block type
- update empty state and list container to use rounded-lg and shadow-md
- add section label header above block items
- show monospace shortcut hint on each menu item
- tighten item padding and icon size for denser layout
2026-04-25 17:49:09 -04:00
hykocx b775b05c15 chore: bump version to 1.4.139 2026-04-25 17:46:08 -04:00
hykocx c74737e5d9 fix(ui): improve slash menu keyboard handling and adaptive positioning
- move slash menu keyboard listener to document capture phase to prevent contentEditable default behaviors
- use circular navigation for arrow keys in slash menu
- separate undo/redo shortcuts into dedicated global keydown handler
- add adaptive positioning for slash menu with flip-up, horizontal clamp, and max-height constraints
2026-04-25 17:46:04 -04:00
hykocx fdf35f36a3 chore: bump version to 1.4.138 2026-04-25 17:42:55 -04:00
hykocx 7fa2353296 style(BlockEditor): improve block spacing and placeholder visibility behavior
- increase block vertical padding from py-0.5 to py-1.5 for better readability
- increase editor container vertical padding from py-3 to py-6
- show placeholder text only on hover or focus instead of always visible
2026-04-25 17:42:51 -04:00
hykocx 645a54dba5 chore: bump version to 1.4.137 2026-04-25 17:37:26 -04:00
hykocx 54386d3fe3 feat(ui): add BlockEditor component with block types, slash menu, and drag-and-drop
- add BlockEditor orchestrator with controlled block list and keyboard navigation
- add Block client component with contentEditable sync, drag handles, and markdown shortcuts
- add SlashMenu for inserting block types via `/` command
- add blockRegistry and block type definitions (paragraph, heading, bullet list, numbered list, quote, code, divider)
- add caret and id utility helpers
- export BlockEditor from shared components index
- add BlockEditor demo to admin devkit ComponentsPage
- add README documenting usage and architecture
2026-04-25 17:37:23 -04:00
hykocx 0c99bf5002 chore: bump version to 1.4.136 2026-04-25 17:08:00 -04:00
hykocx 4e759767f2 feat(admin): add TagInput component demo to devkit components page
- import TagInput component and useState hook
- define ROLE_OPTIONS with color metadata for demo purposes
- add TagInputDemo wrapper component to manage local state
- add PreviewBlock showcasing default, colored badge, and error variants
2026-04-25 17:07:57 -04:00
hykocx 8b61da7322 chore: bump version to 1.4.135 2026-04-25 17:05:36 -04:00
hykocx cd6064b98f refactor(ui): replace RoleBadge with generic Badge component
- add `dot` and `onRemove` props to Badge for colored dot and removable tag support
- delete RoleBadge component in favor of Badge with dot prop
- update UserCreateModal, UserEditModal, and UsersPage to use Badge instead of RoleBadge
- remove RoleBadge export from shared components index
2026-04-25 17:05:32 -04:00
hykocx e78f5321e6 docs(modules): document AdminHeader component usage and clarify admin/components exports 2026-04-25 15:55:10 -04:00
hykocx 5474368a7e chore: bump version to 1.4.134 2026-04-25 15:15:31 -04:00
hykocx f14731e554 fix(cli): export ZenModulesClient component from client manifest to ensure side-effects execute in browser
- update `renderClientManifest` to export a `ZenModulesClient` React component instead of `export {}`
- update docs to explain why rendering the component is required under Next.js 15+/Turbopack and add usage example in `app/layout.js`
2026-04-25 15:15:27 -04:00
hykocx 9cdc945639 chore: bump version to 1.4.133 2026-04-25 15:05:31 -04:00
hykocx cb547f6400 docs(core): update server boundary rules and fix db import paths
- document `.server.js` suffix requirement for node-only imports in DEV.md
- add client-safe subentries table and server-only barrel warnings in MODULES.md
- fix `crud.js` and `database/index.js` to import from `db.server.js`
- replace `createRequire` with `pathToFileURL` in `discover.server.js` for ESM-only modules
- update admin navigation and registry to use safe client-compatible imports
- bump version to 1.4.132
2026-04-25 15:05:26 -04:00
hykocx 0b32e8aa97 refactor(database): rename db.js to db.server.js 2026-04-25 15:05:21 -04:00
hykocx eb87d9070d chore: bump version to 1.4.131 2026-04-25 14:43:08 -04:00
hykocx b460ed0619 docs(modules): update server/client boundary docs and client manifest generation
- update MODULES.md to document dual-entry pattern (main vs ./client) and explain why client entry must not import server-only code
- filter client manifest to only include modules exposing a `./client` subpath export
- add `moduleHasClientEntry` helper in discover.server.js to check package.json exports
- update cli.js to use `moduleHasClientEntry` when rendering the client manifest
- update init.js and modules/index.js to align with new client entry convention
2026-04-25 14:43:00 -04:00
hykocx 92f3e4c561 chore: bump version to 1.4.130 2026-04-25 14:34:46 -04:00
hykocx 1b85d6fac7 docs(modules): add client manifest generation and update discovery docs
- introduce `OUTPUT_CLIENT` constant and `renderClientManifest` for `'use client'` bundle
- rename `renderManifest` to `renderServerManifest` for clarity
- update `sync` command to write both server and client manifests
- update `findInstalledModuleNames` to support custom package path resolution
- rewrite MODULES.md to explain dual-manifest architecture and client hydration rationale
2026-04-25 14:34:43 -04:00