Add on-page editor for the go-graph-cms
Injectable React editor that is side-loaded onto the statically rendered page and edits through the CMS HTTP API (POST /api/edit). - Shadow-root UI over server HTML; patches morphed in, undo/redo from server inverses (reuses @k6n/cms-editor EditClient/morph/markdown editor) - Sign-in via go-auth device grant as the CMS client (aud matches), token refresh + 401 retry; live preview swapped in on load and on tab focus - Schema-driven property form (arrays, maps, variants, $ref, validation) - Every string property editable where it is rendered (value-bound inline fields and attribute chips), markdown WYSIWYG for marked fields - Block palette + drag & drop with ghost drop targets, insertion slots, sort snapping between siblings (Alt to nest) - x-style annotations: on-page padding/margin/gap handles, Style panel, wrap-in-layout; x-graph label/group for titles and grouping - Dev workflow: Vite proxy to the live site (token injected server-side) or an offline in-memory mock CMS; jsdom test suite Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
1af9ec3172
67 files changed
+12322
No files matched your search
@@ -0,0 +1,275 @@
|
||||
:host { all: initial; }
|
||||
* { box-sizing: border-box; }
|
||||
.cms-root { font: 13px/1.4 Inter, system-ui, sans-serif; color: #e8e9ee; }
|
||||
button { font: inherit; color: inherit; cursor: pointer; }
|
||||
button:disabled { opacity: .35; cursor: default; }
|
||||
.cms-muted { color: #8b8fa0; margin: 4px 0; }
|
||||
.cms-error { color: #ff8a8a; }
|
||||
.cms-mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; }
|
||||
|
||||
/* overlay frames never take pointer events: the page owns hit-testing */
|
||||
.cms-overlay { position: fixed; inset: 0; pointer-events: none; z-index: 2147483000; }
|
||||
.cms-frame { position: fixed; border: 1px solid #6aa7ff; background: rgba(106,167,255,.07); border-radius: 2px; }
|
||||
.cms-frame--selected { border: 2px solid #d2a24c; background: rgba(210,162,76,.08); }
|
||||
.cms-frame--editing { border: 2px dashed #5ee0a0; background: none; }
|
||||
.cms-frame__tag { position: absolute; top: -18px; left: -1px; padding: 1px 6px; font-size: 11px; background: #6aa7ff; color: #07080b; border-radius: 3px 3px 0 0; }
|
||||
|
||||
.cms-bar, .cms-dock, .cms-dialog, .cms-outline, .cms-dev, .cms-toast {
|
||||
pointer-events: auto; position: fixed; z-index: 2147483001;
|
||||
background: #14161d; border: 1px solid #2a2d3a; border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.45);
|
||||
}
|
||||
.cms-bar { display: flex; align-items: center; gap: 2px; padding: 3px 4px; border-radius: 8px; }
|
||||
.cms-bar__type { padding: 0 8px; color: #d2a24c; font-weight: 600; }
|
||||
.cms-bar__sep { width: 1px; height: 18px; background: #2a2d3a; margin: 0 3px; }
|
||||
.cms-ico { background: none; border: 0; border-radius: 6px; min-width: 28px; height: 28px; padding: 0 6px; }
|
||||
.cms-ico:hover:not(:disabled), .cms-pill:hover { background: #242836; }
|
||||
.cms-ico.is-on { background: #2b3350; }
|
||||
.cms-ico--danger:hover:not(:disabled) { background: #5a2330; }
|
||||
|
||||
.cms-dock { left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 5px 8px; border-radius: 999px; }
|
||||
.cms-pill { background: none; border: 1px solid #2a2d3a; border-radius: 999px; padding: 4px 12px; height: 28px; }
|
||||
.cms-pill.is-on { background: #2b3350; border-color: #4a5a9a; }
|
||||
.cms-pill--primary { background: #d2a24c; border-color: #d2a24c; color: #07080b; font-weight: 600; }
|
||||
.cms-pill--primary:hover { background: #e0b25c; }
|
||||
.cms-busy { width: 8px; height: 8px; border-radius: 50%; background: #3b3f52; margin: 0 4px; }
|
||||
.cms-busy.is-busy { background: #5ee0a0; animation: cms-pulse .8s infinite alternate; }
|
||||
@keyframes cms-pulse { to { opacity: .2; } }
|
||||
|
||||
.cms-dialog { max-height: calc(100vh - 24px); display: flex; flex-direction: column; }
|
||||
.cms-dialog__head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 14px; border-bottom: 1px solid #2a2d3a; cursor: grab; user-select: none; }
|
||||
.cms-dialog__body { padding: 12px 14px; overflow: auto; }
|
||||
|
||||
.cms-form { display: flex; flex-direction: column; gap: 10px; }
|
||||
.cms-field { display: flex; flex-direction: column; gap: 3px; }
|
||||
.cms-field__label { font-weight: 500; color: #c3c6d4; }
|
||||
.cms-field__label b { color: #ff8a8a; }
|
||||
.cms-field__hint { color: #8b8fa0; font-size: 11.5px; }
|
||||
.cms-input { width: 100%; background: #0c0d12; color: inherit; border: 1px solid #2a2d3a; border-radius: 6px; padding: 6px 8px; font: inherit; }
|
||||
.cms-input:focus { outline: 2px solid #4a5a9a; outline-offset: -1px; }
|
||||
.cms-input--area { resize: vertical; }
|
||||
.cms-input--bad { border-color: #ff6b6b; }
|
||||
.cms-check { width: 16px; height: 16px; }
|
||||
.cms-nested { border: 1px solid #2a2d3a; border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 10px; margin: 0; }
|
||||
.cms-extra summary { cursor: pointer; color: #8b8fa0; margin-bottom: 6px; }
|
||||
.cms-actions { display: flex; justify-content: flex-end; gap: 8px; position: sticky; bottom: 0; }
|
||||
.cms-btn { background: #242836; border: 1px solid #343850; border-radius: 6px; padding: 5px 14px; }
|
||||
.cms-btn--primary { background: #d2a24c; border-color: #d2a24c; color: #07080b; font-weight: 600; }
|
||||
|
||||
.cms-picker h4 { margin: 10px 0 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8b8fa0; }
|
||||
.cms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
|
||||
.cms-tile { background: #1d2029; border: 1px solid #2a2d3a; border-radius: 8px; padding: 10px 8px; text-align: left; }
|
||||
.cms-tile:hover { border-color: #d2a24c; }
|
||||
|
||||
.cms-dev header { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 12px; border-bottom: 1px solid #2a2d3a; }
|
||||
.cms-outline li button { display: flex; gap: 8px; width: 100%; background: none; border: 0; border-radius: 5px; padding: 3px 8px; text-align: left; overflow: hidden; white-space: nowrap; }
|
||||
.cms-outline li button:hover, .cms-outline li button.is-sel { background: #242836; }
|
||||
.cms-outline li button.is-sel { color: #d2a24c; }
|
||||
.cms-outline__type { font-weight: 600; }
|
||||
.cms-outline__text { color: #8b8fa0; overflow: hidden; text-overflow: ellipsis; }
|
||||
|
||||
.cms-dev { right: 12px; top: 12px; bottom: 70px; width: 420px; display: flex; flex-direction: column; overflow: hidden; }
|
||||
.cms-dev header { justify-content: flex-start; gap: 4px; }
|
||||
.cms-dev header button:not(.cms-ico) { background: none; border: 0; padding: 4px 10px; border-radius: 6px; text-transform: capitalize; }
|
||||
.cms-dev header button.is-on { background: #2b3350; }
|
||||
.cms-dev header .cms-ico { margin-left: auto; }
|
||||
.cms-dev__body { overflow: auto; padding: 8px; }
|
||||
.cms-dev pre { margin: 4px 0; font: 11.5px/1.45 "JetBrains Mono", monospace; white-space: pre-wrap; word-break: break-all; color: #b9bdd0; }
|
||||
.cms-log > button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 3px 4px; font: 11.5px "JetBrains Mono", monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.cms-log > button:hover { background: #1d2029; }
|
||||
.cms-log i { color: #8b8fa0; font-style: normal; }
|
||||
.cms-status { padding: 0 4px; border-radius: 3px; }
|
||||
.cms-status.s2 { background: #1f4d36; } .cms-status.s4, .cms-status.s5, .cms-status.s0 { background: #5a2330; }
|
||||
|
||||
.cms-toast { left: 50%; bottom: 68px; transform: translateX(-50%); padding: 8px 14px; max-width: 80vw; cursor: pointer; }
|
||||
.cms-toast--error { border-color: #a33a4a; background: #2a1219; }
|
||||
|
||||
.cms-bar__grip { cursor: grab; user-select: none; }
|
||||
.cms-bar__grip:active { cursor: grabbing; }
|
||||
.cms-dropline { position: fixed; background: #5ee0a0; border-radius: 2px; box-shadow: 0 0 0 2px rgba(94,224,160,.25); }
|
||||
.cms-user { padding: 0 10px; color: #8b8fa0; }
|
||||
.cms-toast__action { margin-left: 12px; background: none; border: 0; color: #d2a24c; font-weight: 600; text-decoration: underline; }
|
||||
|
||||
.cms-login { pointer-events: auto; position: fixed; z-index: 2147483002; left: 50%; bottom: 72px; transform: translateX(-50%); width: 340px; max-width: calc(100vw - 24px);
|
||||
background: #14161d; border: 1px solid #2a2d3a; border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.5); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
|
||||
.cms-login h3 { margin: 0; font-size: 15px; }
|
||||
.cms-login p { margin: 0; }
|
||||
.cms-login__link { text-align: center; text-decoration: none; display: block; }
|
||||
.cms-login__paste summary { cursor: pointer; color: #8b8fa0; margin-bottom: 8px; }
|
||||
.cms-login__paste form { display: flex; flex-direction: column; gap: 8px; }
|
||||
.cms-code { font: 600 26px/1 "JetBrains Mono", monospace; letter-spacing: .14em; text-align: center; padding: 14px 0; background: #0c0d12; border: 1px dashed #4a5a9a; border-radius: 8px; user-select: all; }
|
||||
.cms-waiting { display: flex; align-items: center; gap: 8px; }
|
||||
.cms-spinner { width: 12px; height: 12px; border: 2px solid #3b3f52; border-top-color: #d2a24c; border-radius: 50%; animation: cms-spin .8s linear infinite; }
|
||||
@keyframes cms-spin { to { transform: rotate(360deg); } }
|
||||
@media (prefers-reduced-motion: reduce) { .cms-spinner, .cms-busy.is-busy { animation: none; } }
|
||||
|
||||
/* form: arrays, maps, variants, groups */
|
||||
.cms-field.has-error > .cms-input, .cms-field.has-error .cms-input { border-color: #ff6b6b; }
|
||||
.cms-field__error { color: #ff8a8a; font-size: 11.5px; }
|
||||
.cms-inline { display: inline-flex; align-items: center; gap: 6px; }
|
||||
.cms-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
|
||||
.cms-array, .cms-map, .cms-variant { display: flex; flex-direction: column; gap: 6px; }
|
||||
.cms-array__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
|
||||
.cms-item { border: 1px solid #2a2d3a; border-radius: 8px; background: #101219; }
|
||||
.cms-item.is-over { border-color: #5ee0a0; box-shadow: 0 0 0 2px rgba(94,224,160,.2); }
|
||||
.cms-item__head { display: flex; align-items: center; gap: 4px; padding: 3px 4px 3px 2px; }
|
||||
.cms-item__title { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 4px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 6px; }
|
||||
.cms-item__title:hover { background: #1d2029; }
|
||||
.cms-item__value { flex: 1; min-width: 0; }
|
||||
.cms-item__actions { display: flex; flex-shrink: 0; }
|
||||
.cms-item__body { padding: 8px 10px 10px; border-top: 1px solid #2a2d3a; display: flex; flex-direction: column; gap: 10px; }
|
||||
.cms-object { display: flex; flex-direction: column; gap: 10px; }
|
||||
.cms-chev { display: inline-block; transition: transform .12s; color: #8b8fa0; }
|
||||
.cms-chev.is-open { transform: rotate(90deg); }
|
||||
.cms-grip { cursor: grab; color: #5b6075; padding: 0 4px; user-select: none; }
|
||||
.cms-array__foot { display: flex; align-items: center; gap: 10px; }
|
||||
.cms-map__row { display: flex; align-items: flex-start; gap: 6px; }
|
||||
.cms-map__key { width: 34%; flex-shrink: 0; padding-top: 6px; color: #c3c6d4; }
|
||||
input.cms-map__key { padding-top: 6px; }
|
||||
.cms-map__value { flex: 1; min-width: 0; }
|
||||
.cms-map__add { display: flex; gap: 6px; }
|
||||
.cms-group { border: 1px solid #2a2d3a; border-radius: 8px; padding: 6px 10px; }
|
||||
.cms-group > summary { cursor: pointer; font-weight: 600; padding: 2px 0; }
|
||||
.cms-group[open] > summary { margin-bottom: 8px; }
|
||||
.cms-group[open] { display: flex; flex-direction: column; gap: 10px; }
|
||||
.cms-readonly { margin: 0; padding: 6px 8px; background: #0c0d12; border-radius: 6px; font: 12px/1.4 "JetBrains Mono", monospace; white-space: pre-wrap; color: #9aa0b5; }
|
||||
.cms-thumb { max-width: 160px; max-height: 90px; object-fit: contain; border-radius: 6px; border: 1px solid #2a2d3a; }
|
||||
.cms-actions__note { margin-right: auto; align-self: center; }
|
||||
|
||||
/* style: handles, bands, panel */
|
||||
.cms-band { position: fixed; pointer-events: none; }
|
||||
.cms-band--padding { background: rgba(110,231,160,.22); outline: 1px solid rgba(110,231,160,.5); }
|
||||
.cms-band--margin { background: rgba(243,168,95,.22); outline: 1px solid rgba(243,168,95,.5); }
|
||||
.cms-band--gap { background: rgba(180,140,255,.28); outline: 1px solid rgba(180,140,255,.55); }
|
||||
.cms-grip-h { position: fixed; pointer-events: auto; z-index: 2; border-radius: 99px; background: #fff; border: 2px solid currentColor; box-shadow: 0 1px 4px rgba(0,0,0,.4); touch-action: none; opacity: .85; }
|
||||
.cms-grip-h:hover, .cms-grip-h.is-active { opacity: 1; transform: scale(1.06); }
|
||||
.cms-grip-h--y { cursor: ns-resize; } .cms-grip-h--x { cursor: ew-resize; }
|
||||
.cms-grip-h--padding { color: #2fbf71; } .cms-grip-h--margin { color: #e8872b; } .cms-grip-h--gap { color: #9a6cf0; }
|
||||
.cms-tip { position: fixed; pointer-events: none; background: #14161d; border: 1px solid #2a2d3a; border-radius: 6px; padding: 3px 8px; font-size: 12px; white-space: nowrap; z-index: 3; }
|
||||
.cms-tip b { color: #d2a24c; }
|
||||
|
||||
.cms-style { display: flex; flex-direction: column; gap: 14px; }
|
||||
.cms-style__section { display: flex; flex-direction: column; gap: 10px; }
|
||||
.cms-style__section h4 { margin: 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8b8fa0; }
|
||||
.cms-style__note { font-size: 11.5px; }
|
||||
.cms-tabs { display: flex; gap: 2px; border-bottom: 1px solid #2a2d3a; }
|
||||
.cms-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 6px 10px; color: #8b8fa0; }
|
||||
.cms-tabs button.is-on { color: #e8e9ee; border-color: #d2a24c; }
|
||||
.cms-ctl { display: flex; flex-direction: column; gap: 4px; }
|
||||
.cms-ctl__head { display: flex; align-items: center; justify-content: space-between; }
|
||||
.cms-ctl__label { color: #c3c6d4; font-weight: 500; }
|
||||
.cms-ctl__clear { background: none; border: 0; color: #8b8fa0; padding: 0 4px; }
|
||||
.cms-ctl__clear:hover { color: #e8e9ee; }
|
||||
.cms-chips { display: flex; flex-wrap: wrap; gap: 4px; }
|
||||
.cms-chip { background: #1d2029; border: 1px solid #2a2d3a; border-radius: 6px; padding: 4px 9px; }
|
||||
.cms-chip:hover { border-color: #4a5a9a; }
|
||||
.cms-chip.is-on { background: #2b3350; border-color: #6a7fe0; color: #fff; }
|
||||
.cms-stepper { display: flex; align-items: center; gap: 4px; }
|
||||
.cms-stepper .cms-input { width: 64px; text-align: center; }
|
||||
|
||||
.cms-boxmodel { display: flex; justify-content: center; }
|
||||
.cms-box { display: grid; grid-template-columns: 74px 1fr 74px; grid-template-rows: auto auto auto; gap: 4px; padding: 6px; border-radius: 8px; position: relative; width: 100%; }
|
||||
.cms-box--margin { background: rgba(243,168,95,.12); border: 1px dashed rgba(243,168,95,.55); }
|
||||
.cms-box--padding { background: rgba(110,231,160,.12); border: 1px dashed rgba(110,231,160,.55); }
|
||||
.cms-box__title { position: absolute; top: 2px; left: 8px; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #8b8fa0; }
|
||||
.cms-box__top { grid-column: 2; grid-row: 1; text-align: center; padding-top: 10px; }
|
||||
.cms-box__bottom { grid-column: 2; grid-row: 3; text-align: center; }
|
||||
.cms-box__left { grid-column: 1; grid-row: 2; align-self: center; }
|
||||
.cms-box__right { grid-column: 3; grid-row: 2; align-self: center; text-align: right; }
|
||||
.cms-box__mid { grid-column: 2; grid-row: 2; min-width: 0; }
|
||||
.cms-box__content { display: block; text-align: center; padding: 14px 0; border-radius: 6px; background: #0c0d12; color: #5b6075; font-size: 11px; }
|
||||
.cms-box__sel { width: 100%; background: #0c0d12; color: inherit; border: 1px solid #2a2d3a; border-radius: 6px; padding: 3px 4px; font: inherit; }
|
||||
.cms-box__sel.is-inherited { color: #8b8fa0; }
|
||||
.cms-box__link, .cms-box__none { color: #5b6075; font-size: 11px; }
|
||||
|
||||
/* ---- polish: icons, toolbar, menu, rail, palette, drag ---- */
|
||||
:host { --cms-accent: #d2a24c; --cms-line: #2a2d3a; --cms-panel: #14161d; }
|
||||
.cms-svg { display: block; flex-shrink: 0; }
|
||||
.cms-ico { display: inline-flex; align-items: center; justify-content: center; gap: 4px; color: #c9ccda; transition: background .12s, color .12s; }
|
||||
.cms-ico:hover:not(:disabled) { color: #fff; }
|
||||
.cms-ico.is-on { color: var(--cms-accent); }
|
||||
.cms-bar { padding: 4px 6px; gap: 2px; border-radius: 10px; backdrop-filter: blur(6px); }
|
||||
.cms-bar__type { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px 0 4px; height: 28px; color: var(--cms-accent); font-weight: 600; border-radius: 6px; }
|
||||
.cms-bar__type:hover { background: #242836; }
|
||||
.cms-bar__sep, .cms-dock__sep { width: 1px; height: 18px; background: var(--cms-line); margin: 0 4px; }
|
||||
.cms-frame__tag { display: inline-flex; align-items: center; gap: 4px; }
|
||||
.cms-frame--selected::after { content: ''; position: absolute; inset: -2px; border-radius: 3px; box-shadow: 0 0 0 4px rgba(210,162,76,.18); pointer-events: none; }
|
||||
|
||||
.cms-dock { padding: 6px 10px; gap: 2px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
|
||||
.cms-pill { display: inline-flex; align-items: center; gap: 6px; }
|
||||
.cms-toast { display: flex; align-items: center; gap: 8px; }
|
||||
.cms-toast--error svg { color: #ff8a8a; } .cms-toast svg { color: #5ee0a0; }
|
||||
.cms-chip { display: inline-flex; align-items: center; gap: 6px; }
|
||||
.cms-tile { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
|
||||
.cms-tile svg { color: var(--cms-accent); }
|
||||
|
||||
.cms-menuwrap { position: relative; }
|
||||
.cms-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px; background: var(--cms-panel); border: 1px solid var(--cms-line); border-radius: 10px; box-shadow: 0 12px 36px rgba(0,0,0,.55); padding: 4px; display: flex; flex-direction: column; z-index: 5; }
|
||||
.cms-menu button { display: flex; align-items: center; gap: 10px; background: none; border: 0; text-align: left; padding: 7px 10px; border-radius: 6px; white-space: nowrap; }
|
||||
.cms-menu button:hover { background: #242836; }
|
||||
|
||||
/* drag: ghost = the virtual element showing where the block lands */
|
||||
.cms-ghost { position: fixed; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 2px dashed #5ee0a0; border-radius: 8px; background: rgba(94,224,160,.14); color: #bff5d9; font-weight: 600; pointer-events: none; box-shadow: 0 6px 24px rgba(0,0,0,.35); animation: cms-pop .12s ease-out; }
|
||||
@keyframes cms-pop { from { transform: scale(.97); opacity: 0; } }
|
||||
.cms-dragchip { position: fixed; display: inline-flex; align-items: center; gap: 6px; background: var(--cms-panel); border: 1px solid #5ee0a0; border-radius: 999px; padding: 3px 10px; font-size: 12px; pointer-events: none; z-index: 4; }
|
||||
.cms-dragchip.is-refused { border-color: #a33a4a; color: #ff8a8a; }
|
||||
|
||||
/* insertion slots */
|
||||
.cms-slot { position: fixed; pointer-events: auto; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 4px; min-width: 22px; height: 22px; padding: 0 3px; border-radius: 999px; border: 1px solid #4a5a9a; background: #2b3350; color: #dfe5ff; opacity: .0; transition: opacity .12s, transform .12s; z-index: 1; }
|
||||
.cms-overlay:hover .cms-slot, .cms-slot:focus-visible, .cms-slot--empty { opacity: .9; }
|
||||
.cms-slot:hover { opacity: 1; transform: translate(-50%, -50%) scale(1.12); background: #3a4672; }
|
||||
.cms-slot--empty { padding: 0 12px; height: 30px; border-style: dashed; background: rgba(43,51,80,.85); }
|
||||
|
||||
.cms-attrchip { position: fixed; pointer-events: auto; transform: translate(-100%, -100%); display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 999px; border: 1px solid #5ee0a0; background: #14161d; color: #5ee0a0; z-index: 1; }
|
||||
.cms-attrchip:hover { background: #1f3a2e; }
|
||||
|
||||
/* left rail: outline + block palette */
|
||||
.cms-rail { pointer-events: auto; position: fixed; z-index: 2147483001; left: 12px; top: 12px; bottom: 76px; width: 280px; display: flex; flex-direction: column; overflow: hidden; background: var(--cms-panel); border: 1px solid var(--cms-line); border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
|
||||
.cms-rail > header { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 0 6px; border-bottom: 1px solid var(--cms-line); }
|
||||
.cms-rail .cms-tabs { border: 0; } .cms-rail .cms-tabs button { display: inline-flex; align-items: center; gap: 6px; }
|
||||
.cms-pad { padding: 10px 12px 4px; }
|
||||
.cms-hint { font-size: 11.5px; margin-top: 6px; }
|
||||
.cms-outline { list-style: none; margin: 0; padding: 4px; overflow: auto; }
|
||||
.cms-outline li button { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; border-radius: 6px; padding: 4px 8px; text-align: left; overflow: hidden; white-space: nowrap; }
|
||||
.cms-outline li button:hover, .cms-outline li button.is-sel { background: #242836; }
|
||||
.cms-outline li button.is-sel { color: var(--cms-accent); }
|
||||
.cms-outline__type { font-weight: 600; } .cms-outline__text { color: #8b8fa0; overflow: hidden; text-overflow: ellipsis; }
|
||||
.cms-palette { overflow: auto; padding-bottom: 12px; }
|
||||
.cms-palette h4 { margin: 10px 12px 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8b8fa0; }
|
||||
.cms-palette__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 0 10px; }
|
||||
.cms-block { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 8px; background: #1a1d26; border: 1px solid var(--cms-line); border-radius: 10px; cursor: grab; touch-action: none; user-select: none; text-align: center; }
|
||||
.cms-block svg { color: var(--cms-accent); } .cms-block span { font-size: 12px; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
|
||||
.cms-block:hover { border-color: #4a5a9a; background: #20243a; }
|
||||
.cms-block:active { cursor: grabbing; }
|
||||
.cms-dev header .cms-ico { margin-left: auto; }
|
||||
|
||||
/* sort snapping: faint markers at every candidate position, the active one animates between them */
|
||||
.cms-snap { position: fixed; pointer-events: none; background: rgba(94,224,160,.28); border-radius: 2px; }
|
||||
.cms-snap.is-active { background: transparent; }
|
||||
.cms-dropline { transition: left .09s ease-out, top .09s ease-out, width .09s ease-out, height .09s ease-out; }
|
||||
@media (prefers-reduced-motion: reduce) { .cms-dropline { transition: none; } }
|
||||
|
||||
/* titles + groups */
|
||||
.cms-frame__tag i { font-style: normal; opacity: .7; font-weight: 400; }
|
||||
.cms-frame__tag em { font-style: normal; margin-left: 6px; padding: 0 5px; border-radius: 99px; background: rgba(7,8,11,.25); font-size: 10px; }
|
||||
.cms-bar__name { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.cms-group-sec > summary { cursor: pointer; list-style: none; margin: 10px 12px 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8b8fa0; display: flex; gap: 8px; align-items: center; }
|
||||
.cms-group-sec > summary::-webkit-details-marker { display: none; }
|
||||
|
||||
.cms-block small, .cms-tile small { display: block; font-size: 10.5px; color: #8b8fa0; font-family: "JetBrains Mono", monospace; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
|
||||
.cms-tile span { font-weight: 500; }
|
||||
|
||||
/* disclosure chevrons are icons now (rotate when open) */
|
||||
summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 4px; }
|
||||
summary::-webkit-details-marker { display: none; }
|
||||
summary .cms-chev { transition: transform .12s; color: #8b8fa0; }
|
||||
details[open] > summary > .cms-chev { transform: rotate(90deg); }
|
||||
.cms-box__link { display: inline-flex; align-items: center; gap: 3px; }
|
||||
.cms-item__head .cms-ico, .cms-map__row .cms-ico { padding: 0 4px; }
|
||||
.cms-grip { display: inline-flex; align-items: center; }
|
||||
|
||||
.cms-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
|
||||
|
||||
/* a dialog asked for again: flash it instead of opening a duplicate */
|
||||
.cms-dialog.is-pulsing { animation: cms-pulse-ring .7s ease-out; }
|
||||
@keyframes cms-pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(210,162,76,.9), 0 8px 30px rgba(0,0,0,.45); } 100% { box-shadow: 0 0 0 14px rgba(210,162,76,0), 0 8px 30px rgba(0,0,0,.45); } }
|
||||
@media (prefers-reduced-motion: reduce) { .cms-dialog.is-pulsing { animation: none; outline: 2px solid #d2a24c; } }
|
||||
Reference in new issue
Block a user