epos-unit 1.12.0 → 1.14.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/dist/epos-unit.d.ts +1 -0
- package/dist/epos-unit.js +3 -1
- package/package.json +4 -3
- package/src/epos-unit.ts +4 -2
package/dist/epos-unit.d.ts
CHANGED
package/dist/epos-unit.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
// src/epos-unit.ts
|
|
2
|
-
import "epos";
|
|
3
2
|
import { createLog } from "dropcap/utils";
|
|
3
|
+
import "epos";
|
|
4
|
+
import { nanoid } from "nanoid";
|
|
4
5
|
var _root_ = /* @__PURE__ */ Symbol("root");
|
|
5
6
|
var _parent_ = /* @__PURE__ */ Symbol("parent");
|
|
6
7
|
var _disposers_ = /* @__PURE__ */ Symbol("disposers");
|
|
7
8
|
var Unit = class {
|
|
9
|
+
id = nanoid();
|
|
8
10
|
static get [epos.symbols.stateModelStrict]() {
|
|
9
11
|
return true;
|
|
10
12
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "epos-unit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "imkost",
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
"src"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"dropcap": "^1.
|
|
24
|
-
"epos": "^1.
|
|
23
|
+
"dropcap": "^1.1.0",
|
|
24
|
+
"epos": "^1.32.0",
|
|
25
|
+
"nanoid": "^3.3.11"
|
|
25
26
|
}
|
|
26
27
|
}
|
package/src/epos-unit.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import 'epos'
|
|
2
1
|
import type { Cls } from 'dropcap/types'
|
|
3
2
|
import { createLog, Log } from 'dropcap/utils'
|
|
3
|
+
import 'epos'
|
|
4
|
+
import { nanoid } from 'nanoid'
|
|
4
5
|
import type { FC } from 'react'
|
|
5
6
|
|
|
6
7
|
export const _root_ = Symbol('root')
|
|
@@ -9,11 +10,12 @@ export const _disposers_ = Symbol('disposers')
|
|
|
9
10
|
export type Descriptors = Record<string | symbol, PropertyDescriptor>
|
|
10
11
|
|
|
11
12
|
export class Unit<TRoot = unknown> {
|
|
13
|
+
id = nanoid()
|
|
12
14
|
declare '@': string
|
|
13
15
|
declare log: Log;
|
|
14
16
|
declare [':version']?: number
|
|
15
17
|
declare private [_root_]: TRoot
|
|
16
|
-
declare private [_parent_]: Unit<TRoot> | null // Parent reference for not-yet-attached
|
|
18
|
+
declare private [_parent_]: Unit<TRoot> | null // Parent reference for a not-yet-attached unit
|
|
17
19
|
declare private [_disposers_]: Set<() => void>
|
|
18
20
|
|
|
19
21
|
static get [epos.symbols.stateModelStrict]() {
|