@formicoidea/labre-core 0.56.0 → 0.58.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/architecture/code.c4 +13 -13
- package/architecture/domain.c4 +2504 -0
- package/architecture/likec4.config.json +3 -3
- package/dist/_pkgs/affine-block-surface/extensions/reading-toolbar.js +12 -12
- package/dist/_pkgs/affine-components/highlight-dropdown-menu/highlight-duotone-icon.js +8 -8
- package/dist/_pkgs/affine-components/highlight-dropdown-menu/text-duotone-icon.js +11 -11
- package/dist/_pkgs/affine-fragment-doc-title/title-band/title-band.d.ts +3 -1
- package/dist/_pkgs/affine-fragment-doc-title/title-band/title-band.js +15 -2
- package/dist/_pkgs/affine-fragment-frame-panel/body/frame-panel-body.js +4 -4
- package/dist/_pkgs/affine-fragment-frame-panel/card/frame-card-title.d.ts +19 -6
- package/dist/_pkgs/affine-fragment-frame-panel/card/frame-card-title.js +136 -52
- package/dist/_pkgs/affine-fragment-frame-panel/card/frame-card.js +22 -4
- package/dist/_pkgs/affine-fragment-frame-panel/card/frame-preview.d.ts +12 -0
- package/dist/_pkgs/affine-fragment-frame-panel/card/frame-preview.js +81 -5
- package/dist/_pkgs/affine-fragment-frame-panel/card/preview-size.d.ts +9 -0
- package/dist/_pkgs/affine-fragment-frame-panel/card/preview-size.js +20 -0
- package/dist/_pkgs/affine-fragment-frame-panel/effects.js +0 -2
- package/dist/_pkgs/affine-fragment-frame-panel/frame-panel.js +2 -0
- package/dist/_pkgs/affine-widget-edgeless-zoom-toolbar/index.js +26 -26
- package/dist/_pkgs/affine-widget-keyboard-toolbar/icons.js +98 -98
- package/dist/_pkgs/affine-widget-page-dragging-area/index.js +10 -10
- package/dist/_pkgs/affine-widget-viewport-overlay/index.js +13 -13
- package/dist/_pkgs/data-view/core/utils/menu-title.js +17 -17
- package/dist/host-panels.d.ts +9 -4
- package/dist/host-panels.js +19 -4
- package/package.json +1 -1
- package/dist/_pkgs/affine-fragment-frame-panel/card/frame-card-title-editor.d.ts +0 -25
- package/dist/_pkgs/affine-fragment-frame-panel/card/frame-card-title-editor.js +0 -181
|
@@ -45,9 +45,15 @@ import { property, query, state } from 'lit/decorators.js';
|
|
|
45
45
|
import { guard } from 'lit/directives/guard.js';
|
|
46
46
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
47
47
|
import debounce from 'lodash-es/debounce.js';
|
|
48
|
+
import { fluidPreviewSize } from './preview-size.js';
|
|
48
49
|
const DEFAULT_PREVIEW_CONTAINER_WIDTH = 280;
|
|
49
50
|
const DEFAULT_PREVIEW_CONTAINER_HEIGHT = 166;
|
|
50
51
|
const styles = css `
|
|
52
|
+
frame-preview[data-fluid] {
|
|
53
|
+
display: block;
|
|
54
|
+
width: 100%;
|
|
55
|
+
}
|
|
56
|
+
|
|
51
57
|
.frame-preview-container {
|
|
52
58
|
display: block;
|
|
53
59
|
width: 100%;
|
|
@@ -89,9 +95,15 @@ let FramePreview = (() => {
|
|
|
89
95
|
let _std_decorators;
|
|
90
96
|
let _std_initializers = [];
|
|
91
97
|
let _std_extraInitializers = [];
|
|
98
|
+
let __containerWidth_decorators;
|
|
99
|
+
let __containerWidth_initializers = [];
|
|
100
|
+
let __containerWidth_extraInitializers = [];
|
|
92
101
|
let _fillScreen_decorators;
|
|
93
102
|
let _fillScreen_initializers = [];
|
|
94
103
|
let _fillScreen_extraInitializers = [];
|
|
104
|
+
let _fluid_decorators;
|
|
105
|
+
let _fluid_initializers = [];
|
|
106
|
+
let _fluid_extraInitializers = [];
|
|
95
107
|
let _frame_decorators;
|
|
96
108
|
let _frame_initializers = [];
|
|
97
109
|
let _frame_extraInitializers = [];
|
|
@@ -111,14 +123,18 @@ let FramePreview = (() => {
|
|
|
111
123
|
static {
|
|
112
124
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
113
125
|
_std_decorators = [property({ attribute: false })];
|
|
126
|
+
__containerWidth_decorators = [state()];
|
|
114
127
|
_fillScreen_decorators = [state()];
|
|
128
|
+
_fluid_decorators = [property({ attribute: false })];
|
|
115
129
|
_frame_decorators = [property({ attribute: false })];
|
|
116
130
|
_frameViewportWH_decorators = [state()];
|
|
117
131
|
_previewEditor_decorators = [query('editor-host')];
|
|
118
132
|
_surfaceHeight_decorators = [property({ attribute: false })];
|
|
119
133
|
_surfaceWidth_decorators = [property({ attribute: false })];
|
|
120
134
|
__esDecorate(this, null, _std_decorators, { kind: "accessor", name: "std", static: false, private: false, access: { has: obj => "std" in obj, get: obj => obj.std, set: (obj, value) => { obj.std = value; } }, metadata: _metadata }, _std_initializers, _std_extraInitializers);
|
|
135
|
+
__esDecorate(this, null, __containerWidth_decorators, { kind: "accessor", name: "_containerWidth", static: false, private: false, access: { has: obj => "_containerWidth" in obj, get: obj => obj._containerWidth, set: (obj, value) => { obj._containerWidth = value; } }, metadata: _metadata }, __containerWidth_initializers, __containerWidth_extraInitializers);
|
|
121
136
|
__esDecorate(this, null, _fillScreen_decorators, { kind: "accessor", name: "fillScreen", static: false, private: false, access: { has: obj => "fillScreen" in obj, get: obj => obj.fillScreen, set: (obj, value) => { obj.fillScreen = value; } }, metadata: _metadata }, _fillScreen_initializers, _fillScreen_extraInitializers);
|
|
137
|
+
__esDecorate(this, null, _fluid_decorators, { kind: "accessor", name: "fluid", static: false, private: false, access: { has: obj => "fluid" in obj, get: obj => obj.fluid, set: (obj, value) => { obj.fluid = value; } }, metadata: _metadata }, _fluid_initializers, _fluid_extraInitializers);
|
|
122
138
|
__esDecorate(this, null, _frame_decorators, { kind: "accessor", name: "frame", static: false, private: false, access: { has: obj => "frame" in obj, get: obj => obj.frame, set: (obj, value) => { obj.frame = value; } }, metadata: _metadata }, _frame_initializers, _frame_extraInitializers);
|
|
123
139
|
__esDecorate(this, null, _frameViewportWH_decorators, { kind: "accessor", name: "frameViewportWH", static: false, private: false, access: { has: obj => "frameViewportWH" in obj, get: obj => obj.frameViewportWH, set: (obj, value) => { obj.frameViewportWH = value; } }, metadata: _metadata }, _frameViewportWH_initializers, _frameViewportWH_extraInitializers);
|
|
124
140
|
__esDecorate(this, null, _previewEditor_decorators, { kind: "accessor", name: "previewEditor", static: false, private: false, access: { has: obj => "previewEditor" in obj, get: obj => obj.previewEditor, set: (obj, value) => { obj.previewEditor = value; } }, metadata: _metadata }, _previewEditor_initializers, _previewEditor_extraInitializers);
|
|
@@ -157,9 +173,13 @@ let FramePreview = (() => {
|
|
|
157
173
|
payload.view.model.flavour !== 'affine:page') {
|
|
158
174
|
return;
|
|
159
175
|
}
|
|
176
|
+
// Every size, not only the first: a fluid preview follows its
|
|
177
|
+
// panel's width, and the mini editor's viewport settles on the new
|
|
178
|
+
// size (debounced) after the box has changed — fitting then is what
|
|
179
|
+
// keeps the frame filling it. The subject completes with the
|
|
180
|
+
// viewport, which ends the subscription.
|
|
160
181
|
const viewport = std.get(GfxControllerIdentifier).viewport;
|
|
161
|
-
|
|
162
|
-
subscription.unsubscribe();
|
|
182
|
+
viewport.sizeUpdated.subscribe(() => {
|
|
163
183
|
refreshViewport();
|
|
164
184
|
});
|
|
165
185
|
});
|
|
@@ -219,14 +239,50 @@ let FramePreview = (() => {
|
|
|
219
239
|
this._initPreviewDoc();
|
|
220
240
|
this._updateFrameViewportWH();
|
|
221
241
|
this._setFrameDisposables(this.frame);
|
|
242
|
+
this._observeWidth();
|
|
222
243
|
}
|
|
223
244
|
disconnectedCallback() {
|
|
224
245
|
super.disconnectedCallback();
|
|
225
246
|
this._clearFrameDisposables();
|
|
247
|
+
this._resizeObserver?.disconnect();
|
|
248
|
+
this._resizeObserver = null;
|
|
249
|
+
}
|
|
250
|
+
/** A fluid preview follows its own width: the panel's, as it is resized. */
|
|
251
|
+
_observeWidth() {
|
|
252
|
+
this._resizeObserver?.disconnect();
|
|
253
|
+
this._resizeObserver = null;
|
|
254
|
+
if (!this.fluid || typeof ResizeObserver === 'undefined')
|
|
255
|
+
return;
|
|
256
|
+
this._resizeObserver = new ResizeObserver(([entry]) => {
|
|
257
|
+
if (!entry)
|
|
258
|
+
return;
|
|
259
|
+
const width = Math.floor(entry.contentRect.width);
|
|
260
|
+
if (width !== this._containerWidth)
|
|
261
|
+
this._containerWidth = width;
|
|
262
|
+
});
|
|
263
|
+
this._resizeObserver.observe(this);
|
|
264
|
+
}
|
|
265
|
+
willUpdate(changed) {
|
|
266
|
+
if (changed.has('fluid')) {
|
|
267
|
+
this.toggleAttribute('data-fluid', this.fluid);
|
|
268
|
+
if (this.isConnected)
|
|
269
|
+
this._observeWidth();
|
|
270
|
+
}
|
|
271
|
+
// The box was only read at connect and on a frame's own update, so a host
|
|
272
|
+
// that resized it after mounting kept the old scale.
|
|
273
|
+
if (changed.has('fluid') ||
|
|
274
|
+
changed.has('_containerWidth') ||
|
|
275
|
+
changed.has('surfaceWidth') ||
|
|
276
|
+
changed.has('surfaceHeight') ||
|
|
277
|
+
changed.has('fillScreen')) {
|
|
278
|
+
this._updateFrameViewportWH();
|
|
279
|
+
}
|
|
226
280
|
}
|
|
227
281
|
render() {
|
|
228
282
|
const { frame } = this;
|
|
229
|
-
|
|
283
|
+
// A fluid preview builds its mini editor once it knows its width, never
|
|
284
|
+
// at the default box first.
|
|
285
|
+
const noContent = !frame || !frame.xywh || (this.fluid && this._containerWidth === 0);
|
|
230
286
|
return html `<div class="frame-preview-container">
|
|
231
287
|
${noContent ? nothing : this._renderSurfaceContent()}
|
|
232
288
|
</div>`;
|
|
@@ -242,9 +298,21 @@ let FramePreview = (() => {
|
|
|
242
298
|
#std_accessor_storage;
|
|
243
299
|
get std() { return this.#std_accessor_storage; }
|
|
244
300
|
set std(value) { this.#std_accessor_storage = value; }
|
|
301
|
+
#_containerWidth_accessor_storage;
|
|
302
|
+
/** The width a fluid preview measured on itself; `0` until laid out. */
|
|
303
|
+
get _containerWidth() { return this.#_containerWidth_accessor_storage; }
|
|
304
|
+
set _containerWidth(value) { this.#_containerWidth_accessor_storage = value; }
|
|
245
305
|
#fillScreen_accessor_storage;
|
|
246
306
|
get fillScreen() { return this.#fillScreen_accessor_storage; }
|
|
247
307
|
set fillScreen(value) { this.#fillScreen_accessor_storage = value; }
|
|
308
|
+
#fluid_accessor_storage;
|
|
309
|
+
/**
|
|
310
|
+
* Take the container's width and the frame's proportions (recette 1,
|
|
311
|
+
* P0-1.2): the box grows and shrinks with the panel, never taller than
|
|
312
|
+
* wide, and `surfaceWidth` / `surfaceHeight` are computed, not read.
|
|
313
|
+
*/
|
|
314
|
+
get fluid() { return this.#fluid_accessor_storage; }
|
|
315
|
+
set fluid(value) { this.#fluid_accessor_storage = value; }
|
|
248
316
|
#frame_accessor_storage;
|
|
249
317
|
get frame() { return this.#frame_accessor_storage; }
|
|
250
318
|
set frame(value) { this.#frame_accessor_storage = value; }
|
|
@@ -278,8 +346,14 @@ let FramePreview = (() => {
|
|
|
278
346
|
this._frameDisposables = null;
|
|
279
347
|
this._previewDoc = null;
|
|
280
348
|
this._runtimePreviewExt = [];
|
|
349
|
+
this._resizeObserver = null;
|
|
281
350
|
this._updateFrameViewportWH = () => {
|
|
282
351
|
const [, , w, h] = deserializeXYWH(this.frame.xywh);
|
|
352
|
+
if (this.fluid) {
|
|
353
|
+
const box = fluidPreviewSize(this._containerWidth, w, h);
|
|
354
|
+
this.surfaceWidth = box.width;
|
|
355
|
+
this.surfaceHeight = box.height;
|
|
356
|
+
}
|
|
283
357
|
let scale = 1;
|
|
284
358
|
if (this.fillScreen) {
|
|
285
359
|
scale = Math.max(this.surfaceWidth / w, this.surfaceHeight / h);
|
|
@@ -293,8 +367,10 @@ let FramePreview = (() => {
|
|
|
293
367
|
};
|
|
294
368
|
};
|
|
295
369
|
this.#std_accessor_storage = __runInitializers(this, _std_initializers, void 0);
|
|
296
|
-
this.#
|
|
297
|
-
this.#
|
|
370
|
+
this.#_containerWidth_accessor_storage = (__runInitializers(this, _std_extraInitializers), __runInitializers(this, __containerWidth_initializers, 0));
|
|
371
|
+
this.#fillScreen_accessor_storage = (__runInitializers(this, __containerWidth_extraInitializers), __runInitializers(this, _fillScreen_initializers, false));
|
|
372
|
+
this.#fluid_accessor_storage = (__runInitializers(this, _fillScreen_extraInitializers), __runInitializers(this, _fluid_initializers, false));
|
|
373
|
+
this.#frame_accessor_storage = (__runInitializers(this, _fluid_extraInitializers), __runInitializers(this, _frame_initializers, void 0));
|
|
298
374
|
this.#frameViewportWH_accessor_storage = (__runInitializers(this, _frame_extraInitializers), __runInitializers(this, _frameViewportWH_initializers, {
|
|
299
375
|
width: 0,
|
|
300
376
|
height: 0,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The box of a fluid frame preview (recette 1, P0-1.2): the container's width,
|
|
3
|
+
* the frame's proportions, never taller than it is wide. A frame without an
|
|
4
|
+
* area gets a square box; a container not laid out yet gets no box at all.
|
|
5
|
+
*/
|
|
6
|
+
export declare function fluidPreviewSize(containerWidth: number, frameWidth: number, frameHeight: number): {
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A portrait frame previewed at the panel's full width would be taller than
|
|
3
|
+
* the sidebar is wide many times over and push every other card off screen:
|
|
4
|
+
* past a square, the box stops growing and the frame is contained in it.
|
|
5
|
+
*/
|
|
6
|
+
const MAX_HEIGHT_PER_WIDTH = 1;
|
|
7
|
+
/**
|
|
8
|
+
* The box of a fluid frame preview (recette 1, P0-1.2): the container's width,
|
|
9
|
+
* the frame's proportions, never taller than it is wide. A frame without an
|
|
10
|
+
* area gets a square box; a container not laid out yet gets no box at all.
|
|
11
|
+
*/
|
|
12
|
+
export function fluidPreviewSize(containerWidth, frameWidth, frameHeight) {
|
|
13
|
+
const width = Math.max(0, Math.floor(containerWidth));
|
|
14
|
+
if (width === 0)
|
|
15
|
+
return { width: 0, height: 0 };
|
|
16
|
+
const ratio = frameWidth > 0 && frameHeight > 0
|
|
17
|
+
? Math.min(frameHeight / frameWidth, MAX_HEIGHT_PER_WIDTH)
|
|
18
|
+
: MAX_HEIGHT_PER_WIDTH;
|
|
19
|
+
return { width, height: Math.round(width * ratio) };
|
|
20
|
+
}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { AFFINE_FRAME_PANEL_BODY, FramePanelBody, } from './body/frame-panel-body.js';
|
|
2
2
|
import { AFFINE_FRAME_CARD, FrameCard } from './card/frame-card.js';
|
|
3
3
|
import { AFFINE_FRAME_CARD_TITLE, FrameCardTitle, } from './card/frame-card-title.js';
|
|
4
|
-
import { AFFINE_FRAME_TITLE_EDITOR, FrameCardTitleEditor, } from './card/frame-card-title-editor.js';
|
|
5
4
|
import { AFFINE_FRAME_PREVIEW, FramePreview } from './card/frame-preview.js';
|
|
6
5
|
import { AFFINE_FRAME_PANEL, FramePanel } from './frame-panel.js';
|
|
7
6
|
import { AFFINE_FRAME_PANEL_HEADER, FramePanelHeader, } from './header/frame-panel-header.js';
|
|
8
7
|
import { AFFINE_FRAMES_SETTING_MENU, FramesSettingMenu, } from './header/frames-setting-menu.js';
|
|
9
8
|
export function effects() {
|
|
10
9
|
customElements.define(AFFINE_FRAME_PANEL, FramePanel);
|
|
11
|
-
customElements.define(AFFINE_FRAME_TITLE_EDITOR, FrameCardTitleEditor);
|
|
12
10
|
customElements.define(AFFINE_FRAME_CARD, FrameCard);
|
|
13
11
|
customElements.define(AFFINE_FRAME_CARD_TITLE, FrameCardTitle);
|
|
14
12
|
customElements.define(AFFINE_FRAME_PANEL_BODY, FramePanelBody);
|
|
@@ -68,6 +68,8 @@ const styles = css `
|
|
|
68
68
|
|
|
69
69
|
overflow: auto;
|
|
70
70
|
overflow-x: hidden;
|
|
71
|
+
/* A scrollbar appearing must not narrow the fluid cards it scrolls. */
|
|
72
|
+
scrollbar-gutter: stable;
|
|
71
73
|
scrollbar-width: thin; /* For Firefox */
|
|
72
74
|
scrollbar-color: transparent transparent; /* For Firefox */
|
|
73
75
|
}
|
|
@@ -52,29 +52,29 @@ let AffineEdgelessZoomToolbarWidget = (() => {
|
|
|
52
52
|
__esDecorate(this, null, __hide_decorators, { kind: "accessor", name: "_hide", static: false, private: false, access: { has: obj => "_hide" in obj, get: obj => obj._hide, set: (obj, value) => { obj._hide = value; } }, metadata: _metadata }, __hide_initializers, __hide_extraInitializers);
|
|
53
53
|
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
54
54
|
}
|
|
55
|
-
static { this.styles = css `
|
|
56
|
-
:host {
|
|
57
|
-
position: absolute;
|
|
58
|
-
bottom: 20px;
|
|
59
|
-
left: 12px;
|
|
60
|
-
z-index: var(--affine-z-index-popover);
|
|
61
|
-
display: flex;
|
|
62
|
-
justify-content: center;
|
|
63
|
-
-webkit-user-select: none;
|
|
64
|
-
user-select: none;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
@container viewport (width <= 1200px) {
|
|
68
|
-
edgeless-zoom-toolbar {
|
|
69
|
-
display: none;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
@container viewport (width > 1200px) {
|
|
74
|
-
zoom-bar-toggle-button {
|
|
75
|
-
display: none;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
55
|
+
static { this.styles = css `
|
|
56
|
+
:host {
|
|
57
|
+
position: absolute;
|
|
58
|
+
bottom: 20px;
|
|
59
|
+
left: 12px;
|
|
60
|
+
z-index: var(--affine-z-index-popover);
|
|
61
|
+
display: flex;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
-webkit-user-select: none;
|
|
64
|
+
user-select: none;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@container viewport (width <= 1200px) {
|
|
68
|
+
edgeless-zoom-toolbar {
|
|
69
|
+
display: none;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@container viewport (width > 1200px) {
|
|
74
|
+
zoom-bar-toggle-button {
|
|
75
|
+
display: none;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
78
|
`; }
|
|
79
79
|
get edgeless() {
|
|
80
80
|
return this.block;
|
|
@@ -105,9 +105,9 @@ let AffineEdgelessZoomToolbarWidget = (() => {
|
|
|
105
105
|
if (this._hide || !this.edgeless) {
|
|
106
106
|
return nothing;
|
|
107
107
|
}
|
|
108
|
-
return html `
|
|
109
|
-
<edgeless-zoom-toolbar .std=${this.std}></edgeless-zoom-toolbar>
|
|
110
|
-
<zoom-bar-toggle-button .std=${this.std}></zoom-bar-toggle-button>
|
|
108
|
+
return html `
|
|
109
|
+
<edgeless-zoom-toolbar .std=${this.std}></edgeless-zoom-toolbar>
|
|
110
|
+
<zoom-bar-toggle-button .std=${this.std}></zoom-bar-toggle-button>
|
|
111
111
|
`;
|
|
112
112
|
}
|
|
113
113
|
#_hide_accessor_storage = __runInitializers(this, __hide_initializers, false);
|
|
@@ -19,105 +19,105 @@ export function HeadingIcon(i) {
|
|
|
19
19
|
return Heading1Icon();
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
export const HighLightDuotoneIcon = (color) => html `<svg
|
|
23
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
24
|
-
width="24"
|
|
25
|
-
height="24"
|
|
26
|
-
viewBox="0 0 24 24"
|
|
27
|
-
fill="none"
|
|
28
|
-
>
|
|
29
|
-
<path
|
|
30
|
-
d="M5.8291 16.441L7.91757 18.5295L6.57811 19.8689C6.53119 19.9158 6.46406 19.9364 6.3989 19.9239L3.37036 19.3412C3.21285 19.3109 3.15331 19.1168 3.26673 19.0034L5.8291 16.441Z"
|
|
31
|
-
fill="${color}"
|
|
32
|
-
/>
|
|
33
|
-
<path
|
|
34
|
-
fill-rule="evenodd"
|
|
35
|
-
clip-rule="evenodd"
|
|
36
|
-
d="M19.0095 3.63759C17.9526 2.58067 16.26 2.516 15.1255 3.48919L7.32135 10.1837C6.35438 11.0132 6.05275 12.3823 6.58163 13.5414L6.73501 13.8775L5.67697 14.9356C5.30169 15.3108 5.30169 15.9193 5.67697 16.2946L8.06379 18.6814C8.43907 19.0567 9.04752 19.0567 9.4228 18.6814L10.4808 17.6234L10.8171 17.7768C11.9761 18.3057 13.3452 18.0041 14.1747 17.0371L20.8692 9.23294C21.8424 8.09846 21.7778 6.40588 20.7208 5.34896L19.0095 3.63759ZM16.1021 4.62769C16.6415 4.16498 17.4463 4.19572 17.9488 4.69825L19.6602 6.40962C20.1627 6.91215 20.1935 7.7169 19.7307 8.25631L14.6424 14.188L10.1704 9.71604L16.1021 4.62769ZM9.02857 10.6955L8.29798 11.3222C7.83822 11.7166 7.6948 12.3676 7.94627 12.9187L8.29785 13.6892C8.4348 13.9893 8.37947 14.3544 8.13372 14.6001L7.11878 15.6151L8.74329 17.2396L9.75812 16.2247C10.004 15.9789 10.3691 15.9236 10.6693 16.0606L11.4398 16.4122C11.9908 16.6636 12.6418 16.5202 13.0362 16.0605L13.6629 15.3299L9.02857 10.6955Z"
|
|
37
|
-
fill="${cssVarV2('icon/primary')}"
|
|
38
|
-
/>
|
|
22
|
+
export const HighLightDuotoneIcon = (color) => html `<svg
|
|
23
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
24
|
+
width="24"
|
|
25
|
+
height="24"
|
|
26
|
+
viewBox="0 0 24 24"
|
|
27
|
+
fill="none"
|
|
28
|
+
>
|
|
29
|
+
<path
|
|
30
|
+
d="M5.8291 16.441L7.91757 18.5295L6.57811 19.8689C6.53119 19.9158 6.46406 19.9364 6.3989 19.9239L3.37036 19.3412C3.21285 19.3109 3.15331 19.1168 3.26673 19.0034L5.8291 16.441Z"
|
|
31
|
+
fill="${color}"
|
|
32
|
+
/>
|
|
33
|
+
<path
|
|
34
|
+
fill-rule="evenodd"
|
|
35
|
+
clip-rule="evenodd"
|
|
36
|
+
d="M19.0095 3.63759C17.9526 2.58067 16.26 2.516 15.1255 3.48919L7.32135 10.1837C6.35438 11.0132 6.05275 12.3823 6.58163 13.5414L6.73501 13.8775L5.67697 14.9356C5.30169 15.3108 5.30169 15.9193 5.67697 16.2946L8.06379 18.6814C8.43907 19.0567 9.04752 19.0567 9.4228 18.6814L10.4808 17.6234L10.8171 17.7768C11.9761 18.3057 13.3452 18.0041 14.1747 17.0371L20.8692 9.23294C21.8424 8.09846 21.7778 6.40588 20.7208 5.34896L19.0095 3.63759ZM16.1021 4.62769C16.6415 4.16498 17.4463 4.19572 17.9488 4.69825L19.6602 6.40962C20.1627 6.91215 20.1935 7.7169 19.7307 8.25631L14.6424 14.188L10.1704 9.71604L16.1021 4.62769ZM9.02857 10.6955L8.29798 11.3222C7.83822 11.7166 7.6948 12.3676 7.94627 12.9187L8.29785 13.6892C8.4348 13.9893 8.37947 14.3544 8.13372 14.6001L7.11878 15.6151L8.74329 17.2396L9.75812 16.2247C10.004 15.9789 10.3691 15.9236 10.6693 16.0606L11.4398 16.4122C11.9908 16.6636 12.6418 16.5202 13.0362 16.0605L13.6629 15.3299L9.02857 10.6955Z"
|
|
37
|
+
fill="${cssVarV2('icon/primary')}"
|
|
38
|
+
/>
|
|
39
39
|
</svg>`;
|
|
40
|
-
export const TextColorIcon = (color) => html `<svg
|
|
41
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
42
|
-
width="32"
|
|
43
|
-
height="32"
|
|
44
|
-
viewBox="0 0 32 32"
|
|
45
|
-
fill="none"
|
|
46
|
-
>
|
|
47
|
-
<path
|
|
48
|
-
fill-rule="evenodd"
|
|
49
|
-
clip-rule="evenodd"
|
|
50
|
-
d="M14.0627 6.16255C14.385 5.30291 15.2068 4.7334 16.1249 4.7334C17.043 4.7334 17.8648 5.30291 18.1872 6.16255L23.7279 20.9378C23.9219 21.455 23.6599 22.0314 23.1427 22.2253C22.6256 22.4192 22.0492 22.1572 21.8553 21.6401L20.2289 17.3031H12.021L10.3946 21.6401C10.2007 22.1572 9.62428 22.4192 9.10716 22.2253C8.59004 22.0314 8.32803 21.455 8.52195 20.9378L14.0627 6.16255ZM12.771 15.3031H19.4789L16.3146 6.8648C16.2849 6.78576 16.2094 6.7334 16.1249 6.7334C16.0405 6.7334 15.965 6.78576 15.9353 6.8648L12.771 15.3031Z"
|
|
51
|
-
fill="${cssVarV2('icon/primary')}"
|
|
52
|
-
/>
|
|
53
|
-
<rect
|
|
54
|
-
x="5.45837"
|
|
55
|
-
y="24"
|
|
56
|
-
width="21.3333"
|
|
57
|
-
height="3.33333"
|
|
58
|
-
rx="1"
|
|
59
|
-
fill=${color}
|
|
60
|
-
/>
|
|
40
|
+
export const TextColorIcon = (color) => html `<svg
|
|
41
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
42
|
+
width="32"
|
|
43
|
+
height="32"
|
|
44
|
+
viewBox="0 0 32 32"
|
|
45
|
+
fill="none"
|
|
46
|
+
>
|
|
47
|
+
<path
|
|
48
|
+
fill-rule="evenodd"
|
|
49
|
+
clip-rule="evenodd"
|
|
50
|
+
d="M14.0627 6.16255C14.385 5.30291 15.2068 4.7334 16.1249 4.7334C17.043 4.7334 17.8648 5.30291 18.1872 6.16255L23.7279 20.9378C23.9219 21.455 23.6599 22.0314 23.1427 22.2253C22.6256 22.4192 22.0492 22.1572 21.8553 21.6401L20.2289 17.3031H12.021L10.3946 21.6401C10.2007 22.1572 9.62428 22.4192 9.10716 22.2253C8.59004 22.0314 8.32803 21.455 8.52195 20.9378L14.0627 6.16255ZM12.771 15.3031H19.4789L16.3146 6.8648C16.2849 6.78576 16.2094 6.7334 16.1249 6.7334C16.0405 6.7334 15.965 6.78576 15.9353 6.8648L12.771 15.3031Z"
|
|
51
|
+
fill="${cssVarV2('icon/primary')}"
|
|
52
|
+
/>
|
|
53
|
+
<rect
|
|
54
|
+
x="5.45837"
|
|
55
|
+
y="24"
|
|
56
|
+
width="21.3333"
|
|
57
|
+
height="3.33333"
|
|
58
|
+
rx="1"
|
|
59
|
+
fill=${color}
|
|
60
|
+
/>
|
|
61
61
|
</svg>`;
|
|
62
|
-
export const TextBackgroundDuotoneIcon = (color) => html `<svg
|
|
63
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
64
|
-
width="32"
|
|
65
|
-
height="32"
|
|
66
|
-
viewBox="0 0 32 32"
|
|
67
|
-
fill="none"
|
|
68
|
-
>
|
|
69
|
-
<path
|
|
70
|
-
fill-rule="evenodd"
|
|
71
|
-
clip-rule="evenodd"
|
|
72
|
-
d="M4.57507 7.33336C4.57507 5.60287 5.97791 4.20003 7.70841 4.20003H25.0417C26.7722 4.20003 28.1751 5.60287 28.1751 7.33336V24.6667C28.1751 26.3972 26.7722 27.8 25.0417 27.8H7.70841C5.97791 27.8 4.57507 26.3972 4.57507 24.6667V7.33336Z"
|
|
73
|
-
fill="${color}"
|
|
74
|
-
/>
|
|
75
|
-
<path
|
|
76
|
-
fill-rule="evenodd"
|
|
77
|
-
clip-rule="evenodd"
|
|
78
|
-
d="M4.57495 7.33333C4.57495 5.60284 5.97779 4.2 7.70828 4.2H25.0416C26.7721 4.2 28.175 5.60284 28.175 7.33333V24.6667C28.175 26.3972 26.7721 27.8 25.0416 27.8H7.70828C5.97779 27.8 4.57495 26.3972 4.57495 24.6667V7.33333ZM7.70828 5.13333C6.49326 5.13333 5.50828 6.1183 5.50828 7.33333V24.6667C5.50828 25.8817 6.49326 26.8667 7.70828 26.8667H25.0416C26.2566 26.8667 27.2416 25.8817 27.2416 24.6667V7.33333C27.2416 6.1183 26.2566 5.13333 25.0416 5.13333H7.70828Z"
|
|
79
|
-
fill="black"
|
|
80
|
-
fill-opacity="0.22"
|
|
81
|
-
/>
|
|
82
|
-
<path
|
|
83
|
-
fill-rule="evenodd"
|
|
84
|
-
clip-rule="evenodd"
|
|
85
|
-
d="M14.5379 10.0064C14.8251 9.24064 15.5571 8.73332 16.375 8.73332C17.1928 8.73332 17.9249 9.24064 18.2121 10.0064L22.6446 21.8266C22.8386 22.3438 22.5766 22.9202 22.0594 23.1141C21.5423 23.308 20.9659 23.046 20.772 22.5289L19.5196 19.1891H13.2304L11.978 22.5289C11.7841 23.046 11.2076 23.308 10.6905 23.1141C10.1734 22.9202 9.9114 22.3438 10.1053 21.8266L14.5379 10.0064ZM13.9804 17.1891H18.7696L16.375 10.8035L13.9804 17.1891Z"
|
|
86
|
-
fill="${cssVarV2('text/primary')}"
|
|
87
|
-
/>
|
|
62
|
+
export const TextBackgroundDuotoneIcon = (color) => html `<svg
|
|
63
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
64
|
+
width="32"
|
|
65
|
+
height="32"
|
|
66
|
+
viewBox="0 0 32 32"
|
|
67
|
+
fill="none"
|
|
68
|
+
>
|
|
69
|
+
<path
|
|
70
|
+
fill-rule="evenodd"
|
|
71
|
+
clip-rule="evenodd"
|
|
72
|
+
d="M4.57507 7.33336C4.57507 5.60287 5.97791 4.20003 7.70841 4.20003H25.0417C26.7722 4.20003 28.1751 5.60287 28.1751 7.33336V24.6667C28.1751 26.3972 26.7722 27.8 25.0417 27.8H7.70841C5.97791 27.8 4.57507 26.3972 4.57507 24.6667V7.33336Z"
|
|
73
|
+
fill="${color}"
|
|
74
|
+
/>
|
|
75
|
+
<path
|
|
76
|
+
fill-rule="evenodd"
|
|
77
|
+
clip-rule="evenodd"
|
|
78
|
+
d="M4.57495 7.33333C4.57495 5.60284 5.97779 4.2 7.70828 4.2H25.0416C26.7721 4.2 28.175 5.60284 28.175 7.33333V24.6667C28.175 26.3972 26.7721 27.8 25.0416 27.8H7.70828C5.97779 27.8 4.57495 26.3972 4.57495 24.6667V7.33333ZM7.70828 5.13333C6.49326 5.13333 5.50828 6.1183 5.50828 7.33333V24.6667C5.50828 25.8817 6.49326 26.8667 7.70828 26.8667H25.0416C26.2566 26.8667 27.2416 25.8817 27.2416 24.6667V7.33333C27.2416 6.1183 26.2566 5.13333 25.0416 5.13333H7.70828Z"
|
|
79
|
+
fill="black"
|
|
80
|
+
fill-opacity="0.22"
|
|
81
|
+
/>
|
|
82
|
+
<path
|
|
83
|
+
fill-rule="evenodd"
|
|
84
|
+
clip-rule="evenodd"
|
|
85
|
+
d="M14.5379 10.0064C14.8251 9.24064 15.5571 8.73332 16.375 8.73332C17.1928 8.73332 17.9249 9.24064 18.2121 10.0064L22.6446 21.8266C22.8386 22.3438 22.5766 22.9202 22.0594 23.1141C21.5423 23.308 20.9659 23.046 20.772 22.5289L19.5196 19.1891H13.2304L11.978 22.5289C11.7841 23.046 11.2076 23.308 10.6905 23.1141C10.1734 22.9202 9.9114 22.3438 10.1053 21.8266L14.5379 10.0064ZM13.9804 17.1891H18.7696L16.375 10.8035L13.9804 17.1891Z"
|
|
86
|
+
fill="${cssVarV2('text/primary')}"
|
|
87
|
+
/>
|
|
88
88
|
</svg>`;
|
|
89
|
-
export const FigmaDuotoneIcon = html `<svg
|
|
90
|
-
width="32"
|
|
91
|
-
height="32"
|
|
92
|
-
viewBox="0 0 24 24"
|
|
93
|
-
fill="none"
|
|
94
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
95
|
-
>
|
|
96
|
-
<g id="Figma_Duotone">
|
|
97
|
-
<path
|
|
98
|
-
id="Vector"
|
|
99
|
-
d="M8.41842 22.5027C10.3047 22.5027 11.8356 20.9719 11.8356 19.0856V15.6685H8.41842C6.53216 15.6685 5.00128 17.1993 5.00128 19.0856C5.00128 20.9719 6.53216 22.5027 8.41842 22.5027Z"
|
|
100
|
-
fill="#0ACF83"
|
|
101
|
-
/>
|
|
102
|
-
<path
|
|
103
|
-
id="Vector_2"
|
|
104
|
-
d="M5.00128 12.2514C5.00128 10.3651 6.53216 8.83423 8.41842 8.83423H11.8356V15.6685H8.41842C6.53216 15.6685 5.00128 14.1376 5.00128 12.2514Z"
|
|
105
|
-
fill="#A259FF"
|
|
106
|
-
/>
|
|
107
|
-
<path
|
|
108
|
-
id="Vector_3"
|
|
109
|
-
d="M5.00146 5.41714C5.00146 3.53088 6.53234 2 8.4186 2H11.8357V8.83428H8.4186C6.53234 8.83428 5.00146 7.3034 5.00146 5.41714Z"
|
|
110
|
-
fill="#F24E1E"
|
|
111
|
-
/>
|
|
112
|
-
<path
|
|
113
|
-
id="Vector_4"
|
|
114
|
-
d="M11.8356 2H15.2527C17.139 2 18.6699 3.53088 18.6699 5.41714C18.6699 7.3034 17.139 8.83428 15.2527 8.83428H11.8356V2Z"
|
|
115
|
-
fill="#FF7262"
|
|
116
|
-
/>
|
|
117
|
-
<path
|
|
118
|
-
id="Vector_5"
|
|
119
|
-
d="M18.6699 12.2514C18.6699 14.1376 17.139 15.6685 15.2527 15.6685C13.3665 15.6685 11.8356 14.1376 11.8356 12.2514C11.8356 10.3651 13.3665 8.83423 15.2527 8.83423C17.139 8.83423 18.6699 10.3651 18.6699 12.2514Z"
|
|
120
|
-
fill="#1ABCFE"
|
|
121
|
-
/>
|
|
122
|
-
</g>
|
|
89
|
+
export const FigmaDuotoneIcon = html `<svg
|
|
90
|
+
width="32"
|
|
91
|
+
height="32"
|
|
92
|
+
viewBox="0 0 24 24"
|
|
93
|
+
fill="none"
|
|
94
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
95
|
+
>
|
|
96
|
+
<g id="Figma_Duotone">
|
|
97
|
+
<path
|
|
98
|
+
id="Vector"
|
|
99
|
+
d="M8.41842 22.5027C10.3047 22.5027 11.8356 20.9719 11.8356 19.0856V15.6685H8.41842C6.53216 15.6685 5.00128 17.1993 5.00128 19.0856C5.00128 20.9719 6.53216 22.5027 8.41842 22.5027Z"
|
|
100
|
+
fill="#0ACF83"
|
|
101
|
+
/>
|
|
102
|
+
<path
|
|
103
|
+
id="Vector_2"
|
|
104
|
+
d="M5.00128 12.2514C5.00128 10.3651 6.53216 8.83423 8.41842 8.83423H11.8356V15.6685H8.41842C6.53216 15.6685 5.00128 14.1376 5.00128 12.2514Z"
|
|
105
|
+
fill="#A259FF"
|
|
106
|
+
/>
|
|
107
|
+
<path
|
|
108
|
+
id="Vector_3"
|
|
109
|
+
d="M5.00146 5.41714C5.00146 3.53088 6.53234 2 8.4186 2H11.8357V8.83428H8.4186C6.53234 8.83428 5.00146 7.3034 5.00146 5.41714Z"
|
|
110
|
+
fill="#F24E1E"
|
|
111
|
+
/>
|
|
112
|
+
<path
|
|
113
|
+
id="Vector_4"
|
|
114
|
+
d="M11.8356 2H15.2527C17.139 2 18.6699 3.53088 18.6699 5.41714C18.6699 7.3034 17.139 8.83428 15.2527 8.83428H11.8356V2Z"
|
|
115
|
+
fill="#FF7262"
|
|
116
|
+
/>
|
|
117
|
+
<path
|
|
118
|
+
id="Vector_5"
|
|
119
|
+
d="M18.6699 12.2514C18.6699 14.1376 17.139 15.6685 15.2527 15.6685C13.3665 15.6685 11.8356 14.1376 11.8356 12.2514C11.8356 10.3651 13.3665 8.83423 15.2527 8.83423C17.139 8.83423 18.6699 10.3651 18.6699 12.2514Z"
|
|
120
|
+
fill="#1ABCFE"
|
|
121
|
+
/>
|
|
122
|
+
</g>
|
|
123
123
|
</svg> `;
|
|
@@ -199,16 +199,16 @@ let AffinePageDraggingAreaWidget = (() => {
|
|
|
199
199
|
width: rect.width + 'px',
|
|
200
200
|
height: rect.height + 'px',
|
|
201
201
|
};
|
|
202
|
-
return html `
|
|
203
|
-
<style>
|
|
204
|
-
.affine-page-dragging-area {
|
|
205
|
-
position: absolute;
|
|
206
|
-
background: var(--affine-hover-color);
|
|
207
|
-
z-index: 1;
|
|
208
|
-
pointer-events: none;
|
|
209
|
-
}
|
|
210
|
-
</style>
|
|
211
|
-
<div class="affine-page-dragging-area" style=${styleMap(style)}></div>
|
|
202
|
+
return html `
|
|
203
|
+
<style>
|
|
204
|
+
.affine-page-dragging-area {
|
|
205
|
+
position: absolute;
|
|
206
|
+
background: var(--affine-hover-color);
|
|
207
|
+
z-index: 1;
|
|
208
|
+
pointer-events: none;
|
|
209
|
+
}
|
|
210
|
+
</style>
|
|
211
|
+
<div class="affine-page-dragging-area" style=${styleMap(style)}></div>
|
|
212
212
|
`;
|
|
213
213
|
}
|
|
214
214
|
#rect_accessor_storage;
|
|
@@ -51,19 +51,19 @@ let AffineViewportOverlayWidget = (() => {
|
|
|
51
51
|
__esDecorate(this, null, __lockViewport_decorators, { kind: "accessor", name: "_lockViewport", static: false, private: false, access: { has: obj => "_lockViewport" in obj, get: obj => obj._lockViewport, set: (obj, value) => { obj._lockViewport = value; } }, metadata: _metadata }, __lockViewport_initializers, __lockViewport_extraInitializers);
|
|
52
52
|
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
53
53
|
}
|
|
54
|
-
static { this.styles = css `
|
|
55
|
-
.affine-viewport-overlay-widget {
|
|
56
|
-
position: absolute;
|
|
57
|
-
top: 0;
|
|
58
|
-
left: 0;
|
|
59
|
-
background: transparent;
|
|
60
|
-
pointer-events: none;
|
|
61
|
-
z-index: calc(var(--affine-z-index-popover) - 1);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.affine-viewport-overlay-widget.lock {
|
|
65
|
-
pointer-events: auto;
|
|
66
|
-
}
|
|
54
|
+
static { this.styles = css `
|
|
55
|
+
.affine-viewport-overlay-widget {
|
|
56
|
+
position: absolute;
|
|
57
|
+
top: 0;
|
|
58
|
+
left: 0;
|
|
59
|
+
background: transparent;
|
|
60
|
+
pointer-events: none;
|
|
61
|
+
z-index: calc(var(--affine-z-index-popover) - 1);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.affine-viewport-overlay-widget.lock {
|
|
65
|
+
pointer-events: auto;
|
|
66
|
+
}
|
|
67
67
|
`; }
|
|
68
68
|
connectedCallback() {
|
|
69
69
|
super.connectedCallback();
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { ArrowLeftBigIcon } from '@blocksuite/icons/lit';
|
|
2
2
|
import { html } from 'lit';
|
|
3
3
|
export const menuTitle = (name, onBack) => {
|
|
4
|
-
return html `
|
|
5
|
-
<div
|
|
6
|
-
style="display:flex;align-items:center;gap: 4px;padding: 3px 3px 3px 2px"
|
|
7
|
-
>
|
|
8
|
-
<div
|
|
9
|
-
@click=${onBack}
|
|
10
|
-
class="dv-icon-20 dv-hover dv-pd-2 dv-round-4"
|
|
11
|
-
style="display:flex;"
|
|
12
|
-
>
|
|
13
|
-
${ArrowLeftBigIcon()}
|
|
14
|
-
</div>
|
|
15
|
-
<div
|
|
16
|
-
style="font-weight:500;font-size: 14px;line-height: 22px;color: var(--affine-text-primary-color)"
|
|
17
|
-
>
|
|
18
|
-
${name}
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
4
|
+
return html `
|
|
5
|
+
<div
|
|
6
|
+
style="display:flex;align-items:center;gap: 4px;padding: 3px 3px 3px 2px"
|
|
7
|
+
>
|
|
8
|
+
<div
|
|
9
|
+
@click=${onBack}
|
|
10
|
+
class="dv-icon-20 dv-hover dv-pd-2 dv-round-4"
|
|
11
|
+
style="display:flex;"
|
|
12
|
+
>
|
|
13
|
+
${ArrowLeftBigIcon()}
|
|
14
|
+
</div>
|
|
15
|
+
<div
|
|
16
|
+
style="font-weight:500;font-size: 14px;line-height: 22px;color: var(--affine-text-primary-color)"
|
|
17
|
+
>
|
|
18
|
+
${name}
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
21
|
`;
|
|
22
22
|
};
|
package/dist/host-panels.d.ts
CHANGED
|
@@ -54,8 +54,9 @@ import { type BlockStdScope, type CommandFile } from './_pkgs/std/index.js';
|
|
|
54
54
|
*/
|
|
55
55
|
export { type AnyCommandDescriptor, type CommandFile, type CommandInvocation, type CommandOwner, type CommandSurface, getCommandIcon, getCommandsForSurface, getRegisteredCommands, runCommand, runCommandAsync, } from './_pkgs/std/index.js';
|
|
56
56
|
export { armArtefact } from './_pkgs/affine-widget-edgeless-toolbar/index.js';
|
|
57
|
-
export { type SelectionPaneNode, selectionPaneTree, } from './_pkgs/affine-block-surface/index.js';
|
|
57
|
+
export { type SelectionPaneNode, selectionPaneCommands, selectionPaneTree, } from './_pkgs/affine-block-surface/index.js';
|
|
58
58
|
export { frameCommands, type ReorderFramesParams, reorderFramesParams, } from './_pkgs/affine-block-frame/index.js';
|
|
59
|
+
export { createPanelReorderDrag, type PanelDragPoint, type PanelReorderDrag, type PanelReorderDragOptions, panelReorderGap, } from './_pkgs/affine-shared/utils/index.js';
|
|
59
60
|
export { formatPropertyValue, isPropertyValueEmpty, } from './_pkgs/affine-fragment-doc-title/index.js';
|
|
60
61
|
export type { PropertiesPanelRequest, PropertiesPanelService, TitleBandNotShownPage, TitleBandProperty, TitleBandService, TitleBandSheetState, } from './_pkgs/affine-shared/services/index.js';
|
|
61
62
|
export { ThreadMarksExtension } from './_pkgs/affine-shared/services/index.js';
|
|
@@ -89,9 +90,12 @@ export declare function fitToModel(std: BlockStdScope, id: string, padding?: [nu
|
|
|
89
90
|
* thumbnail renders one through `ExportManager` instead.
|
|
90
91
|
*
|
|
91
92
|
* Returns the element ready to be appended; `width` and `height` are the
|
|
92
|
-
* preview box in CSS pixels
|
|
93
|
-
*
|
|
94
|
-
*
|
|
93
|
+
* preview box in CSS pixels, `fillScreen` covers the box instead of
|
|
94
|
+
* containing the frame. `fluid` (0.57) replaces the fixed box: the preview
|
|
95
|
+
* takes its container's width and the frame's proportions, never taller than
|
|
96
|
+
* wide, and follows the container as it is resized — the library's own panel
|
|
97
|
+
* cards draw it that way (recette 1, P0-1.2); `width` and `height` are then
|
|
98
|
+
* ignored. One mini editor per preview: mount only the cards on screen. The element is defined by the
|
|
95
99
|
* frame panel's view extension, so it renders nothing in an assembly where the
|
|
96
100
|
* `frame` flag is off (ADR 0009) — the same assembly where there is no frame
|
|
97
101
|
* to preview.
|
|
@@ -100,6 +104,7 @@ export declare function createFramePreview(std: BlockStdScope, frame: FrameBlock
|
|
|
100
104
|
width?: number;
|
|
101
105
|
height?: number;
|
|
102
106
|
fillScreen?: boolean;
|
|
107
|
+
fluid?: boolean;
|
|
103
108
|
}): FramePreview;
|
|
104
109
|
/**
|
|
105
110
|
* One entry of the current view's own actions — what a host draws in the
|