@dou-ui/code 0.1.0-alpha.0 → 0.1.0-alpha.10
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/code-diff.js.map +1 -1
- package/dist/code-diff.vue_vue_type_script_setup_true_lang.js +491 -17
- package/dist/code-diff.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/code-editor.js.map +1 -1
- package/dist/code-editor.vue_vue_type_script_setup_true_lang.js +408 -125
- package/dist/code-editor.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/code-keys.vue_vue_type_script_setup_true_lang.js +138 -62
- package/dist/code-keys.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/code-keys2.js.map +1 -1
- package/dist/extension.js +6 -1
- package/dist/extension.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/locale.js +6 -12
- package/dist/locale.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/code-diff.vue.d.ts +6 -3
- package/dist/types/code-editor.vue.d.ts +1 -0
- package/dist/types/extension.d.ts +44 -4
- package/dist/types/index.d.ts +8 -4
- package/dist/types/locale.d.ts +5 -5
- package/dist/types/types.d.ts +91 -5
- package/dist/types/view/viewport.d.ts +16 -0
- package/dist/types/view/viewport.test.d.ts +1 -0
- package/dist/view/viewport.js +31 -0
- package/dist/view/viewport.js.map +1 -0
- package/package.json +3 -3
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer dou.components{.dou-code-editor{--dou-code-editor-font-size:var(--dou-font-size-sm);--dou-code-editor-line-height:20px;--dou-code-editor-padding-y:8px;--dou-code-editor-padding-x:12px;--dou-code-editor-bg:var(--dou-color-bg-surface);--dou-code-editor-gutter-bg:var(--dou-code-editor-bg);--dou-code-editor-gutter-text:var(--dou-color-text-tertiary);--dou-code-editor-border:var(--dou-color-border);--dou-code-editor-border-focus:color-mix(in oklab,var(--dou-color-focus)70%,var(--dou-color-text));--dou-code-editor-cursor:var(--dou-color-text);--dou-code-editor-active-line:color-mix(in oklab,var(--dou-color-text)4%,transparent);--dou-code-editor-selection:color-mix(in oklab,var(--dou-color-primary)20%,transparent);--dou-code-editor-match:color-mix(in oklab,var(--dou-color-warning)22%,transparent);--dou-code-editor-match-current:color-mix(in oklab,var(--dou-color-warning-text)80%,transparent);--dou-code-editor-match-mark:color-mix(in oklab,var(--dou-color-warning)60%,transparent);--dou-code-editor-bracket:color-mix(in oklab,var(--dou-color-text)35%,transparent);--dou-code-editor-error:var(--dou-color-danger-text);--dou-code-editor-warning:var(--dou-color-warning-text);--dou-code-editor-info:var(--dou-color-primary-text);--dou-code-editor-bracket-unmatched:color-mix(in oklab,var(--dou-color-danger-text)70%,transparent);position:relative;display:flex;box-sizing:border-box;min-height:calc(var(--dou-code-editor-line-height) + 2*var(--dou-code-editor-padding-y) + 2px);overflow:hidden;border:1px solid var(--dou-code-editor-border);border-radius:var(--dou-radius-container);background-color:var(--dou-code-editor-bg);color:var(--dou-color-text);font-family:var(--dou-font-family-mono);font-size:var(--dou-code-editor-font-size);font-variant-ligatures:none;line-height:var(--dou-code-editor-line-height);transition:border-color var(--dou-motion-duration-fast)var(--dou-motion-easing);flex-direction:column;width:100%;min-width:0}.dou-code-editor.is-focused{border-color:var(--dou-code-editor-border-focus)}.dou-code-editor:not(.is-focused){--dou-code-editor-selection:color-mix(in oklab,var(--dou-color-text)10%,transparent)}.dou-code-editor.is-disabled{color:var(--dou-color-text-disabled);cursor:not-allowed}.dou-code-editor__body{position:relative;display:flex;flex:auto;min-height:0}.dou-code-editor__scroller{position:relative;overflow:auto;overscroll-behavior-x:contain;scrollbar-width:thin;flex:auto;min-width:0;min-height:0}.dou-code-editor__minimap{position:relative;overflow:hidden;box-shadow:inset 1px 0 0 color-mix(in oklab,var(--dou-color-text)6%,transparent);color:var(--dou-color-text-tertiary);cursor:default;touch-action:none;user-select:none;flex:none;width:96px}.dou-code-editor__minimap-canvas{position:absolute;width:100%;height:100%;inset:0}.dou-code-editor__minimap-view{position:absolute;background-color:color-mix(in oklab,var(--dou-color-text)6%,transparent);transition:background-color var(--dou-motion-duration-fast)var(--dou-motion-easing);top:0;left:0;right:0}.dou-code-editor__minimap:hover .dou-code-editor__minimap-view{background-color:color-mix(in oklab,var(--dou-color-text)9%,transparent)}.dou-code-editor__minimap:active .dou-code-editor__minimap-view{background-color:color-mix(in oklab,var(--dou-color-text)12%,transparent)}.dou-code-editor__sizer{position:relative;display:flex;box-sizing:border-box;width:max-content;min-width:100%}.dou-code-editor__gutter{position:sticky;z-index:2;box-sizing:border-box;width:var(--dou-code-editor-gutter);background-color:var(--dou-code-editor-gutter-bg);color:var(--dou-code-editor-gutter-text);font-variant-numeric:tabular-nums;cursor:default;user-select:none;-webkit-user-select:none;touch-action:manipulation;flex:none;left:0}.dou-code-editor__numbers{position:absolute;will-change:transform;top:0;left:0;right:0}.dou-code-editor__number{position:relative;box-sizing:border-box;height:var(--dou-code-editor-line-height);padding:0 12px 0 calc(16px + var(--dou-code-editor-gutter-cells,0px));text-align:right}.dou-code-editor__number.is-active{color:var(--dou-color-text-secondary)}.dou-code-editor.is-foldable .dou-code-editor__number{padding-right:24px}.dou-code-editor__fold-toggle{position:absolute;display:flex;height:var(--dou-code-editor-line-height);color:var(--dou-color-text-tertiary);cursor:pointer;opacity:0;transition:opacity var(--dou-motion-duration-fast)var(--dou-motion-easing);justify-content:center;align-items: center;width:14px;font-size:12px;top:0;right:6px}.dou-code-editor__gutter:hover .dou-code-editor__fold-toggle{opacity:1}.dou-code-editor__fold-toggle.is-folded{opacity:1}.dou-code-editor__fold-toggle:hover{color:var(--dou-color-text)}@media (pointer:coarse){.dou-code-editor__fold-toggle{opacity:1}.dou-code-editor__fold-toggle:before{position:absolute;content:"";inset:-4px -6px}}.dou-code-editor__content{position:relative;cursor:text;touch-action:manipulation;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;flex:auto;min-width:0}.dou-code-editor.is-disabled .dou-code-editor__content{cursor:not-allowed}.dou-code-editor__lines,.dou-code-editor__matches,.dou-code-editor__brackets,.dou-code-editor__selections,.dou-code-editor__cursors{position:absolute;pointer-events:none;top:0;left:0}.dou-code-editor__lines{will-change:transform;right:0}.dou-code-editor__line{box-sizing:border-box;height:var(--dou-code-editor-line-height);padding:0 var(--dou-code-editor-padding-x);white-space:pre;tab-size:var(--dou-code-editor-tab-size,2)}.dou-code-editor__line.is-wrapped{height:auto}.dou-code-editor__row{box-sizing:border-box;height:var(--dou-code-editor-line-height)}.dou-code-editor__fold-marker{display:inline-block;box-sizing:border-box;border:1px solid var(--dou-color-border);background-color:var(--dou-color-bg-muted);color:var(--dou-color-text-secondary);vertical-align:1px;cursor:pointer;pointer-events:auto;border-radius:4px;height:16px;margin-left:6px;padding:0 6px;font-size:12px;line-height:14px}.dou-code-editor__fold-marker:hover{color:var(--dou-color-text)}.dou-code-editor__line :-webkit-any(.dou-syntax-heading,.dou-syntax-strong){font-weight:inherit}.dou-code-editor__line :-moz-any(.dou-syntax-heading,.dou-syntax-strong){font-weight:inherit}.dou-code-editor__line :is(.dou-syntax-heading,.dou-syntax-strong){font-weight:inherit}.dou-code-editor__compose{text-decoration:underline;text-decoration-color:var(--dou-color-text-tertiary);text-underline-offset:3px}.dou-code-editor__probe{position:absolute;visibility:hidden;white-space:pre;pointer-events:none;top:0;left:0}.dou-code-editor__active-line{position:absolute;height:var(--dou-code-editor-line-height);background-color:var(--dou-code-editor-active-line);pointer-events:none;top:0;left:0;right:0}.dou-code-editor:not(.is-focused) .dou-code-editor__active-line{background-color:#0000}.dou-code-editor__match{position:absolute;box-sizing:border-box;height:var(--dou-code-editor-line-height);background-color:var(--dou-code-editor-match);border-radius:2px;top:0;left:0}.dou-code-editor__match.is-current{box-shadow:inset 0 0 0 1px var(--dou-code-editor-match-current)}.dou-code-editor__marks{position:absolute;z-index:3;pointer-events:none;width:6px;top:0;bottom:0;right:0}.dou-code-editor__mark{position:absolute;background-color:var(--dou-code-editor-match-mark);border-radius:1px;width:6px;height:2px;right:0}.dou-code-editor__mark.is-current{background-color:var(--dou-code-editor-match-current);height:3px}.dou-code-editor__live{position:absolute;overflow:hidden;clip-path:inset(50%);white-space:nowrap;width:1px;height:1px}.dou-code-editor__search{position:absolute;z-index:4;display:flex;container-type:inline-size;pointer-events:none;justify-content:flex-end;top:6px;left:6px;right:14px}.dou-code-editor__search>*{pointer-events:auto}.dou-code-editor__bracket{position:absolute;box-sizing:border-box;height:var(--dou-code-editor-line-height);border:1px solid var(--dou-code-editor-bracket);border-radius:2px;top:0;left:0}.dou-code-editor__bracket.is-unmatched{border-color:var(--dou-code-editor-bracket-unmatched)}.dou-code-editor__selection{position:absolute;height:var(--dou-code-editor-line-height);background-color:var(--dou-code-editor-selection);border-radius:2px;top:0;left:0}.dou-code-editor__cursor{position:absolute;height:var(--dou-code-editor-line-height);background-color:var(--dou-code-editor-cursor);animation:1.2s step-end .5s infinite dou-code-editor-blink;border-radius:1px;width:2px;top:0;left:0}.dou-code-editor.is-readonly .dou-code-editor__cursor{opacity:.4;animation:none}@media (prefers-reduced-motion:reduce){.dou-code-editor__cursor{animation:none}}.dou-code-editor__placeholder{position:absolute;top:var(--dou-code-editor-padding-y);left:var(--dou-code-editor-padding-x);color:var(--dou-color-text-tertiary);white-space:pre;pointer-events:none}.dou-code-editor__input{position:absolute;z-index:-1;box-sizing:border-box;width:calc(100% - var(--dou-code-editor-padding-x));overflow:hidden;outline:none;color:#0000;caret-color:transparent;font:inherit;font-size:max(var(--dou-font-size-input-min),var(--dou-code-editor-font-size));line-height:inherit;letter-spacing:inherit;white-space:pre;tab-size:var(--dou-code-editor-tab-size,2);resize:none;pointer-events:none;background:0 0;border:0;min-width:1px;margin:0;padding:0}.dou-code-editor__input::selection{background:0 0}}@layer dou.components{.dou-code-editor__problem{text-decoration-line:underline;text-decoration-style:wavy;text-decoration-thickness:1px;text-decoration-skip-ink:none;text-underline-offset:3px}.dou-code-editor__problem.is-error{text-decoration-color:var(--dou-code-editor-error)}.dou-code-editor__problem.is-warning{text-decoration-color:var(--dou-code-editor-warning)}.dou-code-editor__problem.is-info{text-decoration-color:var(--dou-code-editor-info)}.dou-code-editor__problem.is-hint{text-decoration-style:dotted;text-decoration-color:var(--dou-color-text-tertiary)}.dou-code-editor__cells{position:absolute;display:flex;height:var(--dou-code-editor-line-height);top:0;left:0}.dou-code-editor__cell{display:inline-flex;font-size:var(--dou-font-size-sm);flex:none;justify-content:center;align-items: center;height:100%}.dou-code-editor__cell[data-gutter-cell]{cursor:pointer}.dou-code-editor__cell>svg{width:14px;height:14px}.dou-code-editor__problem-icon.is-error{color:var(--dou-code-editor-error)}.dou-code-editor__problem-icon.is-warning{color:var(--dou-code-editor-warning)}.dou-code-editor__problem-icon.is-info{color:var(--dou-code-editor-info)}.dou-code-editor__problem-icon.is-hint{color:var(--dou-color-text-tertiary)}.dou-code-editor__problem-mark.is-error{background-color:var(--dou-code-editor-error)}.dou-code-editor__problem-mark.is-warning{background-color:var(--dou-code-editor-warning)}.dou-code-editor__problem-mark.is-info{background-color:var(--dou-code-editor-info)}.dou-code-editor__problem-mark.is-hint{background-color:var(--dou-color-text-tertiary)}.dou-code-editor__floating{display:contents}.dou-code-editor__floating.is-outside{--dou-code-editor-font-size:var(--dou-font-size-sm);--dou-code-editor-bg:var(--dou-color-bg-surface);--dou-code-editor-error:var(--dou-color-danger-text);--dou-code-editor-warning:var(--dou-color-warning-text);--dou-code-editor-info:var(--dou-color-primary-text);position:absolute;display:block;color:var(--dou-color-text);transition:opacity var(--dou-motion-duration-fast)var(--dou-motion-easing);width:0;height:0;line-height:20px;top:0;left:0}.dou-code-editor__floating.is-outside.is-scrolling{opacity:0;pointer-events:none;transition:none}.dou-code-editor__floating.is-outside.is-fixed{position:fixed}.dou-code-editor__problems{position:absolute;z-index:6;box-sizing:border-box;display:flex;border:1px solid var(--dou-color-border);border-radius:var(--dou-radius-control);background-color:var(--dou-color-bg-surface);box-shadow:var(--dou-shadow-md);font-family:var(--dou-font-family);font-size:var(--dou-font-size-sm);white-space:normal;overflow-y:auto;overscroll-behavior:contain;flex-direction:column;gap:4px;width:max-content;max-width:min(440px,100% - 8px);padding:6px;line-height:20px;top:0;left:0}.dou-code-editor__problems>*{flex-shrink:0}.dou-code-editor__problem-item{display:flex;align-items: flex-start;gap:6px;padding:0 2px}.dou-code-editor__problem-item.is-error{--dou-code-editor-problem:var(--dou-code-editor-error)}.dou-code-editor__problem-item.is-warning{--dou-code-editor-problem:var(--dou-code-editor-warning)}.dou-code-editor__problem-item.is-info{--dou-code-editor-problem:var(--dou-code-editor-info)}.dou-code-editor__problem-item.is-hint{--dou-code-editor-problem:var(--dou-color-text-tertiary)}.dou-code-editor__problem-severity{color:var(--dou-code-editor-problem);flex:none;width:14px;height:20px}.dou-code-editor__problem-message{overflow-wrap:anywhere;color:var(--dou-color-text);min-width:0}.dou-code-editor__problem-source{color:var(--dou-color-text-tertiary);margin-left:8px}.dou-code-editor__fixes{display:flex;border-top:1px solid var(--dou-color-border-subtle);flex-wrap:wrap;gap:2px;padding-top:4px}.dou-code-editor__fix{display:inline-flex;border-radius:calc(var(--dou-radius-control) - 2px);color:var(--dou-color-primary-text);font:inherit;cursor:pointer;background:0 0;border:0;align-items: center;height:24px;padding:0 8px}.dou-code-editor__fix.is-active{background-color:color-mix(in oklab,var(--dou-color-text)6%,transparent)}.dou-code-editor__fix:hover{background-color:color-mix(in oklab,var(--dou-color-text)6%,transparent)}@media (pointer:coarse){.dou-code-editor__fix{height:36px}}.dou-code-editor__hover{color:var(--dou-color-text);overflow-wrap:anywhere;white-space:pre-wrap;padding:0 2px}.dou-code-editor__hover+.dou-code-editor__problem-item{border-top:1px solid var(--dou-color-border-subtle);padding-top:4px}.dou-code-lsp-markup{display:flex;white-space:normal;flex-direction:column;gap:6px}.dou-code-lsp-markup__text{white-space:pre-wrap;margin:0}.dou-code-lsp-markup__code{font-family:var(--dou-font-family-mono);white-space:pre-wrap;margin:0}.dou-code-lsp-markup__inline{font-family:var(--dou-font-family-mono)}.dou-code-editor__completions{position:absolute;z-index:7;box-sizing:border-box;display:flex;border:1px solid var(--dou-color-border);border-radius:var(--dou-radius-control);background-color:var(--dou-color-bg-surface);box-shadow:var(--dou-shadow-md);font-family:var(--dou-font-family-mono);font-size:var(--dou-code-editor-font-size);flex-direction:column;width:max-content;min-width:min(200px,100%);max-height:264px;padding:4px;line-height:20px;top:0;left:0}.dou-code-editor__completion-list{overflow-y:auto;overscroll-behavior:contain;flex:0 auto;min-height:28px}.dou-code-editor__completion{display:flex;border-radius:calc(var(--dou-radius-control) - 2px);color:var(--dou-color-text);cursor:pointer;align-items: center;gap:8px;height:28px;padding:0 8px 0 6px}.dou-code-editor__completion.is-active{background-color:color-mix(in oklab,var(--dou-color-text)8%,transparent)}@media (hover:hover){.dou-code-editor__completion:not(.is-active):hover{background-color:color-mix(in oklab,var(--dou-color-text)4%,transparent)}}@media (pointer:coarse){.dou-code-editor__completion{height:36px}}.dou-code-editor__completion-kind{color:var(--dou-color-text-tertiary);flex:none;width:16px;height:16px}.dou-code-editor__completion-label{overflow:hidden;text-overflow:ellipsis;white-space:pre;flex:none;max-width:75%}.dou-code-editor__completion-match{color:var(--dou-color-primary-text);background:0 0;font-weight:600}.dou-code-editor__completion-detail{overflow:hidden;color:var(--dou-color-text-tertiary);font-family:var(--dou-font-family);font-size:var(--dou-font-size-sm);text-overflow:ellipsis;white-space:nowrap;flex:0 auto;min-width:0;margin-left:auto;padding-left:16px}.dou-code-editor__completion-info{border-top:1px solid var(--dou-color-border-subtle);color:var(--dou-color-text-secondary);font-family:var(--dou-font-family);font-size:var(--dou-font-size-sm);white-space:pre-wrap;overflow-wrap:anywhere;flex:none;max-width:400px;margin-top:4px;padding:6px 6px 2px}.dou-code-editor__signature{position:absolute;z-index:6;box-sizing:border-box;border:1px solid var(--dou-color-border);border-radius:var(--dou-radius-control);background-color:var(--dou-color-bg-surface);box-shadow:var(--dou-shadow-md);font-size:var(--dou-font-size-sm);overflow-y:auto;pointer-events:none;width:max-content;max-width:min(440px,100% - 8px);padding:4px 8px;line-height:20px;top:0;left:0}.dou-code-editor__signature-label{color:var(--dou-color-text-secondary);font-family:var(--dou-font-family-mono);font-size:var(--dou-code-editor-font-size);overflow-wrap:anywhere}.dou-code-editor__signature-active{color:var(--dou-color-text);text-decoration:underline;text-underline-offset:3px;font-weight:600}.dou-code-editor__signature-info{color:var(--dou-color-text-tertiary);font-family:var(--dou-font-family);white-space:pre-wrap}.dou-code-editor__field{box-shadow:inset 0 0 0 1px var(--dou-color-border-strong);border-radius:2px}.dou-code-editor__widgets{position:absolute;z-index:3;top:0;left:0}.dou-code-editor__widget{position:absolute;box-sizing:border-box;cursor:auto;font-family:var(--dou-font-family);font-size:var(--dou-font-size-sm);white-space:normal;user-select:text;-webkit-user-select:text;display:flow-root;line-height:20px;top:0;left:0}.dou-code-editor__inline{display:inline-block;vertical-align:top;height:var(--dou-code-editor-line-height);white-space:nowrap}.dou-code-editor__panels{font-family:var(--dou-font-family);flex:none}.dou-code-editor__panels.is-top{border-bottom:1px solid var(--dou-color-border-subtle)}.dou-code-editor__panels.is-bottom{border-top:1px solid var(--dou-color-border-subtle)}.dou-code-editor__handle{position:absolute;z-index:5;touch-action:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;width:0;height:0;top:0;left:0}.dou-code-editor__handle:before{position:absolute;content:"";width:36px;height:36px;top:-6px}.dou-code-editor__handle:after{position:absolute;background-color:var(--dou-color-primary);content:"";width:14px;height:14px;top:0}.dou-code-editor__handle.is-start:before{left:-27px}.dou-code-editor__handle.is-start:after{border-radius:50% 0 50% 50%;right:0}.dou-code-editor__handle.is-end:before{left:-9px}.dou-code-editor__handle.is-end:after{border-radius:0 50% 50%;left:0}.dou-code-editor__handle.is-caret:before{left:-18px}.dou-code-editor__handle.is-caret:after{border-radius:0 50% 50%;width:12px;height:12px;top:4px;left:-6px;transform:rotate(45deg)}.dou-code-editor__magnifier{position:absolute;z-index:6;box-sizing:border-box;overflow:hidden;border:1px solid var(--dou-color-border);background:linear-gradient(var(--dou-code-editor-bg),var(--dou-code-editor-bg)),var(--dou-color-bg-surface);box-shadow:var(--dou-shadow-md);pointer-events:none;border-radius:999px;width:128px;top:0;left:0}.dou-code-editor__magnifier-text{position:absolute;height:var(--dou-code-editor-line-height);margin-top:calc(var(--dou-code-editor-line-height)/-2);white-space:pre;tab-size:var(--dou-code-editor-tab-size);transform-origin:0 50%;top:50%;left:0}.dou-code-editor__magnifier-caret{position:absolute;height:calc(var(--dou-code-editor-line-height)*1.5);background-color:var(--dou-color-primary);border-radius:1px;width:2px;top:50%;translate:0 -50%}.dou-code-editor__menu{position:absolute;z-index:6;display:flex;border:1px solid var(--dou-color-border);border-radius:calc(var(--dou-radius-control) + 2px);background-color:var(--dou-color-bg-surface);box-shadow:var(--dou-shadow-md);font-family:var(--dou-font-family);white-space:nowrap;gap:2px;padding:2px;top:0;left:0}.dou-code-editor__menu-button{display:inline-flex;border-radius:var(--dou-radius-control);color:var(--dou-color-text);font:inherit;font-size:var(--dou-font-size-sm);cursor:pointer;-webkit-tap-highlight-color:transparent;background:0 0;border:0;align-items: center;min-width:36px;height:36px;padding:0 12px;line-height:1}.dou-code-editor__menu-button:active{background-color:color-mix(in oklab,var(--dou-color-text)8%,transparent)}@media (hover:hover){.dou-code-editor__menu-button:hover{background-color:color-mix(in oklab,var(--dou-color-text)5%,transparent)}}.dou-code-editor__keys{position:fixed;box-sizing:border-box;padding:0 max(8px,env(safe-area-inset-right))0 max(8px,env(safe-area-inset-left));pointer-events:none;transition:opacity var(--dou-motion-duration-fast)var(--dou-motion-easing);top:0;left:0}.dou-code-editor__keys.is-scrolling{opacity:0}.dou-code-editor__keys.is-scrolling>.dou-code-keys{pointer-events:none}.dou-code-editor__keys>.dou-code-keys{overflow:hidden;border:1px solid color-mix(in oklab,var(--dou-color-text)10%,transparent);background-color:color-mix(in oklab,var(--dou-color-bg-surface)92%,transparent);box-shadow:var(--dou-shadow-md);-webkit-backdrop-filter:blur(20px)saturate(1.8);backdrop-filter:blur(20px)saturate(1.8);pointer-events:auto;border-radius:22px;height:44px;padding:0 3px}.dou-code-editor__keys>.dou-code-keys .dou-code-keys__scroll{padding:0}.dou-code-editor__keys>.dou-code-keys .dou-code-keys__arrows{position:relative;box-shadow:none;padding:0 0 0 5px}.dou-code-editor__keys>.dou-code-keys .dou-code-keys__arrows:before{position:absolute;background-color:var(--dou-color-border-subtle);content:"";width:1px;top:10px;bottom:10px;left:0}.dou-code-editor__keys>.dou-code-keys .dou-code-keys__key{border-radius:18px}.dou-code-keys{display:flex;box-sizing:border-box;border-top:1px solid var(--dou-color-border);background-color:var(--dou-color-bg-surface);color:var(--dou-color-text);font-family:var(--dou-font-family-mono);font-size:var(--dou-font-size-md);user-select:none;-webkit-user-select:none;height:45px}.dou-code-keys__scroll{display:flex;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;touch-action:pan-x;flex:auto;align-items: center;gap:2px;min-width:0;padding:0 4px}.dou-code-keys__scroll::-webkit-scrollbar{display:none}.dou-code-keys__arrows{display:flex;box-shadow:-1px 0 0 var(--dou-color-border-subtle);flex:none;align-items: center;gap:2px;padding:0 4px}.dou-code-keys__key{display:inline-flex;box-sizing:border-box;border-radius:var(--dou-radius-control);color:inherit;font:inherit;cursor:pointer;touch-action:pan-x;-webkit-tap-highlight-color:transparent;transition-property:background-color,transform;transition-duration:var(--dou-motion-duration-fast);transition-timing-function:var(--dou-motion-easing-exit);background:0 0;border:0;flex:none;justify-content:center;align-items: center;min-width:36px;height:36px;padding:0 8px;line-height:1}.dou-code-keys__key>svg{color:var(--dou-color-text-secondary);width:18px;height:18px}@media (hover:hover){.dou-code-keys__key:hover{background-color:color-mix(in oklab,var(--dou-color-text)5%,transparent)}}.dou-code-keys__key.is-pressed{background-color:color-mix(in oklab,var(--dou-color-text)10%,transparent);transition-duration:var(--dou-motion-duration-slow);transition-timing-function:var(--dou-motion-easing-spring);transform:scale(1.12)}}@layer dou.components{.dou-code-input{--dou-code-input-height:var(--dou-control-height-md);display:block;width:100%;min-width:0}.dou-code-input .dou-code-editor{--dou-code-editor-padding-x:var(--dou-control-padding-x-md);--dou-code-editor-padding-y:calc((var(--dou-code-input-height) - var(--dou-code-editor-line-height) - 2px)/2);min-height:var(--dou-code-input-height);border-radius:var(--dou-radius-control);transition-property:border-color,box-shadow}@media (hover:hover){.dou-code-input .dou-code-editor:not(:-webkit-any(.is-focused,.is-disabled)):hover{--dou-code-editor-border:var(--dou-color-border-strong)}.dou-code-input .dou-code-editor:not(:-moz-any(.is-focused,.is-disabled)):hover{--dou-code-editor-border:var(--dou-color-border-strong)}.dou-code-input .dou-code-editor:not(:is(.is-focused,.is-disabled)):hover{--dou-code-editor-border:var(--dou-color-border-strong)}}.dou-code-input .dou-code-editor__marks{display:none}.dou-code-input:not(.is-multiline) .dou-code-editor{height:var(--dou-code-input-height)}.dou-code-input:not(.is-multiline) .dou-code-editor .dou-code-editor__scroller{scrollbar-width:none}.dou-code-input:not(.is-multiline) .dou-code-editor .dou-code-editor__scroller::-webkit-scrollbar{display:none}.dou-code-input.is-multiline .dou-code-editor{min-height:calc(var(--dou-code-input-min-rows,1)*var(--dou-code-editor-line-height) + 2*var(--dou-code-editor-padding-y) + 2px);max-height:calc(var(--dou-code-input-max-rows,6)*var(--dou-code-editor-line-height) + 2*var(--dou-code-editor-padding-y) + 2px)}.dou-code-input.is-invalid .dou-code-editor{--dou-code-editor-border:color-mix(in oklab,var(--dou-color-danger)55%,var(--dou-color-border));--dou-code-editor-border-focus:var(--dou-color-danger)}.dou-code-input--sm{--dou-code-input-height:var(--dou-control-height-sm)}.dou-code-input--sm .dou-code-editor{--dou-code-editor-padding-x:var(--dou-control-padding-x-sm)}.dou-code-input--lg{--dou-code-input-height:var(--dou-control-height-lg)}.dou-code-input--lg .dou-code-editor{--dou-code-editor-padding-x:var(--dou-control-padding-x-lg)}}@keyframes dou-code-peer-name{to{opacity:0;visibility:hidden}}@keyframes dou-code-editor-blink{50%{opacity:0}}@layer dou.components{.dou-code-diff{--dou-code-diff-removed:color-mix(in oklab,var(--dou-color-danger)10%,transparent);--dou-code-diff-added:color-mix(in oklab,var(--dou-color-success)10%,transparent);--dou-code-diff-removed-word:color-mix(in oklab,var(--dou-color-danger-text)30%,transparent);--dou-code-diff-added-word:color-mix(in oklab,var(--dou-color-success-text)30%,transparent);--dou-code-diff-border:var(--dou-color-border);position:relative;display:flex;box-sizing:border-box;overflow:hidden;border:1px solid var(--dou-code-diff-border);border-radius:var(--dou-radius-container);background-color:var(--dou-color-bg-surface);transition:border-color var(--dou-motion-duration-fast)var(--dou-motion-easing);flex-direction:column;width:100%;min-width:0}.dou-code-diff:focus-within{border-color:color-mix(in oklab,var(--dou-color-focus)70%,var(--dou-color-text))}.dou-code-diff .dou-code-editor{border:0;border-radius:0}.dou-code-diff__toolbar{display:flex;border-bottom:1px solid var(--dou-code-diff-border);font-size:var(--dou-font-size-sm);flex:none;align-items: center;gap:2px;min-height:36px;padding:0 6px 0 12px}@media (pointer:coarse){.dou-code-diff__toolbar{min-height:44px}}.dou-code-diff__stats{display:flex;overflow:hidden;white-space:nowrap;flex:auto;align-items: center;gap:8px;min-width:0}.dou-code-diff__count{font-family:var(--dou-font-family-mono);font-variant-numeric:tabular-nums}.dou-code-diff__count.is-added{color:var(--dou-color-success-text)}.dou-code-diff__count.is-removed{color:var(--dou-color-danger-text)}.dou-code-diff__summary{overflow:hidden;color:var(--dou-color-text-secondary);text-overflow:ellipsis}.dou-code-diff__hidden-text{position:absolute;overflow:hidden;clip-path:inset(50%);white-space:nowrap;width:1px;height:1px}@media (pointer:coarse){.dou-code-diff__toolbar .dou-button{position:relative;min-width:36px;min-height:36px}.dou-code-diff__toolbar .dou-button:after{position:absolute;content:"";inset:-2px}}.dou-code-diff__body{display:grid;grid-template-rows:minmax(0,1fr);grid-template-columns:minmax(0,1fr);flex:auto;min-height:0}.dou-code-diff--split>.dou-code-diff__body{grid-template-rows:auto minmax(0,1fr);grid-template-columns:minmax(0,1fr)minmax(0,1fr)}.dou-code-diff__label{border-bottom:1px solid var(--dou-code-diff-border);color:var(--dou-color-text-secondary);padding:4px 12px;font-size:12px}.dou-code-diff__label:nth-child(2){border-left:1px solid var(--dou-code-diff-border)}.dou-code-diff__side{display:flex;flex-direction:column;min-width:0;min-height:0}.dou-code-diff__side.is-modified{border-left:1px solid var(--dou-code-diff-border)}.dou-code-diff__side>.dou-code-editor{flex:auto}.dou-code-diff__line.is-removed{background-color:var(--dou-code-diff-removed)}.dou-code-diff__line.is-added{background-color:var(--dou-code-diff-added)}.dou-code-diff__word.is-removed{background-color:var(--dou-code-diff-removed-word)}.dou-code-diff__word.is-added{background-color:var(--dou-code-diff-added-word)}.dou-code-editor__cell.dou-code-diff__sign{font-family:var(--dou-font-family-mono)}.dou-code-editor__cell.dou-code-diff__sign.is-removed{background-color:var(--dou-code-diff-removed);color:var(--dou-color-danger-text)}.dou-code-editor__cell.dou-code-diff__sign.is-added{background-color:var(--dou-code-diff-added);color:var(--dou-color-success-text)}.dou-code-editor__cell.dou-code-diff__number{box-sizing:border-box;color:var(--dou-code-editor-gutter-text);font-family:var(--dou-font-family-mono);font-size:inherit;font-variant-numeric:tabular-nums;justify-content:flex-end;padding-right:8px}.dou-code-editor__cell.dou-code-diff__number.is-removed{background-color:var(--dou-code-diff-removed)}.dou-code-editor__cell.dou-code-diff__number.is-added{background-color:var(--dou-code-diff-added)}.dou-code-diff__filler{background-image:repeating-linear-gradient(-45deg,transparent 0 6px,color-mix(in oklab,var(--dou-color-text)5%,transparent)6px 7px)}.dou-code-diff__bar{display:flex;box-sizing:border-box;border:0;border-block:1px solid var(--dou-code-diff-border);background-color:color-mix(in oklab,var(--dou-color-text)3%,transparent);color:var(--dou-color-text-secondary);font:inherit;text-align:left;cursor:pointer;align-items: center;gap:6px;width:100%;height:28px;margin:0;padding:0 12px;font-size:12px}@media (hover:hover){.dou-code-diff__bar:hover{background-color:color-mix(in oklab,var(--dou-color-text)6%,transparent);color:var(--dou-color-text)}}.dou-code-diff__bar:focus-visible{outline:2px solid var(--dou-color-focus);outline-offset:-2px}@media (pointer:coarse){.dou-code-diff__bar{height:36px}}.dou-code-diff__bar-icon{flex:none;font-size:14px}.dou-code-diff__live{position:absolute;overflow:hidden;clip-path:inset(50%);white-space:nowrap;width:1px;height:1px}.dou-code-peer{position:relative;z-index:1;display:inline-block;height:var(--dou-code-editor-line-height);vertical-align:top;pointer-events:none;width:0}.dou-code-peer:before{content:"";position:absolute;background-color:var(--dou-code-peer-color);border-radius:1px;width:2px;height:100%;top:0;left:-1px}.dou-code-peer__name{position:absolute;background-color:var(--dou-code-peer-color);color:oklch(from var(--dou-code-peer-color)clamp(.2,(.66 - l)*100,.99)0 0);font-family:var(--dou-font-family);font-size:var(--dou-font-size-sm);white-space:nowrap;user-select:none;animation:dou-code-peer-name var(--dou-motion-duration-fast)var(--dou-motion-easing)3s forwards;border-radius:4px 4px 4px 0;padding:0 6px;line-height:18px;bottom:100%;left:-1px}.dou-code-peer.is-below .dou-code-peer__name{border-radius:0 4px 4px;top:100%;bottom:auto}.dou-code-peer-selection{background-color:color-mix(in oklab,var(--dou-code-peer-color)20%,transparent)}}
|
|
1
|
+
@layer dou.components{.dou-code-editor{--dou-code-editor-font-size:var(--dou-font-size-sm);--dou-code-editor-line-height:20px;--dou-code-editor-padding-y:8px;--dou-code-editor-padding-x:12px;--dou-code-editor-bg:var(--dou-color-bg-surface);--dou-code-editor-gutter-bg:var(--dou-code-editor-bg);--dou-code-editor-gutter-text:var(--dou-color-text-tertiary);--dou-code-editor-border:var(--dou-color-border);--dou-code-editor-border-focus:color-mix(in oklab,var(--dou-color-focus)70%,var(--dou-color-text));--dou-code-editor-cursor:var(--dou-color-text);--dou-code-editor-active-line:color-mix(in oklab,var(--dou-color-text)4%,transparent);--dou-code-editor-selection:color-mix(in oklab,var(--dou-color-primary)20%,transparent);--dou-code-editor-match:color-mix(in oklab,var(--dou-color-warning)22%,transparent);--dou-code-editor-match-current:color-mix(in oklab,var(--dou-color-warning-text)80%,transparent);--dou-code-editor-match-mark:color-mix(in oklab,var(--dou-color-warning)60%,transparent);--dou-code-editor-bracket:color-mix(in oklab,var(--dou-color-text)35%,transparent);--dou-code-editor-error:var(--dou-color-danger-text);--dou-code-editor-warning:var(--dou-color-warning-text);--dou-code-editor-info:var(--dou-color-primary-text);--dou-code-editor-bracket-unmatched:color-mix(in oklab,var(--dou-color-danger-text)70%,transparent);position:relative;display:flex;box-sizing:border-box;min-height:calc(var(--dou-code-editor-line-height) + 2*var(--dou-code-editor-padding-y) + 2px);overflow:hidden;border:1px solid var(--dou-code-editor-border);border-radius:var(--dou-radius-container);background-color:var(--dou-code-editor-bg);color:var(--dou-color-text);font-family:var(--dou-font-family-mono);font-size:var(--dou-code-editor-font-size);font-variant-ligatures:none;line-height:var(--dou-code-editor-line-height);transition:border-color var(--dou-motion-duration-fast)var(--dou-motion-easing);flex-direction:column;width:100%;min-width:0}.dou-code-editor.is-focused{border-color:var(--dou-code-editor-border-focus)}.dou-code-editor:not(.is-bordered){min-height:calc(var(--dou-code-editor-line-height) + 2*var(--dou-code-editor-padding-y));border:0;border-radius:0}.dou-code-editor:not(.is-focused){--dou-code-editor-selection:color-mix(in oklab,var(--dou-color-text)10%,transparent)}.dou-code-editor.is-disabled{color:var(--dou-color-text-disabled);cursor:not-allowed}.dou-code-editor__body{position:relative;display:flex;flex:auto;min-height:0}.dou-code-editor__scroller{position:relative;overflow:auto;overscroll-behavior-x:contain;scrollbar-width:thin;flex:auto;min-width:0;min-height:0}.dou-code-editor__minimap{position:relative;overflow:hidden;box-shadow:inset 1px 0 0 color-mix(in oklab,var(--dou-color-text)6%,transparent);color:var(--dou-color-text-tertiary);cursor:default;touch-action:none;user-select:none;flex:none;width:96px}.dou-code-editor__minimap-canvas{position:absolute;width:100%;height:100%;inset:0}.dou-code-editor__minimap-view{position:absolute;background-color:color-mix(in oklab,var(--dou-color-text)6%,transparent);transition:background-color var(--dou-motion-duration-fast)var(--dou-motion-easing);top:0;left:0;right:0}.dou-code-editor__minimap:hover .dou-code-editor__minimap-view{background-color:color-mix(in oklab,var(--dou-color-text)9%,transparent)}.dou-code-editor__minimap:active .dou-code-editor__minimap-view{background-color:color-mix(in oklab,var(--dou-color-text)12%,transparent)}.dou-code-editor__sizer{position:relative;display:flex;box-sizing:border-box;width:max-content;min-width:100%}.dou-code-editor__gutter{position:sticky;z-index:2;box-sizing:border-box;width:var(--dou-code-editor-gutter);background-color:var(--dou-code-editor-gutter-bg);color:var(--dou-code-editor-gutter-text);font-variant-numeric:tabular-nums;cursor:default;user-select:none;-webkit-user-select:none;touch-action:manipulation;flex:none;left:0}.dou-code-editor__numbers{position:absolute;will-change:transform;top:0;left:0;right:0}.dou-code-editor__number{position:relative;box-sizing:border-box;height:var(--dou-code-editor-line-height);padding:0 12px 0 calc(16px + var(--dou-code-editor-gutter-cells,0px));text-align:right}.dou-code-editor__number.is-active{color:var(--dou-color-text-secondary)}.dou-code-editor.is-foldable .dou-code-editor__number{padding-right:24px}.dou-code-editor__fold-toggle{position:absolute;display:flex;height:var(--dou-code-editor-line-height);color:var(--dou-color-text-tertiary);cursor:pointer;opacity:0;transition:opacity var(--dou-motion-duration-fast)var(--dou-motion-easing);justify-content:center;align-items: center;width:14px;font-size:12px;top:0;right:6px}.dou-code-editor__gutter:hover .dou-code-editor__fold-toggle{opacity:1}.dou-code-editor__fold-toggle.is-folded{opacity:1}.dou-code-editor__fold-toggle:hover{color:var(--dou-color-text)}@media (pointer:coarse){.dou-code-editor__fold-toggle{opacity:1}.dou-code-editor__fold-toggle:before{position:absolute;content:"";inset:-4px -6px}}.dou-code-editor__content{position:relative;cursor:text;touch-action:manipulation;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;flex:auto;min-width:0}.dou-code-editor.is-disabled .dou-code-editor__content{cursor:not-allowed}.dou-code-editor__lines,.dou-code-editor__matches,.dou-code-editor__brackets,.dou-code-editor__selections,.dou-code-editor__cursors{position:absolute;pointer-events:none;top:0;left:0}.dou-code-editor__lines{will-change:transform;right:0}.dou-code-editor__line{box-sizing:border-box;height:var(--dou-code-editor-line-height);padding:0 var(--dou-code-editor-padding-x);white-space:pre;tab-size:var(--dou-code-editor-tab-size,2)}.dou-code-editor__line.is-wrapped{height:auto}.dou-code-editor__row{box-sizing:border-box;height:var(--dou-code-editor-line-height)}.dou-code-editor__fold-marker{display:inline-block;box-sizing:border-box;border:1px solid var(--dou-color-border);background-color:var(--dou-color-bg-muted);color:var(--dou-color-text-secondary);vertical-align:1px;cursor:pointer;pointer-events:auto;border-radius:4px;height:16px;margin-left:6px;padding:0 6px;font-size:12px;line-height:14px}.dou-code-editor__fold-marker:hover{color:var(--dou-color-text)}.dou-code-editor__line :-webkit-any(.dou-syntax-heading,.dou-syntax-strong){font-weight:inherit}.dou-code-editor__line :-moz-any(.dou-syntax-heading,.dou-syntax-strong){font-weight:inherit}.dou-code-editor__line :is(.dou-syntax-heading,.dou-syntax-strong){font-weight:inherit}.dou-code-editor__compose{text-decoration:underline;text-decoration-color:var(--dou-color-text-tertiary);text-underline-offset:3px}.dou-code-editor__probe{position:absolute;visibility:hidden;white-space:pre;pointer-events:none;top:0;left:0}.dou-code-editor__active-line{position:absolute;height:var(--dou-code-editor-line-height);background-color:var(--dou-code-editor-active-line);pointer-events:none;top:0;left:0;right:0}.dou-code-editor:not(.is-focused) .dou-code-editor__active-line{background-color:#0000}.dou-code-editor__match{position:absolute;box-sizing:border-box;height:var(--dou-code-editor-line-height);background-color:var(--dou-code-editor-match);border-radius:2px;top:0;left:0}.dou-code-editor__match.is-current{box-shadow:inset 0 0 0 1px var(--dou-code-editor-match-current)}.dou-code-editor__marks{position:absolute;z-index:3;pointer-events:none;width:6px;top:0;bottom:0;right:0}.dou-code-editor__mark{position:absolute;background-color:var(--dou-code-editor-match-mark);border-radius:1px;width:6px;height:2px;right:0}.dou-code-editor__mark.is-current{background-color:var(--dou-code-editor-match-current);height:3px}.dou-code-editor__live{position:absolute;overflow:hidden;clip-path:inset(50%);white-space:nowrap;width:1px;height:1px}.dou-code-editor__search{position:absolute;z-index:4;display:flex;container-type:inline-size;pointer-events:none;justify-content:flex-end;top:6px;left:6px;right:14px}.dou-code-editor__search>*{pointer-events:auto}.dou-code-editor__bracket{position:absolute;box-sizing:border-box;height:var(--dou-code-editor-line-height);border:1px solid var(--dou-code-editor-bracket);border-radius:2px;top:0;left:0}.dou-code-editor__bracket.is-unmatched{border-color:var(--dou-code-editor-bracket-unmatched)}.dou-code-editor__selection{position:absolute;height:var(--dou-code-editor-line-height);background-color:var(--dou-code-editor-selection);border-radius:2px;top:0;left:0}.dou-code-editor__cursor{position:absolute;height:var(--dou-code-editor-line-height);background-color:var(--dou-code-editor-cursor);animation:1.2s step-end .5s infinite dou-code-editor-blink;border-radius:1px;width:2px;top:0;left:0}.dou-code-editor.is-readonly .dou-code-editor__cursor{opacity:.4;animation:none}@media (prefers-reduced-motion:reduce){.dou-code-editor__cursor{animation:none}}.dou-code-editor__placeholder{position:absolute;top:var(--dou-code-editor-padding-y);left:var(--dou-code-editor-padding-x);color:var(--dou-color-text-tertiary);white-space:pre;pointer-events:none}.dou-code-editor__input{position:absolute;z-index:-1;box-sizing:border-box;width:calc(100% - var(--dou-code-editor-padding-x));overflow:hidden;outline:none;color:#0000;caret-color:transparent;font:inherit;font-size:max(var(--dou-font-size-input-min),var(--dou-code-editor-font-size));line-height:inherit;letter-spacing:inherit;white-space:pre;tab-size:var(--dou-code-editor-tab-size,2);resize:none;pointer-events:none;background:0 0;border:0;min-width:1px;margin:0;padding:0}.dou-code-editor__input::selection{background:0 0}}@layer dou.components{.dou-code-editor__problem{text-decoration-line:underline;text-decoration-style:wavy;text-decoration-thickness:1px;text-decoration-skip-ink:none;text-underline-offset:3px}.dou-code-editor__problem.is-error{text-decoration-color:var(--dou-code-editor-error)}.dou-code-editor__problem.is-warning{text-decoration-color:var(--dou-code-editor-warning)}.dou-code-editor__problem.is-info{text-decoration-color:var(--dou-code-editor-info)}.dou-code-editor__problem.is-hint{text-decoration-style:dotted;text-decoration-color:var(--dou-color-text-tertiary)}.dou-code-editor__cells{position:absolute;display:flex;height:var(--dou-code-editor-line-height);top:0;left:0}.dou-code-editor__cell{display:inline-flex;font-size:var(--dou-font-size-sm);flex:none;justify-content:center;align-items: center;height:100%}.dou-code-editor__cell[data-gutter-cell]{cursor:pointer}.dou-code-editor.is-disabled .dou-code-editor__cell[data-gutter-cell]{cursor:default}.dou-code-editor__cell[role=button]{border-radius:var(--dou-radius-control)}.dou-code-editor__cell[role=button]:focus-visible{outline:2px solid var(--dou-color-focus);outline-offset:-2px}.dou-code-editor__cell>svg{width:14px;height:14px}.dou-code-editor__cell.is-on-hover{opacity:0;transition:opacity var(--dou-motion-duration-fast)var(--dou-motion-easing)}.dou-code-editor:not(.is-disabled) .dou-code-editor__number:-webkit-any(:hover,.is-hovered)>.dou-code-editor__cells>.dou-code-editor__cell.is-on-hover{opacity:1}.dou-code-editor:not(.is-disabled) .dou-code-editor__number:-moz-any(:hover,.is-hovered)>.dou-code-editor__cells>.dou-code-editor__cell.is-on-hover{opacity:1}.dou-code-editor:not(.is-disabled) .dou-code-editor__number:is(:hover,.is-hovered)>.dou-code-editor__cells>.dou-code-editor__cell.is-on-hover{opacity:1}.dou-code-editor.is-focused .dou-code-editor__number.is-active>.dou-code-editor__cells>.dou-code-editor__cell.is-on-hover{opacity:1}.dou-code-editor__cell.is-on-hover:focus-visible{opacity:1}.dou-code-editor__problem-icon.is-error{color:var(--dou-code-editor-error)}.dou-code-editor__problem-icon.is-warning{color:var(--dou-code-editor-warning)}.dou-code-editor__problem-icon.is-info{color:var(--dou-code-editor-info)}.dou-code-editor__problem-icon.is-hint{color:var(--dou-color-text-tertiary)}.dou-code-editor__problem-mark.is-error{background-color:var(--dou-code-editor-error)}.dou-code-editor__problem-mark.is-warning{background-color:var(--dou-code-editor-warning)}.dou-code-editor__problem-mark.is-info{background-color:var(--dou-code-editor-info)}.dou-code-editor__problem-mark.is-hint{background-color:var(--dou-color-text-tertiary)}.dou-code-editor__floating{display:contents}.dou-code-editor__floating.is-outside{--dou-code-editor-font-size:var(--dou-font-size-sm);--dou-code-editor-bg:var(--dou-color-bg-surface);--dou-code-editor-error:var(--dou-color-danger-text);--dou-code-editor-warning:var(--dou-color-warning-text);--dou-code-editor-info:var(--dou-color-primary-text);position:absolute;display:block;color:var(--dou-color-text);transition:opacity var(--dou-motion-duration-fast)var(--dou-motion-easing);width:0;height:0;line-height:20px;top:0;left:0}.dou-code-editor__floating.is-outside.is-scrolling{opacity:0;pointer-events:none;transition:none}.dou-code-editor__floating.is-outside.is-fixed{position:fixed}.dou-code-editor__problems{position:absolute;z-index:6;box-sizing:border-box;display:flex;border:1px solid var(--dou-color-border);border-radius:var(--dou-radius-control);background-color:var(--dou-color-bg-surface);box-shadow:var(--dou-shadow-md);font-family:var(--dou-font-family);font-size:var(--dou-font-size-sm);white-space:normal;overflow-y:auto;overscroll-behavior:contain;flex-direction:column;gap:4px;width:max-content;max-width:min(440px,100% - 8px);padding:6px;line-height:20px;top:0;left:0}.dou-code-editor__problems>*{flex-shrink:0}.dou-code-editor__problem-item{display:flex;align-items: flex-start;gap:6px;padding:0 2px}.dou-code-editor__problem-item.is-error{--dou-code-editor-problem:var(--dou-code-editor-error)}.dou-code-editor__problem-item.is-warning{--dou-code-editor-problem:var(--dou-code-editor-warning)}.dou-code-editor__problem-item.is-info{--dou-code-editor-problem:var(--dou-code-editor-info)}.dou-code-editor__problem-item.is-hint{--dou-code-editor-problem:var(--dou-color-text-tertiary)}.dou-code-editor__problem-severity{color:var(--dou-code-editor-problem);flex:none;width:14px;height:20px}.dou-code-editor__problem-message{overflow-wrap:anywhere;color:var(--dou-color-text);min-width:0}.dou-code-editor__problem-source{color:var(--dou-color-text-tertiary);margin-left:8px}.dou-code-editor__fixes{display:flex;border-top:1px solid var(--dou-color-border-subtle);flex-wrap:wrap;gap:2px;padding-top:4px}.dou-code-editor__fix{display:inline-flex;border-radius:calc(var(--dou-radius-control) - 2px);color:var(--dou-color-primary-text);font:inherit;cursor:pointer;background:0 0;border:0;align-items: center;height:24px;padding:0 8px}.dou-code-editor__fix.is-active{background-color:color-mix(in oklab,var(--dou-color-text)6%,transparent)}.dou-code-editor__fix:hover{background-color:color-mix(in oklab,var(--dou-color-text)6%,transparent)}@media (pointer:coarse){.dou-code-editor__fix{height:36px}}.dou-code-editor__hover{color:var(--dou-color-text);overflow-wrap:anywhere;white-space:pre-wrap;padding:0 2px}.dou-code-editor__hover+.dou-code-editor__problem-item{border-top:1px solid var(--dou-color-border-subtle);padding-top:4px}.dou-code-lsp-markup{display:flex;white-space:normal;flex-direction:column;gap:6px}.dou-code-lsp-markup__text{white-space:pre-wrap;margin:0}.dou-code-lsp-markup__code{font-family:var(--dou-font-family-mono);white-space:pre-wrap;margin:0}.dou-code-lsp-markup__inline{font-family:var(--dou-font-family-mono)}.dou-code-editor__completions{position:absolute;z-index:7;box-sizing:border-box;display:flex;border:1px solid var(--dou-color-border);border-radius:var(--dou-radius-control);background-color:var(--dou-color-bg-surface);box-shadow:var(--dou-shadow-md);font-family:var(--dou-font-family-mono);font-size:var(--dou-code-editor-font-size);flex-direction:column;width:max-content;min-width:min(200px,100%);max-height:264px;padding:4px;line-height:20px;top:0;left:0}.dou-code-editor__completion-list{overflow-y:auto;overscroll-behavior:contain;flex:0 auto;min-height:28px}.dou-code-editor__completion{display:flex;border-radius:calc(var(--dou-radius-control) - 2px);color:var(--dou-color-text);cursor:pointer;align-items: center;gap:8px;height:28px;padding:0 8px 0 6px}.dou-code-editor__completion.is-active{background-color:color-mix(in oklab,var(--dou-color-text)8%,transparent)}@media (hover:hover){.dou-code-editor__completion:not(.is-active):hover{background-color:color-mix(in oklab,var(--dou-color-text)4%,transparent)}}@media (pointer:coarse){.dou-code-editor__completion{height:36px}}.dou-code-editor__completion-kind{color:var(--dou-color-text-tertiary);flex:none;width:16px;height:16px}.dou-code-editor__completion-label{overflow:hidden;text-overflow:ellipsis;white-space:pre;flex:none;max-width:75%}.dou-code-editor__completion-match{color:var(--dou-color-primary-text);background:0 0;font-weight:600}.dou-code-editor__completion-detail{overflow:hidden;color:var(--dou-color-text-tertiary);font-family:var(--dou-font-family);font-size:var(--dou-font-size-sm);text-overflow:ellipsis;white-space:nowrap;flex:0 auto;min-width:0;margin-left:auto;padding-left:16px}.dou-code-editor__completion-info{border-top:1px solid var(--dou-color-border-subtle);color:var(--dou-color-text-secondary);font-family:var(--dou-font-family);font-size:var(--dou-font-size-sm);white-space:pre-wrap;overflow-wrap:anywhere;flex:none;max-width:400px;margin-top:4px;padding:6px 6px 2px}.dou-code-editor__signature{position:absolute;z-index:6;box-sizing:border-box;border:1px solid var(--dou-color-border);border-radius:var(--dou-radius-control);background-color:var(--dou-color-bg-surface);box-shadow:var(--dou-shadow-md);font-size:var(--dou-font-size-sm);overflow-y:auto;pointer-events:none;width:max-content;max-width:min(440px,100% - 8px);padding:4px 8px;line-height:20px;top:0;left:0}.dou-code-editor__signature-label{color:var(--dou-color-text-secondary);font-family:var(--dou-font-family-mono);font-size:var(--dou-code-editor-font-size);overflow-wrap:anywhere}.dou-code-editor__signature-active{color:var(--dou-color-text);text-decoration:underline;text-underline-offset:3px;font-weight:600}.dou-code-editor__signature-info{color:var(--dou-color-text-tertiary);font-family:var(--dou-font-family);white-space:pre-wrap}.dou-code-editor__field{box-shadow:inset 0 0 0 1px var(--dou-color-border-strong);border-radius:2px}.dou-code-editor__widgets{position:absolute;z-index:3;top:0;left:0}.dou-code-editor__widget{position:absolute;box-sizing:border-box;cursor:auto;font-family:var(--dou-font-family);font-size:var(--dou-font-size-sm);white-space:normal;user-select:text;-webkit-user-select:text;display:flow-root;line-height:20px;top:0;left:0}.dou-code-editor__inline{display:inline-block;vertical-align:top;height:var(--dou-code-editor-line-height);white-space:nowrap}.dou-code-editor__panels{font-family:var(--dou-font-family);flex:none}.dou-code-editor__panels.is-top{border-bottom:1px solid var(--dou-color-border-subtle)}.dou-code-editor__panels.is-bottom{border-top:1px solid var(--dou-color-border-subtle)}.dou-code-editor__handle{position:absolute;z-index:5;touch-action:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;width:0;height:0;top:0;left:0}.dou-code-editor__handle:before{position:absolute;content:"";width:36px;height:36px;top:-6px}.dou-code-editor__handle:after{position:absolute;background-color:var(--dou-color-primary);content:"";width:14px;height:14px;top:0}.dou-code-editor__handle.is-start:before{left:-27px}.dou-code-editor__handle.is-start:after{border-radius:50% 0 50% 50%;right:0}.dou-code-editor__handle.is-end:before{left:-9px}.dou-code-editor__handle.is-end:after{border-radius:0 50% 50%;left:0}.dou-code-editor__handle.is-caret:before{left:-18px}.dou-code-editor__handle.is-caret:after{border-radius:0 50% 50%;width:12px;height:12px;top:4px;left:-6px;transform:rotate(45deg)}.dou-code-editor__magnifier{position:absolute;z-index:6;box-sizing:border-box;overflow:hidden;border:1px solid var(--dou-color-border);background:linear-gradient(var(--dou-code-editor-bg),var(--dou-code-editor-bg)),var(--dou-color-bg-surface);box-shadow:var(--dou-shadow-md);pointer-events:none;border-radius:999px;width:128px;top:0;left:0}.dou-code-editor__magnifier-text{position:absolute;height:var(--dou-code-editor-line-height);margin-top:calc(var(--dou-code-editor-line-height)/-2);white-space:pre;tab-size:var(--dou-code-editor-tab-size);transform-origin:0 50%;top:50%;left:0}.dou-code-editor__magnifier-caret{position:absolute;height:calc(var(--dou-code-editor-line-height)*1.5);background-color:var(--dou-color-primary);border-radius:1px;width:2px;top:50%;translate:0 -50%}.dou-code-editor__menu{position:absolute;z-index:6;display:flex;border:1px solid var(--dou-color-border);border-radius:calc(var(--dou-radius-control) + 2px);background-color:var(--dou-color-bg-surface);box-shadow:var(--dou-shadow-md);font-family:var(--dou-font-family);white-space:nowrap;gap:2px;padding:2px;top:0;left:0}.dou-code-editor__menu-button{display:inline-flex;border-radius:var(--dou-radius-control);color:var(--dou-color-text);font:inherit;font-size:var(--dou-font-size-sm);cursor:pointer;-webkit-tap-highlight-color:transparent;background:0 0;border:0;align-items: center;min-width:36px;height:36px;padding:0 12px;line-height:1}.dou-code-editor__menu-button:active{background-color:color-mix(in oklab,var(--dou-color-text)8%,transparent)}@media (hover:hover){.dou-code-editor__menu-button:hover{background-color:color-mix(in oklab,var(--dou-color-text)5%,transparent)}}.dou-code-editor__keys{position:absolute;box-sizing:border-box;display:flex;border:1px solid color-mix(in oklab,var(--dou-color-text)10%,transparent);background-color:color-mix(in oklab,var(--dou-color-bg-surface)92%,transparent);box-shadow:var(--dou-shadow-md);-webkit-backdrop-filter:blur(20px)saturate(1.8);backdrop-filter:blur(20px)saturate(1.8);transition:opacity var(--dou-motion-duration-fast)var(--dou-motion-easing);border-radius:22px;height:44px;padding:0 3px 0 0;top:0;left:0}.dou-code-editor__keys.is-fixed{position:fixed}.dou-code-editor__keys.is-scrolling{opacity:0;pointer-events:none;transition:none}.dou-code-editor__keys>.dou-code-keys{background-color:#0000;border-top:0;flex:auto;min-width:0;height:42px}.dou-code-editor__keys>.dou-code-keys .dou-code-keys__scroll{padding:0}.dou-code-editor__keys>.dou-code-keys .dou-code-keys__arrows{position:relative;box-shadow:none;padding:0 0 0 5px}.dou-code-editor__keys>.dou-code-keys .dou-code-keys__arrows:before{position:absolute;background-color:var(--dou-color-border-subtle);content:"";width:1px;top:10px;bottom:10px;left:0}.dou-code-editor__keys>.dou-code-keys .dou-code-keys__key{border-radius:18px}.dou-code-editor__keys-grip{display:flex;color:var(--dou-color-text-tertiary);cursor:grab;touch-action:none;-webkit-tap-highlight-color:transparent;background:0 0;border:0;flex:none;justify-content:center;align-items: center;width:36px;margin:0;padding:0 0 0 6px}.dou-code-editor__keys-grip>svg{width:18px;height:18px}.dou-code-editor__keys-grip:active{cursor:grabbing}.dou-code-editor__keys-grip:focus-visible{outline:2px solid var(--dou-color-focus);outline-offset:-4px;border-radius:18px}.dou-code-keys{display:flex;box-sizing:border-box;border-top:1px solid var(--dou-color-border);background-color:var(--dou-color-bg-surface);color:var(--dou-color-text);font-family:var(--dou-font-family-mono);font-size:var(--dou-font-size-md);user-select:none;-webkit-user-select:none;height:45px}.dou-code-keys__scroll{display:flex;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;touch-action:pan-x;flex:auto;align-items: center;gap:2px;min-width:0;padding:0 4px}.dou-code-keys__scroll::-webkit-scrollbar{display:none}.dou-code-keys__arrows{display:flex;box-shadow:-1px 0 0 var(--dou-color-border-subtle);flex:none;align-items: center;gap:2px;padding:0 4px}.dou-code-keys__stick{position:relative;color:var(--dou-color-text-tertiary);cursor:grab;touch-action:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;background:0 0;border:0;border-radius:50%;flex:none;width:36px;height:36px;margin:0;padding:0}.dou-code-keys__stick:focus-visible{outline:2px solid var(--dou-color-focus);outline-offset:0}.dou-code-keys__pad{position:absolute;z-index:1;display:flex;box-sizing:border-box;background-color:var(--dou-color-bg-muted);box-shadow:inset 0 0 0 1px var(--dou-color-border-subtle);pointer-events:none;transition-property:width,height,margin,background-color,box-shadow,translate;transition-duration:var(--dou-motion-duration-normal);transition-timing-function:var(--dou-motion-easing);border-radius:50%;justify-content:center;align-items: center;width:32px;height:32px;margin:-16px 0 0 -16px;top:50%;left:50%}.dou-code-keys__way{position:absolute;opacity:0;transition:opacity var(--dou-motion-duration-fast)var(--dou-motion-easing);width:16px;height:16px}.dou-code-keys__way.is-up{top:8px}.dou-code-keys__way.is-down{bottom:8px}.dou-code-keys__way.is-left{left:8px}.dou-code-keys__way.is-right{right:8px}.dou-code-keys__thumb{box-sizing:border-box;background-color:var(--dou-color-bg-surface);box-shadow:0 0 0 1px color-mix(in oklab,var(--dou-color-text)14%,transparent),var(--dou-shadow-sm);transition-property:width,height,transform;transition-duration:var(--dou-motion-duration-normal);transition-timing-function:var(--dou-motion-easing-spring);border-radius:50%;width:18px;height:18px}.dou-code-keys__stick.is-held{cursor:grabbing}.dou-code-keys__stick.is-held .dou-code-keys__pad{background-color:var(--dou-color-bg-surface);box-shadow:inset 0 0 0 1px var(--dou-color-border),var(--dou-shadow-lg);transition-duration:var(--dou-motion-duration-slow);transition-timing-function:var(--dou-motion-easing-spring);width:104px;height:104px;margin:-52px 0 0 -52px}.dou-code-keys__stick.is-held .dou-code-keys__way{opacity:1}.dou-code-keys__stick.is-held .dou-code-keys__thumb{background-color:color-mix(in oklab,var(--dou-color-text)8%,var(--dou-color-bg-surface));width:40px;height:40px;transition-property:width,height}.dou-code-keys__key{display:inline-flex;box-sizing:border-box;border-radius:var(--dou-radius-control);color:inherit;font:inherit;cursor:pointer;touch-action:pan-x;-webkit-tap-highlight-color:transparent;transition-property:background-color,transform;transition-duration:var(--dou-motion-duration-fast);transition-timing-function:var(--dou-motion-easing-exit);background:0 0;border:0;flex:none;justify-content:center;align-items: center;min-width:36px;height:36px;padding:0 8px;line-height:1}.dou-code-keys__key>svg{color:var(--dou-color-text-secondary);width:18px;height:18px}@media (hover:hover){.dou-code-keys__key:hover{background-color:color-mix(in oklab,var(--dou-color-text)5%,transparent)}}.dou-code-keys__key.is-pressed{background-color:color-mix(in oklab,var(--dou-color-text)10%,transparent);transition-duration:var(--dou-motion-duration-slow);transition-timing-function:var(--dou-motion-easing-spring);transform:scale(1.12)}}@layer dou.components{.dou-code-input{--dou-code-input-height:var(--dou-control-height-md);display:block;width:100%;min-width:0}.dou-code-input .dou-code-editor{--dou-code-editor-padding-x:var(--dou-control-padding-x-md);--dou-code-editor-padding-y:calc((var(--dou-code-input-height) - var(--dou-code-editor-line-height) - 2px)/2);min-height:var(--dou-code-input-height);border-radius:var(--dou-radius-control);transition-property:border-color,box-shadow}@media (hover:hover){.dou-code-input .dou-code-editor:not(:-webkit-any(.is-focused,.is-disabled)):hover{--dou-code-editor-border:var(--dou-color-border-strong)}.dou-code-input .dou-code-editor:not(:-moz-any(.is-focused,.is-disabled)):hover{--dou-code-editor-border:var(--dou-color-border-strong)}.dou-code-input .dou-code-editor:not(:is(.is-focused,.is-disabled)):hover{--dou-code-editor-border:var(--dou-color-border-strong)}}.dou-code-input .dou-code-editor__marks{display:none}.dou-code-input:not(.is-multiline) .dou-code-editor{height:var(--dou-code-input-height)}.dou-code-input:not(.is-multiline) .dou-code-editor .dou-code-editor__scroller{scrollbar-width:none}.dou-code-input:not(.is-multiline) .dou-code-editor .dou-code-editor__scroller::-webkit-scrollbar{display:none}.dou-code-input.is-multiline .dou-code-editor{min-height:calc(var(--dou-code-input-min-rows,1)*var(--dou-code-editor-line-height) + 2*var(--dou-code-editor-padding-y) + 2px);max-height:calc(var(--dou-code-input-max-rows,6)*var(--dou-code-editor-line-height) + 2*var(--dou-code-editor-padding-y) + 2px)}.dou-code-input.is-invalid .dou-code-editor{--dou-code-editor-border:color-mix(in oklab,var(--dou-color-danger)55%,var(--dou-color-border));--dou-code-editor-border-focus:var(--dou-color-danger)}.dou-code-input--sm{--dou-code-input-height:var(--dou-control-height-sm)}.dou-code-input--sm .dou-code-editor{--dou-code-editor-padding-x:var(--dou-control-padding-x-sm)}.dou-code-input--lg{--dou-code-input-height:var(--dou-control-height-lg)}.dou-code-input--lg .dou-code-editor{--dou-code-editor-padding-x:var(--dou-control-padding-x-lg)}}@keyframes dou-code-peer-name{to{opacity:0;visibility:hidden}}@keyframes dou-code-editor-blink{50%{opacity:0}}@layer dou.components{.dou-code-diff{--dou-code-diff-removed:color-mix(in oklab,var(--dou-color-danger)10%,transparent);--dou-code-diff-added:color-mix(in oklab,var(--dou-color-success)10%,transparent);--dou-code-diff-removed-word:color-mix(in oklab,var(--dou-color-danger-text)30%,transparent);--dou-code-diff-added-word:color-mix(in oklab,var(--dou-color-success-text)30%,transparent);--dou-code-diff-border:var(--dou-color-border);position:relative;display:flex;box-sizing:border-box;overflow:hidden;border:1px solid var(--dou-code-diff-border);border-radius:var(--dou-radius-container);background-color:var(--dou-color-bg-surface);transition:border-color var(--dou-motion-duration-fast)var(--dou-motion-easing);flex-direction:column;width:100%;min-width:0}.dou-code-diff:focus-within{border-color:color-mix(in oklab,var(--dou-color-focus)70%,var(--dou-color-text))}.dou-code-diff:not(.is-bordered){border:0;border-radius:0}.dou-code-diff__toolbar{display:flex;border-bottom:1px solid var(--dou-code-diff-border);font-size:var(--dou-font-size-sm);flex:none;align-items: center;gap:2px;min-height:36px;padding:0 6px 0 12px}@media (pointer:coarse){.dou-code-diff__toolbar{min-height:44px}}.dou-code-diff__stats{display:flex;overflow:hidden;white-space:nowrap;flex:auto;align-items: center;gap:8px;min-width:0}.dou-code-diff__count{font-family:var(--dou-font-family-mono);font-variant-numeric:tabular-nums}.dou-code-diff__count.is-added{color:var(--dou-color-success-text)}.dou-code-diff__count.is-removed{color:var(--dou-color-danger-text)}.dou-code-diff__summary{overflow:hidden;color:var(--dou-color-text-secondary);text-overflow:ellipsis}.dou-code-diff__hidden-text{position:absolute;overflow:hidden;clip-path:inset(50%);white-space:nowrap;width:1px;height:1px}@media (pointer:coarse){.dou-code-diff__toolbar .dou-button{position:relative;min-width:36px;min-height:36px}.dou-code-diff__toolbar .dou-button:after{position:absolute;content:"";inset:-2px}}.dou-code-diff__body{display:grid;grid-template-rows:minmax(0,1fr);grid-template-columns:minmax(0,1fr);flex:auto;min-height:0}.dou-code-diff--split>.dou-code-diff__body{grid-template-rows:auto minmax(0,1fr);grid-template-columns:minmax(0,1fr)minmax(0,1fr)}.dou-code-diff__label{border-bottom:1px solid var(--dou-code-diff-border);color:var(--dou-color-text-secondary);padding:4px 12px;font-size:12px}.dou-code-diff__label:nth-child(2){border-left:1px solid var(--dou-code-diff-border)}.dou-code-diff__side{display:flex;flex-direction:column;min-width:0;min-height:0}.dou-code-diff__side.is-modified{border-left:1px solid var(--dou-code-diff-border)}.dou-code-diff__side>.dou-code-editor{flex:auto}.dou-code-diff__line.is-removed{background-color:var(--dou-code-diff-removed)}.dou-code-diff__line.is-added{background-color:var(--dou-code-diff-added)}.dou-code-diff__word.is-removed{background-color:var(--dou-code-diff-removed-word)}.dou-code-diff__word.is-added{background-color:var(--dou-code-diff-added-word)}.dou-code-editor__cell.dou-code-diff__sign{font-family:var(--dou-font-family-mono)}.dou-code-editor__cell.dou-code-diff__sign.is-removed{background-color:var(--dou-code-diff-removed);color:var(--dou-color-danger-text)}.dou-code-editor__cell.dou-code-diff__sign.is-added{background-color:var(--dou-code-diff-added);color:var(--dou-color-success-text)}.dou-code-editor__cell.dou-code-diff__number{box-sizing:border-box;color:var(--dou-code-editor-gutter-text);font-family:var(--dou-font-family-mono);font-size:inherit;font-variant-numeric:tabular-nums;justify-content:flex-end;padding-right:8px}.dou-code-editor__cell.dou-code-diff__number.is-removed{background-color:var(--dou-code-diff-removed)}.dou-code-editor__cell.dou-code-diff__number.is-added{background-color:var(--dou-code-diff-added)}.dou-code-diff__widget{display:flow-root}.dou-code-diff--split>.dou-code-diff__body{position:relative}.dou-code-diff__spans{position:absolute;z-index:3;overflow:hidden;pointer-events:none;left:0;right:0}.dou-code-diff__span{position:absolute;display:flow-root;box-sizing:border-box;font-family:var(--dou-font-family);font-size:var(--dou-font-size-sm);pointer-events:auto;transition:opacity var(--dou-motion-duration-fast)var(--dou-motion-easing);line-height:20px;top:0;left:0;right:0}.dou-code-diff__span:not(.is-placed){visibility:hidden;opacity:0;transition:none}.dou-code-diff__filler{background-image:repeating-linear-gradient(-45deg,transparent 0 6px,color-mix(in oklab,var(--dou-color-text)5%,transparent)6px 7px)}.dou-code-diff__bar{display:flex;box-sizing:border-box;border:0;border-block:1px solid var(--dou-code-diff-border);background-color:color-mix(in oklab,var(--dou-color-text)3%,transparent);color:var(--dou-color-text-secondary);font:inherit;text-align:left;cursor:pointer;align-items: center;gap:6px;width:100%;height:28px;margin:0;padding:0 12px;font-size:12px}@media (hover:hover){.dou-code-diff__bar:hover{background-color:color-mix(in oklab,var(--dou-color-text)6%,transparent);color:var(--dou-color-text)}}.dou-code-diff__bar:focus-visible{outline:2px solid var(--dou-color-focus);outline-offset:-2px}@media (pointer:coarse){.dou-code-diff__bar{height:36px}}.dou-code-diff__bar-icon{flex:none;font-size:14px}.dou-code-diff__live{position:absolute;overflow:hidden;clip-path:inset(50%);white-space:nowrap;width:1px;height:1px}.dou-code-peer{position:relative;z-index:1;display:inline-block;height:var(--dou-code-editor-line-height);vertical-align:top;pointer-events:none;width:0}.dou-code-peer:before{content:"";position:absolute;background-color:var(--dou-code-peer-color);border-radius:1px;width:2px;height:100%;top:0;left:-1px}.dou-code-peer__name{position:absolute;background-color:var(--dou-code-peer-color);color:oklch(from var(--dou-code-peer-color)clamp(.2,(.66 - l)*100,.99)0 0);font-family:var(--dou-font-family);font-size:var(--dou-font-size-sm);white-space:nowrap;user-select:none;animation:dou-code-peer-name var(--dou-motion-duration-fast)var(--dou-motion-easing)3s forwards;border-radius:4px 4px 4px 0;padding:0 6px;line-height:18px;bottom:100%;left:-1px}.dou-code-peer.is-below .dou-code-peer__name{border-radius:0 4px 4px;top:100%;bottom:auto}.dou-code-peer-selection{background-color:color-mix(in oklab,var(--dou-code-peer-color)20%,transparent)}}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type CodeDiffHunk } from './core/diff';
|
|
2
2
|
import { type CodeExtension } from './extension';
|
|
3
|
-
import type { CodeDiffProps, CodeEditorExpose } from './types';
|
|
3
|
+
import type { CodeDiffGutter, CodeDiffProps, CodeDiffWidget, CodeEditorExpose } from './types';
|
|
4
4
|
declare function next(): boolean;
|
|
5
5
|
declare function previous(): boolean;
|
|
6
6
|
declare const __VLS_export: import("vue").DefineComponent<CodeDiffProps, {
|
|
@@ -27,19 +27,22 @@ declare const __VLS_export: import("vue").DefineComponent<CodeDiffProps, {
|
|
|
27
27
|
toolbar: boolean;
|
|
28
28
|
language: import("./index.js").CodeLanguage<any> | null;
|
|
29
29
|
tabSize: number;
|
|
30
|
+
original: string;
|
|
30
31
|
messages: Partial<import("./locale").CodeMessages>;
|
|
32
|
+
mode: "split" | "inline" | "auto";
|
|
31
33
|
modelValue: string;
|
|
34
|
+
bordered: boolean;
|
|
32
35
|
wrap: boolean;
|
|
33
36
|
extensions: CodeExtension[];
|
|
34
37
|
editable: boolean;
|
|
35
|
-
|
|
36
|
-
original: string;
|
|
38
|
+
widgets: CodeDiffWidget[];
|
|
37
39
|
collapseUnchanged: boolean | {
|
|
38
40
|
context?: number;
|
|
39
41
|
minLines?: number;
|
|
40
42
|
};
|
|
41
43
|
ignoreWhitespace: boolean;
|
|
42
44
|
words: boolean;
|
|
45
|
+
gutters: CodeDiffGutter[];
|
|
43
46
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
44
47
|
declare const _default: typeof __VLS_export;
|
|
45
48
|
export default _default;
|
|
@@ -98,8 +98,30 @@ export interface CodeGutterMarker {
|
|
|
98
98
|
/** Short text, when there is no icon. */
|
|
99
99
|
text?: string;
|
|
100
100
|
class?: string;
|
|
101
|
-
/**
|
|
101
|
+
/**
|
|
102
|
+
* Shown on hover. Required when the column has `onPress`: the marker is
|
|
103
|
+
* then a button, and this is its name.
|
|
104
|
+
*/
|
|
102
105
|
title?: string;
|
|
106
|
+
/**
|
|
107
|
+
* When the marker shows: `always`, or `hover`, out of sight until its
|
|
108
|
+
* line is hovered, holds the cursor, or the marker has the focus, e.g. a
|
|
109
|
+
* "comment" mark offered on every line. Defaults to `always`.
|
|
110
|
+
*/
|
|
111
|
+
visible?: 'always' | 'hover';
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* The marker a column shows on every line without one of its own, out of
|
|
115
|
+
* sight until the line is hovered (as `visible: 'hover'`), e.g. "add a
|
|
116
|
+
* breakpoint" offered on every line.
|
|
117
|
+
*/
|
|
118
|
+
export interface CodeGutterHoverMarker extends Pick<CodeGutterMarker, 'icon' | 'text' | 'class'> {
|
|
119
|
+
/**
|
|
120
|
+
* Its name, as a marker's `title`; a function names the marker of each
|
|
121
|
+
* line, e.g. "Add a breakpoint on line 3". It is called for every line in
|
|
122
|
+
* view, often: keep it quick.
|
|
123
|
+
*/
|
|
124
|
+
title?: string | ((line: number) => string);
|
|
103
125
|
}
|
|
104
126
|
/** A column of the gutter, left of the line numbers. */
|
|
105
127
|
export interface CodeGutter {
|
|
@@ -107,9 +129,22 @@ export interface CodeGutter {
|
|
|
107
129
|
/** In px. Defaults to 16. */
|
|
108
130
|
width?: number;
|
|
109
131
|
/** The markers on the lines in view; reactive state read here updates them. */
|
|
110
|
-
markers
|
|
111
|
-
/** A
|
|
112
|
-
|
|
132
|
+
markers?: (context: CodeExtensionContext) => CodeGutterMarker[];
|
|
133
|
+
/** A marker on every other line, shown on hover. */
|
|
134
|
+
hoverMarker?: CodeGutterHoverMarker;
|
|
135
|
+
/**
|
|
136
|
+
* Where `onPress` answers: `any` cell of the column (the default), e.g. to
|
|
137
|
+
* set a breakpoint on an empty line, or only its `markers`.
|
|
138
|
+
*/
|
|
139
|
+
pressOn?: 'any' | 'markers';
|
|
140
|
+
/**
|
|
141
|
+
* A press on the column, on line `line`, e.g. to set a breakpoint. A
|
|
142
|
+
* marker in such a column is a button: the one on the cursor's line is
|
|
143
|
+
* reached with Escape then Shift+Tab, and Enter or Space presses it. A
|
|
144
|
+
* finger or pen presses when it lifts in place; a tap on a marker still
|
|
145
|
+
* out of sight first moves the cursor to its line, which shows it.
|
|
146
|
+
*/
|
|
147
|
+
onPress?: (line: number, event: PointerEvent | KeyboardEvent, context: CodeExtensionContext) => void;
|
|
113
148
|
}
|
|
114
149
|
/** An undo history that takes the place of the editor's own, e.g. one shared with others. */
|
|
115
150
|
export interface CodeHistoryHandler {
|
|
@@ -317,5 +352,10 @@ export interface CodeExtensionContext extends CodeEditorExpose {
|
|
|
317
352
|
/** Types an extension; returns it as it is. */
|
|
318
353
|
export declare function defineCodeExtension(extension: CodeExtension): CodeExtension;
|
|
319
354
|
export declare const CODE_EDITOR_KEY: InjectionKey<CodeExtensionContext>;
|
|
355
|
+
/**
|
|
356
|
+
* Internal: told each widget height an editor measures, by `extension/id`;
|
|
357
|
+
* DouCodeDiff leaves a blank of the same height across from it.
|
|
358
|
+
*/
|
|
359
|
+
export declare const WIDGET_HEIGHT_KEY: InjectionKey<((key: string, height: number) => void) | null>;
|
|
320
360
|
/** The editor a panel or gutter component is drawn in. */
|
|
321
361
|
export declare function useCodeEditor(): CodeExtensionContext;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export declare const DouCodeEditor: import("dou-ui").WithInstall<import("vue").D
|
|
|
25
25
|
modelValue: string;
|
|
26
26
|
lineNumbers: boolean;
|
|
27
27
|
gutter: boolean;
|
|
28
|
+
bordered: boolean;
|
|
28
29
|
activeLine: boolean;
|
|
29
30
|
closeBrackets: boolean;
|
|
30
31
|
matchBrackets: boolean;
|
|
@@ -86,27 +87,30 @@ export declare const DouCodeDiff: import("dou-ui").WithInstall<import("vue").Def
|
|
|
86
87
|
toolbar: boolean;
|
|
87
88
|
language: import("./index.js").CodeLanguage<any> | null;
|
|
88
89
|
tabSize: number;
|
|
90
|
+
original: string;
|
|
89
91
|
messages: Partial<import("./locale").CodeMessages>;
|
|
92
|
+
mode: "split" | "inline" | "auto";
|
|
90
93
|
modelValue: string;
|
|
94
|
+
bordered: boolean;
|
|
91
95
|
wrap: boolean;
|
|
92
96
|
extensions: import("./extension").CodeExtension[];
|
|
93
97
|
editable: boolean;
|
|
94
|
-
|
|
95
|
-
original: string;
|
|
98
|
+
widgets: import("./types").CodeDiffWidget[];
|
|
96
99
|
collapseUnchanged: boolean | {
|
|
97
100
|
context?: number;
|
|
98
101
|
minLines?: number;
|
|
99
102
|
};
|
|
100
103
|
ignoreWhitespace: boolean;
|
|
101
104
|
words: boolean;
|
|
105
|
+
gutters: import("./types").CodeDiffGutter[];
|
|
102
106
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, import("vue").HTMLAttributes>;
|
|
103
107
|
export { diffText } from './core/diff';
|
|
104
108
|
export type { CodeDiffHunk, CodeDiffOptions, CodeDiffPart } from './core/diff';
|
|
105
109
|
export { defaultCodeKeys } from './code-keys';
|
|
106
110
|
export { defineCodeExtension, useCodeEditor } from './extension';
|
|
107
|
-
export type { CodeDecoration, CodeDiagnostic, CodeDiagnosticAction, CodeDiagnosticSeverity, CodeExtension, CodeExtensionContext, CodeGutter, CodeGutterMarker, CodeHistoryHandler, CodeCompletion, CodeCompletionKind, CodeCompletionRequest, CodePositionRequest, CodeCompletionResult, CodeHoverResult, CodeMenuItem, CodePanel, CodeSignatureResult, CodeWidget, } from './extension';
|
|
111
|
+
export type { CodeDecoration, CodeDiagnostic, CodeDiagnosticAction, CodeDiagnosticSeverity, CodeExtension, CodeExtensionContext, CodeGutter, CodeGutterHoverMarker, CodeGutterMarker, CodeHistoryHandler, CodeCompletion, CodeCompletionKind, CodeCompletionRequest, CodePositionRequest, CodeCompletionResult, CodeHoverResult, CodeMenuItem, CodePanel, CodeSignatureResult, CodeWidget, } from './extension';
|
|
108
112
|
export default DouCodeEditor;
|
|
109
|
-
export type { CodeDiffEmits, CodeDiffProps, CodeEditorEmits, CodeEditorExpose, CodeEditorProps, CodeInputEmits, CodeInputProps, CodeKey, CodeKeysProps, } from './types';
|
|
113
|
+
export type { CodeDiffEmits, CodeDiffGutter, CodeDiffGutterMarker, CodeDiffHoverMarker, CodeDiffProps, CodeDiffSide, CodeDiffWidget, CodeEditorEmits, CodeEditorExpose, CodeEditorProps, CodeInputEmits, CodeInputProps, CodeKey, CodeKeysProps, } from './types';
|
|
110
114
|
export { CodeText, splitLines } from './core/text';
|
|
111
115
|
export type { CodeLine } from './core/text';
|
|
112
116
|
export { ChangeSet } from './core/changes';
|
package/dist/types/locale.d.ts
CHANGED
|
@@ -15,14 +15,14 @@ export interface CodeMessages {
|
|
|
15
15
|
selectAll: string;
|
|
16
16
|
/** Toolbar button of a language server (`@dou-ui/code/lsp`): go to where the name is defined. */
|
|
17
17
|
goToDefinition: string;
|
|
18
|
-
/** The bar of symbol keys
|
|
18
|
+
/** The bar of symbol keys on a touch screen. */
|
|
19
19
|
keys: string;
|
|
20
|
+
/** The grip that moves the bar of symbol keys. */
|
|
21
|
+
moveKeys: string;
|
|
20
22
|
/** The Tab key on that bar. */
|
|
21
23
|
indent: string;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
cursorUp: string;
|
|
25
|
-
cursorDown: string;
|
|
24
|
+
/** The stick at the end of the bar of keys, which moves the cursor. */
|
|
25
|
+
moveCursor: string;
|
|
26
26
|
undo: string;
|
|
27
27
|
redo: string;
|
|
28
28
|
error: string;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Component } from 'vue';
|
|
2
|
-
import type { CodeDiagnostic, CodeExtension } from './extension';
|
|
1
|
+
import type { Component, VNodeChild } from 'vue';
|
|
2
|
+
import type { CodeDiagnostic, CodeExtension, CodeGutterHoverMarker, CodeGutterMarker } from './extension';
|
|
3
3
|
import type { CodeCommand } from './core/commands';
|
|
4
4
|
import type { CodeKeymap } from './core/keymap';
|
|
5
5
|
import type { CodeSearchQuery } from './core/search';
|
|
@@ -32,6 +32,12 @@ export interface CodeEditorProps {
|
|
|
32
32
|
* On by default.
|
|
33
33
|
*/
|
|
34
34
|
gutter?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* The hairline frame and rounded corners. Off, the editor takes no
|
|
37
|
+
* border at all, for a panel or card that already has an edge. On by
|
|
38
|
+
* default.
|
|
39
|
+
*/
|
|
40
|
+
bordered?: boolean;
|
|
35
41
|
/** Tints the line with the cursor. */
|
|
36
42
|
activeLine?: boolean;
|
|
37
43
|
/** Columns per tab stop, also the width of one indent. */
|
|
@@ -69,7 +75,7 @@ export interface CodeEditorProps {
|
|
|
69
75
|
/** Replaces any of the editor's texts, which otherwise follow DouUI's locale. */
|
|
70
76
|
messages?: Partial<CodeMessages>;
|
|
71
77
|
/**
|
|
72
|
-
* The bar of symbol keys
|
|
78
|
+
* The bar of symbol keys below the editor, moved by its grip, shown on touch screens
|
|
73
79
|
* while the editor can be typed in. An array sets the keys that scroll;
|
|
74
80
|
* a string is a key that types itself. `false` leaves the bar out. On by default.
|
|
75
81
|
*/
|
|
@@ -210,7 +216,7 @@ export interface CodeInputProps {
|
|
|
210
216
|
* the page by default. `false` keeps them inside the box.
|
|
211
217
|
*/
|
|
212
218
|
teleport?: string | HTMLElement | false;
|
|
213
|
-
/** The bar of symbol keys
|
|
219
|
+
/** The bar of symbol keys below the box, moved by its grip; off by default. */
|
|
214
220
|
keys?: boolean | ReadonlyArray<CodeKey | string>;
|
|
215
221
|
messages?: Partial<CodeMessages>;
|
|
216
222
|
autofocus?: boolean;
|
|
@@ -254,13 +260,93 @@ export interface CodeDiffProps {
|
|
|
254
260
|
words?: boolean;
|
|
255
261
|
/** Wraps long lines in the inline view; side by side, lines never wrap, to stay aligned. */
|
|
256
262
|
wrap?: boolean;
|
|
257
|
-
/**
|
|
263
|
+
/**
|
|
264
|
+
* Extensions of the modified side, side by side only: for things that
|
|
265
|
+
* read the text, such as a language service or a linter. Markers and
|
|
266
|
+
* widgets for both sides go in `gutters` and `widgets`.
|
|
267
|
+
*/
|
|
258
268
|
extensions?: CodeExtension[];
|
|
269
|
+
/**
|
|
270
|
+
* Columns left of the line numbers, with markers on either text's lines;
|
|
271
|
+
* drawn on both sides side by side, and on the matching rows inline.
|
|
272
|
+
*/
|
|
273
|
+
gutters?: CodeDiffGutter[];
|
|
274
|
+
/**
|
|
275
|
+
* Components between lines of either text, e.g. review comments. The
|
|
276
|
+
* other side leaves a blank of the same height, so the two stay lined up.
|
|
277
|
+
*/
|
|
278
|
+
widgets?: CodeDiffWidget[];
|
|
259
279
|
tabSize?: number;
|
|
260
280
|
/** The toolbar above: change count, previous and next, expand, and the view toggle. On by default. */
|
|
261
281
|
toolbar?: boolean;
|
|
282
|
+
/**
|
|
283
|
+
* The hairline frame and rounded corners around the whole diff. Off,
|
|
284
|
+
* the diff takes no border at all and no focus edge, for a panel or
|
|
285
|
+
* card that already has one; the lines between the toolbar and the
|
|
286
|
+
* sides stay. On by default.
|
|
287
|
+
*/
|
|
288
|
+
bordered?: boolean;
|
|
262
289
|
messages?: Partial<CodeMessages>;
|
|
263
290
|
}
|
|
291
|
+
/** Which of the two texts a line is counted in. */
|
|
292
|
+
export type CodeDiffSide = 'original' | 'modified';
|
|
293
|
+
/** A marker in a column of `DouCodeDiff`, on line `line` (from 1) of side `side`. */
|
|
294
|
+
export interface CodeDiffGutterMarker extends CodeGutterMarker {
|
|
295
|
+
side: CodeDiffSide;
|
|
296
|
+
}
|
|
297
|
+
/** `DouCodeDiff`'s `hoverMarker`: on the lines of one side only, with `side`. */
|
|
298
|
+
export interface CodeDiffHoverMarker extends Omit<CodeGutterHoverMarker, 'title'> {
|
|
299
|
+
/**
|
|
300
|
+
* Its name; a function names the marker of each line, with the line and
|
|
301
|
+
* side `onPress` gets there, e.g. "Comment on line 3 of the new text".
|
|
302
|
+
* It is called for every line in view, often: keep it quick.
|
|
303
|
+
*/
|
|
304
|
+
title?: string | ((line: number, side: CodeDiffSide) => string);
|
|
305
|
+
/** Only on the lines of this side; on both when left out. */
|
|
306
|
+
side?: CodeDiffSide;
|
|
307
|
+
}
|
|
308
|
+
/** A column of `DouCodeDiff`'s gutter, left of the line numbers. */
|
|
309
|
+
export interface CodeDiffGutter {
|
|
310
|
+
name: string;
|
|
311
|
+
/** In px. Defaults to 16. */
|
|
312
|
+
width?: number;
|
|
313
|
+
markers?: CodeDiffGutterMarker[];
|
|
314
|
+
/**
|
|
315
|
+
* A marker on every other line, shown on hover. With `side`, the other
|
|
316
|
+
* side's column only answers presses on its own markers.
|
|
317
|
+
*/
|
|
318
|
+
hoverMarker?: CodeDiffHoverMarker;
|
|
319
|
+
/**
|
|
320
|
+
* Where `onPress` answers: `any` cell of the column (the default), or only
|
|
321
|
+
* its markers. With a `hoverMarker` on one side, only markers anyway.
|
|
322
|
+
*/
|
|
323
|
+
pressOn?: 'any' | 'markers';
|
|
324
|
+
/**
|
|
325
|
+
* A press on the column, on line `line` of `side`. Inline, a row both
|
|
326
|
+
* texts share counts as the marker's side there, else as `modified`.
|
|
327
|
+
*/
|
|
328
|
+
onPress?: (line: number, event: PointerEvent | KeyboardEvent, side: CodeDiffSide) => void;
|
|
329
|
+
}
|
|
330
|
+
/** A component drawn between lines of `DouCodeDiff`. */
|
|
331
|
+
export interface CodeDiffWidget {
|
|
332
|
+
/** Tells widgets apart across both sides; its measured height is kept by it. */
|
|
333
|
+
id: string;
|
|
334
|
+
side: CodeDiffSide;
|
|
335
|
+
/** Below line `line` (from 1) of `side`; above with `position: 'above'`. */
|
|
336
|
+
line: number;
|
|
337
|
+
/** Defaults to `below`. */
|
|
338
|
+
position?: 'above' | 'below';
|
|
339
|
+
render: () => VNodeChild;
|
|
340
|
+
/** Its height in px before it has been drawn and measured; defaults to one line. */
|
|
341
|
+
height?: number;
|
|
342
|
+
/** What it is, read out when the cursor moves onto its line. */
|
|
343
|
+
label?: string;
|
|
344
|
+
/**
|
|
345
|
+
* Side by side: `side` (the default) draws it in its own column, `both`
|
|
346
|
+
* across the two. Inline, it always takes the one column.
|
|
347
|
+
*/
|
|
348
|
+
span?: 'side' | 'both';
|
|
349
|
+
}
|
|
264
350
|
export interface CodeDiffEmits {
|
|
265
351
|
'update:modelValue': [value: string];
|
|
266
352
|
'update:mode': [mode: 'split' | 'inline'];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The part of the window in view, above a phone's keyboard and inside a
|
|
3
|
+
* pinch zoom, in the coordinates `getBoundingClientRect` gives.
|
|
4
|
+
*
|
|
5
|
+
* Browsers disagree on what those coordinates are relative to: the layout
|
|
6
|
+
* viewport (so the visual viewport sits `offsetTop` into them), or the
|
|
7
|
+
* visual viewport itself (iOS Safari, where adding `offsetTop` counts the
|
|
8
|
+
* scroll twice). The page's own box tells which: the visual viewport's place
|
|
9
|
+
* in the page, plus where the page starts in those coordinates.
|
|
10
|
+
*/
|
|
11
|
+
export declare function visibleViewport(): {
|
|
12
|
+
left: number;
|
|
13
|
+
top: number;
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// src/view/viewport.ts
|
|
2
|
+
/**
|
|
3
|
+
* The part of the window in view, above a phone's keyboard and inside a
|
|
4
|
+
* pinch zoom, in the coordinates `getBoundingClientRect` gives.
|
|
5
|
+
*
|
|
6
|
+
* Browsers disagree on what those coordinates are relative to: the layout
|
|
7
|
+
* viewport (so the visual viewport sits `offsetTop` into them), or the
|
|
8
|
+
* visual viewport itself (iOS Safari, where adding `offsetTop` counts the
|
|
9
|
+
* scroll twice). The page's own box tells which: the visual viewport's place
|
|
10
|
+
* in the page, plus where the page starts in those coordinates.
|
|
11
|
+
*/
|
|
12
|
+
function visibleViewport() {
|
|
13
|
+
const root = document.documentElement;
|
|
14
|
+
const vv = window.visualViewport;
|
|
15
|
+
if (!vv) return {
|
|
16
|
+
left: 0,
|
|
17
|
+
top: 0,
|
|
18
|
+
width: root.clientWidth,
|
|
19
|
+
height: root.clientHeight
|
|
20
|
+
};
|
|
21
|
+
const page = root.getBoundingClientRect();
|
|
22
|
+
return {
|
|
23
|
+
left: vv.pageLeft + page.left,
|
|
24
|
+
top: vv.pageTop + page.top,
|
|
25
|
+
width: vv.width,
|
|
26
|
+
height: vv.height
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export { visibleViewport };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=viewport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewport.js","names":[],"sources":["../../src/view/viewport.ts"],"sourcesContent":["/**\n * The part of the window in view, above a phone's keyboard and inside a\n * pinch zoom, in the coordinates `getBoundingClientRect` gives.\n *\n * Browsers disagree on what those coordinates are relative to: the layout\n * viewport (so the visual viewport sits `offsetTop` into them), or the\n * visual viewport itself (iOS Safari, where adding `offsetTop` counts the\n * scroll twice). The page's own box tells which: the visual viewport's place\n * in the page, plus where the page starts in those coordinates.\n */\nexport function visibleViewport(): { left: number; top: number; width: number; height: number } {\n const root = document.documentElement\n const vv = window.visualViewport\n if (!vv) return { left: 0, top: 0, width: root.clientWidth, height: root.clientHeight }\n const page = root.getBoundingClientRect()\n return {\n left: vv.pageLeft + page.left,\n top: vv.pageTop + page.top,\n width: vv.width,\n height: vv.height,\n }\n}\n"],"mappings":";;;;;;;;;;;AAUA,SAAgB,kBAAgF;CAC9F,MAAM,OAAO,SAAS;CACtB,MAAM,KAAK,OAAO;CAClB,IAAI,CAAC,IAAI,OAAO;EAAE,MAAM;EAAG,KAAK;EAAG,OAAO,KAAK;EAAa,QAAQ,KAAK;CAAa;CACtF,MAAM,OAAO,KAAK,sBAAsB;CACxC,OAAO;EACL,MAAM,GAAG,WAAW,KAAK;EACzB,KAAK,GAAG,UAAU,KAAK;EACvB,OAAO,GAAG;EACV,QAAQ,GAAG;CACb;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dou-ui/code",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.10",
|
|
4
4
|
"description": "DouUI 的代码编辑器:大文件流畅编辑、输入法友好、多光标与协同",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vue",
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
"build": "vite build && vue-tsc -p tsconfig.build.json && bun scripts/build-style.ts"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@dou-ui/icons": "0.1.0-alpha.
|
|
66
|
+
"@dou-ui/icons": "0.1.0-alpha.10"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"dou-ui": "0.1.0-alpha.
|
|
69
|
+
"dou-ui": "0.1.0-alpha.10",
|
|
70
70
|
"vue": "^3.5.0",
|
|
71
71
|
"yjs": "^13.6.0",
|
|
72
72
|
"shiki": "^1.0.0 || ^2.0.0 || ^3.0.0"
|