@burger-editor/client 4.0.0-alpha.71 → 4.0.0-alpha.72

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.d.ts CHANGED
@@ -13,9 +13,9 @@ export declare const version: string;
13
13
  * attachDraftSwitcher(engine);
14
14
  * ```
15
15
  */
16
- export declare function attachDraftSwitcher(engine: BurgerEditorEngine): {
17
- cleanUp: () => void;
18
- } | null;
16
+ export declare function attachDraftSwitcher(engine: BurgerEditorEngine): (Disposable & {
17
+ cleanUp(): void;
18
+ }) | null;
19
19
  /**
20
20
  * BurgerEditorのクライアントUIを組み立てるメインエントリ
21
21
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AASzD,OAAO,gBAAgB,CAAC;AAExB,eAAO,MAAM,OAAO,QAAc,CAAC;AAEnC;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,kBAAkB;;SAS7D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,wBAAwB,CAC7C,OAAO,EAAE,IAAI,CAAC,yBAAyB,EAAE,MAAM,CAAC;;GA+BhD;AAED,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AASzD,OAAO,gBAAgB,CAAC;AAExB,eAAO,MAAM,OAAO,QAAc,CAAC;AAEnC;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,kBAAkB;;UAS7D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,wBAAwB,CAC7C,OAAO,EAAE,IAAI,CAAC,yBAAyB,EAAE,MAAM,CAAC;;GAuChD;AAED,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC"}
package/dist/mount.d.ts CHANGED
@@ -1,18 +1,19 @@
1
1
  import { ReactNode } from 'react';
2
2
  /**
3
- * Mount a React node into a DOM container and return a cleanup handle,
4
- * matching the `UICreator` contract shape used across the engine.
3
+ * Mount a React node into a DOM container and return a `Disposable`
4
+ * teardown handle, matching the `UICreator` contract shape used across
5
+ * the engine.
5
6
  * @param node - The React node to render
6
7
  * @param target - The DOM container
7
- * @returns An object whose `cleanUp` unmounts the root
8
+ * @returns A handle that unmounts the root, via `using` or `cleanUp()`
8
9
  * @example
9
10
  * ```tsx
10
- * const { cleanUp } = reactMount(<DraftSwitcher engine={engine} />, container);
11
- * // When the UI is torn down:
12
- * cleanUp();
11
+ * using mount = reactMount(<DraftSwitcher engine={engine} />, container);
12
+ * // Root is unmounted automatically when `mount` goes out of scope.
13
13
  * ```
14
14
  */
15
- export declare function reactMount(node: ReactNode, target: HTMLElement): {
16
- cleanUp: () => void;
15
+ export declare function reactMount(node: ReactNode, target: HTMLElement): Disposable & {
16
+ /** @deprecated Use a `using` declaration instead. */
17
+ cleanUp(): void;
17
18
  };
18
19
  //# sourceMappingURL=mount.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mount.d.ts","sourceRoot":"","sources":["../src/mount.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW;;EAQ9D"}
1
+ {"version":3,"file":"mount.d.ts","sourceRoot":"","sources":["../src/mount.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CACzB,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,WAAW,GACjB,UAAU,GAAG;IACf,qDAAqD;IACrD,OAAO,IAAI,IAAI,CAAC;CAChB,CAaA"}