@inditextech/weave-sdk 0.27.3 → 0.27.4
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 +18 -249
- package/dist/sdk.cjs +10 -79
- package/dist/sdk.d.cts +36 -61
- package/dist/sdk.d.cts.map +1 -1
- package/dist/sdk.d.ts +36 -61
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +11 -76
- package/dist/sdk.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,279 +4,48 @@ SPDX-FileCopyrightText: 2025 2025 INDUSTRIA DE DISEÑO TEXTIL S.A. (INDITEX S.A.
|
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
-->
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
[](https://github.com/prettier/prettier)
|
|
7
|
+
# Weave.js / SDK
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
This package generates the `@inditextech/weave-sdk` package, the Weave SDK, designed power-lift all the necessary stuff to build collaborative applications using real-time data synchronization powered by [Yjs](https://github.com/yjs/yjs/tree/master), relying on [CRDTs](https://github.com/yjs/yjs/blob/master/README.md#Yjs-CRDT-Algorithm) (Conflict-Free Replicated Data Types).
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
## Setup
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
This project requires NodeJS (version 8 or later) and NPM.
|
|
17
|
-
[Node](http://nodejs.org/) and [NPM](https://npmjs.org/) are really easy to install.
|
|
18
|
-
To make sure you have them available on your machine,
|
|
19
|
-
try running the following command.
|
|
20
|
-
|
|
21
|
-
```sh
|
|
22
|
-
$ npm -v && node -v
|
|
23
|
-
6.4.1
|
|
24
|
-
v8.16.0
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Table of contents
|
|
28
|
-
|
|
29
|
-
- [Project Name](#project-name)
|
|
30
|
-
- [Prerequisites](#prerequisites)
|
|
31
|
-
- [Table of contents](#table-of-contents)
|
|
32
|
-
- [Getting Started](#getting-started)
|
|
33
|
-
- [Installation](#installation)
|
|
34
|
-
- [Usage](#usage)
|
|
35
|
-
- [Serving the app](#serving-the-app)
|
|
36
|
-
- [Running the tests](#running-the-tests)
|
|
37
|
-
- [Building a distribution version](#building-a-distribution-version)
|
|
38
|
-
- [Serving the distribution version](#serving-the-distribution-version)
|
|
39
|
-
- [API](#api)
|
|
40
|
-
- [useBasicFetch](#usebasicfetch)
|
|
41
|
-
- [Options](#options)
|
|
42
|
-
- [fetchData](#fetchdata)
|
|
43
|
-
- [Contributing](#contributing)
|
|
44
|
-
- [Credits](#credits)
|
|
45
|
-
- [Built With](#built-with)
|
|
46
|
-
- [Versioning](#versioning)
|
|
47
|
-
- [Authors](#authors)
|
|
48
|
-
- [License](#license)
|
|
49
|
-
|
|
50
|
-
## Getting Started
|
|
51
|
-
|
|
52
|
-
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
|
|
53
|
-
|
|
54
|
-
## Installation
|
|
55
|
-
|
|
56
|
-
**BEFORE YOU INSTALL:** please read the [prerequisites](#prerequisites)
|
|
57
|
-
|
|
58
|
-
Start with cloning this repo on your local machine:
|
|
59
|
-
|
|
60
|
-
```sh
|
|
61
|
-
$ git clone https://github.com/ORG/PROJECT.git
|
|
62
|
-
$ cd PROJECT
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
To install and set up the library, run:
|
|
66
|
-
|
|
67
|
-
```sh
|
|
68
|
-
$ npm install -S myLib
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
Or if you prefer using Yarn:
|
|
13
|
+
This is a monorepo, to install this package dependencies, just setup the monorepo, this can be done by locating on the `/code` project and execute the following command.
|
|
72
14
|
|
|
73
15
|
```sh
|
|
74
|
-
$
|
|
16
|
+
$ npm install
|
|
75
17
|
```
|
|
76
18
|
|
|
77
19
|
## Usage
|
|
78
20
|
|
|
79
|
-
|
|
21
|
+
This is a monorepo, this commands need to be from the `/code` folder of the repo.
|
|
80
22
|
|
|
81
|
-
|
|
82
|
-
$ npm start
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
### Running the tests
|
|
23
|
+
### Build the package
|
|
86
24
|
|
|
87
25
|
```sh
|
|
88
|
-
$ npm
|
|
26
|
+
$ npm run build --workspace=@inditextech/weave-sdk
|
|
89
27
|
```
|
|
90
28
|
|
|
91
|
-
###
|
|
29
|
+
### Link the package
|
|
92
30
|
|
|
93
31
|
```sh
|
|
94
|
-
$ npm run
|
|
32
|
+
$ npm run link --workspace=@inditextech/weave-sdk
|
|
95
33
|
```
|
|
96
34
|
|
|
97
|
-
|
|
98
|
-
inside your local `dist/` folder
|
|
99
|
-
|
|
100
|
-
### Serving the distribution version
|
|
35
|
+
### Lint the package
|
|
101
36
|
|
|
102
37
|
```sh
|
|
103
|
-
$ npm run
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
This will use `lite-server` for servign your already
|
|
107
|
-
generated distribution version of the project.
|
|
108
|
-
|
|
109
|
-
_Note_ this requires
|
|
110
|
-
[Building a distribution version](#building-a-distribution-version) first.
|
|
111
|
-
|
|
112
|
-
## API
|
|
113
|
-
|
|
114
|
-
### useBasicFetch
|
|
115
|
-
|
|
116
|
-
```js
|
|
117
|
-
useBasicFetch(((url: string) = ''), ((delay: number) = 0));
|
|
38
|
+
$ npm run lint --workspace=@inditextech/weave-sdk
|
|
118
39
|
```
|
|
119
40
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
#### Options
|
|
123
|
-
|
|
124
|
-
`url`
|
|
125
|
-
|
|
126
|
-
| Type | Default value |
|
|
127
|
-
| ------ | ------------- |
|
|
128
|
-
| string | '' |
|
|
129
|
-
|
|
130
|
-
If present, the request will be performed as soon as the component is mounted
|
|
131
|
-
|
|
132
|
-
Example:
|
|
133
|
-
|
|
134
|
-
```tsx
|
|
135
|
-
const MyComponent: React.FC = () => {
|
|
136
|
-
const { data, error, loading } = useBasicFetch(
|
|
137
|
-
'https://api.icndb.com/jokes/random'
|
|
138
|
-
);
|
|
139
|
-
|
|
140
|
-
if (error) {
|
|
141
|
-
return <p>Error</p>;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
if (loading) {
|
|
145
|
-
return <p>Loading...</p>;
|
|
146
|
-
}
|
|
41
|
+
### Test the package
|
|
147
42
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
<h2>Chuck Norris Joke of the day</h2>
|
|
151
|
-
{data && data.value && <p>{data.value.joke}</p>}
|
|
152
|
-
</div>
|
|
153
|
-
);
|
|
154
|
-
};
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
`delay`
|
|
158
|
-
|
|
159
|
-
| Type | Default value | Description |
|
|
160
|
-
| ------ | ------------- | -------------------- |
|
|
161
|
-
| number | 0 | Time in milliseconds |
|
|
162
|
-
|
|
163
|
-
If present, the request will be delayed by the given amount of time
|
|
164
|
-
|
|
165
|
-
Example:
|
|
166
|
-
|
|
167
|
-
```tsx
|
|
168
|
-
type Joke = {
|
|
169
|
-
value: {
|
|
170
|
-
id: number;
|
|
171
|
-
joke: string;
|
|
172
|
-
};
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
const MyComponent: React.FC = () => {
|
|
176
|
-
const { data, error, loading } = useBasicFetch<Joke>(
|
|
177
|
-
'https://api.icndb.com/jokes/random',
|
|
178
|
-
2000
|
|
179
|
-
);
|
|
180
|
-
|
|
181
|
-
if (error) {
|
|
182
|
-
return <p>Error</p>;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
if (loading) {
|
|
186
|
-
return <p>Loading...</p>;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
return (
|
|
190
|
-
<div className="App">
|
|
191
|
-
<h2>Chuck Norris Joke of the day</h2>
|
|
192
|
-
{data && data.value && <p>{data.value.joke}</p>}
|
|
193
|
-
</div>
|
|
194
|
-
);
|
|
195
|
-
};
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
### fetchData
|
|
199
|
-
|
|
200
|
-
```js
|
|
201
|
-
fetchData(url: string)
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
Perform an asynchronous http request against a given url
|
|
205
|
-
|
|
206
|
-
```tsx
|
|
207
|
-
type Joke = {
|
|
208
|
-
value: {
|
|
209
|
-
id: number;
|
|
210
|
-
joke: string;
|
|
211
|
-
};
|
|
212
|
-
};
|
|
213
|
-
|
|
214
|
-
const ChuckNorrisJokes: React.FC = () => {
|
|
215
|
-
const { data, fetchData, error, loading } = useBasicFetch<Joke>();
|
|
216
|
-
const [jokeId, setJokeId] = useState(1);
|
|
217
|
-
|
|
218
|
-
useEffect(() => {
|
|
219
|
-
fetchData(`https://api.icndb.com/jokes/${jokeId}`);
|
|
220
|
-
}, [jokeId, fetchData]);
|
|
221
|
-
|
|
222
|
-
const handleNext = () => setJokeId(jokeId + 1);
|
|
223
|
-
|
|
224
|
-
if (error) {
|
|
225
|
-
return <p>Error</p>;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
const jokeData = data && data.value;
|
|
229
|
-
|
|
230
|
-
return (
|
|
231
|
-
<div className="Comments">
|
|
232
|
-
{loading && <p>Loading...</p>}
|
|
233
|
-
{!loading && jokeData && (
|
|
234
|
-
<div>
|
|
235
|
-
<p>Joke ID: {jokeData.id}</p>
|
|
236
|
-
<p>{jokeData.joke}</p>
|
|
237
|
-
</div>
|
|
238
|
-
)}
|
|
239
|
-
{!loading && jokeData && !jokeData.joke && <p>{jokeData}</p>}
|
|
240
|
-
<button disabled={loading} onClick={handleNext}>
|
|
241
|
-
Next Joke
|
|
242
|
-
</button>
|
|
243
|
-
</div>
|
|
244
|
-
);
|
|
245
|
-
};
|
|
43
|
+
```sh
|
|
44
|
+
$ npm run test --workspace=@inditextech/weave-sdk
|
|
246
45
|
```
|
|
247
46
|
|
|
248
|
-
## Contributing
|
|
249
|
-
|
|
250
|
-
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
|
|
251
|
-
|
|
252
|
-
1. Fork it!
|
|
253
|
-
2. Create your feature branch: `git checkout -b my-new-feature`
|
|
254
|
-
3. Add your changes: `git add .`
|
|
255
|
-
4. Commit your changes: `git commit -am 'Add some feature'`
|
|
256
|
-
5. Push to the branch: `git push origin my-new-feature`
|
|
257
|
-
6. Submit a pull request :sunglasses:
|
|
258
|
-
|
|
259
|
-
## Credits
|
|
260
|
-
|
|
261
|
-
TODO: Write credits
|
|
262
|
-
|
|
263
|
-
## Built With
|
|
264
|
-
|
|
265
|
-
- Dropwizard - Bla bla bla
|
|
266
|
-
- Maven - Maybe
|
|
267
|
-
- Atom - ergaerga
|
|
268
|
-
- Love
|
|
269
|
-
|
|
270
|
-
## Versioning
|
|
271
|
-
|
|
272
|
-
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/your/project/tags).
|
|
273
|
-
|
|
274
|
-
## Authors
|
|
275
|
-
|
|
276
|
-
- **John Doe** - _Initial work_ - [JohnDoe](https://github.com/JohnDoe)
|
|
277
|
-
|
|
278
|
-
See also the list of [contributors](https://github.com/your/project/contributors) who participated in this project.
|
|
279
|
-
|
|
280
47
|
## License
|
|
281
48
|
|
|
282
|
-
[
|
|
49
|
+
This project is licensed under the terms of the [Apache-2.0](LICENSE) license.
|
|
50
|
+
|
|
51
|
+
© 2025 INDUSTRIA DE DISEÑO TEXTIL S.A. (INDITEX S.A.)
|
package/dist/sdk.cjs
CHANGED
|
@@ -18139,7 +18139,7 @@ var WeaveRegisterManager = class {
|
|
|
18139
18139
|
|
|
18140
18140
|
//#endregion
|
|
18141
18141
|
//#region package.json
|
|
18142
|
-
var version = "0.27.
|
|
18142
|
+
var version = "0.27.4";
|
|
18143
18143
|
|
|
18144
18144
|
//#endregion
|
|
18145
18145
|
//#region src/managers/setup.ts
|
|
@@ -19643,8 +19643,9 @@ var WeaveImageToolAction = class extends WeaveAction {
|
|
|
19643
19643
|
this.imageId = v4_default();
|
|
19644
19644
|
this.imageURL = imageURL;
|
|
19645
19645
|
this.preloadImgs[this.imageId] = new Image();
|
|
19646
|
-
this.preloadImgs[this.imageId].onerror = (
|
|
19647
|
-
|
|
19646
|
+
this.preloadImgs[this.imageId].onerror = () => {
|
|
19647
|
+
this.instance.emitEvent("onImageLoadEnd", new Error("Error loading image"));
|
|
19648
|
+
this.cancelAction();
|
|
19648
19649
|
};
|
|
19649
19650
|
this.preloadImgs[this.imageId].onload = () => {
|
|
19650
19651
|
this.instance.emitEvent("onImageLoadEnd", void 0);
|
|
@@ -19656,10 +19657,6 @@ var WeaveImageToolAction = class extends WeaveAction {
|
|
|
19656
19657
|
};
|
|
19657
19658
|
this.addImageNode(position);
|
|
19658
19659
|
};
|
|
19659
|
-
this.preloadImgs[this.imageId].onerror = () => {
|
|
19660
|
-
this.instance.emitEvent("onImageLoadEnd", new Error("Error loading image"));
|
|
19661
|
-
this.cancelAction();
|
|
19662
|
-
};
|
|
19663
19660
|
this.preloadImgs[this.imageId].src = imageURL;
|
|
19664
19661
|
this.instance.emitEvent("onImageLoadStart");
|
|
19665
19662
|
}
|
|
@@ -20625,64 +20622,6 @@ var WeaveRegularPolygonNode = class extends WeaveNode {
|
|
|
20625
20622
|
//#endregion
|
|
20626
20623
|
//#region src/nodes/frame/constants.ts
|
|
20627
20624
|
const WEAVE_FRAME_NODE_TYPE = "frame";
|
|
20628
|
-
const WEAVE_FRAME_NODE_SIZES_MULTIPLIER = 5;
|
|
20629
|
-
const WEAVE_FRAME_NODE_SIZES_ORIENTATION = {
|
|
20630
|
-
landscape: "landscape",
|
|
20631
|
-
portrait: "portrait"
|
|
20632
|
-
};
|
|
20633
|
-
const WEAVE_FRAME_NODE_SIZES_TYPES = {
|
|
20634
|
-
A1: "A1",
|
|
20635
|
-
A2: "A2",
|
|
20636
|
-
A3: "A3",
|
|
20637
|
-
A4: "A4",
|
|
20638
|
-
CUSTOM: "custom"
|
|
20639
|
-
};
|
|
20640
|
-
const WEAVE_FRAME_NODE_SIZES = {
|
|
20641
|
-
landscape: {
|
|
20642
|
-
A1: {
|
|
20643
|
-
width: 841,
|
|
20644
|
-
height: 594
|
|
20645
|
-
},
|
|
20646
|
-
A2: {
|
|
20647
|
-
width: 592,
|
|
20648
|
-
height: 420
|
|
20649
|
-
},
|
|
20650
|
-
A3: {
|
|
20651
|
-
width: 420,
|
|
20652
|
-
height: 297
|
|
20653
|
-
},
|
|
20654
|
-
A4: {
|
|
20655
|
-
width: 297,
|
|
20656
|
-
height: 210
|
|
20657
|
-
},
|
|
20658
|
-
custom: {
|
|
20659
|
-
width: 0,
|
|
20660
|
-
height: 0
|
|
20661
|
-
}
|
|
20662
|
-
},
|
|
20663
|
-
portrait: {
|
|
20664
|
-
A1: {
|
|
20665
|
-
width: 594,
|
|
20666
|
-
height: 841
|
|
20667
|
-
},
|
|
20668
|
-
A2: {
|
|
20669
|
-
width: 420,
|
|
20670
|
-
height: 594
|
|
20671
|
-
},
|
|
20672
|
-
A3: {
|
|
20673
|
-
width: 297,
|
|
20674
|
-
height: 420
|
|
20675
|
-
},
|
|
20676
|
-
A4: {
|
|
20677
|
-
width: 210,
|
|
20678
|
-
height: 297
|
|
20679
|
-
},
|
|
20680
|
-
custom: {
|
|
20681
|
-
width: 0,
|
|
20682
|
-
height: 0
|
|
20683
|
-
}
|
|
20684
|
-
}
|
|
20685
|
-
};
|
|
20686
20625
|
const WEAVE_FRAME_NODE_DEFAULT_CONFIG = {
|
|
20687
20626
|
fontFamily: "Arial",
|
|
20688
20627
|
fontStyle: "bold",
|
|
@@ -20709,10 +20648,8 @@ const WEAVE_FRAME_NODE_DEFAULT_CONFIG = {
|
|
|
20709
20648
|
};
|
|
20710
20649
|
const WEAVE_FRAME_NODE_DEFAULT_PROPS = {
|
|
20711
20650
|
title: "Frame XXX",
|
|
20712
|
-
frameWidth:
|
|
20713
|
-
frameHeight:
|
|
20714
|
-
frameType: WEAVE_FRAME_NODE_SIZES_TYPES.A4,
|
|
20715
|
-
frameOrientation: WEAVE_FRAME_NODE_SIZES_ORIENTATION.landscape
|
|
20651
|
+
frameWidth: 1920,
|
|
20652
|
+
frameHeight: 1080
|
|
20716
20653
|
};
|
|
20717
20654
|
|
|
20718
20655
|
//#endregion
|
|
@@ -20740,8 +20677,6 @@ var WeaveFrameNode = class extends WeaveNode {
|
|
|
20740
20677
|
...props.title && { title: props.title },
|
|
20741
20678
|
...props.frameWidth && { frameWidth: props.frameWidth },
|
|
20742
20679
|
...props.frameHeight && { frameHeight: props.frameHeight },
|
|
20743
|
-
...props.frameType && { frameType: props.frameType },
|
|
20744
|
-
...props.frameOrientation && { frameOrientation: props.frameOrientation },
|
|
20745
20680
|
children: []
|
|
20746
20681
|
}
|
|
20747
20682
|
};
|
|
@@ -20989,10 +20924,10 @@ var WeaveFrameNode = class extends WeaveNode {
|
|
|
20989
20924
|
serialize(instance) {
|
|
20990
20925
|
const stage = this.instance.getStage();
|
|
20991
20926
|
const attrs = instance.getAttrs();
|
|
20992
|
-
let mainNode =
|
|
20993
|
-
if (attrs.id?.indexOf("-selector-area") !== -1) mainNode = stage
|
|
20994
|
-
let frameInternal =
|
|
20995
|
-
if (attrs.id?.indexOf("-selector-area") !== -1) frameInternal =
|
|
20927
|
+
let mainNode = instance;
|
|
20928
|
+
if (attrs.id?.indexOf("-selector-area") !== -1) mainNode = stage.findOne(`#${attrs.nodeId}`);
|
|
20929
|
+
let frameInternal = stage.findOne(`#${attrs.containerId}`);
|
|
20930
|
+
if (attrs.id?.indexOf("-selector-area") !== -1) frameInternal = stage.findOne(`#${attrs.containerId}`);
|
|
20996
20931
|
const childrenMapped = [];
|
|
20997
20932
|
if (frameInternal) {
|
|
20998
20933
|
const children = [...frameInternal.getChildren()];
|
|
@@ -24612,10 +24547,6 @@ exports.WEAVE_DEFAULT_USER_INFO_FUNCTION = WEAVE_DEFAULT_USER_INFO_FUNCTION
|
|
|
24612
24547
|
exports.WEAVE_ELLIPSE_NODE_TYPE = WEAVE_ELLIPSE_NODE_TYPE
|
|
24613
24548
|
exports.WEAVE_FRAME_NODE_DEFAULT_CONFIG = WEAVE_FRAME_NODE_DEFAULT_CONFIG
|
|
24614
24549
|
exports.WEAVE_FRAME_NODE_DEFAULT_PROPS = WEAVE_FRAME_NODE_DEFAULT_PROPS
|
|
24615
|
-
exports.WEAVE_FRAME_NODE_SIZES = WEAVE_FRAME_NODE_SIZES
|
|
24616
|
-
exports.WEAVE_FRAME_NODE_SIZES_MULTIPLIER = WEAVE_FRAME_NODE_SIZES_MULTIPLIER
|
|
24617
|
-
exports.WEAVE_FRAME_NODE_SIZES_ORIENTATION = WEAVE_FRAME_NODE_SIZES_ORIENTATION
|
|
24618
|
-
exports.WEAVE_FRAME_NODE_SIZES_TYPES = WEAVE_FRAME_NODE_SIZES_TYPES
|
|
24619
24550
|
exports.WEAVE_FRAME_NODE_TYPE = WEAVE_FRAME_NODE_TYPE
|
|
24620
24551
|
exports.WEAVE_GRID_DEFAULT_COLOR = WEAVE_GRID_DEFAULT_COLOR
|
|
24621
24552
|
exports.WEAVE_GRID_DEFAULT_ORIGIN_COLOR = WEAVE_GRID_DEFAULT_ORIGIN_COLOR
|
package/dist/sdk.d.cts
CHANGED
|
@@ -848,66 +848,9 @@ declare class WeaveRegularPolygonNode extends WeaveNode {
|
|
|
848
848
|
//# sourceMappingURL=regular-polygon.d.ts.map
|
|
849
849
|
declare const WEAVE_REGULAR_POLYGON_NODE_TYPE = "regular-polygon";
|
|
850
850
|
|
|
851
|
-
//#endregion
|
|
852
|
-
//#region src/nodes/frame/constants.d.ts
|
|
853
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
854
|
-
declare const WEAVE_FRAME_NODE_TYPE = "frame";
|
|
855
|
-
declare const WEAVE_FRAME_NODE_SIZES_MULTIPLIER = 5;
|
|
856
|
-
declare const WEAVE_FRAME_NODE_SIZES_ORIENTATION: {
|
|
857
|
-
readonly landscape: "landscape";
|
|
858
|
-
readonly portrait: "portrait";
|
|
859
|
-
};
|
|
860
|
-
declare const WEAVE_FRAME_NODE_SIZES_TYPES: {
|
|
861
|
-
readonly A1: "A1";
|
|
862
|
-
readonly A2: "A2";
|
|
863
|
-
readonly A3: "A3";
|
|
864
|
-
readonly A4: "A4";
|
|
865
|
-
readonly CUSTOM: "custom";
|
|
866
|
-
};
|
|
867
|
-
declare const WEAVE_FRAME_NODE_SIZES: WeaveFrameNodeSizesInfo;
|
|
868
|
-
declare const WEAVE_FRAME_NODE_DEFAULT_CONFIG: {
|
|
869
|
-
fontFamily: string;
|
|
870
|
-
fontStyle: string;
|
|
871
|
-
fontSize: number;
|
|
872
|
-
fontColor: string;
|
|
873
|
-
titleMargin: number;
|
|
874
|
-
borderColor: string;
|
|
875
|
-
borderWidth: number;
|
|
876
|
-
onTargetLeave: {
|
|
877
|
-
borderColor: string;
|
|
878
|
-
fill: string;
|
|
879
|
-
};
|
|
880
|
-
onTargetEnter: {
|
|
881
|
-
borderColor: string;
|
|
882
|
-
fill: string;
|
|
883
|
-
};
|
|
884
|
-
transform: {
|
|
885
|
-
rotateEnabled: boolean;
|
|
886
|
-
resizeEnabled: boolean;
|
|
887
|
-
enabledAnchors: string[];
|
|
888
|
-
borderStrokeWidth: number;
|
|
889
|
-
padding: number;
|
|
890
|
-
};
|
|
891
|
-
};
|
|
892
|
-
declare const WEAVE_FRAME_NODE_DEFAULT_PROPS: {
|
|
893
|
-
title: string;
|
|
894
|
-
frameWidth: number;
|
|
895
|
-
frameHeight: number;
|
|
896
|
-
frameType: string;
|
|
897
|
-
frameOrientation: string;
|
|
898
|
-
};
|
|
899
|
-
|
|
900
851
|
//#endregion
|
|
901
852
|
//#region src/nodes/frame/types.d.ts
|
|
902
853
|
//# sourceMappingURL=constants.d.ts.map
|
|
903
|
-
type WeaveFrameNodeSizesOrientationKeys = keyof typeof WEAVE_FRAME_NODE_SIZES_ORIENTATION;
|
|
904
|
-
type WeaveFrameNodeSizesOrientation = (typeof WEAVE_FRAME_NODE_SIZES_ORIENTATION)[WeaveFrameNodeSizesOrientationKeys];
|
|
905
|
-
type WeaveFrameNodeSizesKeys = keyof typeof WEAVE_FRAME_NODE_SIZES_TYPES;
|
|
906
|
-
type WeaveFrameNodeSizes = (typeof WEAVE_FRAME_NODE_SIZES_TYPES)[WeaveFrameNodeSizesKeys];
|
|
907
|
-
type WeaveFrameNodeSizesInfo = { [Property in Partial<WeaveFrameNodeSizesOrientation>]: { [Property in WeaveFrameNodeSizes]: {
|
|
908
|
-
width: number;
|
|
909
|
-
height: number;
|
|
910
|
-
} } };
|
|
911
854
|
type WeaveFrameProperties = {
|
|
912
855
|
fontFamily: string;
|
|
913
856
|
fontStyle: string;
|
|
@@ -930,8 +873,6 @@ type WeaveFrameAttributes = WeaveElementAttributes & {
|
|
|
930
873
|
title: string;
|
|
931
874
|
frameWidth: number;
|
|
932
875
|
frameHeight: number;
|
|
933
|
-
frameOrientation: WeaveFrameNodeSizesOrientation;
|
|
934
|
-
frameType: WeaveFrameNodeSizes;
|
|
935
876
|
};
|
|
936
877
|
type WeaveFrameNodeParams = {
|
|
937
878
|
config: Partial<WeaveFrameProperties>;
|
|
@@ -951,8 +892,42 @@ declare class WeaveFrameNode extends WeaveNode {
|
|
|
951
892
|
}
|
|
952
893
|
|
|
953
894
|
//#endregion
|
|
954
|
-
//#region src/
|
|
895
|
+
//#region src/nodes/frame/constants.d.ts
|
|
955
896
|
//# sourceMappingURL=frame.d.ts.map
|
|
897
|
+
declare const WEAVE_FRAME_NODE_TYPE = "frame";
|
|
898
|
+
declare const WEAVE_FRAME_NODE_DEFAULT_CONFIG: {
|
|
899
|
+
fontFamily: string;
|
|
900
|
+
fontStyle: string;
|
|
901
|
+
fontSize: number;
|
|
902
|
+
fontColor: string;
|
|
903
|
+
titleMargin: number;
|
|
904
|
+
borderColor: string;
|
|
905
|
+
borderWidth: number;
|
|
906
|
+
onTargetLeave: {
|
|
907
|
+
borderColor: string;
|
|
908
|
+
fill: string;
|
|
909
|
+
};
|
|
910
|
+
onTargetEnter: {
|
|
911
|
+
borderColor: string;
|
|
912
|
+
fill: string;
|
|
913
|
+
};
|
|
914
|
+
transform: {
|
|
915
|
+
rotateEnabled: boolean;
|
|
916
|
+
resizeEnabled: boolean;
|
|
917
|
+
enabledAnchors: string[];
|
|
918
|
+
borderStrokeWidth: number;
|
|
919
|
+
padding: number;
|
|
920
|
+
};
|
|
921
|
+
};
|
|
922
|
+
declare const WEAVE_FRAME_NODE_DEFAULT_PROPS: {
|
|
923
|
+
title: string;
|
|
924
|
+
frameWidth: number;
|
|
925
|
+
frameHeight: number;
|
|
926
|
+
};
|
|
927
|
+
|
|
928
|
+
//#endregion
|
|
929
|
+
//#region src/actions/zoom-out-tool/types.d.ts
|
|
930
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
956
931
|
type WeaveZoomOutToolActionParams = {
|
|
957
932
|
previousAction: string;
|
|
958
933
|
};
|
|
@@ -2232,5 +2207,5 @@ declare class WeaveNodesSnappingPlugin extends WeavePlugin {
|
|
|
2232
2207
|
//#endregion
|
|
2233
2208
|
//# sourceMappingURL=nodes-snapping.d.ts.map
|
|
2234
2209
|
|
|
2235
|
-
export { ARROW_TOOL_ACTION_NAME, ARROW_TOOL_STATE, BRUSH_TOOL_ACTION_NAME, BRUSH_TOOL_STATE, COPY_PASTE_NODES_PLUGIN_STATE, ELLIPSE_TOOL_ACTION_NAME, ELLIPSE_TOOL_STATE, ERASER_TOOL_ACTION_NAME, ERASER_TOOL_STATE, FRAME_TOOL_ACTION_NAME, FRAME_TOOL_STATE, GUIDE_LINE_DEFAULT_CONFIG, GUIDE_LINE_DRAG_SNAPPING_THRESHOLD, GUIDE_LINE_NAME, GUIDE_LINE_TRANSFORM_SNAPPING_THRESHOLD, GUIDE_ORIENTATION, Guide, GuideOrientation, GuideOrientationKeys, IMAGE_TOOL_ACTION_NAME, IMAGE_TOOL_STATE, ImageProps, LineGuide, LineGuideStop, MOVE_TOOL_ACTION_NAME, MOVE_TOOL_STATE, NODE_SNAP, NodeSnap, NodeSnapKeys, NodeSnappingEdge, NodeSnappingEdges, PEN_TOOL_ACTION_NAME, PEN_TOOL_STATE, RECTANGLE_TOOL_ACTION_NAME, RECTANGLE_TOOL_STATE, REGULAR_POLYGON_TOOL_ACTION_NAME, REGULAR_POLYGON_TOOL_STATE, SELECTION_TOOL_ACTION_NAME, SELECTION_TOOL_STATE, STAR_TOOL_ACTION_NAME, STAR_TOOL_STATE, TEXT_LAYOUT, TEXT_TOOL_ACTION_NAME, TEXT_TOOL_STATE, TextSerializable, WEAVE_ARROW_NODE_TYPE, WEAVE_COPY_PASTE_NODES_KEY, WEAVE_DEFAULT_USER_INFO_FUNCTION, WEAVE_ELLIPSE_NODE_TYPE, WEAVE_FRAME_NODE_DEFAULT_CONFIG, WEAVE_FRAME_NODE_DEFAULT_PROPS,
|
|
2210
|
+
export { ARROW_TOOL_ACTION_NAME, ARROW_TOOL_STATE, BRUSH_TOOL_ACTION_NAME, BRUSH_TOOL_STATE, COPY_PASTE_NODES_PLUGIN_STATE, ELLIPSE_TOOL_ACTION_NAME, ELLIPSE_TOOL_STATE, ERASER_TOOL_ACTION_NAME, ERASER_TOOL_STATE, FRAME_TOOL_ACTION_NAME, FRAME_TOOL_STATE, GUIDE_LINE_DEFAULT_CONFIG, GUIDE_LINE_DRAG_SNAPPING_THRESHOLD, GUIDE_LINE_NAME, GUIDE_LINE_TRANSFORM_SNAPPING_THRESHOLD, GUIDE_ORIENTATION, Guide, GuideOrientation, GuideOrientationKeys, IMAGE_TOOL_ACTION_NAME, IMAGE_TOOL_STATE, ImageProps, LineGuide, LineGuideStop, MOVE_TOOL_ACTION_NAME, MOVE_TOOL_STATE, NODE_SNAP, NodeSnap, NodeSnapKeys, NodeSnappingEdge, NodeSnappingEdges, PEN_TOOL_ACTION_NAME, PEN_TOOL_STATE, RECTANGLE_TOOL_ACTION_NAME, RECTANGLE_TOOL_STATE, REGULAR_POLYGON_TOOL_ACTION_NAME, REGULAR_POLYGON_TOOL_STATE, SELECTION_TOOL_ACTION_NAME, SELECTION_TOOL_STATE, STAR_TOOL_ACTION_NAME, STAR_TOOL_STATE, TEXT_LAYOUT, TEXT_TOOL_ACTION_NAME, TEXT_TOOL_STATE, TextSerializable, WEAVE_ARROW_NODE_TYPE, WEAVE_COPY_PASTE_NODES_KEY, WEAVE_DEFAULT_USER_INFO_FUNCTION, WEAVE_ELLIPSE_NODE_TYPE, WEAVE_FRAME_NODE_DEFAULT_CONFIG, WEAVE_FRAME_NODE_DEFAULT_PROPS, WEAVE_FRAME_NODE_TYPE, WEAVE_GRID_DEFAULT_COLOR, WEAVE_GRID_DEFAULT_ORIGIN_COLOR, WEAVE_GRID_DEFAULT_SIZE, WEAVE_GRID_DEFAULT_TYPE, WEAVE_GRID_LAYER_ID, WEAVE_GRID_TYPES, WEAVE_GROUP_NODE_TYPE, WEAVE_IMAGE_CROP_END_TYPE, WEAVE_IMAGE_NODE_TYPE, WEAVE_LAYER_NODE_TYPE, WEAVE_LINE_NODE_TYPE, WEAVE_NODES_SELECTION_KEY, WEAVE_NODES_SELECTION_LAYER_ID, WEAVE_NODES_SNAPPING_KEY, WEAVE_RECTANGLE_NODE_TYPE, WEAVE_REGULAR_POLYGON_NODE_TYPE, WEAVE_STAGE_GRID_KEY, WEAVE_STAGE_NODE_TYPE, WEAVE_STAR_NODE_TYPE, WEAVE_TEXT_NODE_TYPE, WEAVE_USERS_POINTERS_KEY, WEAVE_USERS_SELECTION_KEY, WEAVE_USER_POINTERS_DEFAULT_PROPS, WEAVE_USER_POINTER_KEY, WEAVE_USER_SELECTION_KEY, Weave, WeaveAction, WeaveActionPropsChangeEvent, WeaveArrowNode, WeaveArrowNodeParams, WeaveArrowProperties, WeaveArrowToolAction, WeaveArrowToolActionState, WeaveArrowToolActionStateKeys, WeaveBrushToolAction, WeaveBrushToolActionState, WeaveBrushToolActionStateKeys, WeaveConnectedUserInfoKey, WeaveConnectedUsers, WeaveConnectedUsersChangeEvent, WeaveConnectedUsersPlugin, WeaveConnectedUsersPluginConfig, WeaveConnectedUsersPluginParams, WeaveContextMenuPlugin, WeaveCopyPasteNodesPlugin, WeaveCopyPasteNodesPluginOnCopyEvent, WeaveCopyPasteNodesPluginOnPasteEvent, WeaveCopyPasteNodesPluginOnPasteExternalEvent, WeaveCopyPasteNodesPluginState, WeaveCopyPasteNodesPluginStateKeys, WeaveEllipseNode, WeaveEllipseNodeParams, WeaveEllipseProperties, WeaveEllipseToolAction, WeaveEllipseToolActionState, WeaveEllipseToolActionStateKeys, WeaveEraserToolAction, WeaveEraserToolActionState, WeaveEraserToolActionStateKeys, WeaveExportNodeActionParams, WeaveExportNodeToolAction, WeaveExportStageActionParams, WeaveExportStageToolAction, WeaveFitToScreenToolAction, WeaveFitToScreenToolActionParams, WeaveFitToSelectionToolAction, WeaveFitToSelectionToolActionParams, WeaveFrameAttributes, WeaveFrameNode, WeaveFrameNodeParams, WeaveFrameProperties, WeaveFrameToolAction, WeaveFrameToolActionState, WeaveFrameToolActionStateKeys, WeaveFrameToolActionTriggerParams, WeaveFrameToolProps, WeaveGroupNode, WeaveGroupNodeParams, WeaveGroupProperties, WeaveImageCropEndType, WeaveImageCropEndTypeKeys, WeaveImageNode, WeaveImageNodeParams, WeaveImageOnCropEndEvent, WeaveImageOnCropStartEvent, WeaveImageProperties, WeaveImageToolAction, WeaveImageToolActionOnEndLoadImageEvent, WeaveImageToolActionOnStartLoadImageEvent, WeaveImageToolActionState, WeaveImageToolActionStateKeys, WeaveImageToolActionTriggerParams, WeaveImageToolActionTriggerReturn, WeaveLayerNode, WeaveLineNode, WeaveLineNodeParams, WeaveLineProperties, WeaveMoveToolAction, WeaveMoveToolActionState, WeaveMoveToolActionStateKeys, WeaveNode, WeaveNodesSelectionConfig, WeaveNodesSelectionPlugin, WeaveNodesSelectionPluginConfig, WeaveNodesSelectionPluginOnNodesChangeEvent, WeaveNodesSelectionPluginOnSelectionStateEvent, WeaveNodesSelectionPluginOnStageSelectionEvent, WeaveNodesSelectionPluginParams, WeaveNodesSelectionTransformationsConfig, WeaveNodesSnappingPlugin, WeaveNodesSnappingPluginConfig, WeaveNodesSnappingPluginParams, WeavePasteModel, WeavePenToolAction, WeavePenToolActionState, WeavePenToolActionStateKeys, WeavePlugin, WeaveRectangleNode, WeaveRectangleNodeParams, WeaveRectangleProperties, WeaveRectangleToolAction, WeaveRectangleToolActionState, WeaveRectangleToolActionStateKeys, WeaveRegularPolygonNode, WeaveRegularPolygonNodeParams, WeaveRegularPolygonProperties, WeaveRegularPolygonToolAction, WeaveRegularPolygonToolActionState, WeaveRegularPolygonToolActionStateKeys, WeaveSelectionToolAction, WeaveSelectionToolActionState, WeaveSelectionToolActionStateKeys, WeaveStageContextMenuPluginConfig, WeaveStageContextMenuPluginOnNodeContextMenuEvent, WeaveStageContextMenuPluginParams, WeaveStageDropAreaPlugin, WeaveStageDropPluginOnStageDropEvent, WeaveStageGridPlugin, WeaveStageGridPluginConfig, WeaveStageGridPluginParams, WeaveStageGridType, WeaveStageGridTypeKeys, WeaveStageNode, WeaveStagePanningPlugin, WeaveStageResizePlugin, WeaveStageZoomChanged, WeaveStageZoomPlugin, WeaveStageZoomPluginConfig, WeaveStageZoomPluginOnZoomChangeEvent, WeaveStageZoomPluginParams, WeaveStarNode, WeaveStarNodeParams, WeaveStarProperties, WeaveStarToolAction, WeaveStarToolActionState, WeaveStarToolActionStateKeys, WeaveStore, WeaveStoreOnNodeChangeEvent, WeaveStoreOnRoomLoadedEvent, WeaveStoreOnStateChangeEvent, WeaveStoreOnUndoRedoChangeEvent, WeaveTextLayout, WeaveTextLayoutKeys, WeaveTextNode, WeaveTextNodeParams, WeaveTextProperties, WeaveTextToolAction, WeaveTextToolActionState, WeaveTextToolActionStateKeys, WeaveToPasteNode, WeaveUserPointer, WeaveUserPointerKey, WeaveUserPointersUIProperties, WeaveUserSelectionInfo, WeaveUserSelectionKey, WeaveUsersPointersPlugin, WeaveUsersPointersPluginConfig, WeaveUsersPointersPluginParams, WeaveUsersSelectionPlugin, WeaveUsersSelectionPluginConfig, WeaveUsersSelectionPluginParams, WeaveZoomInToolAction, WeaveZoomInToolActionParams, WeaveZoomOutToolAction, WeaveZoomOutToolActionParams, checkIfOverContainer, clearContainerTargets, moveNodeToContainer, resetScale };
|
|
2236
2211
|
//# sourceMappingURL=sdk.d.cts.map
|