simplestyle-js 3.4.2-alpha.3 → 3.4.2-alpha.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.
@@ -33,4 +33,16 @@ ${contents}`, '');
33
33
  return this.sheets.entries().reduce((prev, [ruleId, contents])=>`${prev}
34
34
  <style id="${ruleId}">${contents}</style>`, '');
35
35
  }
36
+ /**
37
+ * returns an array of tuples, Array<[string, string]>,
38
+ * where the first item in the tuple is the ID for the style rule
39
+ * and the second item is the actual CSS.
40
+ * Use this if you need to fully-control how you're rendering
41
+ * style tags BUT BE SURE TO USE THE ID or else HMR
42
+ * won't work during local development
43
+ */ getRulesById() {
44
+ return [
45
+ ...this.sheets.entries()
46
+ ];
47
+ }
36
48
  }
@@ -16,4 +16,13 @@ export declare class SimpleStyleRegistry {
16
16
  * mapped to their internal ruleset IDs
17
17
  */
18
18
  getHTML(): string;
19
+ /**
20
+ * returns an array of tuples, Array<[string, string]>,
21
+ * where the first item in the tuple is the ID for the style rule
22
+ * and the second item is the actual CSS.
23
+ * Use this if you need to fully-control how you're rendering
24
+ * style tags BUT BE SURE TO USE THE ID or else HMR
25
+ * won't work during local development
26
+ */
27
+ getRulesById(): [string, string][];
19
28
  }
@@ -16,4 +16,13 @@ export declare class SimpleStyleRegistry {
16
16
  * mapped to their internal ruleset IDs
17
17
  */
18
18
  getHTML(): string;
19
+ /**
20
+ * returns an array of tuples, Array<[string, string]>,
21
+ * where the first item in the tuple is the ID for the style rule
22
+ * and the second item is the actual CSS.
23
+ * Use this if you need to fully-control how you're rendering
24
+ * style tags BUT BE SURE TO USE THE ID or else HMR
25
+ * won't work during local development
26
+ */
27
+ getRulesById(): [string, string][];
19
28
  }
@@ -28,4 +28,16 @@ ${contents}`, '');
28
28
  return this.sheets.entries().reduce((prev, [ruleId, contents])=>`${prev}
29
29
  <style id="${ruleId}">${contents}</style>`, '');
30
30
  }
31
+ /**
32
+ * returns an array of tuples, Array<[string, string]>,
33
+ * where the first item in the tuple is the ID for the style rule
34
+ * and the second item is the actual CSS.
35
+ * Use this if you need to fully-control how you're rendering
36
+ * style tags BUT BE SURE TO USE THE ID or else HMR
37
+ * won't work during local development
38
+ */ getRulesById() {
39
+ return [
40
+ ...this.sheets.entries()
41
+ ];
42
+ }
31
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simplestyle-js",
3
- "version": "3.4.2-alpha.3",
3
+ "version": "3.4.2-alpha.4",
4
4
  "description": "An incredibly straightforward and simple CSS-in-JS solution with zero runtime dependencies, and out-of-the-box TypeScript support",
5
5
  "type": "module",
6
6
  "repository": {