@lukekaalim/act-web 3.3.0 → 3.4.0-alpha.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @lukekaalim/act-web
2
2
 
3
+ ## 3.4.0-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Added "Style" prop support to SVG
8
+
9
+ ## 3.4.0-alpha.0
10
+
11
+ ### Minor Changes
12
+
13
+ - b3f6c49: Added debug capabilities and protocol
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [b3f6c49]
18
+ - @lukekaalim/act-backstage@3.0.0-alpha.0
19
+ - @lukekaalim/act-recon@3.0.0-alpha.0
20
+
3
21
  ## 3.3.0
4
22
 
5
23
  ### Minor Changes
package/mod.ts CHANGED
@@ -2,3 +2,4 @@ export * from './space.ts';
2
2
  export * from './element.ts';
3
3
  export * from './props.ts';
4
4
  export * from './render.ts';
5
+ export * from './scheduler.ts';
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@lukekaalim/act-web",
3
- "version": "3.3.0",
3
+ "version": "3.4.0-alpha.1",
4
4
  "type": "module",
5
5
  "main": "mod.ts",
6
6
  "dependencies": {
7
7
  "@lukekaalim/act": "^3.1.0",
8
- "@lukekaalim/act-recon": "^2.0.0",
9
- "@lukekaalim/act-backstage": "^2.0.0"
8
+ "@lukekaalim/act-recon": "^3.0.0-alpha.0",
9
+ "@lukekaalim/act-backstage": "^3.0.0-alpha.0"
10
10
  }
11
11
  }
package/props.ts CHANGED
@@ -43,6 +43,8 @@ export const setSVGElementProps = (
43
43
  case 'ref':
44
44
  (next as any).current = node;
45
45
  return true;
46
+ case 'style':
47
+ return (setStyleProp(node.style, next as any, prev as any), true);
46
48
  default:
47
49
  node.setAttribute(name, next as any);
48
50
  return true;
package/render.ts CHANGED
@@ -1,31 +1,7 @@
1
- import { createId, h } from "@lukekaalim/act";
1
+ import { h } from "@lukekaalim/act";
2
2
  import { createWebSpace, HTML } from "./space";
3
3
  import { createRenderFunction, RenderFunction } from "@lukekaalim/act-backstage";
4
- import { Scheduler } from "@lukekaalim/act-recon";
5
-
6
- export const createDOMScheduler = (): Scheduler => {
7
- const workMap = new Map();
8
- let id: number | null = null;
9
- const work = () => {
10
- id = null;
11
- for (const [,callback] of workMap)
12
- callback();
13
-
14
- workMap.clear();
15
- };
16
- return {
17
- requestWork(callback) {
18
- const workId = createId<'WorkID'>();
19
- workMap.set(workId, callback);
20
- if (!id)
21
- id = setTimeout(work, 1) as any;
22
- return workId;
23
- },
24
- cancelWork(workId) {
25
- workMap.delete(workId);
26
- },
27
- }
28
- }
4
+ import { createDOMScheduler } from "./scheduler";
29
5
 
30
6
 
31
7
  export const render: RenderFunction<HTMLElement> = (node, root) =>
package/scheduler.ts ADDED
@@ -0,0 +1,26 @@
1
+ import { createId } from "@lukekaalim/act";
2
+ import { Scheduler } from "@lukekaalim/act-recon";
3
+
4
+ export const createDOMScheduler = (): Scheduler => {
5
+ const workMap = new Map();
6
+ let id: number | null = null;
7
+ const work = () => {
8
+ id = null;
9
+ for (const [,callback] of workMap)
10
+ callback();
11
+
12
+ workMap.clear();
13
+ };
14
+ return {
15
+ requestWork(callback) {
16
+ const workId = createId<'WorkID'>();
17
+ workMap.set(workId, callback);
18
+ if (!id)
19
+ id = setTimeout(work, 1) as any;
20
+ return workId;
21
+ },
22
+ cancelWork(workId) {
23
+ workMap.delete(workId);
24
+ },
25
+ }
26
+ }