The real fix was in .gitignore (dist → /dist) so panel/dist
is now properly tracked. The CI workarounds are no longer needed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
npm run build only outputs assets/dist/ (Vite JS/CSS).
Add an explicit step to copy kirby/, vendor/, site/, assets/fonts+svg
and index.php from public/ into dist/ so the FTP mirrors have
the correct source. Also removes the wrong panel/ workaround.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The panel/dist is compiled by Kirby and not in the repo.
The mirror --delete was wiping it on every deploy.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Flatten ref({ value }) to simple ref(), replace 9 updateX functions with
a generic updateProp driven by descriptor arrays, and loop over descriptors
in generatePreviewCss/loadValuesFromStylesheet/applyAllStyles. Remove
trivial passthrough computed properties. (-123 lines)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix template check 'carte' → 'map' so map subpages are served by API
- Add parseMarker() and enrich parseCarte() with static image, intro, markers
- Include map children in parseGeoformat() alongside chapters
- Resolve map block references in chapters to full carte data
- Update narrative store flattening with new carte fields
- Replace MapBlock placeholder with full carte rendering (title, image, tags, intro, markers with icons and blocks)
- Add default marker-pin.svg for markers without custom icon
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace GeoformatPage model with a plugin registering coverFiles as a
pageMethod (available on all pages) and coverLabel as a fileMethod to
display "Carte [title]" for map children files.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Expose combined files (page files + map children files) for the cover
field query in the geoformat blueprint.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reorganize narrative, geoformat, chapter, project and map blueprints
to use tabs layout. Add shared blueprint fields and files tab partials.
Update map block query for new page hierarchy.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Standardize French template names to English across blueprints,
content files, PHP templates, Vue components and Pinia stores.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Save map data directly via API instead of emit('input') to avoid
draft state. Capture image, clear flag, then reload — the panel
shows the correct image in a single reload.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Both use field--view-only styling with disabled inputs and
"Fonctionnalité à venir" tooltip. Italic checkbox remains active.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Keep only A4/A5 + "Personnalisé" option. Width/height fields use same
layout as margin fields and are editable only in custom mode.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Margins: px + mm only. Font sizes: px only.
em/rem buttons are commented out, not deleted, for potential future use.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previously, changing unit (e.g. mm → px) kept the numeric value unchanged,
causing visual changes. Now values are converted through a px pivot unit
so the rendered size stays the same.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Dispatch input events on color inputs after syncFromStore so Coloris
updates its ::before pseudo-element swatches with loaded values.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Guard watcher-triggered renders in usePreviewRenderer until first
explicit render completes, preventing premature renders with default
styles. Also: disable Contenu tab, update content/blueprints, add
global disabled button styles, minor formatting.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Properly organize routes following design-to-pack pattern:
- routes/markers/get.php
- routes/markers/create.php
- routes/markers/update.php
- routes/markers/delete.php
- routes/position/update.php
- routes/image/capture.php
- routes/image/check-flag.php
- routes/image/clear-flag.php
Each route in its own file for better maintainability.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Reorganize routes following design-to-pack pattern:
- routes/markers.php: CRUD operations for markers
- routes/position.php: Position update (single mode)
- routes/image.php: Image capture and regeneration flag management
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add html-to-image for capturing map container with markers
- Auto-generate map image on page/marker save via hooks
- Use flag system (.regenerate-map-image) to trigger generation on Panel reload
- Create file using Kirby API for proper indexing
- Add mapStaticImage field in blueprint to display generated image
- Wait for map to be fully loaded before capture
- Capture entire container (map + custom markers)
- Filter MapLibre controls from capture
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add "Définir le cadrage" button in multi mode to save current map
center and zoom as default framing
- Add getCurrentZoom() method in MapPreview to retrieve current zoom level
- Fix: prevent automatic save on initial load with isInitialLoad flag
to avoid marking page as modified when loading existing data
- Style: dark button theme for save framing button
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Generate marker slugs from title (e.g., "marqueur-2") instead of
timestamp-based slugs (e.g., "marker-1770362950"). Also fix panelUrl
generation to use Kirby's panel URL method.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
API now returns iconUrl and iconSize for each marker, allowing custom
marker icons defined in marker.yml to be displayed on the map-editor
field of the parent map page.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Return title directly instead of reading from page object
- Prevents showing identifier/slug before reload
- New markers now display "Marqueur [index]" immediately in list
- Also return num directly for consistency
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add markerIcon files field to marker.yml for custom JPG/PNG/SVG icons
- Add markerIconSize range field (20-500px, default 40px) with unit display
- Layout icon fields side-by-side (50/50 width) in marker blueprint
- Add markerIconUrl prop in index.php to auto-detect uploaded icon
- Add markerIconSize prop in index.php to read size from page data
- Update MapPreview.vue to display custom images instead of default pins
- Set icon dimensions dynamically based on markerIconSize value
- Icon size updates on save/reload (reactive implementation deferred)
- Remove custom tiles background functionality (not needed)
Note: Custom icons show uploaded image, may have white background on
transparent PNGs depending on image processing. Size is non-reactive
and requires save + reload to update in preview.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Remove custom title field from marker.yml blueprint
- Use default Kirby page title for marker names in MarkerList
- Add French tooltips to MarkerList buttons (Ajouter, Modifier, Supprimer)
- API already uses page title via $marker->title()->value()
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Enhanced coordinate synchronization in single mode to handle Panel
actions like "Supprimer" (reset to saved values).
Issues Fixed:
- Marker not updating when clicking "Supprimer" button in Panel
- Panel "Supprimer" restores saved coordinates but marker didn't move
- No detection of programmatic field value changes
Solution:
- Add MutationObserver to detect attribute changes on input fields
- Add 500ms polling as fallback for value detection
- Add nextTick() for reactive updates to ensure proper timing
- Handle coordinate reset: when invalid, return to default center
- Proper cleanup with onBeforeUnmount for observers and intervals
Behavior:
- User changes field → marker updates immediately
- User drags marker → fields update immediately
- User clicks "Supprimer" → marker returns to saved position
- Fields cleared → marker disappears, map resets to default center
Technical Details:
- MutationObserver watches 'value' attribute on lat/lon inputs
- Polling checks every 500ms for changes missed by events
- Watcher uses nextTick() to ensure DOM updates complete
- All event listeners and observers properly cleaned up on unmount
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>