canon-ds 0.1.0
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/LICENSE +21 -0
- package/README.md +153 -0
- package/THIRD_PARTY_NOTICES.md +55 -0
- package/bin/canon.js +6 -0
- package/lib/build-manifest.mjs +54 -0
- package/lib/build.mjs +69 -0
- package/lib/cli.mjs +273 -0
- package/lib/color.js +160 -0
- package/lib/components/_shared.mjs +93 -0
- package/lib/components/accordion.mjs +136 -0
- package/lib/components/account-card.mjs +166 -0
- package/lib/components/activity-feed.mjs +176 -0
- package/lib/components/activity-gauge.mjs +98 -0
- package/lib/components/agent-presence.mjs +156 -0
- package/lib/components/alert.mjs +154 -0
- package/lib/components/app-store-button.mjs +108 -0
- package/lib/components/avatar-group.mjs +128 -0
- package/lib/components/avatar.mjs +225 -0
- package/lib/components/badge-group.mjs +55 -0
- package/lib/components/badge.mjs +174 -0
- package/lib/components/banner.mjs +116 -0
- package/lib/components/breadcrumb.mjs +170 -0
- package/lib/components/button-group.mjs +114 -0
- package/lib/components/button.mjs +197 -0
- package/lib/components/card-header.mjs +115 -0
- package/lib/components/card.mjs +106 -0
- package/lib/components/carousel.mjs +182 -0
- package/lib/components/chart-frame.mjs +101 -0
- package/lib/components/checkbox.mjs +163 -0
- package/lib/components/close-button.mjs +49 -0
- package/lib/components/code.mjs +123 -0
- package/lib/components/color-picker.mjs +122 -0
- package/lib/components/combobox.mjs +210 -0
- package/lib/components/command-palette.mjs +226 -0
- package/lib/components/content-divider.mjs +104 -0
- package/lib/components/counter.mjs +86 -0
- package/lib/components/credit-card.mjs +126 -0
- package/lib/components/date-picker.mjs +202 -0
- package/lib/components/description-list.mjs +88 -0
- package/lib/components/dialog.mjs +140 -0
- package/lib/components/divider.mjs +115 -0
- package/lib/components/drawer.mjs +150 -0
- package/lib/components/empty-state.mjs +112 -0
- package/lib/components/featured-card.mjs +124 -0
- package/lib/components/featured-icon.mjs +67 -0
- package/lib/components/field.mjs +122 -0
- package/lib/components/file-dropzone.mjs +166 -0
- package/lib/components/filter-bar.mjs +179 -0
- package/lib/components/header-navigation.mjs +94 -0
- package/lib/components/icon-button.mjs +179 -0
- package/lib/components/index.mjs +52 -0
- package/lib/components/inline-cta.mjs +139 -0
- package/lib/components/input-group.mjs +164 -0
- package/lib/components/input.mjs +197 -0
- package/lib/components/kanban.mjs +179 -0
- package/lib/components/kbd.mjs +70 -0
- package/lib/components/kicker.mjs +79 -0
- package/lib/components/link.mjs +108 -0
- package/lib/components/list.mjs +117 -0
- package/lib/components/media-frame.mjs +119 -0
- package/lib/components/menu.mjs +190 -0
- package/lib/components/message.mjs +249 -0
- package/lib/components/metric-group.mjs +210 -0
- package/lib/components/mobile-header.mjs +173 -0
- package/lib/components/multi-select.mjs +218 -0
- package/lib/components/notification.mjs +175 -0
- package/lib/components/number-input.mjs +149 -0
- package/lib/components/page-header.mjs +68 -0
- package/lib/components/pagination.mjs +236 -0
- package/lib/components/pin-input.mjs +120 -0
- package/lib/components/popover.mjs +126 -0
- package/lib/components/progress-circle.mjs +115 -0
- package/lib/components/progress.mjs +93 -0
- package/lib/components/prose.mjs +96 -0
- package/lib/components/radio.mjs +160 -0
- package/lib/components/rating.mjs +93 -0
- package/lib/components/rich-text-editor.mjs +178 -0
- package/lib/components/section-header.mjs +62 -0
- package/lib/components/segmented-control.mjs +121 -0
- package/lib/components/select.mjs +163 -0
- package/lib/components/sidebar-nav.mjs +172 -0
- package/lib/components/sidebar.mjs +124 -0
- package/lib/components/skeleton.mjs +66 -0
- package/lib/components/slider.mjs +122 -0
- package/lib/components/social-button.mjs +119 -0
- package/lib/components/spinner.mjs +69 -0
- package/lib/components/stat.mjs +120 -0
- package/lib/components/stepper.mjs +228 -0
- package/lib/components/switch.mjs +159 -0
- package/lib/components/table.mjs +212 -0
- package/lib/components/tabs.mjs +207 -0
- package/lib/components/tag.mjs +196 -0
- package/lib/components/tags-input.mjs +146 -0
- package/lib/components/textarea.mjs +117 -0
- package/lib/components/timeline.mjs +135 -0
- package/lib/components/toast.mjs +115 -0
- package/lib/components/tooltip.mjs +86 -0
- package/lib/components/topbar.mjs +207 -0
- package/lib/components/tree-view.mjs +156 -0
- package/lib/components/video-player.mjs +189 -0
- package/lib/connect.mjs +110 -0
- package/lib/design-files.mjs +175 -0
- package/lib/distribution.mjs +109 -0
- package/lib/editor.js +940 -0
- package/lib/engine.js +339 -0
- package/lib/generators/agents.mjs +68 -0
- package/lib/generators/connection.md +58 -0
- package/lib/generators/css.mjs +2 -0
- package/lib/generators/designmd.mjs +324 -0
- package/lib/generators/documentation.css +82 -0
- package/lib/generators/documentation.html +81 -0
- package/lib/generators/documentation.js +96 -0
- package/lib/generators/documentation.mjs +35 -0
- package/lib/generators/dtcg.mjs +60 -0
- package/lib/generators/preview.css +279 -0
- package/lib/generators/preview.mjs +225 -0
- package/lib/generators/react.mjs +162 -0
- package/lib/generators/tailwind.mjs +114 -0
- package/lib/install.mjs +108 -0
- package/lib/lint.mjs +538 -0
- package/lib/mcp.mjs +268 -0
- package/lib/open.mjs +7 -0
- package/lib/patterns/_app.mjs +56 -0
- package/lib/patterns/app-shell.mjs +25 -0
- package/lib/patterns/audit-log.mjs +37 -0
- package/lib/patterns/auth-pages.mjs +44 -0
- package/lib/patterns/billing-page.mjs +39 -0
- package/lib/patterns/calendar-page.mjs +55 -0
- package/lib/patterns/dashboard-page.mjs +28 -0
- package/lib/patterns/files-page.mjs +30 -0
- package/lib/patterns/first-run.mjs +31 -0
- package/lib/patterns/form-layout.mjs +24 -0
- package/lib/patterns/inbox-page.mjs +58 -0
- package/lib/patterns/index.mjs +29 -0
- package/lib/patterns/list-detail-page.mjs +24 -0
- package/lib/patterns/mobile-app.mjs +46 -0
- package/lib/patterns/modal-flows.mjs +32 -0
- package/lib/patterns/onboarding-page.mjs +42 -0
- package/lib/patterns/permissions-page.mjs +38 -0
- package/lib/patterns/profile-page.mjs +32 -0
- package/lib/patterns/settings-page.mjs +24 -0
- package/lib/project.mjs +28 -0
- package/lib/serve.mjs +279 -0
- package/lib/system.mjs +210 -0
- package/lib/tokens/base.js +251 -0
- package/lib/tokens/canon-preset.mjs +67 -0
- package/lib/tokens/index.mjs +1 -0
- package/lib/tokens/legacy-canon.json +559 -0
- package/lib/tokens/presets.mjs +161 -0
- package/lib/tokens/resolve.mjs +1 -0
- package/lib/types.mjs +4 -0
- package/lib/version.mjs +2 -0
- package/package.json +54 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { tokensCss, baseCss } from "./css.mjs";
|
|
3
|
+
import { VERSION } from "../version.mjs";
|
|
4
|
+
const escapeHtml = (value) => value.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
|
5
|
+
const asset = (name) => readFileSync(new URL('./documentation.' + name, import.meta.url), 'utf8');
|
|
6
|
+
export function documentationHtml(system, index, fontLink = '', options = {}) {
|
|
7
|
+
const template = asset('html');
|
|
8
|
+
const navigation = [...template.matchAll(/<article class="doc-article" id="([^"]+)" data-label="([^"]+)"/g)]
|
|
9
|
+
.map(([, id, label]) => '<a href="#' + escapeHtml(id) + '">' + escapeHtml(label) + '</a>')
|
|
10
|
+
.join('\n');
|
|
11
|
+
const values = {
|
|
12
|
+
name: escapeHtml(system.meta.name),
|
|
13
|
+
version: escapeHtml(VERSION),
|
|
14
|
+
theme: escapeHtml(system.meta.defaultTheme),
|
|
15
|
+
navigation,
|
|
16
|
+
'font-link': fontLink,
|
|
17
|
+
styles: tokensCss(system, index) + '\n' + baseCss(system, index) + '\n' + asset('css').replace(/--P-/g, '--' + system.meta.prefix + '-'),
|
|
18
|
+
script: asset('js'),
|
|
19
|
+
'connection-customization': options.publicSite
|
|
20
|
+
? 'Explore o catálogo público e conecte o Canon pelo prompt. O agente abre um <a href="#studio">Studio</a> próprio para você personalizar o design antes de criar as telas e durante todo o desenvolvimento.'
|
|
21
|
+
: 'Você pode ajustar o visual durante todo o desenvolvimento no <a href="#studio">Studio</a> do projeto. Se quiser personalizar este design antes da conexão, clique em <strong>Save</strong> para levar seus ajustes junto.',
|
|
22
|
+
'studio-intro': options.publicSite
|
|
23
|
+
? 'Explore os componentes e layouts aqui. Para personalizar, copie o prompt de conexão: o agente abre um Studio vinculado ao seu projeto.'
|
|
24
|
+
: 'Personalize antes de conectar ou continue editando no Studio vinculado que o agente abre para o projeto.',
|
|
25
|
+
'studio-save': options.publicSite
|
|
26
|
+
? 'No Studio aberto pelo agente, clique em <strong>Save</strong>. Isso atualiza os estilos do app e as referências que o agente usa nas próximas alterações. Suas escolhas ficam no seu projeto.'
|
|
27
|
+
: 'Clique em <strong>Save</strong>. No Studio aberto pelo agente, isso atualiza os estilos do app e as referências que ele usa nas próximas alterações. Se você estiver preparando um design antes de conectar, Save guarda as escolhas que serão levadas ao projeto.',
|
|
28
|
+
'public-links': options.publicSite ? '<a href="https://github.com/marcosdocanto/canon">Código e contribuições no GitHub</a>' : '',
|
|
29
|
+
};
|
|
30
|
+
return template.replace(/\{\{([a-z-]+)\}\}/g, (_match, key) => {
|
|
31
|
+
if (!(key in values))
|
|
32
|
+
throw new Error('Unknown documentation placeholder: ' + key);
|
|
33
|
+
return values[key];
|
|
34
|
+
});
|
|
35
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/** W3C Design Tokens Community Group format (2024 draft) with light/dark as $extensions. */
|
|
2
|
+
export function dtcg(system, idx) {
|
|
3
|
+
const out = { $schema: 'https://tr.designtokens.org/format/', $description: `${system.meta.name} design tokens, generated by canon` };
|
|
4
|
+
const set = (path, value) => {
|
|
5
|
+
let cur = out;
|
|
6
|
+
for (const p of path.slice(0, -1))
|
|
7
|
+
cur = (cur[p] ??= {});
|
|
8
|
+
cur[path[path.length - 1]] = value;
|
|
9
|
+
};
|
|
10
|
+
const typeOf = (group, path) => {
|
|
11
|
+
if (group === 'color')
|
|
12
|
+
return 'color';
|
|
13
|
+
if (group === 'space' || group === 'radius' || group === 'size' || group === 'breakpoint' || (group === 'font' && path.startsWith('size')) || (group === 'font' && path.startsWith('control')) || (group === 'border'))
|
|
14
|
+
return 'dimension';
|
|
15
|
+
if (group === 'shadow')
|
|
16
|
+
return 'shadow';
|
|
17
|
+
if (group === 'font' && path.startsWith('family'))
|
|
18
|
+
return 'fontFamily';
|
|
19
|
+
if (group === 'font' && path.startsWith('weight'))
|
|
20
|
+
return 'fontWeight';
|
|
21
|
+
if (group === 'motion' && path.startsWith('duration'))
|
|
22
|
+
return 'duration';
|
|
23
|
+
if (group === 'motion' && path.startsWith('easing'))
|
|
24
|
+
return 'cubicBezier';
|
|
25
|
+
if (group === 'z' || group === 'opacity')
|
|
26
|
+
return 'number';
|
|
27
|
+
return 'string';
|
|
28
|
+
};
|
|
29
|
+
for (const t of idx.values()) {
|
|
30
|
+
if (t.group === 'type')
|
|
31
|
+
continue;
|
|
32
|
+
const path = t.ref.slice(1, -1).split('.');
|
|
33
|
+
const token = { $type: typeOf(t.group, t.path), $value: t.light };
|
|
34
|
+
if (t.description)
|
|
35
|
+
token.$description = t.description;
|
|
36
|
+
if (t.themed)
|
|
37
|
+
token.$extensions = { 'com.canon.theme': { light: t.light, dark: t.dark }, 'com.canon.cssVar': t.cssVar };
|
|
38
|
+
else
|
|
39
|
+
token.$extensions = { 'com.canon.cssVar': t.cssVar };
|
|
40
|
+
set(path, token);
|
|
41
|
+
}
|
|
42
|
+
for (const [name, ts] of Object.entries(system.tokens.type)) {
|
|
43
|
+
set(['type', name], {
|
|
44
|
+
$type: 'typography',
|
|
45
|
+
$description: ts.description,
|
|
46
|
+
$value: {
|
|
47
|
+
fontFamily: idx.get(`type.${name}.family`).light,
|
|
48
|
+
fontSize: idx.get(`type.${name}.size`).light,
|
|
49
|
+
fontWeight: idx.get(`type.${name}.weight`).light,
|
|
50
|
+
lineHeight: idx.get(`type.${name}.lineHeight`).light,
|
|
51
|
+
letterSpacing: idx.get(`type.${name}.letterSpacing`).light,
|
|
52
|
+
...(ts.transform ? { textTransform: ts.transform } : {}),
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
return JSON.stringify(out, null, 2) + '\n';
|
|
57
|
+
}
|
|
58
|
+
export function generate(system, idx, write) {
|
|
59
|
+
write('tokens.dtcg.json', dtcg(system, idx));
|
|
60
|
+
}
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
.pv-app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
|
|
2
|
+
.pv-app[data-editor] { grid-template-columns: 240px 1fr 420px; }
|
|
3
|
+
.pv-nav { position: sticky; top: 0; height: 100vh; overflow: auto; border-right: 1px solid var(--P-color-border-default); padding: 20px 16px; background: var(--P-color-bg-surface); font-size: 13px; }
|
|
4
|
+
.pv-nav__brand { min-height: 32px; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; letter-spacing: -0.01em; margin-bottom: 4px; }
|
|
5
|
+
.pv-nav__mark { width: 20px; height: 20px; border-radius: 0; background: var(--P-color-bg-action); flex-shrink: 0; clip-path: polygon(0 0, 100% 0, 100% 22%, 27% 22%, 27% 78%, 100% 78%, 100% 100%, 0 100%); }
|
|
6
|
+
.pv-nav__studio { margin-left: auto; font-size: 10px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--P-color-fg-subtle); }
|
|
7
|
+
.pv-nav__search { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; border: 1px solid var(--P-color-border-default); border-radius: var(--P-radius-control); background: var(--P-color-bg-surface); color: var(--P-color-fg-subtle); margin: 8px 0 4px; }
|
|
8
|
+
.pv-nav__search svg { width: 14px; height: 14px; flex-shrink: 0; }
|
|
9
|
+
.pv-nav__search input { border: 0; background: none; font: inherit; font-size: 13px; color: inherit; width: 100%; outline: none; color: var(--P-color-fg-default); }
|
|
10
|
+
.pv-nav a[hidden] { display: none; }
|
|
11
|
+
.pv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
|
|
12
|
+
.pv-nav__sub { color: var(--P-color-fg-subtle); font-size: 12px; margin-bottom: 16px; line-height: 1.4; }
|
|
13
|
+
.pv-nav__group { font-family: var(--P-font-family-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--P-color-fg-subtle); margin: 16px 0 6px; }
|
|
14
|
+
.pv-nav a { display: block; padding: 4px 8px; border-radius: 6px; color: var(--P-color-fg-muted); }
|
|
15
|
+
.pv-nav a:hover { background: var(--P-color-bg-subtle); color: var(--P-color-fg-default); }
|
|
16
|
+
.pv-nav a[aria-current="location"] { background: var(--P-color-bg-subtle); color: var(--P-color-fg-action); font-weight: 600; box-shadow: inset 2px 0 var(--P-color-bg-action); }
|
|
17
|
+
.pv-nav-group { margin: 6px 0; }
|
|
18
|
+
.pv-nav-group > summary { display: flex; align-items: center; justify-content: space-between; min-height: 32px; padding: 6px 8px; font-size: 12px; font-weight: 500; color: var(--P-color-fg-default); list-style: none; cursor: pointer; }
|
|
19
|
+
.pv-nav-group > summary::-webkit-details-marker { display: none; }
|
|
20
|
+
.pv-nav-group > summary::after { content: ''; width: 5px; height: 5px; margin-right: 3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); opacity: .6; }
|
|
21
|
+
.pv-nav-group[open] > summary::after { transform: rotate(45deg); }
|
|
22
|
+
.pv-nav-group > a { margin-left: 8px; min-height: 30px; }
|
|
23
|
+
.pv-nav-group[hidden], .pv-nav-empty[hidden] { display: none; }
|
|
24
|
+
.pv-nav-empty { padding: 12px 8px; color: var(--P-color-fg-muted); font-size: 12px; line-height: 1.5; }
|
|
25
|
+
.pv-nav a.pv-nav__start { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding: 9px 10px; background: var(--P-color-bg-action); color: var(--P-color-fg-on-action); font-weight: 500; }
|
|
26
|
+
.pv-nav a.pv-nav__start:hover { background: var(--P-color-bg-action-hover); }
|
|
27
|
+
.pv-start { display: inline-flex; align-items: center; justify-content: center; gap: 20px; min-height: 40px; padding: 8px 14px; margin-top: 20px; border-radius: var(--P-radius-control); background: var(--P-color-bg-action); color: var(--P-color-fg-on-action); font-size: 13px; font-weight: 500; }
|
|
28
|
+
.pv-start:hover { background: var(--P-color-bg-action-hover); }
|
|
29
|
+
.pv-nav a.pv-nav__docs { display: flex; justify-content: space-between; align-items: center; margin: 14px 0; padding: 8px 10px; border: 1px solid var(--P-color-border-default); color: var(--P-color-fg-action); font-size: 12px; font-weight: 500; }
|
|
30
|
+
.pv-nav__toggle { display: none; }
|
|
31
|
+
.pv-main { padding: 32px 40px 120px; max-width: 1480px; min-width: 0; }
|
|
32
|
+
.pv-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 32px; position: sticky; top: 0; background: var(--P-color-bg-canvas); z-index: 5; padding: 8px 0; }
|
|
33
|
+
.pv-top__title { font-size: 13px; color: var(--P-color-fg-muted); display: flex; align-items: center; gap: 12px; }
|
|
34
|
+
.pv-top__crumb { font-weight: 500; color: var(--P-color-fg-default); }
|
|
35
|
+
.pv-btn.pv-btn--icon { width: 32px; min-width: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
|
|
36
|
+
.pv-btn--icon svg { width: 18px; height: 18px; flex-shrink: 0; }
|
|
37
|
+
.pv-theme-sun { display: none; }
|
|
38
|
+
:root[data-theme="dark"] .pv-theme-sun { display: inline; }
|
|
39
|
+
:root[data-theme="dark"] .pv-theme-moon { display: none; }
|
|
40
|
+
.pv-status { margin-left: 8px; color: var(--P-color-fg-success); }
|
|
41
|
+
.pv-project { color: var(--P-color-fg-muted); font-size: 12px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
42
|
+
.pv-status[data-error="1"] { color: var(--P-color-fg-danger); }
|
|
43
|
+
.pv-top__actions { display: flex; gap: 8px; flex-shrink: 0; }
|
|
44
|
+
.pv-btn { font: inherit; font-size: 13px; font-weight: 500; height: 32px; padding: 0 12px; border-radius: var(--P-radius-control); border: 1px solid var(--P-color-border-default); background: var(--P-color-bg-surface); color: inherit; cursor: pointer; }
|
|
45
|
+
.pv-btn:hover { background: var(--P-color-bg-subtle); }
|
|
46
|
+
.pv-btn--primary { background: var(--P-color-bg-action); color: var(--P-color-fg-on-action); border-color: var(--P-color-bg-action); }
|
|
47
|
+
.pv-btn--primary:hover { background: var(--P-color-bg-action-hover); }
|
|
48
|
+
.pv-btn--sm { height: 24px; padding: 0 8px; font-size: 11px; }
|
|
49
|
+
.pv-section { padding: 40px 0; scroll-margin-top: 64px; border-top: 1px solid var(--P-color-border-default); overflow-x: clip; contain: layout paint; }
|
|
50
|
+
.pv-section:first-child { border-top: 0; padding-top: 0; }
|
|
51
|
+
.pv-overview { border-top: 0; padding-top: 0; }
|
|
52
|
+
.pv-overview > .pv-h2 { font-family: var(--P-font-family-display); font-size: 28px; font-weight: 600; letter-spacing: -.025em; }
|
|
53
|
+
.pv-overview > .pv-kicker { display: flex; align-items: center; gap: 10px; }
|
|
54
|
+
.pv-overview > .pv-kicker::before { content: ""; width: 24px; height: 2px; background: var(--P-color-bg-action); }
|
|
55
|
+
.pv-overview__tokens { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--P-space-4); padding: var(--P-space-5) 0; border-block: 1px solid var(--P-color-border-default); margin: var(--P-space-8) 0; }
|
|
56
|
+
.pv-overview__tokens a { display: flex; align-items: center; gap: var(--P-space-3); font-size: 12px; color: var(--P-color-fg-muted); min-width: 0; }
|
|
57
|
+
.pv-overview__value { display: block; font-weight: 500; color: var(--P-color-fg-default); overflow-wrap: anywhere; }
|
|
58
|
+
.pv-overview__color, .pv-overview__letter, .pv-overview__shape, .pv-overview__density { display: block; width: 40px; flex-shrink: 0; height: 40px; }
|
|
59
|
+
.pv-overview__color { background: var(--P-brand-600); border-radius: var(--P-radius-control); }
|
|
60
|
+
.pv-overview__letter { font: 24px/40px var(--P-font-family-sans); color: var(--P-color-fg-default); }
|
|
61
|
+
.pv-overview__shape { background: var(--P-color-bg-surface); border: 1px solid var(--P-color-border-strong); border-radius: var(--P-radius-control); }
|
|
62
|
+
.pv-overview__density { height: var(--P-size-control-md); border-block: 1px solid var(--P-color-border-strong); background: var(--P-color-bg-subtle); }
|
|
63
|
+
.pv-overview__surface { border: 1px solid var(--P-color-border-default); border-radius: var(--P-radius-card); padding: var(--P-space-6); background: var(--P-color-bg-subtle); }
|
|
64
|
+
.pv-overview__heading { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: var(--P-space-4); }
|
|
65
|
+
.pv-overview__controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--P-space-3); margin-block: var(--P-space-6); }
|
|
66
|
+
.pv-overview__examples { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; gap: var(--P-space-6); }
|
|
67
|
+
.pv-overview__examples > * { width: 100% !important; max-width: none !important; }
|
|
68
|
+
.pv-overview__caption { margin-top: var(--P-space-3); }
|
|
69
|
+
.pv-sync-hint { margin-bottom: var(--P-space-4); padding: var(--P-space-3); border: 1px solid var(--P-color-border-default); border-radius: var(--P-radius-control); color: var(--P-color-fg-muted); }
|
|
70
|
+
.pv-btn:disabled { cursor: wait; opacity: .7; }
|
|
71
|
+
@container (max-width: 600px) { .pv-overview__examples { grid-template-columns: minmax(0, 1fr); } }
|
|
72
|
+
.pv-kicker { font-family: var(--P-font-family-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--P-color-fg-subtle); margin-bottom: 8px; }
|
|
73
|
+
.pv-h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
|
|
74
|
+
.pv-section[data-slug] .pv-h2 { cursor: pointer; }
|
|
75
|
+
[data-public-studio] .pv-section[data-slug] .pv-h2 { cursor: default; }
|
|
76
|
+
[data-public-studio] .pv-editlink { display: none; }
|
|
77
|
+
[data-public-studio] #pv-edit { display: inline-flex; align-items: center; text-decoration: none; }
|
|
78
|
+
.pv-editlink { font-size: 11px; font-weight: 500; color: var(--P-color-fg-subtle); opacity: 0; transition: opacity .15s; }
|
|
79
|
+
.pv-h2:hover .pv-editlink { opacity: 1; }
|
|
80
|
+
.pv-slug { font-family: var(--P-font-family-mono); font-size: 12px; font-weight: 400; color: var(--P-color-fg-subtle); }
|
|
81
|
+
.pv-h3 { font-size: 15px; font-weight: 600; margin: 32px 0 12px; }
|
|
82
|
+
.pv-h4 { font-size: 13px; font-weight: 600; margin: 20px 0 8px; }
|
|
83
|
+
.pv-lead { color: var(--P-color-fg-muted); margin-top: 8px; max-width: 72ch; line-height: 1.55; }
|
|
84
|
+
.pv-usage { font-size: 13px; color: var(--P-color-fg-muted); margin-top: 8px; max-width: 80ch; line-height: 1.55; }
|
|
85
|
+
.pv-examples { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
|
|
86
|
+
.pv-example-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; font-size: 12px; font-weight: 500; color: var(--P-color-fg-muted); }
|
|
87
|
+
.pv-example-picker select { min-width: 0; max-width: 100%; height: 34px; padding: 0 30px 0 10px; border: 1px solid var(--P-color-border-default); border-radius: var(--P-radius-control); background: var(--P-color-bg-surface); color: var(--P-color-fg-default); font: inherit; }
|
|
88
|
+
.pv-example-picker + .pv-examples { margin-top: 12px; }
|
|
89
|
+
[data-example-option][hidden] { display: none; }
|
|
90
|
+
.pv-examples[data-structural] .pv-example__stage { max-height: 560px; overscroll-behavior: contain; }
|
|
91
|
+
.pv-example { margin: 0; border: 1px solid var(--P-color-border-default); border-radius: var(--P-radius-card); background: var(--P-color-bg-surface); overflow: hidden; }
|
|
92
|
+
.pv-example__title { font-size: 12px; font-weight: 500; padding: 8px 14px; border-bottom: 1px solid var(--P-color-border-subtle); color: var(--P-color-fg-muted); display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; }
|
|
93
|
+
.pv-example__title .pv-pattern__controls { margin-left: auto; }
|
|
94
|
+
.pv-example__desc { font-weight: 400; color: var(--P-color-fg-subtle); }
|
|
95
|
+
.pv-example__stage { padding: 24px; background: var(--P-color-bg-canvas); display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
|
|
96
|
+
.pv-example__stage[data-block] { display: block; }
|
|
97
|
+
.pv-code { border-top: 1px solid var(--P-color-border-subtle); }
|
|
98
|
+
.pv-code summary { font-size: 11px; font-family: var(--P-font-family-mono); text-transform: uppercase; letter-spacing: .06em; padding: 6px 14px; color: var(--P-color-fg-subtle); cursor: pointer; }
|
|
99
|
+
.pv-code pre { margin: 0; padding: 12px 14px; font-size: 12px; line-height: 1.5; overflow: auto; max-height: 420px; background: var(--P-color-bg-subtle); font-family: var(--P-font-family-mono); white-space: pre-wrap; word-break: break-all; }
|
|
100
|
+
.pv-matrix-wrap { overflow: auto; border: 1px solid var(--P-color-border-default); border-radius: var(--P-radius-card); background: var(--P-color-bg-surface); }
|
|
101
|
+
.pv-matrix { border-collapse: collapse; font-size: 12px; min-width: 100%; }
|
|
102
|
+
.pv-matrix th { font-family: var(--P-font-family-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--P-color-fg-subtle); text-align: left; padding: 10px 14px; font-weight: 500; border-bottom: 1px solid var(--P-color-border-subtle); }
|
|
103
|
+
.pv-matrix td { padding: 14px; border-bottom: 1px solid var(--P-color-border-subtle); vertical-align: middle; }
|
|
104
|
+
.pv-matrix tbody th { border-right: 1px solid var(--P-color-border-subtle); white-space: nowrap; }
|
|
105
|
+
.pv-details { margin-top: 24px; border: 1px solid var(--P-color-border-default); border-radius: var(--P-radius-card); padding: 0 16px; background: var(--P-color-bg-surface); }
|
|
106
|
+
.pv-details summary { padding: 12px 0; font-size: 13px; font-weight: 500; cursor: pointer; }
|
|
107
|
+
.pv-details > *:last-child { margin-bottom: 16px; }
|
|
108
|
+
.pv-list { padding-left: 18px; list-style: disc; font-size: 13px; line-height: 1.55; color: var(--P-color-fg-muted); display: flex; flex-direction: column; gap: 4px; }
|
|
109
|
+
.pv-list code, .pv-table code, .pv-lead code, .pv-sem code, .pv-type code, .pv-small code, .pv-editor code { font-family: var(--P-font-family-mono); font-size: 12px; background: var(--P-color-bg-subtle); padding: 1px 5px; border-radius: 4px; color: var(--P-color-fg-default); }
|
|
110
|
+
.pv-never li::marker { color: var(--P-color-fg-danger); }
|
|
111
|
+
.pv-table { border-collapse: collapse; width: 100%; font-size: 13px; }
|
|
112
|
+
.pv-table th { text-align: left; font-family: var(--P-font-family-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--P-color-fg-subtle); font-weight: 500; padding: 6px 8px; border-bottom: 1px solid var(--P-color-border-default); }
|
|
113
|
+
.pv-table td { padding: 8px; border-bottom: 1px solid var(--P-color-border-subtle); vertical-align: top; color: var(--P-color-fg-muted); }
|
|
114
|
+
.pv-table td:first-child { white-space: nowrap; }
|
|
115
|
+
.pv-default { font-weight: 700; outline: 1px solid var(--P-color-border-strong); }
|
|
116
|
+
.pv-muted { color: var(--P-color-fg-subtle); }
|
|
117
|
+
.pv-small { font-size: 12px; }
|
|
118
|
+
.pv-scale { margin-top: 12px; }
|
|
119
|
+
.pv-scale__name { font-family: var(--P-font-family-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--P-color-fg-subtle); margin-bottom: 4px; }
|
|
120
|
+
.pv-scale__row { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
|
|
121
|
+
.pv-swatch { height: 56px; border-radius: var(--P-radius-control); border: 1px solid var(--P-color-border-subtle); position: relative; font-family: var(--P-font-family-mono); font-size: 9px; }
|
|
122
|
+
.pv-swatch__step { position: absolute; top: 4px; left: 6px; mix-blend-mode: difference; color: #fff; }
|
|
123
|
+
.pv-swatch__hex { position: absolute; bottom: 4px; left: 6px; mix-blend-mode: difference; color: #fff; }
|
|
124
|
+
.pv-sem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px 20px; }
|
|
125
|
+
.pv-sem { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: 12px; }
|
|
126
|
+
.pv-sem__chip { width: 36px; height: 36px; border-radius: var(--P-radius-control); border: 1px solid var(--P-color-border-default); flex-shrink: 0; }
|
|
127
|
+
.pv-type { display: grid; grid-template-columns: 260px 1fr; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--P-color-border-subtle); align-items: center; }
|
|
128
|
+
.pv-type__meta { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
|
|
129
|
+
.pv-type__specimen { min-width: 0; overflow-wrap: anywhere; }
|
|
130
|
+
.pv-space-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 32px; }
|
|
131
|
+
.pv-space { display: grid; grid-template-columns: 90px minmax(0, 1fr) 56px; align-items: center; gap: 12px; font-size: 12px; }
|
|
132
|
+
.pv-space__bar { max-width: 100%; height: 12px; background: var(--P-color-bg-action); border-radius: 2px; }
|
|
133
|
+
.pv-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; }
|
|
134
|
+
.pv-radius, .pv-shadow, .pv-ctrl { display: flex; flex-direction: column; gap: 6px; font-size: 12px; align-items: flex-start; max-width: 180px; }
|
|
135
|
+
.pv-radius__box { width: 64px; height: 64px; background: var(--P-color-bg-surface); border: 1px solid var(--P-color-border-strong); }
|
|
136
|
+
.pv-shadow__box { width: 96px; height: 64px; border-radius: var(--P-radius-card); background: var(--P-color-bg-surface); border: 1px solid var(--P-color-border-subtle); }
|
|
137
|
+
.pv-ctrl__box { width: 96px; background: var(--P-color-bg-surface); border: 1px solid var(--P-color-border-strong); border-radius: 6px; }
|
|
138
|
+
/* patterns */
|
|
139
|
+
.pv-pattern { margin-top: 24px; border: 1px solid var(--P-color-border-default); border-radius: var(--P-radius-card); overflow: hidden; background: var(--P-color-bg-surface); }
|
|
140
|
+
.pv-pattern__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--P-color-border-subtle); font-size: 12px; font-weight: 500; color: var(--P-color-fg-muted); }
|
|
141
|
+
.pv-pattern__title { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; min-width: 0; }
|
|
142
|
+
.pv-pattern__context { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--P-color-fg-subtle); }
|
|
143
|
+
.pv-pattern__title .pv-example__desc { flex-basis: 100%; font-size: 11px; }
|
|
144
|
+
.pv-pattern__controls { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
|
|
145
|
+
.pv-pattern__metrics { font-family: var(--P-font-family-mono); font-size: 10px; color: var(--P-color-fg-subtle); white-space: nowrap; }
|
|
146
|
+
.pv-pattern__vp { display: flex; gap: 4px; }
|
|
147
|
+
.pv-pattern__vp [aria-pressed="true"] { background: var(--P-color-bg-subtle); border-color: var(--P-color-border-strong); color: var(--P-color-fg-default); }
|
|
148
|
+
.pv-example-picker + [data-example-set] > .pv-pattern { margin-top: 12px; }
|
|
149
|
+
.pv-canvas { display: flex; justify-content: center; min-width: 0; overflow: hidden; padding: 16px; background: var(--P-color-bg-subtle); }
|
|
150
|
+
.pv-canvas[data-preview-zoom="actual"] { overflow: auto; overscroll-behavior: contain; }
|
|
151
|
+
.pv-canvas[data-preview-zoom="actual"] .pv-frame { overflow: visible; }
|
|
152
|
+
.pv-canvas__bounds { position: relative; flex: 0 0 auto; box-shadow: 0 0 0 1px var(--P-color-border-default); }
|
|
153
|
+
.pv-frame { background: var(--P-color-bg-canvas); overflow: auto; container-type: inline-size; }
|
|
154
|
+
.pv-frame[data-vp] { --pv-viewport-width: 1280px; --pv-viewport-height: 760px; width: var(--pv-viewport-width); height: var(--pv-viewport-height); max-width: none; transform: scale(var(--pv-preview-scale, 1)); transform-origin: top left; overscroll-behavior: contain; }
|
|
155
|
+
.pv-frame[data-vp="mobile"] { --pv-viewport-width: 375px; }
|
|
156
|
+
.pv-frame[data-vp]:focus-visible { outline: 2px solid var(--P-color-border-action); outline-offset: 2px; }
|
|
157
|
+
.pv-example__stage { container-type: inline-size; overflow: auto; }
|
|
158
|
+
.pv-example__stage[data-vp] { display: block; }
|
|
159
|
+
.pv-section[data-category="app-section"] .pv-frame { padding: var(--P-space-6); }
|
|
160
|
+
/* editor */
|
|
161
|
+
.pv-editor { position: sticky; top: 0; height: 100vh; min-width: 0; overflow: auto; overscroll-behavior: contain; border-left: 1px solid var(--P-color-border-default); background: var(--P-color-bg-canvas); font-size: 12px; display: flex; flex-direction: column; }
|
|
162
|
+
.pv-editor[hidden] { display: none; }
|
|
163
|
+
.pv-editor [hidden] { display: none !important; }
|
|
164
|
+
.pv-stack { display: flex; flex-direction: column; gap: 14px; }
|
|
165
|
+
.pv-card { border: 1px solid var(--P-color-border-default); border-radius: var(--P-radius-card); background: var(--P-color-bg-surface); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
|
|
166
|
+
.pv-card__title { font-size: 13px; font-weight: 600; color: var(--P-color-fg-default); display: flex; align-items: center; justify-content: space-between; }
|
|
167
|
+
.pv-card__hint { font-size: 11px; color: var(--P-color-fg-subtle); }
|
|
168
|
+
.pv-swatch-big { width: 100%; height: 56px; border-radius: var(--P-radius-control); border: 1px solid var(--P-color-border-subtle); }
|
|
169
|
+
.pv-strip { display: grid; grid-template-columns: repeat(11, 1fr); gap: 3px; }
|
|
170
|
+
.pv-strip span { height: 20px; border-radius: 4px; border: 1px solid var(--P-color-border-subtle); }
|
|
171
|
+
.pv-range { width: 100%; accent-color: var(--P-color-bg-action); }
|
|
172
|
+
.pv-preview { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--P-radius-control); background: var(--P-color-bg-canvas); border: 1px dashed var(--P-color-border-default); flex-wrap: wrap; }
|
|
173
|
+
.pv-preview-box { width: 40px; height: 40px; border: 1px solid var(--P-color-border-strong); background: var(--P-color-bg-surface); }
|
|
174
|
+
.pv-specimen { font-family: var(--P-font-family-sans); }
|
|
175
|
+
.pv-specimen strong { display: block; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
|
|
176
|
+
.pv-specimen span { display: block; font-size: 13px; color: var(--P-color-fg-muted); }
|
|
177
|
+
.pv-inline { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
|
|
178
|
+
.pv-inline > span:first-child { color: var(--P-color-fg-muted); }
|
|
179
|
+
.pv-inline .pv-in, .pv-inline select { width: 140px; }
|
|
180
|
+
.pv-panel-head { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--P-color-border-default); position: sticky; top: 0; background: var(--P-color-bg-canvas); z-index: 2; }
|
|
181
|
+
.pv-tabs { display: flex; border-bottom: 1px solid var(--P-color-border-default); background: var(--P-color-bg-canvas); position: sticky; top: 53px; z-index: 2; }
|
|
182
|
+
.pv-tab { flex: 1; font: inherit; font-size: 12px; font-weight: 500; padding: 8px; border: 0; background: none; color: var(--P-color-fg-muted); cursor: pointer; border-bottom: 2px solid transparent; }
|
|
183
|
+
.pv-tab[data-active="1"] { color: var(--P-color-fg-default); border-bottom-color: var(--P-color-bg-action); }
|
|
184
|
+
.pv-panel-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
|
|
185
|
+
.pv-group { border: 1px solid var(--P-color-border-default); border-radius: var(--P-radius-control); padding: 0 10px; background: var(--P-color-bg-surface); }
|
|
186
|
+
.pv-group > summary { padding: 8px 0; font-weight: 500; cursor: pointer; font-size: 12px; }
|
|
187
|
+
.pv-group--sub { border-color: var(--P-color-border-subtle); margin: 4px 0; }
|
|
188
|
+
.pv-group--state { border: 0; border-left: 2px solid var(--P-color-border-subtle); border-radius: 0; margin: 2px 0 6px 6px; padding-left: 8px; }
|
|
189
|
+
.pv-group--state > summary { color: var(--P-color-fg-muted); padding: 4px 0; }
|
|
190
|
+
.pv-group[open] > summary { border-bottom: 1px solid var(--P-color-border-subtle); margin-bottom: 8px; }
|
|
191
|
+
.pv-group > *:last-child { margin-bottom: 8px; }
|
|
192
|
+
.pv-row.pv-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; margin: 6px 0; color: var(--P-color-fg-muted); }
|
|
193
|
+
.pv-in { font: inherit; font-size: 12px; height: 28px; border: 1px solid var(--P-color-border-default); border-radius: 6px; padding: 0 8px; background: var(--P-color-bg-surface); color: inherit; min-width: 0; width: 100%; }
|
|
194
|
+
.pv-in:focus { outline: none; border-color: var(--P-color-border-action); box-shadow: var(--P-shadow-focus); }
|
|
195
|
+
.pv-in--wide { width: 100%; }
|
|
196
|
+
.pv-in--sm { width: auto; min-width: 90px; }
|
|
197
|
+
.pv-in--prop { width: 45%; font-family: var(--P-font-family-mono); }
|
|
198
|
+
.pv-row > .pv-in, .pv-row > .pv-color { width: 150px; }
|
|
199
|
+
.pv-color { width: 28px; height: 28px; padding: 0; border: 1px solid var(--P-color-border-default); border-radius: 6px; background: none; flex-shrink: 0; }
|
|
200
|
+
.pv-ta { font: inherit; font-size: 12px; line-height: 1.45; width: 100%; border: 1px solid var(--P-color-border-default); border-radius: 6px; padding: 6px 8px; background: var(--P-color-bg-surface); color: inherit; resize: vertical; font-family: var(--P-font-family-mono); }
|
|
201
|
+
.pv-field { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; color: var(--P-color-fg-muted); }
|
|
202
|
+
.pv-tok { display: flex; flex-direction: column; gap: 4px; }
|
|
203
|
+
.pv-tok__row { display: grid; grid-template-columns: 110px 1fr; gap: 6px; align-items: center; }
|
|
204
|
+
.pv-tok__row--themed { grid-template-columns: 110px 1fr 1fr; }
|
|
205
|
+
.pv-tok__row code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
206
|
+
.pv-val { display: flex; align-items: center; gap: 4px; min-width: 0; }
|
|
207
|
+
.pv-sw { width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--P-color-border-default); flex-shrink: 0; }
|
|
208
|
+
.pv-decls { display: flex; flex-direction: column; gap: 4px; padding: 4px 0 8px; }
|
|
209
|
+
.pv-decl { display: flex; gap: 4px; align-items: center; }
|
|
210
|
+
.pv-decl .pv-val { flex: 1; }
|
|
211
|
+
.pv-x { font: inherit; border: 0; background: none; color: var(--P-color-fg-subtle); cursor: pointer; padding: 0 4px; font-size: 14px; }
|
|
212
|
+
.pv-x:hover { color: var(--P-color-fg-danger); }
|
|
213
|
+
.pv-add { font: inherit; font-size: 11px; border: 1px dashed var(--P-color-border-strong); background: none; color: var(--P-color-fg-muted); border-radius: 6px; padding: 4px 8px; cursor: pointer; align-self: flex-start; }
|
|
214
|
+
.pv-add:hover { color: var(--P-color-fg-default); border-color: var(--P-color-fg-muted); }
|
|
215
|
+
.pv-prop { padding: 8px 0; border-top: 1px solid var(--P-color-border-subtle); display: flex; flex-direction: column; gap: 6px; }
|
|
216
|
+
.pv-prop:first-of-type { border-top: 0; }
|
|
217
|
+
.pv-prop__head { display: flex; gap: 8px; align-items: center; }
|
|
218
|
+
.pv-chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
|
|
219
|
+
.pv-chip { display: inline-flex; align-items: center; gap: 2px; height: 22px; padding: 0 2px 0 8px; border-radius: 999px; border: 1px solid var(--P-color-border-default); background: var(--P-color-bg-subtle); font-family: var(--P-font-family-mono); font-size: 11px; }
|
|
220
|
+
.pv-chip[data-default="1"] { border-color: var(--P-color-border-action); }
|
|
221
|
+
.pv-comp-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
|
|
222
|
+
.pv-modal { position: fixed; inset: 0; background: var(--P-color-bg-overlay); display: grid; place-items: center; z-index: 100; padding: 24px; }
|
|
223
|
+
.pv-modal__panel { background: var(--P-color-bg-surface-raised); border-radius: var(--P-radius-card); padding: 20px; max-width: 720px; width: 100%; max-height: 90vh; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
|
|
224
|
+
.pv-export__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
|
|
225
|
+
.pv-export textarea { width: 100%; height: 140px; font-family: var(--P-font-family-mono); font-size: 11px; border: 1px solid var(--P-color-border-default); border-radius: 6px; padding: 8px; background: var(--P-color-bg-subtle); color: inherit; }
|
|
226
|
+
@media (max-width: 900px) { .pv-app, .pv-app[data-editor] { grid-template-columns: 1fr; } .pv-nav { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--P-color-border-default); } .pv-nav__toggle { display: inline-block; margin-top: 12px; } #pv-nav-content { display: none; } .pv-nav[data-expanded] #pv-nav-content { display: block; margin-top: 16px; } .pv-main { padding: 20px 16px 80px; } .pv-type { grid-template-columns: 1fr; } .pv-space-grid { grid-template-columns: 1fr; } .pv-scale__row { grid-template-columns: repeat(6, 1fr); } .pv-editor { position: fixed; inset: 0; height: auto; z-index: 50; } .pv-overview__tokens { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pv-top__title { flex-wrap: wrap; } .pv-sem-grid { grid-template-columns: minmax(0, 1fr); } }
|
|
227
|
+
/* inspector */
|
|
228
|
+
.pv-app[data-editor] .pv-example__stage, .pv-app[data-editor] .pv-matrix td, .pv-app[data-editor] .pv-frame { cursor: crosshair; }
|
|
229
|
+
.pv-app[data-editor] .pv-example__stage [class*="P-"]:hover, .pv-app[data-editor] .pv-matrix td [class*="P-"]:hover { outline: 1px dashed var(--P-color-border-action); outline-offset: 1px; }
|
|
230
|
+
.pv-hint { font-size: 12px; color: var(--P-color-fg-muted); line-height: 1.5; padding: 8px; border: 1px dashed var(--P-color-border-strong); border-radius: var(--P-radius-control); }
|
|
231
|
+
.pv-label { font-size: 11px; font-weight: 500; color: var(--P-color-fg-subtle); text-transform: uppercase; letter-spacing: .04em; }
|
|
232
|
+
.pv-chip--btn { cursor: pointer; font: inherit; font-size: 12px; height: 28px; padding: 0 10px; border-radius: 6px; background: var(--P-color-bg-surface); }
|
|
233
|
+
.pv-chip--btn[data-on="1"] { background: var(--P-color-bg-action); color: var(--P-color-fg-on-action); border-color: var(--P-color-bg-action); }
|
|
234
|
+
.pv-ctx { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
|
|
235
|
+
.pv-ctx > .pv-field:last-child:nth-child(odd) { grid-column: 1 / -1; }
|
|
236
|
+
.pv-ctx__item { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--P-color-fg-muted); }
|
|
237
|
+
.pv-seg { display: flex; flex-wrap: wrap; gap: 2px; padding: 2px; background: var(--P-color-bg-subtle); border-radius: var(--P-radius-control); }
|
|
238
|
+
.pv-seg__item { font: inherit; font-size: 11px; font-weight: 500; height: 24px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: var(--P-color-fg-muted); cursor: pointer; }
|
|
239
|
+
.pv-seg__item[data-on="1"] { background: var(--P-color-bg-surface); color: var(--P-color-fg-default); box-shadow: var(--P-shadow-xs); }
|
|
240
|
+
.pv-prop-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px 0; border-top: 1px solid var(--P-color-border-subtle); }
|
|
241
|
+
.pv-prop-row:first-of-type { border-top: 0; }
|
|
242
|
+
.pv-prop-row__head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 6px; min-height: 20px; }
|
|
243
|
+
.pv-prop-row__name { font-size: 12px; font-weight: 500; color: var(--P-color-fg-default); }
|
|
244
|
+
.pv-prop-row__control { display: grid; gap: 8px; min-width: 0; }
|
|
245
|
+
.pv-property-note { color: var(--P-color-fg-muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
|
|
246
|
+
.pv-prop-reset { border: 0; padding: 0 2px; background: none; color: var(--P-color-fg-muted); font: inherit; font-size: 11px; cursor: pointer; }
|
|
247
|
+
.pv-prop-reset:hover { color: var(--P-color-fg-danger); }
|
|
248
|
+
.pv-prop-row .pv-val { min-width: 0; }
|
|
249
|
+
.pv-prop-row .pv-val > .pv-in { flex: 1; }
|
|
250
|
+
.pv-resolved { font-size: 10px; color: var(--P-color-fg-subtle); font-family: var(--P-font-family-mono); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
251
|
+
.pv-src { font-size: 11px; color: var(--P-color-fg-muted); }
|
|
252
|
+
.pv-sw--lead { width: 18px; height: 18px; }
|
|
253
|
+
.pv-add-prop { margin-top: 8px; color: var(--P-color-fg-muted); }
|
|
254
|
+
.pv-group--adv > summary { color: var(--P-color-fg-muted); }
|
|
255
|
+
select.pv-in { padding-right: 24px; appearance: auto; }
|
|
256
|
+
.pv-inspect-stack { display: grid; gap: 20px; min-width: 0; }
|
|
257
|
+
.pv-inspect-section { display: grid; gap: 12px; min-width: 0; }
|
|
258
|
+
.pv-inspect-heading { font-size: 13px; font-weight: 600; color: var(--P-color-fg-default); }
|
|
259
|
+
.pv-inspect-hint { color: var(--P-color-fg-muted); font-size: 12px; line-height: 1.5; }
|
|
260
|
+
.pv-inspect-preview { padding: 14px; border-radius: 8px; background: var(--P-color-bg-subtle); }
|
|
261
|
+
.pv-inspect-scope { padding-bottom: 20px; border-bottom: 1px solid var(--P-color-border-default); }
|
|
262
|
+
.pv-inspect-groups { display: grid; gap: 10px; }
|
|
263
|
+
.pv-inspect-properties { display: grid; padding: 0 14px 14px; }
|
|
264
|
+
.pv-group__count { color: var(--P-color-fg-muted); font-size: 11px; font-weight: 400; }
|
|
265
|
+
#pv-inspector .pv-field { margin: 0; gap: 6px; }
|
|
266
|
+
#pv-inspector .pv-label { font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: normal; color: var(--P-color-fg-default); }
|
|
267
|
+
#pv-inspector .pv-in { height: 32px; font-size: 12px; color: var(--P-color-fg-default); }
|
|
268
|
+
#pv-inspector .pv-chips { gap: 6px; }
|
|
269
|
+
#pv-inspector .pv-inspect-selector { padding: 0; background: none; color: var(--P-color-fg-muted); font-size: 11px; overflow-wrap: anywhere; }
|
|
270
|
+
#pv-inspector .pv-group { min-width: 0; padding: 0; }
|
|
271
|
+
#pv-inspector .pv-group > summary { display: flex; align-items: center; gap: 8px; padding: 12px 14px; margin: 0; list-style: none; font-size: 13px; font-weight: 500; }
|
|
272
|
+
#pv-inspector .pv-group > summary::-webkit-details-marker { display: none; }
|
|
273
|
+
#pv-inspector .pv-group > summary::after { content: ''; width: 6px; height: 6px; margin-left: auto; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); }
|
|
274
|
+
#pv-inspector .pv-group[open] > summary::after { transform: rotate(45deg); }
|
|
275
|
+
#pv-inspector .pv-group > *:last-child { margin-bottom: 0; }
|
|
276
|
+
#pv-inspector .pv-group--adv > :not(summary) { margin: 12px 14px; }
|
|
277
|
+
#pv-inspector .pv-inspect-properties > .pv-field { padding-top: 14px; }
|
|
278
|
+
#pv-inspector .pv-inspect-properties > .pv-inspect-hint { margin: 6px 0 12px; }
|
|
279
|
+
.pv-btn:focus-visible, .pv-chip--btn:focus-visible, .pv-tab:focus-visible, .pv-prop-reset:focus-visible { outline: 2px solid var(--P-color-border-action); outline-offset: 2px; }
|