@flexsurfer/reflex 0.1.11 โ†’ 0.1.12

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/README.md CHANGED
@@ -20,6 +20,8 @@ After many years of building applications with re-frame in the ClojureScript wor
20
20
  ๐Ÿงฉ **Composable Architecture** - Build complex apps from simple, reusable pieces
21
21
  ๐Ÿ”„ **Reactive Subscriptions** - UI automatically updates when state changes
22
22
  ๐ŸŒ **Multi-Platform Support** - With effects separation, it's super easy to support multiple platforms with the same codebase, including web, mobile, and desktop
23
+ ๐Ÿค– **AI Friendly** - Reviewing AI-generated changes is easier because all logic is expressed through pure, isolated functions, making each change understandable, verifiable, and deterministic.
24
+ ๐Ÿ› ๏ธ **Integrated DevTools** - Reflex-devtools provides deep visibility into your appโ€™s state, events, and subscriptions in real time, forming a powerful combo with Reflex for effective development and debugging.
23
25
  โšก **Interceptor Pattern** - Powerful middleware system for cross-cutting concerns
24
26
  ๐Ÿ›ก๏ธ **Type Safety** - Full TypeScript support with excellent IDE experience
25
27
  ๐Ÿงช **Testability** - Pure functions make testing straightforward and reliable
@@ -28,6 +30,9 @@ After many years of building applications with re-frame in the ClojureScript wor
28
30
 
29
31
  ```bash
30
32
  npm install @flexsurfer/reflex
33
+ npm install --save-dev @flexsurfer/reflex-devtools
34
+
35
+ npx reflex-devtools
31
36
  ```
32
37
 
33
38
  ### Basic Example
@@ -38,8 +43,13 @@ import {
38
43
  regEvent,
39
44
  regSub,
40
45
  dispatch,
41
- useSubscription
46
+ useSubscription,
47
+ enableTracing
42
48
  } from '@flexsurfer/reflex';
49
+ import { enableDevtools } from '@flexsurfer/reflex-devtools'
50
+
51
+ enableTracing()
52
+ enableDevtools();
43
53
 
44
54
  // Initialize your app database
45
55
  initAppDb({ counter: 0 });
package/dist/index.cjs CHANGED
@@ -627,9 +627,7 @@ function resetTracing() {
627
627
  }
628
628
  function registerTraceCb(key, cb) {
629
629
  if (!traceEnabled) {
630
- console.warn(
631
- "Tracing is not enabled; call enableTracing() before registering callbacks"
632
- );
630
+ consoleLog("warn", "[reflex] [trace] Tracing is not enabled; call enableTracing() before registering callbacks");
633
631
  return;
634
632
  }
635
633
  traceCbs.set(key, cb);
@@ -645,7 +643,7 @@ function scheduleFlush() {
645
643
  try {
646
644
  cb(batch);
647
645
  } catch (e) {
648
- console.error("Error in trace callback", e);
646
+ consoleLog("warn", "Error in trace callback", e);
649
647
  }
650
648
  }
651
649
  }, DEBOUNCE_TIME);
@@ -971,7 +969,7 @@ var Reaction = class _Reaction {
971
969
  operation: this.subVector?.[0] ?? "",
972
970
  opType: "sub/dispose",
973
971
  tags: {
974
- subVector: this.subVector,
972
+ queryV: this.subVector,
975
973
  reaction: this.id
976
974
  }
977
975
  },
package/dist/index.mjs CHANGED
@@ -559,9 +559,7 @@ function resetTracing() {
559
559
  }
560
560
  function registerTraceCb(key, cb) {
561
561
  if (!traceEnabled) {
562
- console.warn(
563
- "Tracing is not enabled; call enableTracing() before registering callbacks"
564
- );
562
+ consoleLog("warn", "[reflex] [trace] Tracing is not enabled; call enableTracing() before registering callbacks");
565
563
  return;
566
564
  }
567
565
  traceCbs.set(key, cb);
@@ -577,7 +575,7 @@ function scheduleFlush() {
577
575
  try {
578
576
  cb(batch);
579
577
  } catch (e) {
580
- console.error("Error in trace callback", e);
578
+ consoleLog("warn", "Error in trace callback", e);
581
579
  }
582
580
  }
583
581
  }, DEBOUNCE_TIME);
@@ -903,7 +901,7 @@ var Reaction = class _Reaction {
903
901
  operation: this.subVector?.[0] ?? "",
904
902
  opType: "sub/dispose",
905
903
  tags: {
906
- subVector: this.subVector,
904
+ queryV: this.subVector,
907
905
  reaction: this.id
908
906
  }
909
907
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flexsurfer/reflex",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",