onejs-core 0.3.13 → 0.3.14

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.
@@ -1,6 +1,7 @@
1
1
  declare global {
2
2
  interface Document {
3
3
  addRuntimeUSS(uss: string): void
4
+ clearRuntimeStyleSheets(): void
4
5
 
5
6
  // createElement(tagName: string): CS.OneJS.Dom.Dom
6
7
  // createTextNode(text: string): CS.OneJS.Dom.Dom
@@ -7,6 +7,7 @@ export declare class DocumentWrapper {
7
7
  get body(): DomWrapper;
8
8
  constructor(doc: CS.OneJS.Dom.Document);
9
9
  addRuntimeUSS(uss: string): void;
10
+ clearRuntimeStyleSheets(): void;
10
11
  createElement(tagName: string, options?: ElementCreationOptions): DomWrapper;
11
12
  createElementNS(ns: string, tagName: string, options: ElementCreationOptions): DomWrapper;
12
13
  createTextNode(text: string): DomWrapper;
@@ -10,6 +10,9 @@ export class DocumentWrapper {
10
10
  addRuntimeUSS(uss) {
11
11
  this.#doc.addRuntimeUSS(uss);
12
12
  }
13
+ clearRuntimeStyleSheets() {
14
+ this.#doc.clearRuntimeStyleSheets();
15
+ }
13
16
  createElement(tagName, options) {
14
17
  return new DomWrapper(this.#doc.createElement(tagName));
15
18
  }
package/dist/index.d.ts CHANGED
@@ -18,5 +18,3 @@ declare global {
18
18
  ve: CS.UnityEngine.UIElements.VisualElement;
19
19
  }
20
20
  }
21
-
22
- declare const document: Document
package/dom/document.ts CHANGED
@@ -19,6 +19,10 @@ export class DocumentWrapper {
19
19
  this.#doc.addRuntimeUSS(uss)
20
20
  }
21
21
 
22
+ clearRuntimeStyleSheets(): void {
23
+ this.#doc.clearRuntimeStyleSheets()
24
+ }
25
+
22
26
  createElement(tagName: string, options?: ElementCreationOptions): DomWrapper {
23
27
  return new DomWrapper(this.#doc.createElement(tagName))
24
28
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "onejs-core",
3
3
  "description": "The JS part of OneJS, a UI framework and Scripting Engine for Unity.",
4
- "version": "0.3.13",
4
+ "version": "0.3.14",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./typings.d.ts",
7
7
  "dependencies": {