@v7-cms/cms 0.0.0-alpha.9
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/dist/cms.css +1 -0
- package/dist/v7-cms.js +66824 -0
- package/package.json +73 -0
package/dist/cms.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.v7-cms{--paper: #f8f5ef;--surface: #f0ebe3;--ink: #29251f;--muted: #71675b;--accent: #964630;--line: #ddd6ca;--danger: #a3372a;--ok: #4d6b4a;--radius: 4px;--heading: "Iowan Old Style", "Palatino Linotype", "Noto Serif CJK SC", Georgia, serif;--ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;--mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;color:var(--ink);background:var(--paper);font-family:var(--ui);font-size:14px;line-height:1.6;min-height:100vh}.v7-cms[data-theme=dark]{--paper: #191817;--surface: #24211e;--ink: #e8e2d8;--muted: #b5aa9c;--accent: #e2a083;--line: #3b352f;--danger: #e08a7a;--ok: #9db598}.v7-cms *,.v7-cms *:before,.v7-cms *:after{box-sizing:border-box}.v7-cms h1,.v7-cms h2,.v7-cms h3{margin:0 0 .5rem;font-family:var(--heading);font-weight:500}.v7-cms ul{margin:0;padding:0;list-style:none}.v7-cms :focus-visible{outline:2px solid var(--accent);outline-offset:2px}.v7-cms .shell{display:grid;grid-template-columns:15rem minmax(0,1fr);min-height:100vh}.v7-cms .sidebar{display:flex;flex-direction:column;position:sticky;top:0;align-self:start;max-height:100vh;overflow-y:auto;padding:1.25rem 1rem;border-right:1px solid var(--line);background:var(--surface)}.v7-cms .brand{margin:0 0 1.25rem;font-family:var(--heading);font-size:1.15rem;letter-spacing:-.02em}.v7-cms .nav-heading{margin:1.5rem 0 .4rem;color:var(--muted);font-size:.72rem;letter-spacing:.08em;text-transform:uppercase}.v7-cms .nav-link{display:block;width:100%;padding:.45rem .6rem;border:0;border-radius:var(--radius);background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}.v7-cms .nav-link:hover{background:color-mix(in srgb,var(--paper) 70%,transparent)}.v7-cms .nav-link[aria-current=page]{background:var(--paper);box-shadow:inset 2px 0 0 var(--accent)}.v7-cms .nav-link.muted{color:var(--muted);cursor:default}.v7-cms .main{min-width:0}.v7-cms .account{margin-top:auto;padding-top:.9rem;border-top:1px solid var(--line);display:grid;gap:.5rem}.v7-cms .account-identity{display:flex;align-items:center;gap:.5rem;min-width:0}.v7-cms .account-avatar{border-radius:50%;flex:none}.v7-cms .account-text{min-width:0}.v7-cms .account-name{margin:0;font-weight:600;font-size:.85rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.v7-cms .account-via{margin:0;color:var(--muted);font-size:.72rem}.v7-cms .account-signout{width:100%;font-size:.78rem}.v7-cms .account-confirm{display:grid;gap:.4rem}.v7-cms .account-actions{display:flex;gap:.4rem}.v7-cms .account-actions .button{flex:1;font-size:.78rem}.v7-cms .editor{display:grid;grid-template-columns:16rem minmax(0,1fr);min-height:100vh}.v7-cms .entry-list{padding:1rem .75rem;border-right:1px solid var(--line)}.v7-cms .entry-list-head{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.75rem}.v7-cms .entry-list h2{font-size:.95rem}.v7-cms .entry-link{display:block;width:100%;padding:.4rem .55rem;border:0;border-radius:var(--radius);background:none;color:inherit;font:inherit;text-align:left;overflow-wrap:anywhere;cursor:pointer}.v7-cms .entry-link:hover{background:var(--surface)}.v7-cms .entry-link[aria-current=true]{background:var(--surface);box-shadow:inset 2px 0 0 var(--accent)}.v7-cms .entry-editor{padding:1.25rem 1.5rem 4rem;min-width:0}.v7-cms .editor-head{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;flex-wrap:wrap;padding-bottom:.75rem;margin-bottom:1.25rem;border-bottom:1px solid var(--line)}.v7-cms .editor-path{font-family:var(--mono);font-size:.78rem;color:var(--muted);overflow-wrap:anywhere}.v7-cms .editor-actions{display:flex;gap:.5rem}.v7-cms .button{padding:.35rem .8rem;border:1px solid var(--line);border-radius:var(--radius);background:var(--paper);color:inherit;font:inherit;font-size:.85rem;cursor:pointer}.v7-cms .button:hover:not(:disabled){border-color:var(--accent);color:var(--accent)}.v7-cms .button:disabled{opacity:.55;cursor:not-allowed}.v7-cms .button.primary{border-color:var(--accent);background:var(--accent);color:#fff}.v7-cms .button.danger:hover:not(:disabled){border-color:var(--danger);color:var(--danger)}.v7-cms .input{width:100%;padding:.45rem .6rem;border:1px solid var(--line);border-radius:var(--radius);background:color-mix(in srgb,var(--paper) 92%,#fff);color:var(--ink);font:inherit}.v7-cms .input:focus{border-color:var(--accent);outline:none;box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 20%,transparent)}.v7-cms .textarea{resize:vertical;line-height:1.7}.v7-cms .textarea.body{font-family:var(--mono);font-size:.82rem}.v7-cms .fields{display:grid;gap:1rem}.v7-cms .field-label{display:block;margin-bottom:.25rem;color:var(--muted);font-size:.78rem}.v7-cms .field-optional{opacity:.7}.v7-cms .field-hint{margin:.3rem 0 0;color:var(--muted);font-size:.75rem}.v7-cms .field-error{margin:.3rem 0 0;color:var(--danger);font-size:.78rem}.v7-cms .field[data-invalid=true] .input{border-color:var(--danger)}.v7-cms .object{display:grid;gap:.75rem;padding:.75rem;border:1px solid var(--line);border-radius:var(--radius)}.v7-cms .toggle{display:inline-flex;align-items:center;gap:.5rem;cursor:pointer}.v7-cms .list{display:grid;gap:.6rem}.v7-cms .list-item{border:1px solid var(--line);border-radius:var(--radius)}.v7-cms .list-row{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.4rem .55rem;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--surface) 55%,transparent)}.v7-cms .list-summary{overflow-wrap:anywhere;font-size:.82rem}.v7-cms .list-actions{display:flex;gap:.15rem}.v7-cms .list-actions button{width:1.7rem;height:1.7rem;border:1px solid transparent;border-radius:var(--radius);background:none;color:var(--muted);font:inherit;cursor:pointer}.v7-cms .list-actions button:hover{border-color:var(--line);color:var(--ink)}.v7-cms .list-fields{display:grid;gap:.75rem;padding:.75rem}.v7-cms .add-item{justify-self:start;margin-top:.6rem}.v7-cms .notice{margin:.75rem 0;color:var(--muted);font-size:.85rem}.v7-cms .notice.ok{color:var(--ok)}.v7-cms .notice.error{color:var(--danger)}.v7-cms .config-errors{max-width:42rem;margin:3rem auto;padding:1.5rem}.v7-cms .config-errors ul{display:grid;gap:.5rem}.v7-cms .config-errors code{font-family:var(--mono);font-size:.85em;background:var(--surface);padding:.1em .3em;border-radius:3px}@media(max-width:900px){.v7-cms .shell,.v7-cms .editor{grid-template-columns:minmax(0,1fr)}.v7-cms .sidebar,.v7-cms .entry-list{border-right:0;border-bottom:1px solid var(--line)}.v7-cms .sidebar{position:static;max-height:none;overflow-y:visible}.v7-cms .entry-editor{padding:1rem 1rem 3rem}}.v7-cms .body-field{margin-top:1.5rem}.v7-cms .body-head{display:flex;align-items:baseline;justify-content:space-between;gap:.75rem;margin-bottom:.25rem}.v7-cms .body-actions{display:flex;align-items:center;gap:.6rem}.v7-cms .body-warning{color:var(--danger);font-size:.75rem}.v7-cms .body-field[data-mode=rich] .body-head{margin-bottom:.5rem}.v7-cms .source-editor,.v7-cms .rich-editor{border:1px solid var(--line);border-radius:var(--radius);background:color-mix(in srgb,var(--paper) 92%,#fff);overflow:hidden}.v7-cms .source-editor .cm-editor{font-family:var(--mono);font-size:.82rem}.v7-cms .source-editor .cm-editor.cm-focused{outline:none}.v7-cms .source-editor .cm-scroller{max-height:34rem;line-height:1.7}.v7-cms .source-editor .cm-gutters{border-right:1px solid var(--line);background:transparent;color:var(--muted)}.v7-cms .rich-editor{padding:1rem 1.1rem;min-height:12rem;font-family:var(--heading);font-size:1.02rem;line-height:1.8}.v7-cms .rich-editor:focus-visible,.v7-cms .rich-editor:focus-within{border-color:var(--accent)}.v7-cms .rich-editor :focus-visible{outline:none}.v7-cms .rich-editor h2,.v7-cms .rich-editor h3{font-family:var(--heading)}.v7-cms .rich-editor blockquote{margin:1rem 0;padding-left:.9rem;border-left:2px solid var(--accent);color:var(--muted)}.v7-cms .rich-editor pre{padding:.8rem;border-radius:var(--radius);background:var(--surface);font-family:var(--mono);font-size:.82rem;overflow-x:auto}.v7-cms .rich-editor img{max-width:100%;height:auto}.v7-cms .rich-editor a{color:var(--accent)}.v7-cms .connect{max-width:34rem;margin:4rem auto;padding:1.5rem}.v7-cms .connect h1{font-family:var(--heading);font-size:1.5rem;margin-bottom:.75rem}.v7-cms .connect form{margin-top:1.5rem}.v7-cms .connect .toggle{margin-top:.9rem}.v7-cms .connect .notice.error{margin-top:1rem}.v7-cms .view-switch{display:inline-flex;gap:.2rem;margin:.5rem 0 1rem;padding:.2rem;border:1px solid var(--line);border-radius:999px;font-size:.8rem}.v7-cms .view-switch button{padding:.35rem .85rem;border:0;border-radius:999px;background:none;color:var(--muted);font:inherit;cursor:pointer}.v7-cms .view-switch button:hover{color:var(--ink)}.v7-cms .view-switch button[aria-selected=true]{background:var(--ink);color:var(--paper)}.v7-cms .connect code{font-family:var(--mono);font-size:.85em;background:var(--surface);padding:.1em .35em;border-radius:3px}.v7-cms .editor:has(>.entry-preview){grid-template-columns:15rem minmax(0,1fr) minmax(0,24rem)}.v7-cms .entry-preview{border-left:1px solid var(--line);padding:1rem 1.1rem 3rem;min-width:0}.v7-cms .preview-head{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.6rem}.v7-cms .preview-body{font-family:var(--heading);font-size:.98rem;line-height:1.8;overflow-wrap:anywhere}.v7-cms .preview-body h1,.v7-cms .preview-body h2,.v7-cms .preview-body h3{font-family:var(--heading);line-height:1.5}.v7-cms .preview-body pre{padding:.7rem;border-radius:var(--radius);background:var(--surface);font-family:var(--mono);font-size:.78rem;overflow-x:auto}.v7-cms .preview-body img{max-width:100%;height:auto}.v7-cms .preview-body a{color:var(--accent)}.v7-cms .preview-body blockquote{margin:1rem 0;padding-left:.9rem;border-left:2px solid var(--accent);color:var(--muted)}.v7-cms .preview-body table{display:block;overflow-x:auto;border-collapse:collapse}.v7-cms .preview-body th,.v7-cms .preview-body td{border-bottom:1px solid var(--line);padding:.4rem .7rem .4rem .1rem;text-align:left}.v7-cms .preview-diagram,.v7-cms .preview-score,.v7-cms .preview-math{margin:1rem 0;overflow-x:auto;text-align:center}.v7-cms .preview-diagram svg,.v7-cms .preview-score svg{max-width:100%;height:auto}.v7-cms .preview-error{padding:.6rem;border:1px dashed var(--danger);border-radius:var(--radius);color:var(--danger);font-family:var(--mono);font-size:.75rem;text-align:left;white-space:pre-wrap}.v7-cms .preview-site iframe{width:100%;height:34rem;border:1px solid var(--line);border-radius:var(--radius);background:var(--paper)}@media(max-width:1200px){.v7-cms .editor:has(>.entry-preview){grid-template-columns:15rem minmax(0,1fr)}.v7-cms .entry-preview{grid-column:2;border-left:0;border-top:1px solid var(--line);padding-top:1.25rem}}@media(max-width:900px){.v7-cms .editor:has(>.entry-preview){grid-template-columns:minmax(0,1fr)}.v7-cms .entry-preview{grid-column:1}}@media(max-width:900px){.v7-cms .editor-head{position:sticky;top:0;z-index:5;margin-inline:-1rem;padding:.6rem 1rem;background:var(--paper);border-bottom:1px solid var(--line)}.v7-cms .editor-actions .button{min-height:2.5rem;padding-inline:1rem}.v7-cms .entry-list{max-height:11rem;overflow-y:auto;padding-block:.75rem}.v7-cms .entry-link{min-height:2.5rem}.v7-cms .list-actions button{width:2.25rem;height:2.25rem}.v7-cms .source-editor .cm-scroller{max-height:22rem}.v7-cms .preview-site iframe{height:22rem}.v7-cms .sidebar{padding-block:.85rem}.v7-cms .sidebar ul{display:flex;flex-wrap:wrap;gap:.25rem}.v7-cms .account{margin-top:.75rem}.v7-cms .account-identity{justify-content:flex-start}.v7-cms .sidebar .nav-heading{margin-top:.75rem}}@media(max-width:639px){.v7-cms .entry-preview{padding-inline:.9rem}.v7-cms .preview-body{font-size:.95rem}}@media(hover:none){.v7-cms .photo-tile .photo-overlay,.v7-cms .rich-editor:focus-within{opacity:1;transform:none}}.v7-cms .localized{display:grid;gap:.4rem}.v7-cms .localized-row{display:grid;grid-template-columns:3.5rem minmax(0,1fr);align-items:center;gap:.6rem}.v7-cms .localized-locale{color:var(--muted);font-size:.72rem;letter-spacing:.02em}.v7-cms .image-picker{display:grid;gap:.5rem}.v7-cms .image-preview{max-width:12rem;max-height:9rem;object-fit:contain;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface)}.v7-cms .image-upload{justify-self:start;position:relative;overflow:hidden}.v7-cms .image-upload input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer}
|