@epoch32/visage 1.1.2 → 1.1.3

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/api/index.js CHANGED
@@ -988,7 +988,7 @@ function createContext(defaultValue) {
988
988
  }
989
989
  scope.context.set(id, props.value);
990
990
  return runInScope(scope, () => {
991
- const content = typeof props.children === "function" ? untrack(() => props.children()) : props.children;
991
+ const content = typeof props.children === "function" ? props.children() : props.children;
992
992
  if (typeof document !== "undefined") {
993
993
  const frag = document.createDocumentFragment();
994
994
  insertChild(frag, content);
@@ -724,7 +724,7 @@ function createContext(defaultValue) {
724
724
  }
725
725
  scope.context.set(id, props.value);
726
726
  return runInScope(scope, () => {
727
- const content = typeof props.children === "function" ? untrack(() => props.children()) : props.children;
727
+ const content = typeof props.children === "function" ? props.children() : props.children;
728
728
  if (typeof document !== "undefined") {
729
729
  const frag = document.createDocumentFragment();
730
730
  insertChild(frag, content);
@@ -724,7 +724,7 @@ function createContext(defaultValue) {
724
724
  }
725
725
  scope.context.set(id, props.value);
726
726
  return runInScope(scope, () => {
727
- const content = typeof props.children === "function" ? untrack(() => props.children()) : props.children;
727
+ const content = typeof props.children === "function" ? props.children() : props.children;
728
728
  if (typeof document !== "undefined") {
729
729
  const frag = document.createDocumentFragment();
730
730
  insertChild(frag, content);
@@ -2509,7 +2509,12 @@ function TabsTrigger(props) {
2509
2509
  "data-value": value,
2510
2510
  tabIndex: () => isSelected() ? 0 : -1,
2511
2511
  disabled,
2512
- class: className,
2512
+ class: [
2513
+ className,
2514
+ {
2515
+ active: isSelected
2516
+ }
2517
+ ],
2513
2518
  style,
2514
2519
  onClick: handleClick,
2515
2520
  ...rest,
package/dist/dom/index.js CHANGED
@@ -724,7 +724,7 @@ function createContext(defaultValue) {
724
724
  }
725
725
  scope.context.set(id, props.value);
726
726
  return runInScope(scope, () => {
727
- const content = typeof props.children === "function" ? untrack(() => props.children()) : props.children;
727
+ const content = typeof props.children === "function" ? props.children() : props.children;
728
728
  if (typeof document !== "undefined") {
729
729
  const frag = document.createDocumentFragment();
730
730
  insertChild(frag, content);
@@ -724,7 +724,7 @@ function createContext(defaultValue) {
724
724
  }
725
725
  scope.context.set(id, props.value);
726
726
  return runInScope(scope, () => {
727
- const content = typeof props.children === "function" ? untrack(() => props.children()) : props.children;
727
+ const content = typeof props.children === "function" ? props.children() : props.children;
728
728
  if (typeof document !== "undefined") {
729
729
  const frag = document.createDocumentFragment();
730
730
  insertChild(frag, content);
package/dist/index.js CHANGED
@@ -988,7 +988,7 @@ function createContext(defaultValue) {
988
988
  }
989
989
  scope.context.set(id, props.value);
990
990
  return runInScope(scope, () => {
991
- const content = typeof props.children === "function" ? untrack(() => props.children()) : props.children;
991
+ const content = typeof props.children === "function" ? props.children() : props.children;
992
992
  if (typeof document !== "undefined") {
993
993
  const frag = document.createDocumentFragment();
994
994
  insertChild(frag, content);
@@ -6556,7 +6556,12 @@ function TabsTrigger(props) {
6556
6556
  "data-value": value,
6557
6557
  tabIndex: () => isSelected() ? 0 : -1,
6558
6558
  disabled,
6559
- class: className,
6559
+ class: [
6560
+ className,
6561
+ {
6562
+ active: isSelected
6563
+ }
6564
+ ],
6560
6565
  style,
6561
6566
  onClick: handleClick,
6562
6567
  ...rest,
@@ -724,7 +724,7 @@ function createContext(defaultValue) {
724
724
  }
725
725
  scope.context.set(id, props.value);
726
726
  return runInScope(scope, () => {
727
- const content = typeof props.children === "function" ? untrack(() => props.children()) : props.children;
727
+ const content = typeof props.children === "function" ? props.children() : props.children;
728
728
  if (typeof document !== "undefined") {
729
729
  const frag = document.createDocumentFragment();
730
730
  insertChild(frag, content);
@@ -724,7 +724,7 @@ function createContext(defaultValue) {
724
724
  }
725
725
  scope.context.set(id, props.value);
726
726
  return runInScope(scope, () => {
727
- const content = typeof props.children === "function" ? untrack(() => props.children()) : props.children;
727
+ const content = typeof props.children === "function" ? props.children() : props.children;
728
728
  if (typeof document !== "undefined") {
729
729
  const frag = document.createDocumentFragment();
730
730
  insertChild(frag, content);
@@ -724,7 +724,7 @@ function createContext(defaultValue) {
724
724
  }
725
725
  scope.context.set(id, props.value);
726
726
  return runInScope(scope, () => {
727
- const content = typeof props.children === "function" ? untrack(() => props.children()) : props.children;
727
+ const content = typeof props.children === "function" ? props.children() : props.children;
728
728
  if (typeof document !== "undefined") {
729
729
  const frag = document.createDocumentFragment();
730
730
  insertChild(frag, content);
package/dist/rpc/index.js CHANGED
@@ -934,7 +934,7 @@ function createContext(defaultValue) {
934
934
  }
935
935
  scope.context.set(id, props.value);
936
936
  return runInScope(scope, () => {
937
- const content = typeof props.children === "function" ? untrack(() => props.children()) : props.children;
937
+ const content = typeof props.children === "function" ? props.children() : props.children;
938
938
  if (typeof document !== "undefined") {
939
939
  const frag = document.createDocumentFragment();
940
940
  insertChild(frag, content);
@@ -307,7 +307,7 @@ function createContext(defaultValue) {
307
307
  }
308
308
  scope.context.set(id, props.value);
309
309
  return runInScope(scope, () => {
310
- const content = typeof props.children === "function" ? untrack(() => props.children()) : props.children;
310
+ const content = typeof props.children === "function" ? props.children() : props.children;
311
311
  if (typeof document !== "undefined") {
312
312
  const frag = document.createDocumentFragment();
313
313
  insertChild(frag, content);
@@ -724,7 +724,7 @@ function createContext(defaultValue) {
724
724
  }
725
725
  scope.context.set(id, props.value);
726
726
  return runInScope(scope, () => {
727
- const content = typeof props.children === "function" ? untrack(() => props.children()) : props.children;
727
+ const content = typeof props.children === "function" ? props.children() : props.children;
728
728
  if (typeof document !== "undefined") {
729
729
  const frag = document.createDocumentFragment();
730
730
  insertChild(frag, content);
@@ -724,7 +724,7 @@ function createContext(defaultValue) {
724
724
  }
725
725
  scope.context.set(id, props.value);
726
726
  return runInScope(scope, () => {
727
- const content = typeof props.children === "function" ? untrack(() => props.children()) : props.children;
727
+ const content = typeof props.children === "function" ? props.children() : props.children;
728
728
  if (typeof document !== "undefined") {
729
729
  const frag = document.createDocumentFragment();
730
730
  insertChild(frag, content);
@@ -307,7 +307,7 @@ function createContext(defaultValue) {
307
307
  }
308
308
  scope.context.set(id, props.value);
309
309
  return runInScope(scope, () => {
310
- const content = typeof props.children === "function" ? untrack(() => props.children()) : props.children;
310
+ const content = typeof props.children === "function" ? props.children() : props.children;
311
311
  if (typeof document !== "undefined") {
312
312
  const frag = document.createDocumentFragment();
313
313
  insertChild(frag, content);
package/dist/ui/index.js CHANGED
@@ -724,7 +724,7 @@ function createContext(defaultValue) {
724
724
  }
725
725
  scope.context.set(id, props.value);
726
726
  return runInScope(scope, () => {
727
- const content = typeof props.children === "function" ? untrack(() => props.children()) : props.children;
727
+ const content = typeof props.children === "function" ? props.children() : props.children;
728
728
  if (typeof document !== "undefined") {
729
729
  const frag = document.createDocumentFragment();
730
730
  insertChild(frag, content);
@@ -3774,7 +3774,12 @@ function TabsTrigger(props) {
3774
3774
  "data-value": value,
3775
3775
  tabIndex: () => isSelected() ? 0 : -1,
3776
3776
  disabled,
3777
- class: className,
3777
+ class: [
3778
+ className,
3779
+ {
3780
+ active: isSelected
3781
+ }
3782
+ ],
3778
3783
  style,
3779
3784
  onClick: handleClick,
3780
3785
  ...rest,
@@ -724,7 +724,7 @@ function createContext(defaultValue) {
724
724
  }
725
725
  scope.context.set(id, props.value);
726
726
  return runInScope(scope, () => {
727
- const content = typeof props.children === "function" ? untrack(() => props.children()) : props.children;
727
+ const content = typeof props.children === "function" ? props.children() : props.children;
728
728
  if (typeof document !== "undefined") {
729
729
  const frag = document.createDocumentFragment();
730
730
  insertChild(frag, content);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epoch32/visage",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Lightning-fast, zero-VDOM, fine-grained reactive UI library with full TypeScript support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,5 @@
1
1
  import { type Child, insertChild } from "../dom/render";
2
2
  import { getActiveScope, runInScope, Scope } from "./scope";
3
- import { untrack } from "./system";
4
3
 
5
4
  export interface Context<T> {
6
5
  id: symbol;
@@ -54,7 +53,7 @@ export function createContext<T>(defaultValue?: T): Context<T | undefined> {
54
53
  return runInScope(scope, () => {
55
54
  const content =
56
55
  typeof props.children === "function"
57
- ? untrack(() => (props.children as (...args: any[]) => any)())
56
+ ? (props.children as (...args: any[]) => any)()
58
57
  : props.children;
59
58
  if (typeof document !== "undefined") {
60
59
  const frag = document.createDocumentFragment();
package/src/ui/tabs.tsx CHANGED
@@ -227,7 +227,12 @@ export function TabsTrigger(props: TabsTriggerProps): Child {
227
227
  data-value={value}
228
228
  tabIndex={() => (isSelected() ? 0 : -1)}
229
229
  disabled={disabled}
230
- class={className}
230
+ class={[
231
+ className,
232
+ {
233
+ active: isSelected
234
+ }
235
+ ]}
231
236
  style={style}
232
237
  onClick={handleClick}
233
238
  {...rest}