@makeswift/runtime 0.1.5 → 0.1.6
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/index.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +2 -2
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/dist/Box2.cjs.js +0 -54
- package/dist/Box2.cjs.js.map +0 -1
- package/dist/Box2.es.js +0 -52
- package/dist/Box2.es.js.map +0 -1
- package/dist/grid-item.cjs.js +0 -594
- package/dist/grid-item.cjs.js.map +0 -1
- package/dist/grid-item.es.js +0 -585
- package/dist/grid-item.es.js.map +0 -1
- package/dist/slot.cjs.js +0 -130
- package/dist/slot.cjs.js.map +0 -1
- package/dist/slot.es.js +0 -123
- package/dist/slot.es.js.map +0 -1
- package/dist/types/components/builtin/Box/Box2.d.ts +0 -8
- package/dist/types/components/builtin/Box/Box2.d.ts.map +0 -1
- package/dist/types/components/experimental/box-placeholder.d.ts +0 -2
- package/dist/types/components/experimental/box-placeholder.d.ts.map +0 -1
- package/dist/types/components/experimental/box.d.ts +0 -9
- package/dist/types/components/experimental/box.d.ts.map +0 -1
- package/dist/types/components/experimental/index.d.ts +0 -2
- package/dist/types/components/experimental/index.d.ts.map +0 -1
- package/dist/types/components/hooks/useTable.d.ts +0 -66
- package/dist/types/components/hooks/useTable.d.ts.map +0 -1
- package/dist/types/components/shared/grid-item.d.ts +0 -17
- package/dist/types/components/shared/grid-item.d.ts.map +0 -1
- package/dist/types/controls/slot.d.ts +0 -42
- package/dist/types/controls/slot.d.ts.map +0 -1
- package/dist/types/css/border-radius.d.ts +0 -20
- package/dist/types/css/border-radius.d.ts.map +0 -1
- package/dist/types/css/border.d.ts +0 -31
- package/dist/types/css/border.d.ts.map +0 -1
- package/dist/types/css/box-shadow.d.ts +0 -19
- package/dist/types/css/box-shadow.d.ts.map +0 -1
- package/dist/types/css/color.d.ts +0 -5
- package/dist/types/css/color.d.ts.map +0 -1
- package/dist/types/css/length-percentage.d.ts +0 -10
- package/dist/types/css/length-percentage.d.ts.map +0 -1
- package/dist/types/css/length.d.ts +0 -14
- package/dist/types/css/length.d.ts.map +0 -1
- package/dist/types/css/margin.d.ts +0 -20
- package/dist/types/css/margin.d.ts.map +0 -1
- package/dist/types/css/padding.d.ts +0 -20
- package/dist/types/css/padding.d.ts.map +0 -1
- package/dist/types/runtimes/react/controls/slot.d.ts +0 -26
- package/dist/types/runtimes/react/controls/slot.d.ts.map +0 -1
- package/dist/types/runtimes/react/use-style.d.ts +0 -3
- package/dist/types/runtimes/react/use-style.d.ts.map +0 -1
- package/dist/types/use-global-style.d.ts +0 -3
- package/dist/types/use-global-style.d.ts.map +0 -1
- package/dist/types/use-grid-item-style.d.ts +0 -1
- package/dist/types/use-grid-item-style.d.ts.map +0 -1
- package/dist/types/use-style.d.ts +0 -3
- package/dist/types/use-style.d.ts.map +0 -1
package/dist/slot.cjs.js
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
|
-
var __publicField = (obj, key, value) => {
|
|
5
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
6
|
-
return value;
|
|
7
|
-
};
|
|
8
|
-
var image = require("./image.cjs.js");
|
|
9
|
-
const BuilderEditMode = {
|
|
10
|
-
BUILD: "build",
|
|
11
|
-
CONTENT: "content"
|
|
12
|
-
};
|
|
13
|
-
const RichTextPropControllerMessageType = {
|
|
14
|
-
CHANGE_BUILDER_EDIT_MODE: "CHANGE_BUILDER_EDIT_MODE",
|
|
15
|
-
INITIALIZE_EDITOR: "INITIALIZE_EDITOR",
|
|
16
|
-
CHANGE_EDITOR_VALUE: "CHANGE_EDITOR_VALUE",
|
|
17
|
-
FOCUS: "FOCUS",
|
|
18
|
-
BLUR: "BLUR",
|
|
19
|
-
UNDO: "UNDO",
|
|
20
|
-
REDO: "REDO"
|
|
21
|
-
};
|
|
22
|
-
class PropController {
|
|
23
|
-
constructor(send) {
|
|
24
|
-
__publicField(this, "send");
|
|
25
|
-
this.send = send;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
class DefaultPropController extends PropController {
|
|
29
|
-
recv(_message) {
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
class RichTextPropController extends PropController {
|
|
33
|
-
constructor() {
|
|
34
|
-
super(...arguments);
|
|
35
|
-
__publicField(this, "editor", null);
|
|
36
|
-
}
|
|
37
|
-
recv(message) {
|
|
38
|
-
var _a, _b;
|
|
39
|
-
switch (message.type) {
|
|
40
|
-
case RichTextPropControllerMessageType.CHANGE_BUILDER_EDIT_MODE: {
|
|
41
|
-
switch (message.editMode) {
|
|
42
|
-
case BuilderEditMode.BUILD:
|
|
43
|
-
(_a = this.editor) == null ? void 0 : _a.deselect().blur();
|
|
44
|
-
break;
|
|
45
|
-
case BuilderEditMode.CONTENT:
|
|
46
|
-
(_b = this.editor) == null ? void 0 : _b.focus().moveToRangeOfDocument();
|
|
47
|
-
break;
|
|
48
|
-
}
|
|
49
|
-
break;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
setSlateEditor(editor) {
|
|
54
|
-
this.editor = editor;
|
|
55
|
-
this.send({
|
|
56
|
-
type: RichTextPropControllerMessageType.INITIALIZE_EDITOR,
|
|
57
|
-
value: editor.value.toJSON({ preserveSelection: false })
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
onChange(change) {
|
|
61
|
-
this.send({
|
|
62
|
-
type: RichTextPropControllerMessageType.CHANGE_EDITOR_VALUE,
|
|
63
|
-
value: change.value.toJSON({ preserveSelection: true })
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
focus() {
|
|
67
|
-
this.send({ type: RichTextPropControllerMessageType.FOCUS });
|
|
68
|
-
}
|
|
69
|
-
blur() {
|
|
70
|
-
this.send({ type: RichTextPropControllerMessageType.BLUR });
|
|
71
|
-
}
|
|
72
|
-
undo() {
|
|
73
|
-
this.send({ type: RichTextPropControllerMessageType.UNDO });
|
|
74
|
-
}
|
|
75
|
-
redo() {
|
|
76
|
-
this.send({ type: RichTextPropControllerMessageType.REDO });
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
const TableFormFieldsMessageType = {
|
|
80
|
-
TABLE_FORM_LAYOUT_CHANGE: "TABLE_FORM_LAYOUT_CHANGE",
|
|
81
|
-
TABLE_FORM_FIELD_LAYOUT_CHANGE: "TABLE_FORM_FIELD_LAYOUT_CHANGE"
|
|
82
|
-
};
|
|
83
|
-
class TableFormFieldsPropController extends PropController {
|
|
84
|
-
recv() {
|
|
85
|
-
}
|
|
86
|
-
tableFormLayoutChange(payload) {
|
|
87
|
-
this.send({ type: TableFormFieldsMessageType.TABLE_FORM_LAYOUT_CHANGE, payload });
|
|
88
|
-
}
|
|
89
|
-
tableFormFieldLayoutChange(payload) {
|
|
90
|
-
this.send({ type: TableFormFieldsMessageType.TABLE_FORM_FIELD_LAYOUT_CHANGE, payload });
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
function createPropController(descriptor, send) {
|
|
94
|
-
switch (descriptor.type) {
|
|
95
|
-
case image.Types.RichText:
|
|
96
|
-
return new RichTextPropController(send);
|
|
97
|
-
case image.Types.TableFormFields:
|
|
98
|
-
return new TableFormFieldsPropController(send);
|
|
99
|
-
case SlotControlType:
|
|
100
|
-
return new SlotControl(send);
|
|
101
|
-
default:
|
|
102
|
-
return new DefaultPropController(send);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
const SlotControlType = "makeswift::controls::slot";
|
|
106
|
-
function Slot() {
|
|
107
|
-
return { type: SlotControlType };
|
|
108
|
-
}
|
|
109
|
-
const SlotControlMessageType = {
|
|
110
|
-
CONTAINER_BOX_MODEL_CHANGE: "makeswift::controls::slot::message::container-box-model-change",
|
|
111
|
-
ITEM_BOX_MODEL_CHANGE: "makeswift::controls::slot::message::item-box-model-change"
|
|
112
|
-
};
|
|
113
|
-
class SlotControl extends PropController {
|
|
114
|
-
recv() {
|
|
115
|
-
}
|
|
116
|
-
changeContainerBoxModel(boxModel) {
|
|
117
|
-
this.send({ type: SlotControlMessageType.CONTAINER_BOX_MODEL_CHANGE, payload: { boxModel } });
|
|
118
|
-
}
|
|
119
|
-
changeItemBoxModel(index, boxModel) {
|
|
120
|
-
this.send({ type: SlotControlMessageType.ITEM_BOX_MODEL_CHANGE, payload: { index, boxModel } });
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
exports.RichTextPropControllerMessageType = RichTextPropControllerMessageType;
|
|
124
|
-
exports.Slot = Slot;
|
|
125
|
-
exports.SlotControl = SlotControl;
|
|
126
|
-
exports.SlotControlMessageType = SlotControlMessageType;
|
|
127
|
-
exports.SlotControlType = SlotControlType;
|
|
128
|
-
exports.TableFormFieldsMessageType = TableFormFieldsMessageType;
|
|
129
|
-
exports.createPropController = createPropController;
|
|
130
|
-
//# sourceMappingURL=slot.cjs.js.map
|
package/dist/slot.cjs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"slot.cjs.js","sources":["../src/utils/constants.ts","../src/prop-controllers/instances.ts","../src/controls/slot.ts"],"sourcesContent":["export const BuilderEditMode = {\n BUILD: 'build',\n CONTENT: 'content',\n} as const\n\nexport type BuilderEditMode = typeof BuilderEditMode[keyof typeof BuilderEditMode]\n","import { Editor } from 'slate-react'\nimport { ValueJSON } from 'slate'\nimport { OnChangeParam } from 'slate-react'\nimport { Descriptor, RichTextDescriptor, TableFormFieldsDescriptor, Types } from './descriptors'\nimport { BuilderEditMode } from '../utils/constants'\nimport { BoxModel } from '../state/modules/box-models'\nimport { SlotControl, SlotControlMessage, SlotControlType } from '../controls'\n\nexport const RichTextPropControllerMessageType = {\n CHANGE_BUILDER_EDIT_MODE: 'CHANGE_BUILDER_EDIT_MODE',\n INITIALIZE_EDITOR: 'INITIALIZE_EDITOR',\n CHANGE_EDITOR_VALUE: 'CHANGE_EDITOR_VALUE',\n FOCUS: 'FOCUS',\n BLUR: 'BLUR',\n UNDO: 'UNDO',\n REDO: 'REDO',\n} as const\n\ntype ChangeBuilderEditModeRichTextPropControllerMessage = {\n type: typeof RichTextPropControllerMessageType.CHANGE_BUILDER_EDIT_MODE\n editMode: BuilderEditMode\n}\n\ntype InitializeEditorRichTextPropControllerMessage = {\n type: typeof RichTextPropControllerMessageType.INITIALIZE_EDITOR\n value: ValueJSON\n}\n\ntype ChangeEditorValueRichTextPropControllerMessage = {\n type: typeof RichTextPropControllerMessageType.CHANGE_EDITOR_VALUE\n value: ValueJSON\n}\n\ntype FocusRichTextPropControllerMessage = { type: typeof RichTextPropControllerMessageType.FOCUS }\n\ntype BlurRichTextPropControllerMessage = { type: typeof RichTextPropControllerMessageType.BLUR }\n\ntype UndoRichTextPropControllerMessage = { type: typeof RichTextPropControllerMessageType.UNDO }\n\ntype RedoRichTextPropControllerMessage = { type: typeof RichTextPropControllerMessageType.REDO }\n\nexport type RichTextPropControllerMessage =\n | ChangeBuilderEditModeRichTextPropControllerMessage\n | InitializeEditorRichTextPropControllerMessage\n | ChangeEditorValueRichTextPropControllerMessage\n | FocusRichTextPropControllerMessage\n | BlurRichTextPropControllerMessage\n | UndoRichTextPropControllerMessage\n | RedoRichTextPropControllerMessage\n\nexport type PropControllerMessage =\n | RichTextPropControllerMessage\n | TableFormFieldsMessage\n | SlotControlMessage\n\nexport type Send<T = PropControllerMessage> = (message: T) => void\n\nexport abstract class PropController<T = PropControllerMessage> {\n protected send: Send<T>\n\n constructor(send: Send<T>) {\n this.send = send\n }\n\n abstract recv(message: T): void\n}\n\nclass DefaultPropController extends PropController {\n recv(_message: PropControllerMessage): void {\n // Do nothing.\n }\n}\n\nclass RichTextPropController extends PropController<RichTextPropControllerMessage> {\n private editor: Editor | null = null\n\n recv(message: RichTextPropControllerMessage): void {\n switch (message.type) {\n case RichTextPropControllerMessageType.CHANGE_BUILDER_EDIT_MODE: {\n switch (message.editMode) {\n case BuilderEditMode.BUILD:\n this.editor?.deselect().blur()\n break\n\n case BuilderEditMode.CONTENT:\n this.editor?.focus().moveToRangeOfDocument()\n break\n }\n\n break\n }\n }\n }\n\n setSlateEditor(editor: Editor) {\n this.editor = editor\n\n this.send({\n type: RichTextPropControllerMessageType.INITIALIZE_EDITOR,\n value: editor.value.toJSON({ preserveSelection: false }),\n })\n }\n\n onChange(change: OnChangeParam) {\n this.send({\n type: RichTextPropControllerMessageType.CHANGE_EDITOR_VALUE,\n value: change.value.toJSON({ preserveSelection: true }),\n })\n }\n\n focus() {\n this.send({ type: RichTextPropControllerMessageType.FOCUS })\n }\n\n blur() {\n this.send({ type: RichTextPropControllerMessageType.BLUR })\n }\n\n undo() {\n this.send({ type: RichTextPropControllerMessageType.UNDO })\n }\n\n redo() {\n this.send({ type: RichTextPropControllerMessageType.REDO })\n }\n}\n\nexport const TableFormFieldsMessageType = {\n TABLE_FORM_LAYOUT_CHANGE: 'TABLE_FORM_LAYOUT_CHANGE',\n TABLE_FORM_FIELD_LAYOUT_CHANGE: 'TABLE_FORM_FIELD_LAYOUT_CHANGE',\n} as const\n\ntype TableLayoutTableFormFieldsMessage = {\n type: typeof TableFormFieldsMessageType.TABLE_FORM_LAYOUT_CHANGE\n payload: { layout: BoxModel }\n}\n\ntype TableFieldLayoutTableFormFieldsMessage = {\n type: typeof TableFormFieldsMessageType.TABLE_FORM_FIELD_LAYOUT_CHANGE\n payload: { layout: BoxModel; index: number }\n}\n\nexport type TableFormFieldsMessage =\n | TableLayoutTableFormFieldsMessage\n | TableFieldLayoutTableFormFieldsMessage\n\nexport class TableFormFieldsPropController extends PropController<TableFormFieldsMessage> {\n recv(): void {}\n\n tableFormLayoutChange(payload: { layout: BoxModel }) {\n this.send({ type: TableFormFieldsMessageType.TABLE_FORM_LAYOUT_CHANGE, payload })\n }\n\n tableFormFieldLayoutChange(payload: { layout: BoxModel; index: number }) {\n this.send({ type: TableFormFieldsMessageType.TABLE_FORM_FIELD_LAYOUT_CHANGE, payload })\n }\n}\n\ntype DescriptorPropController<T extends Descriptor> = T extends { type: typeof Types.RichText }\n ? RichTextPropController\n : T extends { type: typeof Types.TableFormFields }\n ? TableFormFieldsPropController\n : DefaultPropController\n\nexport type DescriptorsPropControllers<T extends Record<string, Descriptor>> = {\n [K in keyof T]: undefined extends T[K]\n ? DescriptorPropController<Exclude<T[K], undefined>>\n : DescriptorPropController<T[K]>\n}\n\ntype AnyPropController =\n | DefaultPropController\n | RichTextPropController\n | TableFormFieldsPropController\n | SlotControl\n\nexport function createPropController(\n descriptor: RichTextDescriptor,\n send: Send<RichTextPropControllerMessage>,\n): RichTextPropController\nexport function createPropController(\n descriptor: TableFormFieldsDescriptor,\n send: Send<TableFormFieldsMessage>,\n): TableFormFieldsPropController\nexport function createPropController(descriptor: Descriptor, send: Send): DefaultPropController\nexport function createPropController<T extends PropControllerMessage>(\n descriptor: Descriptor,\n send: Send<T>,\n): AnyPropController {\n switch (descriptor.type) {\n case Types.RichText:\n return new RichTextPropController(send as Send<RichTextPropControllerMessage>)\n\n case Types.TableFormFields:\n return new TableFormFieldsPropController(send as Send<TableFormFieldsMessage>)\n\n case SlotControlType:\n return new SlotControl(send as Send<SlotControlMessage>)\n\n default:\n return new DefaultPropController(send as Send)\n }\n}\n","import { PropController } from '../prop-controllers/instances'\nimport { BoxModel } from '../state/modules/box-models'\nimport { Element } from '../state/react-page'\nimport { ResponsiveValue } from './types'\n\ntype SlotControlColumnData = { count: number; spans: number[][] }\n\nexport type SlotControlData = {\n elements: Element[]\n columns: ResponsiveValue<SlotControlColumnData>\n}\n\nexport const SlotControlType = 'makeswift::controls::slot'\n\nexport type SlotControlDefinition = {\n type: typeof SlotControlType\n}\n\nexport function Slot(): SlotControlDefinition {\n return { type: SlotControlType }\n}\n\nexport const SlotControlMessageType = {\n CONTAINER_BOX_MODEL_CHANGE: 'makeswift::controls::slot::message::container-box-model-change',\n ITEM_BOX_MODEL_CHANGE: 'makeswift::controls::slot::message::item-box-model-change',\n} as const\n\ntype SlotControlContainerBoxModelChangeMessage = {\n type: typeof SlotControlMessageType.CONTAINER_BOX_MODEL_CHANGE\n payload: { boxModel: BoxModel }\n}\n\ntype SlotControlItemBoxModelChangeMessage = {\n type: typeof SlotControlMessageType.ITEM_BOX_MODEL_CHANGE\n payload: { index: number; boxModel: BoxModel }\n}\n\nexport type SlotControlMessage =\n | SlotControlContainerBoxModelChangeMessage\n | SlotControlItemBoxModelChangeMessage\n\nexport class SlotControl extends PropController<SlotControlMessage> {\n recv(): void {}\n\n changeContainerBoxModel(boxModel: BoxModel): void {\n this.send({ type: SlotControlMessageType.CONTAINER_BOX_MODEL_CHANGE, payload: { boxModel } })\n }\n\n changeItemBoxModel(index: number, boxModel: BoxModel): void {\n this.send({ type: SlotControlMessageType.ITEM_BOX_MODEL_CHANGE, payload: { index, boxModel } })\n }\n}\n"],"names":["Types"],"mappings":";;;;;;;;AAAO,MAAM,kBAAkB;AAAA,EAC7B,OAAO;AAAA,EACP,SAAS;AACX;ACKO,MAAM,oCAAoC;AAAA,EAC/C,0BAA0B;AAAA,EAC1B,mBAAmB;AAAA,EACnB,qBAAqB;AAAA,EACrB,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AAyCO,MAAe,eAA0C;AAAA,EAG9D,YAAY,MAAe;AAFjB;AAGR,SAAK,OAAO;AAAA,EACd;AAGF;AAEA,MAAM,8BAA8B,eAAe;AAAA,EACjD,KAAK,UAAuC;AAAA,EAE5C;AACF;AAEA,MAAM,+BAA+B,eAA8C;AAAA,EAAnF;AAAA;AACU,kCAAwB;AAAA;AAAA,EAEhC,KAAK,SAA8C;;AACjD,YAAQ,QAAQ;AAAA,WACT,kCAAkC,0BAA0B;AAC/D,gBAAQ,QAAQ;AAAA,eACT,gBAAgB;AACd,uBAAA,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ACF,aAAA,IAAI,8BAA8B,IAAoC;AAAA,SAE1E;AACI,aAAA,IAAI,YAAY,IAAgC;AAAA;AAGhD,aAAA,IAAI,sBAAsB,IAAY;AAAA;AAEnD;AC9LO,MAAM,kBAAkB;AAMe,gBAAA;AACrC,SAAA,EAAE,MAAM;AACjB;AAEO,MAAM,yBAAyB;AAAA,EACpC,4BAA4B;AAAA,EAC5B,uBAAuB;AACzB;AAgBO,MAAM,oBAAoB,eAAmC;AAAA,EAClE,OAAa;AAAA,EAAC;AAAA,EAEd,wBAAwB,UAA0B;AAC3C,SAAA,KAAK,EAAE,MAAM,uBAAuB,4BAA4B,SAAS,EAAE,SAAS,EAAA,CAAG;AAAA,EAC9F;AAAA,EAEA,mBAAmB,OAAe,UAA0B;AACrD,SAAA,KAAK,EAAE,MAAM,uBAAuB,uBAAuB,SAAS,EAAE,OAAO,SAAS,EAAA,CAAG;AAAA,EAChG;AACF;;;;;;;;"}
|
package/dist/slot.es.js
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => {
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
import { T as Types } from "./image.es.js";
|
|
8
|
-
const BuilderEditMode = {
|
|
9
|
-
BUILD: "build",
|
|
10
|
-
CONTENT: "content"
|
|
11
|
-
};
|
|
12
|
-
const RichTextPropControllerMessageType = {
|
|
13
|
-
CHANGE_BUILDER_EDIT_MODE: "CHANGE_BUILDER_EDIT_MODE",
|
|
14
|
-
INITIALIZE_EDITOR: "INITIALIZE_EDITOR",
|
|
15
|
-
CHANGE_EDITOR_VALUE: "CHANGE_EDITOR_VALUE",
|
|
16
|
-
FOCUS: "FOCUS",
|
|
17
|
-
BLUR: "BLUR",
|
|
18
|
-
UNDO: "UNDO",
|
|
19
|
-
REDO: "REDO"
|
|
20
|
-
};
|
|
21
|
-
class PropController {
|
|
22
|
-
constructor(send) {
|
|
23
|
-
__publicField(this, "send");
|
|
24
|
-
this.send = send;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
class DefaultPropController extends PropController {
|
|
28
|
-
recv(_message) {
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
class RichTextPropController extends PropController {
|
|
32
|
-
constructor() {
|
|
33
|
-
super(...arguments);
|
|
34
|
-
__publicField(this, "editor", null);
|
|
35
|
-
}
|
|
36
|
-
recv(message) {
|
|
37
|
-
var _a, _b;
|
|
38
|
-
switch (message.type) {
|
|
39
|
-
case RichTextPropControllerMessageType.CHANGE_BUILDER_EDIT_MODE: {
|
|
40
|
-
switch (message.editMode) {
|
|
41
|
-
case BuilderEditMode.BUILD:
|
|
42
|
-
(_a = this.editor) == null ? void 0 : _a.deselect().blur();
|
|
43
|
-
break;
|
|
44
|
-
case BuilderEditMode.CONTENT:
|
|
45
|
-
(_b = this.editor) == null ? void 0 : _b.focus().moveToRangeOfDocument();
|
|
46
|
-
break;
|
|
47
|
-
}
|
|
48
|
-
break;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
setSlateEditor(editor) {
|
|
53
|
-
this.editor = editor;
|
|
54
|
-
this.send({
|
|
55
|
-
type: RichTextPropControllerMessageType.INITIALIZE_EDITOR,
|
|
56
|
-
value: editor.value.toJSON({ preserveSelection: false })
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
onChange(change) {
|
|
60
|
-
this.send({
|
|
61
|
-
type: RichTextPropControllerMessageType.CHANGE_EDITOR_VALUE,
|
|
62
|
-
value: change.value.toJSON({ preserveSelection: true })
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
focus() {
|
|
66
|
-
this.send({ type: RichTextPropControllerMessageType.FOCUS });
|
|
67
|
-
}
|
|
68
|
-
blur() {
|
|
69
|
-
this.send({ type: RichTextPropControllerMessageType.BLUR });
|
|
70
|
-
}
|
|
71
|
-
undo() {
|
|
72
|
-
this.send({ type: RichTextPropControllerMessageType.UNDO });
|
|
73
|
-
}
|
|
74
|
-
redo() {
|
|
75
|
-
this.send({ type: RichTextPropControllerMessageType.REDO });
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
const TableFormFieldsMessageType = {
|
|
79
|
-
TABLE_FORM_LAYOUT_CHANGE: "TABLE_FORM_LAYOUT_CHANGE",
|
|
80
|
-
TABLE_FORM_FIELD_LAYOUT_CHANGE: "TABLE_FORM_FIELD_LAYOUT_CHANGE"
|
|
81
|
-
};
|
|
82
|
-
class TableFormFieldsPropController extends PropController {
|
|
83
|
-
recv() {
|
|
84
|
-
}
|
|
85
|
-
tableFormLayoutChange(payload) {
|
|
86
|
-
this.send({ type: TableFormFieldsMessageType.TABLE_FORM_LAYOUT_CHANGE, payload });
|
|
87
|
-
}
|
|
88
|
-
tableFormFieldLayoutChange(payload) {
|
|
89
|
-
this.send({ type: TableFormFieldsMessageType.TABLE_FORM_FIELD_LAYOUT_CHANGE, payload });
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
function createPropController(descriptor, send) {
|
|
93
|
-
switch (descriptor.type) {
|
|
94
|
-
case Types.RichText:
|
|
95
|
-
return new RichTextPropController(send);
|
|
96
|
-
case Types.TableFormFields:
|
|
97
|
-
return new TableFormFieldsPropController(send);
|
|
98
|
-
case SlotControlType:
|
|
99
|
-
return new SlotControl(send);
|
|
100
|
-
default:
|
|
101
|
-
return new DefaultPropController(send);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
const SlotControlType = "makeswift::controls::slot";
|
|
105
|
-
function Slot() {
|
|
106
|
-
return { type: SlotControlType };
|
|
107
|
-
}
|
|
108
|
-
const SlotControlMessageType = {
|
|
109
|
-
CONTAINER_BOX_MODEL_CHANGE: "makeswift::controls::slot::message::container-box-model-change",
|
|
110
|
-
ITEM_BOX_MODEL_CHANGE: "makeswift::controls::slot::message::item-box-model-change"
|
|
111
|
-
};
|
|
112
|
-
class SlotControl extends PropController {
|
|
113
|
-
recv() {
|
|
114
|
-
}
|
|
115
|
-
changeContainerBoxModel(boxModel) {
|
|
116
|
-
this.send({ type: SlotControlMessageType.CONTAINER_BOX_MODEL_CHANGE, payload: { boxModel } });
|
|
117
|
-
}
|
|
118
|
-
changeItemBoxModel(index, boxModel) {
|
|
119
|
-
this.send({ type: SlotControlMessageType.ITEM_BOX_MODEL_CHANGE, payload: { index, boxModel } });
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
export { RichTextPropControllerMessageType as R, SlotControlType as S, TableFormFieldsMessageType as T, Slot as a, SlotControlMessageType as b, SlotControl as c, createPropController as d };
|
|
123
|
-
//# sourceMappingURL=slot.es.js.map
|
package/dist/slot.es.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"slot.es.js","sources":["../src/utils/constants.ts","../src/prop-controllers/instances.ts","../src/controls/slot.ts"],"sourcesContent":["export const BuilderEditMode = {\n BUILD: 'build',\n CONTENT: 'content',\n} as const\n\nexport type BuilderEditMode = typeof BuilderEditMode[keyof typeof BuilderEditMode]\n","import { Editor } from 'slate-react'\nimport { ValueJSON } from 'slate'\nimport { OnChangeParam } from 'slate-react'\nimport { Descriptor, RichTextDescriptor, TableFormFieldsDescriptor, Types } from './descriptors'\nimport { BuilderEditMode } from '../utils/constants'\nimport { BoxModel } from '../state/modules/box-models'\nimport { SlotControl, SlotControlMessage, SlotControlType } from '../controls'\n\nexport const RichTextPropControllerMessageType = {\n CHANGE_BUILDER_EDIT_MODE: 'CHANGE_BUILDER_EDIT_MODE',\n INITIALIZE_EDITOR: 'INITIALIZE_EDITOR',\n CHANGE_EDITOR_VALUE: 'CHANGE_EDITOR_VALUE',\n FOCUS: 'FOCUS',\n BLUR: 'BLUR',\n UNDO: 'UNDO',\n REDO: 'REDO',\n} as const\n\ntype ChangeBuilderEditModeRichTextPropControllerMessage = {\n type: typeof RichTextPropControllerMessageType.CHANGE_BUILDER_EDIT_MODE\n editMode: BuilderEditMode\n}\n\ntype InitializeEditorRichTextPropControllerMessage = {\n type: typeof RichTextPropControllerMessageType.INITIALIZE_EDITOR\n value: ValueJSON\n}\n\ntype ChangeEditorValueRichTextPropControllerMessage = {\n type: typeof RichTextPropControllerMessageType.CHANGE_EDITOR_VALUE\n value: ValueJSON\n}\n\ntype FocusRichTextPropControllerMessage = { type: typeof RichTextPropControllerMessageType.FOCUS }\n\ntype BlurRichTextPropControllerMessage = { type: typeof RichTextPropControllerMessageType.BLUR }\n\ntype UndoRichTextPropControllerMessage = { type: typeof RichTextPropControllerMessageType.UNDO }\n\ntype RedoRichTextPropControllerMessage = { type: typeof RichTextPropControllerMessageType.REDO }\n\nexport type RichTextPropControllerMessage =\n | ChangeBuilderEditModeRichTextPropControllerMessage\n | InitializeEditorRichTextPropControllerMessage\n | ChangeEditorValueRichTextPropControllerMessage\n | FocusRichTextPropControllerMessage\n | BlurRichTextPropControllerMessage\n | UndoRichTextPropControllerMessage\n | RedoRichTextPropControllerMessage\n\nexport type PropControllerMessage =\n | RichTextPropControllerMessage\n | TableFormFieldsMessage\n | SlotControlMessage\n\nexport type Send<T = PropControllerMessage> = (message: T) => void\n\nexport abstract class PropController<T = PropControllerMessage> {\n protected send: Send<T>\n\n constructor(send: Send<T>) {\n this.send = send\n }\n\n abstract recv(message: T): void\n}\n\nclass DefaultPropController extends PropController {\n recv(_message: PropControllerMessage): void {\n // Do nothing.\n }\n}\n\nclass RichTextPropController extends PropController<RichTextPropControllerMessage> {\n private editor: Editor | null = null\n\n recv(message: RichTextPropControllerMessage): void {\n switch (message.type) {\n case RichTextPropControllerMessageType.CHANGE_BUILDER_EDIT_MODE: {\n switch (message.editMode) {\n case BuilderEditMode.BUILD:\n this.editor?.deselect().blur()\n break\n\n case BuilderEditMode.CONTENT:\n this.editor?.focus().moveToRangeOfDocument()\n break\n }\n\n break\n }\n }\n }\n\n setSlateEditor(editor: Editor) {\n this.editor = editor\n\n this.send({\n type: RichTextPropControllerMessageType.INITIALIZE_EDITOR,\n value: editor.value.toJSON({ preserveSelection: false }),\n })\n }\n\n onChange(change: OnChangeParam) {\n this.send({\n type: RichTextPropControllerMessageType.CHANGE_EDITOR_VALUE,\n value: change.value.toJSON({ preserveSelection: true }),\n })\n }\n\n focus() {\n this.send({ type: RichTextPropControllerMessageType.FOCUS })\n }\n\n blur() {\n this.send({ type: RichTextPropControllerMessageType.BLUR })\n }\n\n undo() {\n this.send({ type: RichTextPropControllerMessageType.UNDO })\n }\n\n redo() {\n this.send({ type: RichTextPropControllerMessageType.REDO })\n }\n}\n\nexport const TableFormFieldsMessageType = {\n TABLE_FORM_LAYOUT_CHANGE: 'TABLE_FORM_LAYOUT_CHANGE',\n TABLE_FORM_FIELD_LAYOUT_CHANGE: 'TABLE_FORM_FIELD_LAYOUT_CHANGE',\n} as const\n\ntype TableLayoutTableFormFieldsMessage = {\n type: typeof TableFormFieldsMessageType.TABLE_FORM_LAYOUT_CHANGE\n payload: { layout: BoxModel }\n}\n\ntype TableFieldLayoutTableFormFieldsMessage = {\n type: typeof TableFormFieldsMessageType.TABLE_FORM_FIELD_LAYOUT_CHANGE\n payload: { layout: BoxModel; index: number }\n}\n\nexport type TableFormFieldsMessage =\n | TableLayoutTableFormFieldsMessage\n | TableFieldLayoutTableFormFieldsMessage\n\nexport class TableFormFieldsPropController extends PropController<TableFormFieldsMessage> {\n recv(): void {}\n\n tableFormLayoutChange(payload: { layout: BoxModel }) {\n this.send({ type: TableFormFieldsMessageType.TABLE_FORM_LAYOUT_CHANGE, payload })\n }\n\n tableFormFieldLayoutChange(payload: { layout: BoxModel; index: number }) {\n this.send({ type: TableFormFieldsMessageType.TABLE_FORM_FIELD_LAYOUT_CHANGE, payload })\n }\n}\n\ntype DescriptorPropController<T extends Descriptor> = T extends { type: typeof Types.RichText }\n ? RichTextPropController\n : T extends { type: typeof Types.TableFormFields }\n ? TableFormFieldsPropController\n : DefaultPropController\n\nexport type DescriptorsPropControllers<T extends Record<string, Descriptor>> = {\n [K in keyof T]: undefined extends T[K]\n ? DescriptorPropController<Exclude<T[K], undefined>>\n : DescriptorPropController<T[K]>\n}\n\ntype AnyPropController =\n | DefaultPropController\n | RichTextPropController\n | TableFormFieldsPropController\n | SlotControl\n\nexport function createPropController(\n descriptor: RichTextDescriptor,\n send: Send<RichTextPropControllerMessage>,\n): RichTextPropController\nexport function createPropController(\n descriptor: TableFormFieldsDescriptor,\n send: Send<TableFormFieldsMessage>,\n): TableFormFieldsPropController\nexport function createPropController(descriptor: Descriptor, send: Send): DefaultPropController\nexport function createPropController<T extends PropControllerMessage>(\n descriptor: Descriptor,\n send: Send<T>,\n): AnyPropController {\n switch (descriptor.type) {\n case Types.RichText:\n return new RichTextPropController(send as Send<RichTextPropControllerMessage>)\n\n case Types.TableFormFields:\n return new TableFormFieldsPropController(send as Send<TableFormFieldsMessage>)\n\n case SlotControlType:\n return new SlotControl(send as Send<SlotControlMessage>)\n\n default:\n return new DefaultPropController(send as Send)\n }\n}\n","import { PropController } from '../prop-controllers/instances'\nimport { BoxModel } from '../state/modules/box-models'\nimport { Element } from '../state/react-page'\nimport { ResponsiveValue } from './types'\n\ntype SlotControlColumnData = { count: number; spans: number[][] }\n\nexport type SlotControlData = {\n elements: Element[]\n columns: ResponsiveValue<SlotControlColumnData>\n}\n\nexport const SlotControlType = 'makeswift::controls::slot'\n\nexport type SlotControlDefinition = {\n type: typeof SlotControlType\n}\n\nexport function Slot(): SlotControlDefinition {\n return { type: SlotControlType }\n}\n\nexport const SlotControlMessageType = {\n CONTAINER_BOX_MODEL_CHANGE: 'makeswift::controls::slot::message::container-box-model-change',\n ITEM_BOX_MODEL_CHANGE: 'makeswift::controls::slot::message::item-box-model-change',\n} as const\n\ntype SlotControlContainerBoxModelChangeMessage = {\n type: typeof SlotControlMessageType.CONTAINER_BOX_MODEL_CHANGE\n payload: { boxModel: BoxModel }\n}\n\ntype SlotControlItemBoxModelChangeMessage = {\n type: typeof SlotControlMessageType.ITEM_BOX_MODEL_CHANGE\n payload: { index: number; boxModel: BoxModel }\n}\n\nexport type SlotControlMessage =\n | SlotControlContainerBoxModelChangeMessage\n | SlotControlItemBoxModelChangeMessage\n\nexport class SlotControl extends PropController<SlotControlMessage> {\n recv(): void {}\n\n changeContainerBoxModel(boxModel: BoxModel): void {\n this.send({ type: SlotControlMessageType.CONTAINER_BOX_MODEL_CHANGE, payload: { boxModel } })\n }\n\n changeItemBoxModel(index: number, boxModel: BoxModel): void {\n this.send({ type: SlotControlMessageType.ITEM_BOX_MODEL_CHANGE, payload: { index, boxModel } })\n }\n}\n"],"names":[],"mappings":";;;;;;;AAAO,MAAM,kBAAkB;AAAA,EAC7B,OAAO;AAAA,EACP,SAAS;AACX;ACKO,MAAM,oCAAoC;AAAA,EAC/C,0BAA0B;AAAA,EAC1B,mBAAmB;AAAA,EACnB,qBAAqB;AAAA,EACrB,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AAyCO,MAAe,eAA0C;AAAA,EAG9D,YAAY,MAAe;AAFjB;AAGR,SAAK,OAAO;AAAA,EACd;AAGF;AAEA,MAAM,8BAA8B,eAAe;AAAA,EACjD,KAAK,UAAuC;AAAA,EAE5C;AACF;AAEA,MAAM,+BAA+B,eAA8C;AAAA,EAAnF;AAAA;AACU,kCAAwB;AAAA;AAAA,EAEhC,KAAK,SAA8C;;AACjD,YAAQ,QAAQ;AAAA,WACT,kCAAkC,0BAA0B;AAC/D,gBAAQ,QAAQ;AAAA,eACT,gBAAgB;AACd,uBAAA,WAAA,mBAAQ,WAAW;AACxB;AAAA,eAEG,gBAAgB;AACd,uBAAA,WAAA,mBAAQ,QAAQ;AACrB;AAAA;AAGJ;AAAA,MACF;AAAA;AAAA,EAEJ;AAAA,EAEA,eAAe,QAAgB;AAC7B,SAAK,SAAS;AAEd,SAA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,MAAM,yBAAyB;AAAA,EACpC,4BAA4B;AAAA,EAC5B,uBAAuB;AACzB;AAgBO,MAAM,oBAAoB,eAAmC;AAAA,EAClE,OAAa;AAAA,EAAC;AAAA,EAEd,wBAAwB,UAA0B;AAC3C,SAAA,KAAK,EAAE,MAAM,uBAAuB,4BAA4B,SAAS,EAAE,SAAS,EAAA,CAAG;AAAA,EAC9F;AAAA,EAEA,mBAAmB,OAAe,UAA0B;AACrD,SAAA,KAAK,EAAE,MAAM,uBAAuB,uBAAuB,SAAS,EAAE,OAAO,SAAS,EAAA,CAAG;AAAA,EAChG;AACF;;"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { GridValue } from '../../../prop-controllers/descriptors';
|
|
3
|
-
declare type Props = {
|
|
4
|
-
children?: GridValue;
|
|
5
|
-
};
|
|
6
|
-
export default function Box2({ children }: Props): JSX.Element;
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=Box2.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Box2.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/Box/Box2.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAA;AAGjE,aAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,EAAE,QAAQ,EAAE,EAAE,KAAK,eAoB/C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"box-placeholder.d.ts","sourceRoot":"","sources":["../../../../src/components/experimental/box-placeholder.tsx"],"names":[],"mappings":"AAOA,MAAM,CAAC,OAAO,UAAU,cAAc,gBAwBrC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { GridValue } from '../../prop-controllers/descriptors';
|
|
3
|
-
declare type Props = {
|
|
4
|
-
children?: GridValue;
|
|
5
|
-
className?: string;
|
|
6
|
-
};
|
|
7
|
-
declare const _default: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
-
export default _default;
|
|
9
|
-
//# sourceMappingURL=box.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"box.d.ts","sourceRoot":"","sources":["../../../../src/components/experimental/box.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAA;AAS9D,aAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;;AAED,wBAcE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/experimental/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,OAAO,CAAA"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
export declare type SingleLineTextTableColumn = {
|
|
2
|
-
id: string;
|
|
3
|
-
name: string;
|
|
4
|
-
__typename: 'SingleLineTextTableColumn';
|
|
5
|
-
};
|
|
6
|
-
export declare type LongTextTableColumn = {
|
|
7
|
-
id: string;
|
|
8
|
-
name: string;
|
|
9
|
-
__typename: 'LongTextTableColumn';
|
|
10
|
-
};
|
|
11
|
-
export declare type CheckboxTableColumn = {
|
|
12
|
-
id: string;
|
|
13
|
-
name: string;
|
|
14
|
-
__typename: 'CheckboxTableColumn';
|
|
15
|
-
};
|
|
16
|
-
export declare type MultipleSelectTableColumnOption = {
|
|
17
|
-
id: string;
|
|
18
|
-
name: string;
|
|
19
|
-
};
|
|
20
|
-
export declare type MultipleSelectTableColumn = {
|
|
21
|
-
id: string;
|
|
22
|
-
name: string;
|
|
23
|
-
options: Array<MultipleSelectTableColumnOption>;
|
|
24
|
-
__typename: 'MultipleSelectTableColumn';
|
|
25
|
-
};
|
|
26
|
-
export declare type SingleSelectTableColumnOption = {
|
|
27
|
-
id: string;
|
|
28
|
-
name: string;
|
|
29
|
-
};
|
|
30
|
-
export declare type SingleSelectTableColumn = {
|
|
31
|
-
id: string;
|
|
32
|
-
name: string;
|
|
33
|
-
options: Array<SingleSelectTableColumnOption>;
|
|
34
|
-
__typename: 'SingleSelectTableColumn';
|
|
35
|
-
};
|
|
36
|
-
export declare type PhoneNumberTableColumn = {
|
|
37
|
-
id: string;
|
|
38
|
-
name: string;
|
|
39
|
-
__typename: 'PhoneNumberTableColumn';
|
|
40
|
-
};
|
|
41
|
-
export declare type EmailTableColumn = {
|
|
42
|
-
id: string;
|
|
43
|
-
name: string;
|
|
44
|
-
__typename: 'EmailTableColumn';
|
|
45
|
-
};
|
|
46
|
-
export declare type URLTableColumn = {
|
|
47
|
-
id: string;
|
|
48
|
-
name: string;
|
|
49
|
-
__typename: 'URLTableColumn';
|
|
50
|
-
};
|
|
51
|
-
export declare type NumberTableColumn = {
|
|
52
|
-
id: string;
|
|
53
|
-
name: string;
|
|
54
|
-
__typename: 'NumberTableColumn';
|
|
55
|
-
};
|
|
56
|
-
export declare type TableColumn = SingleLineTextTableColumn | LongTextTableColumn | CheckboxTableColumn | MultipleSelectTableColumn | SingleSelectTableColumn | PhoneNumberTableColumn | EmailTableColumn | URLTableColumn | NumberTableColumn;
|
|
57
|
-
declare type Table = {
|
|
58
|
-
id: string;
|
|
59
|
-
name: string;
|
|
60
|
-
columns: Array<TableColumn>;
|
|
61
|
-
};
|
|
62
|
-
export declare function useTable(tableId: string | null | undefined): import("@apollo/client").QueryResult<{
|
|
63
|
-
table: Table | null;
|
|
64
|
-
}, import("@apollo/client").OperationVariables>;
|
|
65
|
-
export {};
|
|
66
|
-
//# sourceMappingURL=useTable.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useTable.d.ts","sourceRoot":"","sources":["../../../../src/components/hooks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AA;AAED,oBAAY,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,gBAAgB,CAAA;CAC7B,CAAA;AAED,oBAAY,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,mBAAmB,CAAA;CAChC,CAAA;AAED,oBAAY,WAAW,GACnB,yBAAyB,GACzB,mBAAmB,GACnB,mBAAmB,GACnB,yBAAyB,GACzB,uBAAuB,GACvB,sBAAsB,GACtB,gBAAgB,GAChB,cAAc,GACd,iBAAiB,CAAA;AAErB,aAAK,KAAK,GAAG;IACX,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,KAAK,CAAC,WAAW,CAAC,CAAA;CAC5B,CAAA;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS;WAChC,KAAK,GAAG,IAAI;gDAItC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef, ElementType } from 'react';
|
|
2
|
-
import { ResponsiveValue, Length as LengthValue } from '../../prop-controllers';
|
|
3
|
-
declare type BaseProps<T extends ElementType> = {
|
|
4
|
-
as?: T;
|
|
5
|
-
className?: string;
|
|
6
|
-
grid: ResponsiveValue<{
|
|
7
|
-
spans: Array<Array<number>>;
|
|
8
|
-
count: number;
|
|
9
|
-
}>;
|
|
10
|
-
index: number;
|
|
11
|
-
columnGap?: ResponsiveValue<LengthValue>;
|
|
12
|
-
rowGap?: ResponsiveValue<LengthValue>;
|
|
13
|
-
};
|
|
14
|
-
declare type Props<T extends ElementType> = BaseProps<T> & Omit<ComponentPropsWithoutRef<T>, keyof BaseProps<T>>;
|
|
15
|
-
export declare function GridItem<T extends ElementType = 'div'>({ as, grid, index, columnGap, rowGap, className, ...restOfProps }: Props<T>): JSX.Element;
|
|
16
|
-
export {};
|
|
17
|
-
//# sourceMappingURL=grid-item.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"grid-item.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/grid-item.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAI/E,aAAK,SAAS,CAAC,CAAC,SAAS,WAAW,IAAI;IACtC,EAAE,CAAC,EAAE,CAAC,CAAA;IACN,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,eAAe,CAAC;QAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACrE,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC,CAAA;IACxC,MAAM,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC,CAAA;CACtC,CAAA;AAED,aAAK,KAAK,CAAC,CAAC,SAAS,WAAW,IAAI,SAAS,CAAC,CAAC,CAAC,GAC9C,IAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,MAAM,SAAS,CAAC,CAAC,CAAC,CAAC,CAAA;AAEvD,wBAAgB,QAAQ,CAAC,CAAC,SAAS,WAAW,GAAG,KAAK,EAAE,EACtD,EAAE,EACF,IAAI,EACJ,KAAK,EACL,SAAS,EACT,MAAM,EACN,SAAS,EACT,GAAG,WAAW,EACf,EAAE,KAAK,CAAC,CAAC,CAAC,eAKV"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { PropController } from '../prop-controllers/instances';
|
|
2
|
-
import { BoxModel } from '../state/modules/box-models';
|
|
3
|
-
import { Element } from '../state/react-page';
|
|
4
|
-
import { ResponsiveValue } from './types';
|
|
5
|
-
declare type SlotControlColumnData = {
|
|
6
|
-
count: number;
|
|
7
|
-
spans: number[][];
|
|
8
|
-
};
|
|
9
|
-
export declare type SlotControlData = {
|
|
10
|
-
elements: Element[];
|
|
11
|
-
columns: ResponsiveValue<SlotControlColumnData>;
|
|
12
|
-
};
|
|
13
|
-
export declare const SlotControlType = "makeswift::controls::slot";
|
|
14
|
-
export declare type SlotControlDefinition = {
|
|
15
|
-
type: typeof SlotControlType;
|
|
16
|
-
};
|
|
17
|
-
export declare function Slot(): SlotControlDefinition;
|
|
18
|
-
export declare const SlotControlMessageType: {
|
|
19
|
-
readonly CONTAINER_BOX_MODEL_CHANGE: "makeswift::controls::slot::message::container-box-model-change";
|
|
20
|
-
readonly ITEM_BOX_MODEL_CHANGE: "makeswift::controls::slot::message::item-box-model-change";
|
|
21
|
-
};
|
|
22
|
-
declare type SlotControlContainerBoxModelChangeMessage = {
|
|
23
|
-
type: typeof SlotControlMessageType.CONTAINER_BOX_MODEL_CHANGE;
|
|
24
|
-
payload: {
|
|
25
|
-
boxModel: BoxModel;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
declare type SlotControlItemBoxModelChangeMessage = {
|
|
29
|
-
type: typeof SlotControlMessageType.ITEM_BOX_MODEL_CHANGE;
|
|
30
|
-
payload: {
|
|
31
|
-
index: number;
|
|
32
|
-
boxModel: BoxModel;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
export declare type SlotControlMessage = SlotControlContainerBoxModelChangeMessage | SlotControlItemBoxModelChangeMessage;
|
|
36
|
-
export declare class SlotControl extends PropController<SlotControlMessage> {
|
|
37
|
-
recv(): void;
|
|
38
|
-
changeContainerBoxModel(boxModel: BoxModel): void;
|
|
39
|
-
changeItemBoxModel(index: number, boxModel: BoxModel): void;
|
|
40
|
-
}
|
|
41
|
-
export {};
|
|
42
|
-
//# sourceMappingURL=slot.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":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;IAIjD,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI;CAG5D"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { CSSObject } from '@emotion/css';
|
|
2
|
-
import { BorderTopLeftRadiusProperty, BorderTopRightRadiusProperty, BorderBottomRightRadiusProperty, BorderBottomLeftRadiusProperty } from 'csstype';
|
|
3
|
-
import { LengthPercentageData } from './length-percentage';
|
|
4
|
-
/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius#constituent_properties */
|
|
5
|
-
export declare type BorderRadiusLonghandPropertyData = LengthPercentageData;
|
|
6
|
-
/**
|
|
7
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius
|
|
8
|
-
*
|
|
9
|
-
* @todos
|
|
10
|
-
* - Remove `null` from possible values of longhand properties
|
|
11
|
-
* - Remove `undefined` from possible values and make fields optional
|
|
12
|
-
*/
|
|
13
|
-
export declare type BorderRadiusPropertyData = {
|
|
14
|
-
borderTopLeftRadius?: LengthPercentageData | BorderTopLeftRadiusProperty<string | number> | null | undefined;
|
|
15
|
-
borderTopRightRadius?: LengthPercentageData | BorderTopRightRadiusProperty<string | number> | null | undefined;
|
|
16
|
-
borderBottomRightRadius?: LengthPercentageData | BorderBottomRightRadiusProperty<string | number> | null | undefined;
|
|
17
|
-
borderBottomLeftRadius?: LengthPercentageData | BorderBottomLeftRadiusProperty<string | number> | null | undefined;
|
|
18
|
-
};
|
|
19
|
-
export declare function borderRadiusPropertyDataToStyle(data: BorderRadiusPropertyData, defaultValue?: BorderRadiusPropertyData): CSSObject;
|
|
20
|
-
//# sourceMappingURL=border-radius.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"border-radius.d.ts","sourceRoot":"","sources":["../../../src/css/border-radius.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,+BAA+B,EAC/B,8BAA8B,EAC/B,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,oBAAoB,EAAgC,MAAM,qBAAqB,CAAA;AAExF,iGAAiG;AACjG,oBAAY,gCAAgC,GAAG,oBAAoB,CAAA;AAEnE;;;;;;GAMG;AACH,oBAAY,wBAAwB,GAAG;IACrC,mBAAmB,CAAC,EAChB,oBAAoB,GACpB,2BAA2B,CAAC,MAAM,GAAG,MAAM,CAAC,GAC5C,IAAI,GACJ,SAAS,CAAA;IACb,oBAAoB,CAAC,EACjB,oBAAoB,GACpB,4BAA4B,CAAC,MAAM,GAAG,MAAM,CAAC,GAC7C,IAAI,GACJ,SAAS,CAAA;IACb,uBAAuB,CAAC,EACpB,oBAAoB,GACpB,+BAA+B,CAAC,MAAM,GAAG,MAAM,CAAC,GAChD,IAAI,GACJ,SAAS,CAAA;IACb,sBAAsB,CAAC,EACnB,oBAAoB,GACpB,8BAA8B,CAAC,MAAM,GAAG,MAAM,CAAC,GAC/C,IAAI,GACJ,SAAS,CAAA;CACd,CAAA;AAED,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,wBAAwB,EAC9B,YAAY,GAAE,wBAA6B,GAC1C,SAAS,CAyBX"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { CSSObject } from '@emotion/css';
|
|
2
|
-
import { BorderBottomProperty, BorderLeftProperty, BorderRightProperty, BorderStyleProperty, BorderTopProperty } from 'csstype';
|
|
3
|
-
import { ColorValue } from '../components/utils/types';
|
|
4
|
-
/**
|
|
5
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-top#constituent_properties
|
|
6
|
-
*
|
|
7
|
-
* @todos
|
|
8
|
-
* - Change `width` to be a `Length`
|
|
9
|
-
* - Remove `null` from possible values
|
|
10
|
-
* - Remove `undefined` from possible values and make fields optional
|
|
11
|
-
*/
|
|
12
|
-
export declare type BorderSideShorthandPropertyData = {
|
|
13
|
-
width: number | null | undefined;
|
|
14
|
-
style: BorderStyleProperty;
|
|
15
|
-
color?: ColorValue | null;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/border
|
|
19
|
-
*
|
|
20
|
-
* @todos
|
|
21
|
-
* - Remove `null` from possible values
|
|
22
|
-
* - Remove `undefined` from possible values and make fields optional
|
|
23
|
-
*/
|
|
24
|
-
export declare type BorderPropertyData = {
|
|
25
|
-
borderTop?: BorderSideShorthandPropertyData | BorderTopProperty<string | number> | null | undefined;
|
|
26
|
-
borderRight?: BorderSideShorthandPropertyData | BorderRightProperty<string | number> | null | undefined;
|
|
27
|
-
borderBottom?: BorderSideShorthandPropertyData | BorderBottomProperty<string | number> | null | undefined;
|
|
28
|
-
borderLeft?: BorderSideShorthandPropertyData | BorderLeftProperty<string | number> | null | undefined;
|
|
29
|
-
};
|
|
30
|
-
export declare function borderPropertyDataToStyle(data: BorderPropertyData, defaultValue?: BorderPropertyData): CSSObject;
|
|
31
|
-
//# sourceMappingURL=border.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"border.d.ts","sourceRoot":"","sources":["../../../src/css/border.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAElB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,SAAS,CAAA;AAEhB,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAEtD;;;;;;;GAOG;AACH,oBAAY,+BAA+B,GAAG;IAC5C,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IAChC,KAAK,EAAE,mBAAmB,CAAA;IAC1B,KAAK,CAAC,EAAE,UAAU,GAAG,IAAI,CAAA;CAC1B,CAAA;AAED;;;;;;GAMG;AACH,oBAAY,kBAAkB,GAAG;IAC/B,SAAS,CAAC,EACN,+BAA+B,GAC/B,iBAAiB,CAAC,MAAM,GAAG,MAAM,CAAC,GAClC,IAAI,GACJ,SAAS,CAAA;IACb,WAAW,CAAC,EACR,+BAA+B,GAC/B,mBAAmB,CAAC,MAAM,GAAG,MAAM,CAAC,GACpC,IAAI,GACJ,SAAS,CAAA;IACb,YAAY,CAAC,EACT,+BAA+B,GAC/B,oBAAoB,CAAC,MAAM,GAAG,MAAM,CAAC,GACrC,IAAI,GACJ,SAAS,CAAA;IACb,UAAU,CAAC,EACP,+BAA+B,GAC/B,kBAAkB,CAAC,MAAM,GAAG,MAAM,CAAC,GACnC,IAAI,GACJ,SAAS,CAAA;CACd,CAAA;AAED,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,kBAAkB,EACxB,YAAY,GAAE,kBAAuB,GACpC,SAAS,CAaX"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { BoxShadowProperty } from 'csstype';
|
|
2
|
-
import { ColorData } from '../controls/types';
|
|
3
|
-
/**
|
|
4
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow
|
|
5
|
-
*/
|
|
6
|
-
declare type Shadow = {
|
|
7
|
-
color?: ColorData | null;
|
|
8
|
-
blurRadius?: number;
|
|
9
|
-
spreadRadius?: number;
|
|
10
|
-
offsetX?: number;
|
|
11
|
-
offsetY?: number;
|
|
12
|
-
inset?: boolean;
|
|
13
|
-
};
|
|
14
|
-
export declare type BoxShadowPropertyData = {
|
|
15
|
-
id: string;
|
|
16
|
-
payload: Shadow;
|
|
17
|
-
}[] | BoxShadowProperty;
|
|
18
|
-
export {};
|
|
19
|
-
//# sourceMappingURL=box-shadow.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"box-shadow.d.ts","sourceRoot":"","sources":["../../../src/css/box-shadow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAC7C;;GAEG;AACH,aAAK,MAAM,GAAG;IACZ,KAAK,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;IACxB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,oBAAY,qBAAqB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,iBAAiB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../src/css/color.ts"],"names":[],"mappings":"AAAA,oBAAY,SAAS,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { LengthData } from './length';
|
|
2
|
-
/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/percentage */
|
|
3
|
-
export declare type PercentageData = {
|
|
4
|
-
value: number;
|
|
5
|
-
unit: '%';
|
|
6
|
-
};
|
|
7
|
-
/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/length-percentage */
|
|
8
|
-
export declare type LengthPercentageData = LengthData | PercentageData | number | string;
|
|
9
|
-
export declare function lengthPercentageDataToString(data: LengthPercentageData): string;
|
|
10
|
-
//# sourceMappingURL=length-percentage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"length-percentage.d.ts","sourceRoot":"","sources":["../../../src/css/length-percentage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAE1C,uEAAuE;AACvE,oBAAY,cAAc,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,GAAG,CAAA;CAAE,CAAA;AAEzD,8EAA8E;AAC9E,oBAAY,oBAAoB,GAAG,UAAU,GAAG,cAAc,GAAG,MAAM,GAAG,MAAM,CAAA;AAEhF,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,oBAAoB,GAAG,MAAM,CAM/E"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/length
|
|
3
|
-
*
|
|
4
|
-
* @todos
|
|
5
|
-
* - Add additional units
|
|
6
|
-
* - Rename `value` field to `amount` or a more descriptive name representative of the "distance"
|
|
7
|
-
* represented by a CSS length
|
|
8
|
-
*/
|
|
9
|
-
export declare type LengthData = {
|
|
10
|
-
value: number;
|
|
11
|
-
unit: 'px';
|
|
12
|
-
} | string | number;
|
|
13
|
-
export declare function lengthDataToString(data: LengthData): string;
|
|
14
|
-
//# sourceMappingURL=length.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"length.d.ts","sourceRoot":"","sources":["../../../src/css/length.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,oBAAY,UAAU,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,GAAG,MAAM,GAAG,MAAM,CAAA;AAExE,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAM3D"}
|