Socket
Socket
Sign inDemoInstall

realar

Package Overview
Dependencies
1
Maintainers
1
Versions
129
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.6.0-alpha.8 to 0.6.0-alpha.9

1

build/index.d.ts
import { FC } from 'react';
import { Contextual, Isolate, Local, Observe, On, PoolEntry, SignalEntry, Sync, Transaction, Untrack, UseJsx, UseLocal, UseScoped, UseValue, UseValues, ValueEntry } from './types';
export { Value, ValueReadonly, Signal, SignalReadonly, Will } from './types';
export { value, signal, on, sync, cycle, prop, cache, shared, initial, free, mock, unmock, isolate, un, local, contextual, pool, transaction, untrack, observe, useValue, useValues, useLocal, useScoped, shared as useShared, Scope, useJsx, };

@@ -4,0 +5,0 @@ declare const value: ValueEntry;

2

build/index.js

@@ -480,3 +480,3 @@ "use strict";

h[key_is_signal] = 1;
h[key_has_default] = 1;
h[key_has_default] = get[key_handler] && get[key_handler][key_is_signal] ? get[key_handler][key_has_default] : 1;
if (set)

@@ -483,0 +483,0 @@ h[1] = set[key_set] ? set[key_set].bind() : (v) => set(v, untrack(ctx[key_get]));

import { FC } from 'react';
export { ValueEntry, SignalEntry, Local, Contextual, Observe, UseScoped, UseLocal, UseValue, UseValues, UseJsx, On, Sync, Transaction, Untrack, Isolate, PoolEntry, };
export { Value, ValueReadonly, Signal, SignalReadonly, Will, ValueEntry, SignalEntry, Local, Contextual, Observe, UseScoped, UseLocal, UseValue, UseValues, UseJsx, On, Sync, Transaction, Untrack, Isolate, PoolEntry, };
declare type Equals<X, Y> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? ([X] extends [Y] ? ([Y] extends [X] ? true : false) : false) : false;

@@ -17,2 +17,3 @@ declare type Re<T> = {

declare type WillEnsure<T> = ((p: T) => 0) extends ((p: Will<T>) => 0) ? [T] extends [Will<infer P>] ? Will<P> : Will<T> : Will<T>;
declare type WillIf<T, R> = ((p: T) => 0) extends ((p: Will<T>) => 0) ? [T] extends [Will<infer P>] ? WillEnsure<R> : R : R;
declare type On = {

@@ -213,3 +214,3 @@ <T>(target: Re<Will<T>>, fn: (value: T, prev: WillExpand<Will<T>>) => void): void;

untrack<R>(func: (value: WillExpand<O>) => R): Value<I, R>;
to(): Value<I, void>;
to(): Value<I, undefined>;
to<R>(value: R): Value<I, R>;

@@ -232,3 +233,3 @@ };

untrack<R>(func: (value: WillExpand<O>) => R): ValueReadonly<R>;
to(): ValueReadonly<void>;
to(): ValueReadonly<undefined>;
to<R>(value: R): ValueReadonly<R>;

@@ -242,6 +243,6 @@ };

map: {
<R>(func: (value: WillExtract<O>) => R): Signal<I, R>;
track<R>(func: (value: WillExtract<O>) => R): Signal<I, R>;
to(): Signal<I, void>;
to<R>(value: R): Signal<I, R>;
<R>(func: (value: WillExtract<O>) => R): Signal<I, WillIf<O, R>>;
track<R>(func: (value: WillExtract<O>) => R): Signal<I, WillIf<O, R>>;
to(): Signal<I, WillIf<O, undefined>>;
to<R>(value: R): Signal<I, WillIf<O, R>>;
};

@@ -253,6 +254,6 @@ pre: E_PreFilterUnTrackedPartial<I, Signal<I, O>> & {

wrap: {
<N, R>(pre: (value: N, state: WillExpand<O>) => I, map: (value: WillExtract<O>) => R): Signal<N, R>;
<N, R>(pre: (value: N, state: WillExpand<O>) => I, map: (value: WillExtract<O>) => R): Signal<N, WillIf<O, R>>;
};
as: {
value(): Value<I, O>;
value(): Value<I, WillExpand<O>>;
};

@@ -264,7 +265,7 @@ }

track<R>(func: (value: WillExtract<O>) => R): SignalReadonly<R>;
to(): SignalReadonly<void>;
to<R>(value: R): SignalReadonly<R>;
to(): SignalReadonly<WillIf<O, undefined>>;
to<R>(value: R): SignalReadonly<WillIf<O, R>>;
};
as: {
value(): ValueReadonly<O>;
value(): ValueReadonly<WillExpand<O>>;
};

@@ -292,4 +293,4 @@ }

from: {
<O>(get: Re<O>): ValueReadonly<O>;
<O, I>(get: Re<O>, set: ((value: I, state: O) => void) | ReWrit<I>): Value<I, O>;
<O>(get: Re<O>): ValueReadonly<WillExpand<O>>;
<O, I>(get: Re<O>, set: ((value: I, state: WillExpand<O>) => void) | ReWrit<I>): Value<I, WillExpand<O>>;
};

@@ -296,0 +297,0 @@ combine: {

{
"name": "realar",
"version": "0.6.0-alpha.8",
"version": "0.6.0-alpha.9",
"description": "Advanced state manager for React",

@@ -91,3 +91,3 @@ "repository": {

},
"gitHead": "9b039b6316977f030c152f42dde08ab2747a1b18"
"gitHead": "5c4a08ac3e7d25f38eedc35d8e13bc18ab34f683"
}

@@ -10,2 +10,11 @@ import React, { Context, FC } from 'react';

export {
// Types
Value,
ValueReadonly,
Signal,
SignalReadonly,
Will
} from './types';
export {
// Declarative framework

@@ -800,3 +809,3 @@ value,

h[key_is_signal] = 1
h[key_has_default] = 1;
h[key_has_default] = get[key_handler] && get[key_handler][key_is_signal] ? get[key_handler][key_has_default] : 1;
if (set) h[1] = set[key_set] ? set[key_set].bind() : (v) => set(v, untrack(ctx[key_get]));

@@ -803,0 +812,0 @@ const ctx = fill_entity(h, set ? proto_entity_writtable : proto_entity_readable);

@@ -8,2 +8,8 @@ import { FC } from 'react';

export {
Value,
ValueReadonly,
Signal,
SignalReadonly,
Will,
ValueEntry,

@@ -54,2 +60,3 @@ SignalEntry,

type WillEnsure<T> = ((p: T) => 0) extends ((p: Will<T>) => 0) ? [T] extends [Will<infer P>] ? Will<P> : Will<T> : Will<T>;
type WillIf<T, R> = ((p: T) => 0) extends ((p: Will<T>) => 0) ? [T] extends [Will<infer P>] ? WillEnsure<R> : R : R;

@@ -277,3 +284,3 @@ //

to(): Value<I, void>
to(): Value<I, undefined>
to<R>(value: R): Value<I, R>

@@ -301,3 +308,3 @@ }

to(): ValueReadonly<void>
to(): ValueReadonly<undefined>
to<R>(value: R): ValueReadonly<R>

@@ -316,7 +323,7 @@ }

map: {
<R>(func: (value: WillExtract<O>) => R): Signal<I, R> // untracked by default
track<R>(func: (value: WillExtract<O>) => R): Signal<I, R>
<R>(func: (value: WillExtract<O>) => R): Signal<I, WillIf<O, R>> // untracked by default
track<R>(func: (value: WillExtract<O>) => R): Signal<I, WillIf<O, R>>
to(): Signal<I, void>
to<R>(value: R): Signal<I, R>
to(): Signal<I, WillIf<O, undefined>>
to<R>(value: R): Signal<I, WillIf<O, R>>
}

@@ -328,6 +335,6 @@ pre: E_PreFilterUnTrackedPartial<I, Signal<I, O>> & {

wrap: {
<N, R>(pre: (value: N, state: WillExpand<O>) => I, map: (value: WillExtract<O>) => R): Signal<N, R>
<N, R>(pre: (value: N, state: WillExpand<O>) => I, map: (value: WillExtract<O>) => R): Signal<N, WillIf<O, R>>
}
as: {
value(): Value<I, O>
value(): Value<I, WillExpand<O>>
}

@@ -345,7 +352,7 @@ }

to(): SignalReadonly<void>
to<R>(value: R): SignalReadonly<R>
to(): SignalReadonly<WillIf<O, undefined>>
to<R>(value: R): SignalReadonly<WillIf<O, R>>
}
as: {
value(): ValueReadonly<O>
value(): ValueReadonly<WillExpand<O>>
}

@@ -390,4 +397,4 @@ }

from: {
<O>(get: Re<O>): ValueReadonly<O>
<O, I>(get: Re<O>, set: ((value: I, state: O) => void) | ReWrit<I>): Value<I, O>
<O>(get: Re<O>): ValueReadonly<WillExpand<O>>
<O, I>(get: Re<O>, set: ((value: I, state: WillExpand<O>) => void) | ReWrit<I>): Value<I, WillExpand<O>>
}

@@ -394,0 +401,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc