efficient-easel 25.1.0 → 26.2.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/README.md +3 -4
- package/dist/chunk-2S7PJZWH.js +1 -0
- package/dist/chunk-2T22IY3J.js +2 -0
- package/dist/chunk-4FFDGEWA.js +1 -0
- package/dist/{chunk-BBD3FLU3.js → chunk-53ME3GAI.js} +14 -14
- package/dist/{chunk-KFV7N2DJ.js → chunk-56ID6FKZ.js} +1 -1
- package/dist/{chunk-OXOUGEAT.js → chunk-7GGNFLHT.js} +1 -1
- package/dist/chunk-BYONFJVQ.js +2 -0
- package/dist/chunk-CLAADE4J.js +14 -0
- package/dist/{chunk-FEP6XMNX.js → chunk-CP6KQP5A.js} +1 -1
- package/dist/chunk-FIH23CB7.js +1 -0
- package/dist/chunk-FT3O7X6U.js +5 -0
- package/dist/{chunk-UCZQWQNS.js → chunk-FYV6GZXP.js} +1 -1
- package/dist/{chunk-6WTWYHC2.js → chunk-I3KB7LH7.js} +4 -4
- package/dist/{chunk-IW5QXREH.js → chunk-IHXQZDDW.js} +39 -39
- package/dist/chunk-JYVQ62TL.js +1 -0
- package/dist/{chunk-XLC7HWW3.js → chunk-LDXYMHYW.js} +1 -1
- package/dist/chunk-LUG22U5L.js +1 -0
- package/dist/chunk-M5IKANJ5.js +13 -0
- package/dist/{chunk-SQTVXE5D.js → chunk-MBEUSPIN.js} +4 -4
- package/dist/{chunk-S6YOIRXQ.js → chunk-Q3VAJMXS.js} +1 -1
- package/dist/{chunk-U3LTJSBU.js → chunk-R76XMEKT.js} +11 -11
- package/dist/{chunk-62UGN7VM.js → chunk-TOEJCZUO.js} +1 -1
- package/dist/{chunk-ITIVCER6.js → chunk-WQXAAVCE.js} +1 -1
- package/dist/chunk-X3EMJ2EX.js +1 -0
- package/dist/{chunk-KF3LT7J2.js → chunk-YDJZX2XS.js} +1 -1
- package/dist/{chunk-XTDOSL2M.js → chunk-ZIEINXSZ.js} +6 -6
- package/dist/chunk-ZJRMB5KN.js +4 -0
- package/dist/drag/index.js +1 -1
- package/dist/draw/index.d.ts +1 -0
- package/dist/draw/index.js +1 -1
- package/dist/easel/index.js +1 -1
- package/dist/fields/index.js +1 -1
- package/dist/panel/index.d.ts +63 -2
- package/dist/panel/index.js +1 -1
- package/dist/panel/panel.css +46 -0
- package/dist/pick/index.d.ts +16 -195
- package/dist/pick/index.js +1 -1
- package/dist/pick/pick.css +6 -196
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/NodeContextMenu.js +1 -1
- package/dist/screen/components/PageEditGuardNotices.js +1 -1
- package/dist/screen/components/ScreenChrome.js +1 -1
- package/dist/screen/components/ScreenDocumentContext.js +1 -1
- package/dist/screen/components/ScreenMount.js +1 -1
- package/dist/screen/components/ScreenStoreProvider.js +1 -1
- package/dist/screen/components/SectionScreenShell.js +17 -17
- package/dist/screen/components/usePartBridge.js +1 -1
- package/dist/screen/index.js +1 -1
- package/dist/screen/lib/content/block-size.d.ts +74 -0
- package/dist/screen/lib/content/block-size.js +1 -0
- package/dist/screen/lib/document/block-set-host.js +1 -1
- package/dist/screen/lib/document/block-size-fields.d.ts +48 -0
- package/dist/screen/lib/document/block-size-fields.js +1 -0
- package/dist/screen/lib/document/box-fields.d.ts +58 -10
- package/dist/screen/lib/document/box-fields.js +1 -1
- package/dist/screen/lib/document/button-fields.d.ts +97 -0
- package/dist/screen/lib/document/button-fields.js +1 -0
- package/dist/screen/lib/document/device-fields.js +1 -1
- package/dist/screen/lib/document/image-fields.d.ts +118 -0
- package/dist/screen/lib/document/image-fields.js +5 -0
- package/dist/screen/lib/document/style-clipboard.js +1 -1
- package/dist/screen/lib/document/style-fields.d.ts +109 -0
- package/dist/screen/lib/document/style-fields.js +1 -0
- package/dist/screen/lib/document/use-section-ops.js +1 -1
- package/dist/screen/lib/key-scope.js +1 -1
- package/dist/screen/lib/screen-parts.js +1 -1
- package/dist/screen/words.d.ts +22 -1
- package/dist/screen/words.js +1 -1
- package/dist/strings/index.d.ts +12 -9
- package/dist/strings/index.js +2 -2
- package/dist/text-styles/index.d.ts +3 -3
- package/dist/text-styles/index.js +37 -37
- package/dist/{words-fbR9IwxH.d.ts → words-BrN08Fup.d.ts} +16 -1
- package/package.json +31 -1
- package/dist/chunk-ERB6FAZT.js +0 -2
- package/dist/chunk-H6BER2EU.js +0 -1
- package/dist/chunk-JQQFB7EZ.js +0 -1
- package/dist/chunk-KVIEUWTX.js +0 -11
- package/dist/chunk-LUHGBFOD.js +0 -5
- package/dist/chunk-OFBZOI6W.js +0 -1
- package/dist/chunk-SC6E3UUS.js +0 -13
- package/dist/chunk-U6LJ5UKD.js +0 -6
- package/dist/chunk-UDWXBS46.js +0 -1
- package/dist/words-DWvCJXwR.d.ts +0 -51
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { TextFit } from '../content/block-size.js';
|
|
2
|
+
import { PhoneValueAccess, BoxFieldSay, BoxField } from './box-fields.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'efficient-shell/format';
|
|
5
|
+
import 'efficient-shell/ui';
|
|
6
|
+
import '../../../ScreenDocumentContext-DPW_6gOC.js';
|
|
7
|
+
import '../../../blocks/index.js';
|
|
8
|
+
import '../../../types-BljCVdzR.js';
|
|
9
|
+
import '../../../data/index.js';
|
|
10
|
+
import '../../../types-Dq180WRV.js';
|
|
11
|
+
import '../../../resolve-Bz4mszpL.js';
|
|
12
|
+
import '../../../plan-D0DgSLnY.js';
|
|
13
|
+
import '../document-contract.js';
|
|
14
|
+
import '../document-switch.js';
|
|
15
|
+
import '../../../engine-CvXpFE86.js';
|
|
16
|
+
import '../../../edit-lock/index.js';
|
|
17
|
+
import '../admin-bridge.js';
|
|
18
|
+
import '../session.js';
|
|
19
|
+
import '../backend-error.js';
|
|
20
|
+
import '../host-chrome.js';
|
|
21
|
+
import '../links/link-filters.js';
|
|
22
|
+
import '../document-hooks.js';
|
|
23
|
+
import '../section-template-types.js';
|
|
24
|
+
import './content-tree.js';
|
|
25
|
+
import '../shared-section-types.js';
|
|
26
|
+
|
|
27
|
+
/** What a host tells {@link blockSizeFieldSet}. */
|
|
28
|
+
interface BlockSizeFieldSetOptions {
|
|
29
|
+
/** What a text block's words do with nothing stored (a heading shrinks,
|
|
30
|
+
* body text wraps). Left out: the block is not text, and has no Text group. */
|
|
31
|
+
textFit?: TextFit;
|
|
32
|
+
/** Where the phone values are kept (default: `phoneKey(key)` beside each). */
|
|
33
|
+
phone?: PhoneValueAccess;
|
|
34
|
+
/** The host's words. */
|
|
35
|
+
say?: BoxFieldSay;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The rows, in the order the panel shows them: `size` is the Size group,
|
|
39
|
+
* `text` the Text group (empty unless `textFit` names the block's default).
|
|
40
|
+
* The order is load-bearing: the inspector is a FLAT SIBLING LIST, so a
|
|
41
|
+
* heading precedes its rows and never wraps them.
|
|
42
|
+
*/
|
|
43
|
+
declare function blockSizeFieldSet(opts?: BlockSizeFieldSetOptions): {
|
|
44
|
+
size: Record<string, BoxField<unknown>>;
|
|
45
|
+
text: Record<string, BoxField<unknown>>;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export { type BlockSizeFieldSetOptions, blockSizeFieldSet };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{noGlyph as t,boxFieldBuilders as i,PHONE_KEY_ACCESS as n,group as o,phoneTwinFields as r}from"../../../chunk-M5IKANJ5.js";import"../../../chunk-CLAADE4J.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-Q3VAJMXS.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import{BLOCK_WIDTH_LIMIT as m,BLOCK_FIXED_WIDTH as h,BLOCK_WIDTH_FIT_POINTS as e,BLOCK_WIDTH_FIT_DEFAULT as s,TEXT_FIT_MIN_FONT as c,TEXT_FIT_POINTS as p}from"../../../chunk-X3EMJ2EX.js";import"../../../chunk-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-53ME3GAI.js";import"../../../chunk-LUG22U5L.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-FM6JO4WF.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-BSPCSC45.js";import{WidthIcon as u,TextLinesIcon as k}from"efficient-shell/icons/efficient";import{jsx as j}from"react/jsx-runtime";var d=t("a value or limit row under the Width and text-fit choices; drawn bare in the approved design (owner 2026-10-29, c25 row 4); no shell glyph names a min, max or fixed width");function a(t={}){const a=i(t.say),F=t.phone??n,x=(t,i)=>r(t,i,F),E=(t,i,n,o,r)=>x(t,a.slider(i,d,n.min,n.max,n.step,o,"px",r?{clear:{hint:o,emptyLabel:r}}:void 0));return{size:{_gBlockSize:o("Size"),...x("widthFit",a.segmented("Width",/* @__PURE__ */j(u,{}),[...e],s)),...E("width","Fixed width",h,h.fallback),...E("minWidth","Min width",m,m.min,"None"),...E("maxWidth","Content width",m,m.min,"None")},text:t.textFit?{_gText:o("Text"),...x("textFit",a.segmented("When the text does not fit",/* @__PURE__ */j(k,{}),[...p],t.textFit)),...E("minFont","Min font size",c,c.fallback)}:{}}}export{a as blockSizeFieldSet};
|
|
@@ -197,6 +197,48 @@ declare function sidesFromObject(stored: unknown): SidesValue;
|
|
|
197
197
|
* number (0 is a number), and `undefined` — nothing stored, the padding
|
|
198
198
|
* follows — when none does. */
|
|
199
199
|
declare function sidesToObject(sides: SidesValue): Partial<Record<PadSide, number>> | undefined;
|
|
200
|
+
/**
|
|
201
|
+
* Where a host keeps a row's value. The two editors store the same setting in
|
|
202
|
+
* different shapes: the website beside the other props (`buttonColor`), the
|
|
203
|
+
* email designer inside one object (`button.background`, {@link objectAccess}).
|
|
204
|
+
* The row is the same; only this differs, and no stored key moves (plan
|
|
205
|
+
* [PLAN] Fill Editor Gaps Both Ways: 0 data moves).
|
|
206
|
+
*/
|
|
207
|
+
interface ValueAccess {
|
|
208
|
+
/** The value stored for `key` on a node. */
|
|
209
|
+
read: (values: Record<string, unknown>, key: string) => unknown;
|
|
210
|
+
/** The props one write of the value makes (`undefined`: a clear). */
|
|
211
|
+
write: (values: Record<string, unknown>, key: string, next: unknown) => Record<string, unknown>;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Values kept in ONE object prop (`button: { background, color }`). `names`
|
|
215
|
+
* maps a row's key to its name inside the object; a key it does not name
|
|
216
|
+
* keeps its own. A write keeps the object's other keys; a clear removes only
|
|
217
|
+
* its own, and an object left empty is removed too.
|
|
218
|
+
*/
|
|
219
|
+
declare function objectAccess(objectKey: string, names?: Readonly<Record<string, string>>): ValueAccess;
|
|
220
|
+
/**
|
|
221
|
+
* The value `key` holds through `access` on the selected node, and the write
|
|
222
|
+
* that changes it there. `own` is the row's own field (`value` / `onChange`):
|
|
223
|
+
* given, the row reads and writes its own field, as any row does. Without an
|
|
224
|
+
* editor above (a guard, a harness) a value kept elsewhere reads as absent and
|
|
225
|
+
* a write does nothing: the field key itself stores nothing.
|
|
226
|
+
*/
|
|
227
|
+
declare function useAccessValue(access: ValueAccess, key: string, own?: {
|
|
228
|
+
value: unknown;
|
|
229
|
+
onChange: (next: unknown) => void;
|
|
230
|
+
}): [unknown, (next: unknown) => void];
|
|
231
|
+
/**
|
|
232
|
+
* ONE write of several values through `access` on the selected node: one
|
|
233
|
+
* merged patch, one `onChangeMany`. A click that changes two values (a Reset
|
|
234
|
+
* that clears a colour and its opacity) must use this, never two writes: a
|
|
235
|
+
* write awaits the node's resolver before it lands, so a second write built
|
|
236
|
+
* on the node from before the first puts back what the first changed.
|
|
237
|
+
* Without an editor above it writes nothing.
|
|
238
|
+
*/
|
|
239
|
+
declare function useAccessPatch(access: ValueAccess): (changes: readonly (readonly [string, unknown])[]) => void;
|
|
240
|
+
/** Values kept beside the other props, under their own key (the website). */
|
|
241
|
+
declare const FLAT_ACCESS: ValueAccess;
|
|
200
242
|
/**
|
|
201
243
|
* Where a host keeps a row's PHONE value (twins plan E2). The website keeps
|
|
202
244
|
* it beside the desktop key (`gapPhone`, {@link PHONE_KEY_ACCESS}); the email
|
|
@@ -204,16 +246,12 @@ declare function sidesToObject(sides: SidesValue): Partial<Record<PadSide, numbe
|
|
|
204
246
|
* {@link phoneObjectAccess}). The row is the same; only this differs, and no
|
|
205
247
|
* stored key moves.
|
|
206
248
|
*/
|
|
207
|
-
interface PhoneValueAccess {
|
|
249
|
+
interface PhoneValueAccess extends ValueAccess {
|
|
208
250
|
/** The key the phone row is declared under in the host's fields. */
|
|
209
251
|
fieldKey: (key: string) => string;
|
|
210
252
|
/** The phone value is stored under `fieldKey` itself, so the row reads and
|
|
211
253
|
* writes through its own field (`value` / `onChange`), as any row does. */
|
|
212
254
|
ownField?: boolean;
|
|
213
|
-
/** The phone value stored for `key` on a node. */
|
|
214
|
-
read: (values: Record<string, unknown>, key: string) => unknown;
|
|
215
|
-
/** The props one write of the phone value makes (`undefined`: a clear). */
|
|
216
|
-
write: (values: Record<string, unknown>, key: string, next: unknown) => Record<string, unknown>;
|
|
217
255
|
}
|
|
218
256
|
/** The website's phone values: `phoneKey(key)`, beside the desktop key. */
|
|
219
257
|
declare const PHONE_KEY_ACCESS: PhoneValueAccess;
|
|
@@ -259,6 +297,16 @@ interface SliderOptions {
|
|
|
259
297
|
/** The typed box's ceiling, when a typed number may go past the track. */
|
|
260
298
|
inputMax?: number;
|
|
261
299
|
}
|
|
300
|
+
/** What {@link boxFieldBuilders}' `segmented` is told past its options. */
|
|
301
|
+
interface SegmentedOptions<V> {
|
|
302
|
+
/**
|
|
303
|
+
* What a phone twin with nothing stored USES, from the desktop value: the
|
|
304
|
+
* host's own rule, when the phone does not simply repeat the desktop (the
|
|
305
|
+
* website Hero: Side by side on a desktop stacks on a phone). Left out, the
|
|
306
|
+
* phone rests on the desktop value itself. Display only: it never writes.
|
|
307
|
+
*/
|
|
308
|
+
phoneRest?: (desktop: unknown) => V | undefined;
|
|
309
|
+
}
|
|
262
310
|
/** What {@link directionField} is told: the directions this container offers,
|
|
263
311
|
* in the order the strip draws them, and the one an absent value means. */
|
|
264
312
|
interface DirectionFieldOptions<V extends string = string> {
|
|
@@ -440,12 +488,12 @@ declare function boxFieldBuilders(say?: BoxFieldSay): {
|
|
|
440
488
|
label: string;
|
|
441
489
|
value: string;
|
|
442
490
|
picture?: ReactElement;
|
|
443
|
-
})[], fallback: string): BoxField<string>;
|
|
491
|
+
})[], fallback: string, more?: SegmentedOptions<string>): BoxField<string>;
|
|
444
492
|
<V>(label: string, icon: ReactElement, options: {
|
|
445
493
|
label: string;
|
|
446
494
|
value: V;
|
|
447
495
|
picture?: ReactElement;
|
|
448
|
-
}[], fallback: V): BoxField<V>;
|
|
496
|
+
}[], fallback: V, more?: SegmentedOptions<V>): BoxField<V>;
|
|
449
497
|
};
|
|
450
498
|
boxJustifyField: (o?: BoxFlexRowOptions) => SelectField;
|
|
451
499
|
boxAlignField: (o?: BoxFlexRowOptions) => SelectField;
|
|
@@ -495,12 +543,12 @@ declare const segmented: {
|
|
|
495
543
|
label: string;
|
|
496
544
|
value: string;
|
|
497
545
|
picture?: ReactElement;
|
|
498
|
-
})[], fallback: string): BoxField<string>;
|
|
546
|
+
})[], fallback: string, more?: SegmentedOptions<string>): BoxField<string>;
|
|
499
547
|
<V>(label: string, icon: ReactElement, options: {
|
|
500
548
|
label: string;
|
|
501
549
|
value: V;
|
|
502
550
|
picture?: ReactElement;
|
|
503
|
-
}[], fallback: V): BoxField<V>;
|
|
551
|
+
}[], fallback: V, more?: SegmentedOptions<V>): BoxField<V>;
|
|
504
552
|
};
|
|
505
553
|
declare const boxJustifyField: (o?: BoxFlexRowOptions) => SelectField;
|
|
506
554
|
declare const boxAlignField: (o?: BoxFlexRowOptions) => SelectField;
|
|
@@ -541,4 +589,4 @@ declare const boxFieldSet: (opts?: BoxFieldSetOptions) => {
|
|
|
541
589
|
_gNudge: BoxField<undefined>;
|
|
542
590
|
};
|
|
543
591
|
|
|
544
|
-
export { ANCHOR_LABELS, type AlignmentOptions, AlignmentStrip, BOX_ALIGN_POINTS, BOX_DIRECTIONS, BOX_DIRECTION_LABEL, BOX_GAP, BOX_JUSTIFY_POINTS, BOX_NUDGE_LIMIT, BOX_PLACEMENTS, BOX_PLACEMENT_DEFAULT, BOX_WIDTH, BOX_WRAP_LABEL, BOX_WRAP_POINTS, type BlockAlignmentOptions, BlockAlignmentStrip, type BoxAlign, type BoxField, type BoxFieldRenderProps, type BoxFieldSay, type BoxFieldSetOptions, type BoxFlexRowOptions, type BoxJustify, type BoxPlacement, type BoxWrap, type DirectionFieldOptions, type GapFieldOptions, OPEN_PLACEMENT_POINTS, PHONE_KEY_ACCESS, type PhoneValueAccess, type PlacementFieldOptions, PlacementGridView, type PlacementPoint, type PositionOptions, SIDE_PAD_KEYS, Segmented, type SelectField, type SelectOption, type SidesPaddingOptions, type SliderAction, type SliderClear, type SliderOptions, alignmentField, alignmentFields, blockAlignmentField, blockAlignmentFields, boxAlignField, boxFieldBuilders, boxFieldSet, boxJustifyField, boxWrapField, directionField, gapField, group, iconOf, isNoGlyph, noGlyph, normaliseBoxPlacement, phoneObjectAccess, phoneTwinFields, placementField, positionFields, positionPatch, section, segmented, select, sharedStyleKinds, sidesFromObject, sidesPaddingFields, sidesPaddingPatch, sidesToObject, slider };
|
|
592
|
+
export { ANCHOR_LABELS, type AlignmentOptions, AlignmentStrip, BOX_ALIGN_POINTS, BOX_DIRECTIONS, BOX_DIRECTION_LABEL, BOX_GAP, BOX_JUSTIFY_POINTS, BOX_NUDGE_LIMIT, BOX_PLACEMENTS, BOX_PLACEMENT_DEFAULT, BOX_WIDTH, BOX_WRAP_LABEL, BOX_WRAP_POINTS, type BlockAlignmentOptions, BlockAlignmentStrip, type BoxAlign, type BoxField, type BoxFieldRenderProps, type BoxFieldSay, type BoxFieldSetOptions, type BoxFlexRowOptions, type BoxJustify, type BoxPlacement, type BoxWrap, type DirectionFieldOptions, FLAT_ACCESS, type GapFieldOptions, OPEN_PLACEMENT_POINTS, PHONE_KEY_ACCESS, type PhoneValueAccess, type PlacementFieldOptions, PlacementGridView, type PlacementPoint, type PositionOptions, SIDE_PAD_KEYS, Segmented, type SegmentedOptions, type SelectField, type SelectOption, type SidesPaddingOptions, type SliderAction, type SliderClear, type SliderOptions, type ValueAccess, alignmentField, alignmentFields, blockAlignmentField, blockAlignmentFields, boxAlignField, boxFieldBuilders, boxFieldSet, boxJustifyField, boxWrapField, directionField, gapField, group, iconOf, isNoGlyph, noGlyph, normaliseBoxPlacement, objectAccess, phoneObjectAccess, phoneTwinFields, placementField, positionFields, positionPatch, section, segmented, select, sharedStyleKinds, sidesFromObject, sidesPaddingFields, sidesPaddingPatch, sidesToObject, slider, useAccessPatch, useAccessValue };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ANCHOR_LABELS,AlignmentStrip,BOX_ALIGN_POINTS,BOX_DIRECTIONS,BOX_DIRECTION_LABEL,BOX_GAP,BOX_JUSTIFY_POINTS,BOX_NUDGE_LIMIT,BOX_PLACEMENTS,BOX_PLACEMENT_DEFAULT,BOX_WIDTH,BOX_WRAP_LABEL,BOX_WRAP_POINTS,BlockAlignmentStrip,OPEN_PLACEMENT_POINTS,PHONE_KEY_ACCESS,PlacementGridView,SIDE_PAD_KEYS,Segmented,alignmentField,alignmentFields,blockAlignmentField,blockAlignmentFields,boxAlignField,boxFieldBuilders,boxFieldSet,boxJustifyField,boxWrapField,directionField,gapField,group,iconOf,isNoGlyph,noGlyph,normaliseBoxPlacement,phoneObjectAccess,phoneTwinFields,placementField,positionFields,positionPatch,section,segmented,select,sharedStyleKinds,sidesFromObject,sidesPaddingFields,sidesPaddingPatch,sidesToObject,slider}from"../../../chunk-
|
|
1
|
+
export{ANCHOR_LABELS,AlignmentStrip,BOX_ALIGN_POINTS,BOX_DIRECTIONS,BOX_DIRECTION_LABEL,BOX_GAP,BOX_JUSTIFY_POINTS,BOX_NUDGE_LIMIT,BOX_PLACEMENTS,BOX_PLACEMENT_DEFAULT,BOX_WIDTH,BOX_WRAP_LABEL,BOX_WRAP_POINTS,BlockAlignmentStrip,FLAT_ACCESS,OPEN_PLACEMENT_POINTS,PHONE_KEY_ACCESS,PlacementGridView,SIDE_PAD_KEYS,Segmented,alignmentField,alignmentFields,blockAlignmentField,blockAlignmentFields,boxAlignField,boxFieldBuilders,boxFieldSet,boxJustifyField,boxWrapField,directionField,gapField,group,iconOf,isNoGlyph,noGlyph,normaliseBoxPlacement,objectAccess,phoneObjectAccess,phoneTwinFields,placementField,positionFields,positionPatch,section,segmented,select,sharedStyleKinds,sidesFromObject,sidesPaddingFields,sidesPaddingPatch,sidesToObject,slider,useAccessPatch,useAccessValue}from"../../../chunk-M5IKANJ5.js";import"../../../chunk-CLAADE4J.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";export{FIELD_DESCRIPTION_MARKER,describedAs}from"../../../chunk-LX23TCTP.js";import"../../../chunk-Q3VAJMXS.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-53ME3GAI.js";import"../../../chunk-LUG22U5L.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-FM6JO4WF.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-BSPCSC45.js";
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { ValueAccess, SidesPaddingOptions, PhoneValueAccess, BoxFieldSay, BoxField } from './box-fields.js';
|
|
2
|
+
import { ColorPreset } from 'efficient-shell/ui';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'efficient-shell/format';
|
|
5
|
+
import '../../../ScreenDocumentContext-DPW_6gOC.js';
|
|
6
|
+
import '../../../blocks/index.js';
|
|
7
|
+
import '../../../types-BljCVdzR.js';
|
|
8
|
+
import '../../../data/index.js';
|
|
9
|
+
import '../../../types-Dq180WRV.js';
|
|
10
|
+
import '../../../resolve-Bz4mszpL.js';
|
|
11
|
+
import '../../../plan-D0DgSLnY.js';
|
|
12
|
+
import '../document-contract.js';
|
|
13
|
+
import '../document-switch.js';
|
|
14
|
+
import '../../../engine-CvXpFE86.js';
|
|
15
|
+
import '../../../edit-lock/index.js';
|
|
16
|
+
import '../admin-bridge.js';
|
|
17
|
+
import '../session.js';
|
|
18
|
+
import '../backend-error.js';
|
|
19
|
+
import '../host-chrome.js';
|
|
20
|
+
import '../links/link-filters.js';
|
|
21
|
+
import '../document-hooks.js';
|
|
22
|
+
import '../section-template-types.js';
|
|
23
|
+
import './content-tree.js';
|
|
24
|
+
import '../shared-section-types.js';
|
|
25
|
+
|
|
26
|
+
/** The keys the Button's style rows store, as the website stores them. */
|
|
27
|
+
declare const BUTTON_STYLE_KEYS: {
|
|
28
|
+
readonly fill: "buttonColor";
|
|
29
|
+
readonly fillOpacity: "buttonFillOpacity";
|
|
30
|
+
readonly border: "buttonBorder";
|
|
31
|
+
readonly text: "buttonTextColor";
|
|
32
|
+
readonly corners: "buttonCorners";
|
|
33
|
+
readonly cornerSides: "buttonCornerSides";
|
|
34
|
+
};
|
|
35
|
+
/** The Button's own padding keys, as the website stores them. */
|
|
36
|
+
declare const BUTTON_PAD_KEYS: {
|
|
37
|
+
readonly top: "buttonPaddingTop";
|
|
38
|
+
readonly right: "buttonPaddingRight";
|
|
39
|
+
readonly bottom: "buttonPaddingBottom";
|
|
40
|
+
readonly left: "buttonPaddingLeft";
|
|
41
|
+
};
|
|
42
|
+
/** What a host tells {@link buttonFieldSet}. Values only: every host gets
|
|
43
|
+
* every row. */
|
|
44
|
+
interface ButtonFieldSetOptions {
|
|
45
|
+
/** What each empty style row follows, as hooks: the site's button colours
|
|
46
|
+
* on the website, the campaign's accent and button styles in an email. */
|
|
47
|
+
follows: {
|
|
48
|
+
useFill: () => string;
|
|
49
|
+
useText: () => string;
|
|
50
|
+
useBorder: () => {
|
|
51
|
+
width: number;
|
|
52
|
+
color: string;
|
|
53
|
+
};
|
|
54
|
+
useCorners: () => number;
|
|
55
|
+
/** What an unset Fill opacity draws. 100 when left out. */
|
|
56
|
+
useFillOpacity?: () => number;
|
|
57
|
+
};
|
|
58
|
+
/** The colours each colour window offers first. */
|
|
59
|
+
usePresets?: () => readonly ColorPreset[];
|
|
60
|
+
/** What a colour row's Reset says it goes back to (`#2E2E2E from Styles`). */
|
|
61
|
+
resetTo?: (hex: string) => string;
|
|
62
|
+
/** Where the style values are kept. Left out: each under its own key. */
|
|
63
|
+
style?: ValueAccess;
|
|
64
|
+
/** The Padding row. `fallback` is the HOST's: what an empty side draws
|
|
65
|
+
* (the website's Btn classes, the campaign's Button padding). The set keeps
|
|
66
|
+
* no number of its own. `object` is the email designer's storage. */
|
|
67
|
+
padding: SidesPaddingOptions & {
|
|
68
|
+
fallback: NonNullable<SidesPaddingOptions['fallback']>;
|
|
69
|
+
};
|
|
70
|
+
/** Where the alignment's phone value is kept (default `alignPhone`). */
|
|
71
|
+
phone?: PhoneValueAccess;
|
|
72
|
+
/** The host's words. */
|
|
73
|
+
say?: BoxFieldSay;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* The Button's rows, in the order the panel shows them. The order is
|
|
77
|
+
* load-bearing: the inspector is a FLAT SIBLING LIST, so a heading precedes
|
|
78
|
+
* its rows and never wraps them.
|
|
79
|
+
*/
|
|
80
|
+
declare function buttonFieldSet(opts: ButtonFieldSetOptions): {
|
|
81
|
+
align: BoxField<string>;
|
|
82
|
+
_dDesign: BoxField<undefined>;
|
|
83
|
+
buttonColor: BoxField<unknown>;
|
|
84
|
+
buttonFillOpacity: BoxField<unknown> & {
|
|
85
|
+
reachedBy: string;
|
|
86
|
+
};
|
|
87
|
+
buttonBorder: BoxField<unknown>;
|
|
88
|
+
buttonTextColor: BoxField<unknown>;
|
|
89
|
+
buttonCorners: BoxField<unknown>;
|
|
90
|
+
buttonCornerSides: BoxField<unknown> & {
|
|
91
|
+
reachedBy: string;
|
|
92
|
+
};
|
|
93
|
+
_dLayout: BoxField<undefined>;
|
|
94
|
+
_dSize: BoxField<undefined>;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export { BUTTON_PAD_KEYS, BUTTON_STYLE_KEYS, type ButtonFieldSetOptions, buttonFieldSet };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{BUTTON_PAD_KEYS,BUTTON_STYLE_KEYS,buttonFieldSet}from"../../../chunk-FIH23CB7.js";import"../../../chunk-ZJRMB5KN.js";import"../../../chunk-M5IKANJ5.js";import"../../../chunk-CLAADE4J.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-Q3VAJMXS.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-53ME3GAI.js";import"../../../chunk-LUG22U5L.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-FM6JO4WF.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-BSPCSC45.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{DEVICE_HIDDEN_ATTR,DEVICE_NOTE,deviceField,deviceNote,shownTier,withoutDeviceGate}from"../../../chunk-
|
|
1
|
+
export{DEVICE_HIDDEN_ATTR,DEVICE_NOTE,deviceField,deviceNote,shownTier,withoutDeviceGate}from"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";import"../../../chunk-Q3VAJMXS.js";export{DEVICE_FIELD_MARKER,deviceMetaOf}from"../../../chunk-YCSZAP7T.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-BSPCSC45.js";
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { ReactNode, ReactElement } from 'react';
|
|
2
|
+
import { BoxField } from './box-fields.js';
|
|
3
|
+
import { MEDIA_FIELD_MARKER } from './field-markers.js';
|
|
4
|
+
import 'efficient-shell/format';
|
|
5
|
+
import 'efficient-shell/ui';
|
|
6
|
+
import '../../../ScreenDocumentContext-DPW_6gOC.js';
|
|
7
|
+
import '../../../blocks/index.js';
|
|
8
|
+
import '../../../types-BljCVdzR.js';
|
|
9
|
+
import '../../../data/index.js';
|
|
10
|
+
import '../../../types-Dq180WRV.js';
|
|
11
|
+
import '../../../resolve-Bz4mszpL.js';
|
|
12
|
+
import '../../../plan-D0DgSLnY.js';
|
|
13
|
+
import '../document-contract.js';
|
|
14
|
+
import '../document-switch.js';
|
|
15
|
+
import '../../../engine-CvXpFE86.js';
|
|
16
|
+
import '../../../edit-lock/index.js';
|
|
17
|
+
import '../admin-bridge.js';
|
|
18
|
+
import '../session.js';
|
|
19
|
+
import '../backend-error.js';
|
|
20
|
+
import '../host-chrome.js';
|
|
21
|
+
import '../links/link-filters.js';
|
|
22
|
+
import '../document-hooks.js';
|
|
23
|
+
import '../section-template-types.js';
|
|
24
|
+
import './content-tree.js';
|
|
25
|
+
import '../shared-section-types.js';
|
|
26
|
+
import './text-control-kinds.js';
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* THE ONE IMAGE ROW of both editors (twins plan E3, 2026-10-30: the final is
|
|
30
|
+
* easel's row, the look unchanged).
|
|
31
|
+
*
|
|
32
|
+
* Both editors drew efficient-shell's `MediaUploadField` in a row of their
|
|
33
|
+
* own: the website's `MediaUploadField` component (web-builder), the email
|
|
34
|
+
* designer's `emailImageField` (admin portal). Both already asked the library
|
|
35
|
+
* through easel's {@link requestMediaPick}, so the row is easel's: the shell's
|
|
36
|
+
* box, the host's library, and the options only one editor needed until now.
|
|
37
|
+
*
|
|
38
|
+
* - `pickOptions`: the field's own terms for the host's panel (the email
|
|
39
|
+
* Banner's `{ bakeableOnly: true }`).
|
|
40
|
+
* - `paste`: the email's "or paste an image URL" box, for a tenant with no
|
|
41
|
+
* library and for an already-hosted URL. The host's `tidy` runs when the
|
|
42
|
+
* author leaves the box, never per keystroke.
|
|
43
|
+
* - `focusKey`: the website's focus point ON the picture. The dot writes the
|
|
44
|
+
* key of the view it is dragged in — the desktop key, or in the phone view
|
|
45
|
+
* its phone twin (`phoneKey`), which ↺ clears back to the desktop point.
|
|
46
|
+
* - `frameKey`: a picked video's own still. The video and its still go in ONE
|
|
47
|
+
* change: two writes race, and the second is built on the node from before
|
|
48
|
+
* the first, which is then lost.
|
|
49
|
+
* - The template note: a document that cannot hold media
|
|
50
|
+
* (`capabilities.mediaEditing` false, a website template) draws a note in
|
|
51
|
+
* place of the box, so no media can be chosen against a template.
|
|
52
|
+
*
|
|
53
|
+
* What is stored does not change: a URL string. The value read may also be a
|
|
54
|
+
* picture that names its file (`{ src, assetId }`): the box shows its `src`.
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
/** A stored picture: a URL, or a picture that names its file. */
|
|
58
|
+
type ImageValue = string | {
|
|
59
|
+
src?: string | null;
|
|
60
|
+
} | null | undefined;
|
|
61
|
+
/** The URL a stored picture shows. */
|
|
62
|
+
declare function imageValueSrc(value: unknown): string;
|
|
63
|
+
type ImageRowOptions = {
|
|
64
|
+
/** Default image. A video row draws the play glyph and asks for `video/*`. */
|
|
65
|
+
kind?: 'image' | 'video';
|
|
66
|
+
/** The box's own `accept`, where a row takes fewer formats than its kind
|
|
67
|
+
* (a baked picture takes no SVG). */
|
|
68
|
+
accept?: string;
|
|
69
|
+
/** The small kind hint under the box's call to action ("JPG · PNG · WEBP"). */
|
|
70
|
+
acceptHint?: ReactNode;
|
|
71
|
+
/** The field's own terms for the host's panel, handed on untouched. */
|
|
72
|
+
pickOptions?: Record<string, unknown>;
|
|
73
|
+
/** The host's upload cap: a bigger dropped file is refused at the box. */
|
|
74
|
+
maxSizeBytes?: number;
|
|
75
|
+
/** The filled box's height. Default the shell's. */
|
|
76
|
+
height?: number;
|
|
77
|
+
placeholder?: ReactNode;
|
|
78
|
+
/** The bin's name ("Remove hero image"). */
|
|
79
|
+
removeLabel?: string;
|
|
80
|
+
/** The "or paste an image URL" box. `open`: drawn at once (no library). */
|
|
81
|
+
paste?: {
|
|
82
|
+
tidy?: (typed: string) => string;
|
|
83
|
+
open?: boolean;
|
|
84
|
+
};
|
|
85
|
+
/** The sibling key that holds this picture's focus point (images only). */
|
|
86
|
+
focusKey?: string;
|
|
87
|
+
/** Whether a point can move anything now, read off the node's values. */
|
|
88
|
+
focusWhen?: (values: Record<string, unknown>) => boolean;
|
|
89
|
+
/** The sibling key that keeps a picked video's still (`posterUrl`). */
|
|
90
|
+
frameKey?: string;
|
|
91
|
+
/** Drawn under the box: a host's own notes (a picture a bake cannot use). */
|
|
92
|
+
note?: (src: string) => ReactNode;
|
|
93
|
+
/** False when the host has no library to choose in: no Change, and an empty
|
|
94
|
+
* box is off. Default true. What only the host knows while it draws (the
|
|
95
|
+
* email's "this tenant has a site") is passed by a host that draws
|
|
96
|
+
* `ImageRow` in its own field render, with `canPick`, `paste.open` and
|
|
97
|
+
* `note` read there. */
|
|
98
|
+
canPick?: boolean;
|
|
99
|
+
};
|
|
100
|
+
type ImageRowProps = ImageRowOptions & {
|
|
101
|
+
label: string;
|
|
102
|
+
icon?: ReactNode;
|
|
103
|
+
hint?: ReactNode;
|
|
104
|
+
value: ImageValue;
|
|
105
|
+
onChange: (url: string) => void;
|
|
106
|
+
/** This row's own key: with `frameKey`, the video and its still are written
|
|
107
|
+
* in one change under it. */
|
|
108
|
+
name?: string;
|
|
109
|
+
readOnly?: boolean;
|
|
110
|
+
};
|
|
111
|
+
/** THE image row: the shell's box in a settings row, with the options above. */
|
|
112
|
+
declare function ImageRow({ label, icon, hint, value, onChange, name, readOnly: readOnlyProp, canPick, kind, accept, acceptHint, pickOptions, maxSizeBytes, height, placeholder, removeLabel, paste, focusKey, focusWhen, frameKey, note, }: ImageRowProps): ReactElement;
|
|
113
|
+
/** The image row as a field: `label` and `icon` on the row, the options above. */
|
|
114
|
+
declare function imageField(label: string, icon: ReactNode, opts?: ImageRowOptions): BoxField<unknown> & {
|
|
115
|
+
[MEDIA_FIELD_MARKER]: true;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export { ImageRow, type ImageRowOptions, type ImageRowProps, type ImageValue, imageField, imageValueSrc };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{SettingsDefaultReset as e}from"../../../chunk-2T22IY3J.js";import{ScreenDocumentContext as n}from"../../../chunk-BYONFJVQ.js";import"../../../chunk-QZJKWKGH.js";import"../../../chunk-ERR437B5.js";import{requestMediaPick as o}from"../../../chunk-JIP5JNRB.js";import"../../../chunk-GR3XRILS.js";import"../../../chunk-RLBXE4EU.js";import"../../../chunk-6ATIYLUL.js";import"../../../chunk-KO47WAWR.js";import"../../../chunk-NQW6XCAY.js";import"../../../chunk-LOMEH6DG.js";import"../../../chunk-KCOBHPN6.js";import"../../../chunk-NCXYC7WI.js";import"../../../chunk-YM4UEGBV.js";import"../../../chunk-SNF5764Q.js";import{useEaselHost as t}from"../../../chunk-LX23TCTP.js";import{DEFAULT_IMAGE_ROW_WORDS as r}from"../../../chunk-Q3VAJMXS.js";import{phoneKey as i}from"../../../chunk-E52W3M5I.js";import{MEDIA_FIELD_MARKER as c}from"../../../chunk-ANPOR6EY.js";import{useSelectedHost as s}from"../../../chunk-53ME3GAI.js";import"../../../chunk-LUG22U5L.js";import"../../../chunk-TBY3DFKS.js";import{DEFAULT_PANEL_WORDS as a}from"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-NDRZP6YR.js";import"../../../chunk-H6DDIBQ4.js";import"../../../chunk-YYD257TD.js";import"../../../chunk-RE4LP46F.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import{SettingsField as m}from"../../../chunk-MIX7EGRG.js";import{useWords as l}from"../../../chunk-MFIRYGHW.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import{usePreviewDevice as u}from"../../../chunk-BSPCSC45.js";import{useContext as p,useState as h}from"react";import{FOCAL_DEFAULT as f}from"efficient-shell/format";import{MediaUploadField as k,Button as d,Input as j}from"efficient-shell/ui";import{jsx as g,jsxs as v}from"react/jsx-runtime";function y(e){return"string"==typeof e?e:e&&"object"==typeof e&&"string"==typeof e.src?e.src:""}function C({src:e,onChange:n,tidy:o,name:t}){const[r,i]=h(null),c=!r||e!==r.text&&e!==r.from?e:r.text;/* @__PURE__ */
|
|
2
|
+
return g(j,{size:"md",type:"url",inputMode:"url",autoComplete:"off",spellCheck:!1,value:c,placeholder:"https://…","aria-label":t,onChange:o=>{const t=o.target.value;i(n=>({text:t,from:!n||e!==n.text&&e!==n.from?e:n.from})),n(t)},onBlur:e=>{const t=e.target.value,r=o?o(t):t;r!==t&&n(r),i(null)},onKeyDown:e=>{"Enter"===e.key&&e.currentTarget.blur()}})}function R({label:c,icon:j,hint:R,value:E,onChange:b,name:B,readOnly:K,canPick:M=!0,kind:P="image",accept:L,acceptHint:F,pickOptions:Y,maxSizeBytes:N,height:D,placeholder:I,removeLabel:O,paste:S,focusKey:T,focusWhen:G,frameKey:Q,note:w}){const H=l("imageRow",r),W=l("panel",a),X=t(),x=s(),A=p(n),U="video"===P,J=function(e,n){const o=s(),t="mobile"===u();if(!e||!o)return null;const r=o.values??{};if(n&&!n(r))return null;const c="string"==typeof r[e]&&r[e]?String(r[e]):f,a=i(e),m="string"==typeof r[a]&&r[a]?String(r[a]):void 0;return{phone:t,desktop:c,own:m,focus:t?m??c:c,set:n=>o.onChange(t?a:e,n),clear:()=>o.onChange(a,void 0)}}(U?void 0:T,G),[Z,z]=h(!1),V=!0===K||!0===x?.readOnly,q=M&&!V;if(A&&!A.capabilities.mediaEditing)/* @__PURE__ */
|
|
3
|
+
return g(m,{label:c,icon:j,hint:R,children:/* @__PURE__ */g("div",{className:"es-image-row-note",children:U?H.templateVideo:H.template})});const $=Q&&B?{video:B,frame:Q}:null,_=$?e=>e?b(e):x?.onChangeMany({[$.video]:"",[$.frame]:""}):b,ee=$?e=>x?.onChangeMany({[$.video]:e,[$.frame]:""}):b,ne=y(E),oe=J?.phone&&ne?/* @__PURE__ */g(e,{words:W,label:H.focus,changed:Boolean(J.own),detail:H.onDesktop(J.desktop),onReset:J.clear,disabled:V}):void 0,te=S&&!V&&(S.open||Z);/* @__PURE__ */
|
|
4
|
+
return g(m,{label:c,icon:j,hint:R,action:oe,children:/* @__PURE__ */v("div",{className:"es-image-row",children:[
|
|
5
|
+
/* @__PURE__ */g(k,{value:ne,onChange:_,onPick:e=>{if(q)return $&&!x?Promise.resolve(null):o(X,{accept:L??(U?"video/*":"image/*"),title:c,...e?{file:e}:{},...Y?{options:Y}:{}}).then(e=>e&&$?(x?.onChangeMany({[$.video]:e.url,[$.frame]:e.posterUrl??""}),null):e?.url??null)},accept:L??(U?"video/*":"image/*"),acceptHint:F,kind:P,maxSizeBytes:N,height:D,placeholder:I,removeLabel:O,allowReplace:q,allowRemove:!V,disabled:V||!q&&!ne,focusLabel:H.focus,...J&&!V?{focus:J.focus,onFocusChange:J.set}:J?{focus:J.focus}:{}}),w?.(ne),S&&!V?te?/* @__PURE__ */g(C,{src:ne,onChange:ee,tidy:S.tidy,name:H.pasteName}):/* @__PURE__ */g(d,{variant:"link",size:"sm",onClick:()=>z(!0),children:H.pasteLink}):null]})})}function E(e,n,o={}){return{type:"custom",[c]:!0,render:t=>/* @__PURE__ */g(R,{...o,label:e,icon:n,value:t.value,onChange:e=>t.onChange(e),name:t.name,readOnly:t.readOnly})}}export{R as ImageRow,E as imageField,y as imageValueSrc};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{copyNodeStyle,nodeStyleRows,planNodePaste,shopFieldKind,siteStyleScope,styleClipboardOf}from"../../../chunk-
|
|
1
|
+
export{copyNodeStyle,nodeStyleRows,planNodePaste,shopFieldKind,siteStyleScope,styleClipboardOf}from"../../../chunk-JYVQ62TL.js";import"../../../chunk-5XL2RXFU.js";import"../../../chunk-3QB2ZQXK.js";import"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";import"../../../chunk-Q3VAJMXS.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { ColorPreset } from 'efficient-shell/ui';
|
|
3
|
+
import { ValueAccess, BoxField, BoxFieldSay } from './box-fields.js';
|
|
4
|
+
import 'efficient-shell/format';
|
|
5
|
+
import '../../../ScreenDocumentContext-DPW_6gOC.js';
|
|
6
|
+
import '../../../blocks/index.js';
|
|
7
|
+
import '../../../types-BljCVdzR.js';
|
|
8
|
+
import '../../../data/index.js';
|
|
9
|
+
import '../../../types-Dq180WRV.js';
|
|
10
|
+
import '../../../resolve-Bz4mszpL.js';
|
|
11
|
+
import '../../../plan-D0DgSLnY.js';
|
|
12
|
+
import '../document-contract.js';
|
|
13
|
+
import '../document-switch.js';
|
|
14
|
+
import '../../../engine-CvXpFE86.js';
|
|
15
|
+
import '../../../edit-lock/index.js';
|
|
16
|
+
import '../admin-bridge.js';
|
|
17
|
+
import '../session.js';
|
|
18
|
+
import '../backend-error.js';
|
|
19
|
+
import '../host-chrome.js';
|
|
20
|
+
import '../links/link-filters.js';
|
|
21
|
+
import '../document-hooks.js';
|
|
22
|
+
import '../section-template-types.js';
|
|
23
|
+
import './content-tree.js';
|
|
24
|
+
import '../shared-section-types.js';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* THE STYLE ROWS of both editors: a colour, a border and the corners, as
|
|
28
|
+
* settings rows (plan [PLAN] Fill Editor Gaps Both Ways). The parts were
|
|
29
|
+
* already one (`SettingsColour`, the shell's `BorderInput` and
|
|
30
|
+
* `CornersInput`); each editor still wrapped them in its own row — the
|
|
31
|
+
* website's `ColourRow`, `BorderRow` and `cornersRowField`, the email
|
|
32
|
+
* designer's colour card and radius slider. These are the rows, built once.
|
|
33
|
+
*
|
|
34
|
+
* What differs between the editors is handed in, never decided here:
|
|
35
|
+
*
|
|
36
|
+
* - where the value is stored (`access`, {@link ValueAccess}): the website
|
|
37
|
+
* beside the other props, the email designer in one object. Left out, the
|
|
38
|
+
* row reads and writes its own field;
|
|
39
|
+
* - what an empty row follows (`useFollows`, a hook): the site's button
|
|
40
|
+
* colour, the campaign's accent, the corner in force. The row shows it in
|
|
41
|
+
* grey and stores nothing for it.
|
|
42
|
+
*
|
|
43
|
+
* A cleared value is `""` (a colour) or `null` (corners) on the row's own
|
|
44
|
+
* field, as the website has always stored it, and is REMOVED from an object.
|
|
45
|
+
*/
|
|
46
|
+
|
|
47
|
+
/** Where a style row keeps its value. */
|
|
48
|
+
interface Stored {
|
|
49
|
+
/** The row's own key: the field it is declared under. */
|
|
50
|
+
key: string;
|
|
51
|
+
/** Where the value is kept. Left out: the row's own field. */
|
|
52
|
+
access?: ValueAccess;
|
|
53
|
+
}
|
|
54
|
+
/** A field that keeps a value a style row writes beside its own: saved, and
|
|
55
|
+
* drawn by that row (`reachedBy`), never by a row of its own. */
|
|
56
|
+
declare function keptByRow<V>(reachedBy: string): BoxField<V> & {
|
|
57
|
+
reachedBy: string;
|
|
58
|
+
};
|
|
59
|
+
interface ColourFieldOptions extends Stored {
|
|
60
|
+
label: string;
|
|
61
|
+
icon: ReactElement;
|
|
62
|
+
/** The colour an empty row paints, `#rrggbb`. A hook. */
|
|
63
|
+
useFollows: () => string;
|
|
64
|
+
/** The colours the window offers first. A hook. */
|
|
65
|
+
usePresets?: () => readonly ColorPreset[];
|
|
66
|
+
/** The colour's opacity, 0-100, on a sibling key; `useUnset` is what an
|
|
67
|
+
* unset opacity draws (a hook; 100 when left out). */
|
|
68
|
+
opacity?: {
|
|
69
|
+
key: string;
|
|
70
|
+
useUnset?: () => number;
|
|
71
|
+
};
|
|
72
|
+
/** What Reset's tooltip says it goes back to, in the host's words
|
|
73
|
+
* (`#2E2E2E from Styles`). The bare hex when left out. */
|
|
74
|
+
resetTo?: (hex: string) => string;
|
|
75
|
+
}
|
|
76
|
+
/** The widest border a row offers, px (the website's answer 4). */
|
|
77
|
+
declare const BORDER_WIDTH_MAX = 20;
|
|
78
|
+
interface BorderFieldOptions extends Stored {
|
|
79
|
+
/** What an empty border draws: its width and colour, shown in grey. A hook. */
|
|
80
|
+
useFollows: () => {
|
|
81
|
+
width: number;
|
|
82
|
+
color: string;
|
|
83
|
+
};
|
|
84
|
+
/** The Solid / Dashed / Dotted strip. Default false: the line is solid. */
|
|
85
|
+
styles?: boolean;
|
|
86
|
+
}
|
|
87
|
+
/** The corners in the order they are stored. Absence means all four. */
|
|
88
|
+
declare const CORNER_SIDES: readonly ["tl", "tr", "br", "bl"];
|
|
89
|
+
/** The largest corner a row offers, px (the site's own scale). */
|
|
90
|
+
declare const CORNER_RADIUS_MAX = 40;
|
|
91
|
+
interface CornersFieldOptions extends Stored {
|
|
92
|
+
/** The key on the same node (or in the same object) that holds which
|
|
93
|
+
* corners are round. Nothing stored: all four. */
|
|
94
|
+
sidesKey: string;
|
|
95
|
+
/** The radius an unset row draws, px. A hook. */
|
|
96
|
+
useFollows: () => number;
|
|
97
|
+
step?: number;
|
|
98
|
+
}
|
|
99
|
+
/** The three style rows, in the host's words. */
|
|
100
|
+
declare function styleFieldBuilders(say?: BoxFieldSay): {
|
|
101
|
+
colourField: (o: ColourFieldOptions) => BoxField<unknown>;
|
|
102
|
+
borderField: (o: BorderFieldOptions) => BoxField<unknown>;
|
|
103
|
+
cornersField: (o: CornersFieldOptions) => BoxField<unknown>;
|
|
104
|
+
};
|
|
105
|
+
declare const colourField: (o: ColourFieldOptions) => BoxField<unknown>;
|
|
106
|
+
declare const borderField: (o: BorderFieldOptions) => BoxField<unknown>;
|
|
107
|
+
declare const cornersField: (o: CornersFieldOptions) => BoxField<unknown>;
|
|
108
|
+
|
|
109
|
+
export { BORDER_WIDTH_MAX, type BorderFieldOptions, CORNER_RADIUS_MAX, CORNER_SIDES, type ColourFieldOptions, type CornersFieldOptions, borderField, colourField, cornersField, keptByRow, styleFieldBuilders };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{BORDER_WIDTH_MAX,CORNER_RADIUS_MAX,CORNER_SIDES,borderField,colourField,cornersField,keptByRow,styleFieldBuilders}from"../../../chunk-ZJRMB5KN.js";import"../../../chunk-M5IKANJ5.js";import"../../../chunk-CLAADE4J.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-Q3VAJMXS.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-53ME3GAI.js";import"../../../chunk-LUG22U5L.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-FM6JO4WF.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-BSPCSC45.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{useSectionOps}from"../../../chunk-
|
|
1
|
+
export{useSectionOps}from"../../../chunk-LDXYMHYW.js";import"../../../chunk-FT3O7X6U.js";import"../../../chunk-NCXYC7WI.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-TCAAOYQY.js";import"../../../chunk-53ME3GAI.js";import"../../../chunk-LUG22U5L.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-R76XMEKT.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-ZEH6QLBH.js";import"../../../chunk-WHS6Y55E.js";import"../../../chunk-FM6JO4WF.js";import"../../../chunk-K56YDHYQ.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-FIVU2COQ.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-Y2T3JX7K.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-3XECMGXX.js";import"../../../chunk-P2VEMZH5.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{editorRootFocus,isSaveShortcut,useEaselKeyTarget,useEaselSaveKey,useEaselUndoKeys}from"../../chunk-
|
|
1
|
+
export{editorRootFocus,isSaveShortcut,useEaselKeyTarget,useEaselSaveKey,useEaselUndoKeys}from"../../chunk-FYV6GZXP.js";import"../../chunk-LX23TCTP.js";import"../../chunk-53ME3GAI.js";import"../../chunk-LUG22U5L.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-K53PQAMP.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-HZSZT3BE.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSelectionMode,isSlotMode,sameInspectorMode,screenSlotsOf,shownChildSlotsOf,shownSlotFieldsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-
|
|
1
|
+
export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSelectionMode,isSlotMode,sameInspectorMode,screenSlotsOf,shownChildSlotsOf,shownSlotFieldsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-FT3O7X6U.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-LX23TCTP.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-53ME3GAI.js";import"../../chunk-LUG22U5L.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-R76XMEKT.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-FM6JO4WF.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-K53PQAMP.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-HZSZT3BE.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-MIX7EGRG.js";import"../../chunk-DX3VILZ3.js";import"../../chunk-JACEEVVF.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-3XECMGXX.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";
|
package/dist/screen/words.d.ts
CHANGED
|
@@ -395,5 +395,26 @@ type ScreenWords = {
|
|
|
395
395
|
};
|
|
396
396
|
};
|
|
397
397
|
declare const DEFAULT_SCREEN_WORDS: ScreenWords;
|
|
398
|
+
/**
|
|
399
|
+
* THE IMAGE ROW's own words (`ImageRow`, `screen/lib/document/image-fields`;
|
|
400
|
+
* group `imageRow` of `efficient-easel/strings`). The row reads them with
|
|
401
|
+
* `useWords('imageRow', …)`. Its label, its bin's name and its kind hint are
|
|
402
|
+
* the host's; the box's own words are the shell's `MediaUploadField`'s.
|
|
403
|
+
*/
|
|
404
|
+
type ImageRowWords = {
|
|
405
|
+
/** The focus control's name and the ↺'s label. */
|
|
406
|
+
focus: string;
|
|
407
|
+
/** The ↺'s tooltip detail: where the phone's point goes back to. */
|
|
408
|
+
onDesktop: (value: string) => string;
|
|
409
|
+
/** The link that opens the paste box. */
|
|
410
|
+
pasteLink: string;
|
|
411
|
+
/** The paste box's name. */
|
|
412
|
+
pasteName: string;
|
|
413
|
+
/** The note a template draws in place of the box. */
|
|
414
|
+
template: string;
|
|
415
|
+
/** The same note for a video row. */
|
|
416
|
+
templateVideo: string;
|
|
417
|
+
};
|
|
418
|
+
declare const DEFAULT_IMAGE_ROW_WORDS: ImageRowWords;
|
|
398
419
|
|
|
399
|
-
export { DEFAULT_SCREEN_ADD_WORDS, DEFAULT_SCREEN_SAVE_STATUS_WORDS, DEFAULT_SCREEN_SHARED_WORDS, DEFAULT_SCREEN_WORDS, type ScreenAddWords, type ScreenBarWords, type ScreenLeaveWords, type ScreenMenuWords, type ScreenSaveStatusWords, type ScreenSharedWords, type ScreenWords };
|
|
420
|
+
export { DEFAULT_IMAGE_ROW_WORDS, DEFAULT_SCREEN_ADD_WORDS, DEFAULT_SCREEN_SAVE_STATUS_WORDS, DEFAULT_SCREEN_SHARED_WORDS, DEFAULT_SCREEN_WORDS, type ImageRowWords, type ScreenAddWords, type ScreenBarWords, type ScreenLeaveWords, type ScreenMenuWords, type ScreenSaveStatusWords, type ScreenSharedWords, type ScreenWords };
|
package/dist/screen/words.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{DEFAULT_SCREEN_ADD_WORDS,DEFAULT_SCREEN_SAVE_STATUS_WORDS,DEFAULT_SCREEN_SHARED_WORDS,DEFAULT_SCREEN_WORDS}from"../chunk-
|
|
1
|
+
export{DEFAULT_IMAGE_ROW_WORDS,DEFAULT_SCREEN_ADD_WORDS,DEFAULT_SCREEN_SAVE_STATUS_WORDS,DEFAULT_SCREEN_SHARED_WORDS,DEFAULT_SCREEN_WORDS}from"../chunk-Q3VAJMXS.js";
|