@plitzi/nexus 0.32.0 → 0.32.2
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 +39 -0
- package/README.md +211 -27
- package/dist/advanced/index.d.ts +5 -0
- package/dist/advanced/index.mjs +10 -0
- package/dist/async/index.d.ts +0 -2
- package/dist/async/index.mjs +1 -3
- package/dist/createStore/createStore.d.ts +3 -43
- package/dist/createStore/createStore.mjs +85 -100
- package/dist/createStore/helpers/PathTrie.mjs +14 -14
- package/dist/createStore/helpers/createChainReads.d.ts +1 -1
- package/dist/createStore/helpers/createChainReads.mjs +22 -13
- package/dist/createStore/helpers/createSetState.mjs +11 -9
- package/dist/createStore/helpers/forwardParentChanges.mjs +16 -13
- package/dist/createStore/index.mjs +3 -3
- package/dist/derived/index.d.ts +0 -1
- package/dist/derived/index.mjs +1 -2
- package/dist/entities/createEntityStore.d.ts +0 -3
- package/dist/entities/createEntityStore.mjs +71 -78
- package/dist/env.d.ts +4 -0
- package/dist/env.mjs +3 -0
- package/dist/history/index.d.ts +0 -2
- package/dist/history/index.mjs +1 -2
- package/dist/index.d.ts +23 -15
- package/dist/index.mjs +14 -22
- package/dist/middleware/historyMiddleware.mjs +26 -26
- package/dist/middleware/persistMiddleware.mjs +11 -11
- package/dist/middleware/recorderMiddleware.d.ts +21 -0
- package/dist/middleware/recorderMiddleware.mjs +33 -0
- package/dist/{StoreContext.d.ts → react/StoreContext.d.ts} +1 -1
- package/dist/{StoreContext.mjs → react/StoreContext.mjs} +1 -1
- package/dist/{StoreProvider.d.ts → react/StoreProvider.d.ts} +4 -2
- package/dist/react/StoreProvider.mjs +62 -0
- package/dist/react/createStoreHook.d.ts +44 -0
- package/dist/react/createStoreHook.mjs +27 -0
- package/dist/{createStore → react}/hooks/shared.mjs +2 -2
- package/dist/{async → react}/hooks/useAsync.d.ts +1 -1
- package/dist/{async → react}/hooks/useAsync.mjs +1 -1
- package/dist/{async → react}/hooks/useAsyncValue.d.ts +1 -1
- package/dist/{async → react}/hooks/useAsyncValue.mjs +1 -1
- package/dist/{derived → react}/hooks/useDerived.d.ts +1 -1
- package/dist/{derived → react}/hooks/useDerived.mjs +1 -1
- package/dist/react/hooks/useEntity.d.ts +10 -0
- package/dist/react/hooks/useEntity.mjs +23 -0
- package/dist/{createStore → react}/hooks/useStore.mjs +2 -2
- package/dist/{createStore → react}/hooks/useStoreById.mjs +2 -2
- package/dist/{createStore → react}/hooks/useStoreGetter.mjs +1 -1
- package/dist/react/hooks/useStoreHistory.mjs +29 -0
- package/dist/{createStore → react}/hooks/useStoreSetter.mjs +1 -1
- package/dist/{createStore → react}/hooks/useStoreSync.mjs +2 -2
- package/dist/react/index.d.ts +17 -0
- package/dist/react/index.mjs +16 -0
- package/dist/{helpers → react}/useIsomorphicLayoutEffect.mjs +1 -1
- package/dist/types/StoreTypes.d.ts +21 -0
- package/dist/vue/index.d.ts +8 -0
- package/dist/vue/index.mjs +7 -0
- package/dist/vue/injection.d.ts +3 -0
- package/dist/vue/injection.mjs +13 -0
- package/dist/vue/useAsync.d.ts +3 -0
- package/dist/vue/useAsync.mjs +10 -0
- package/dist/vue/useDerived.d.ts +3 -0
- package/dist/vue/useDerived.mjs +10 -0
- package/dist/vue/useEntity.d.ts +11 -0
- package/dist/vue/useEntity.mjs +29 -0
- package/dist/vue/useStore.d.ts +13 -0
- package/dist/vue/useStore.mjs +31 -0
- package/dist/vue/useStoreHistory.d.ts +12 -0
- package/dist/vue/useStoreHistory.mjs +33 -0
- package/logo.svg +77 -22
- package/package.json +133 -56
- package/dist/StoreProvider.mjs +0 -57
- package/dist/history/hooks/useStoreHistory.mjs +0 -24
- /package/dist/{createStore → react}/hooks/shared.d.ts +0 -0
- /package/dist/{createStore → react}/hooks/useStore.d.ts +0 -0
- /package/dist/{createStore → react}/hooks/useStoreById.d.ts +0 -0
- /package/dist/{createStore → react}/hooks/useStoreGetter.d.ts +0 -0
- /package/dist/{history → react}/hooks/useStoreHistory.d.ts +0 -0
- /package/dist/{createStore → react}/hooks/useStoreSetter.d.ts +0 -0
- /package/dist/{createStore → react}/hooks/useStoreSync.d.ts +0 -0
- /package/dist/{helpers → react}/useIsomorphicLayoutEffect.d.ts +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { default as StoreProvider, StoreContext, StoreRegistryContext } from './StoreProvider';
|
|
2
|
+
export { findStoreInRegistry } from './StoreContext';
|
|
3
|
+
export { createStoreHook } from './createStoreHook';
|
|
4
|
+
export { default as useStore, defaultMultiEqualityFn } from './hooks/useStore';
|
|
5
|
+
export { default as useStoreById } from './hooks/useStoreById';
|
|
6
|
+
export { default as useStoreGetter } from './hooks/useStoreGetter';
|
|
7
|
+
export { default as useStoreSetter } from './hooks/useStoreSetter';
|
|
8
|
+
export { default as useStoreSync } from './hooks/useStoreSync';
|
|
9
|
+
export { useAsync } from './hooks/useAsync';
|
|
10
|
+
export { useAsyncValue } from './hooks/useAsyncValue';
|
|
11
|
+
export { useDerived } from './hooks/useDerived';
|
|
12
|
+
export { useStoreHistory } from './hooks/useStoreHistory';
|
|
13
|
+
export { useEntity, useEntityOne, useEntityIds, useEntityAll } from './hooks/useEntity';
|
|
14
|
+
export { default as useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect';
|
|
15
|
+
export type { StoreProviderProps } from './StoreProvider';
|
|
16
|
+
export type { StoreRegistry } from './StoreContext';
|
|
17
|
+
export type { UseStoreHistoryReturn } from './hooks/useStoreHistory';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { StoreContext as e, StoreRegistryContext as t, findStoreInRegistry as n } from "./StoreContext.mjs";
|
|
2
|
+
import { defaultMultiEqualityFn as r } from "./hooks/shared.mjs";
|
|
3
|
+
import i from "./useIsomorphicLayoutEffect.mjs";
|
|
4
|
+
import a from "./hooks/useStoreSync.mjs";
|
|
5
|
+
import o from "./StoreProvider.mjs";
|
|
6
|
+
import s from "./hooks/useStore.mjs";
|
|
7
|
+
import c from "./hooks/useStoreGetter.mjs";
|
|
8
|
+
import l from "./hooks/useStoreSetter.mjs";
|
|
9
|
+
import { createStoreHook as u } from "./createStoreHook.mjs";
|
|
10
|
+
import d from "./hooks/useStoreById.mjs";
|
|
11
|
+
import { useAsync as f } from "./hooks/useAsync.mjs";
|
|
12
|
+
import { useAsyncValue as p } from "./hooks/useAsyncValue.mjs";
|
|
13
|
+
import { useDerived as m } from "./hooks/useDerived.mjs";
|
|
14
|
+
import { useStoreHistory as h } from "./hooks/useStoreHistory.mjs";
|
|
15
|
+
import { useEntity as g, useEntityAll as _, useEntityIds as v, useEntityOne as y } from "./hooks/useEntity.mjs";
|
|
16
|
+
export { e as StoreContext, o as StoreProvider, t as StoreRegistryContext, u as createStoreHook, r as defaultMultiEqualityFn, n as findStoreInRegistry, f as useAsync, p as useAsyncValue, m as useDerived, g as useEntity, _ as useEntityAll, v as useEntityIds, y as useEntityOne, i as useIsomorphicLayoutEffect, s as useStore, d as useStoreById, c as useStoreGetter, h as useStoreHistory, l as useStoreSetter, a as useStoreSync };
|
|
@@ -27,6 +27,8 @@ export type StoreChange<T> = {
|
|
|
27
27
|
path: PathOf<T> | undefined;
|
|
28
28
|
prev: T;
|
|
29
29
|
next: T;
|
|
30
|
+
prevValue: unknown;
|
|
31
|
+
nextValue: unknown;
|
|
30
32
|
};
|
|
31
33
|
export type ChangeListener<T> = (change: StoreChange<T>) => void;
|
|
32
34
|
export declare const CANCEL: unique symbol;
|
|
@@ -74,12 +76,31 @@ export type BoundStore<TBase> = {
|
|
|
74
76
|
setState: SetFromBaseFn<TBase>;
|
|
75
77
|
subscribe: (listener: Listener) => () => void;
|
|
76
78
|
subscribePath: TBase extends object ? <SubP extends PathOf<TBase>>(subPath: SubP, listener: Listener) => () => void : (listener: Listener) => () => void;
|
|
79
|
+
get: TBase extends object ? {
|
|
80
|
+
(): TBase | undefined;
|
|
81
|
+
<SubP extends PathOf<TBase>>(subPath: SubP): PathValue<TBase, SubP> | undefined;
|
|
82
|
+
} : () => TBase | undefined;
|
|
83
|
+
set: SetFromBaseFn<TBase>;
|
|
84
|
+
watch: TBase extends object ? {
|
|
85
|
+
(listener: Listener): () => void;
|
|
86
|
+
<SubP extends PathOf<TBase>>(subPath: SubP, listener: Listener): () => void;
|
|
87
|
+
} : (listener: Listener) => () => void;
|
|
77
88
|
};
|
|
78
89
|
export type StoreApi<T> = {
|
|
79
90
|
id?: string;
|
|
91
|
+
scopePath?: string;
|
|
80
92
|
getState: GetState<T>;
|
|
81
93
|
getPath: <P extends PathOf<T>>(path: P) => PathValue<T, P> | undefined;
|
|
82
94
|
setState: SetState<T>;
|
|
95
|
+
get: {
|
|
96
|
+
(): T;
|
|
97
|
+
<P extends PathOf<T>>(path: P): PathValue<T, P> | undefined;
|
|
98
|
+
};
|
|
99
|
+
set: SetState<T>;
|
|
100
|
+
watch: {
|
|
101
|
+
(listener: Listener): () => void;
|
|
102
|
+
<P extends PathOf<T>>(path: P, listener: Listener): () => void;
|
|
103
|
+
};
|
|
83
104
|
withBase: <P extends PathOf<T>>(basePath: P) => BoundStore<NonNullable<PathValue<T, P>>>;
|
|
84
105
|
batch: <R>(fn: () => R) => R;
|
|
85
106
|
subscribe: (listener: Listener) => () => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { provideStore, injectStore } from './injection';
|
|
2
|
+
export { useStore, useStoreValue, createStoreComposable } from './useStore';
|
|
3
|
+
export { useEntity, useEntityOne, useEntityIds, useEntityAll } from './useEntity';
|
|
4
|
+
export { useDerived } from './useDerived';
|
|
5
|
+
export { useAsync } from './useAsync';
|
|
6
|
+
export { useStoreHistory } from './useStoreHistory';
|
|
7
|
+
export type { UseStoreOptions } from './useStore';
|
|
8
|
+
export type { UseStoreHistoryReturn } from './useStoreHistory';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { injectStore as e, provideStore as t } from "./injection.mjs";
|
|
2
|
+
import { createStoreComposable as n, useStore as r, useStoreValue as i } from "./useStore.mjs";
|
|
3
|
+
import { useEntity as a, useEntityAll as o, useEntityIds as s, useEntityOne as c } from "./useEntity.mjs";
|
|
4
|
+
import { useDerived as l } from "./useDerived.mjs";
|
|
5
|
+
import { useAsync as u } from "./useAsync.mjs";
|
|
6
|
+
import { useStoreHistory as d } from "./useStoreHistory.mjs";
|
|
7
|
+
export { n as createStoreComposable, e as injectStore, t as provideStore, u as useAsync, l as useDerived, a as useEntity, o as useEntityAll, s as useEntityIds, c as useEntityOne, r as useStore, d as useStoreHistory, i as useStoreValue };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { inject as e, provide as t } from "vue";
|
|
2
|
+
//#region src/vue/injection.ts
|
|
3
|
+
var n = Symbol("@plitzi/nexus/vue/store");
|
|
4
|
+
function r(e) {
|
|
5
|
+
t(n, e);
|
|
6
|
+
}
|
|
7
|
+
function i() {
|
|
8
|
+
let t = e(n);
|
|
9
|
+
if (!t) throw Error("@plitzi/nexus/vue: no store provided. Call provideStore(store) in a parent component, or pass { store } to the composable.");
|
|
10
|
+
return t;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { i as injectStore, r as provideStore };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EntityId } from '../entities/createEntityAdapter';
|
|
2
|
+
import { EntityStore } from '../entities/createEntityStore';
|
|
3
|
+
import { Ref } from 'vue';
|
|
4
|
+
export declare function useEntityOne<T>(store: EntityStore<T>, id: EntityId): Ref<T | undefined>;
|
|
5
|
+
export declare function useEntityIds<T>(store: EntityStore<T>): Ref<string[]>;
|
|
6
|
+
export declare function useEntityAll<T>(store: EntityStore<T>): Ref<T[]>;
|
|
7
|
+
export declare function useEntity<T>(store: EntityStore<T>): {
|
|
8
|
+
useOne: (id: EntityId) => Ref<T | undefined, T | undefined>;
|
|
9
|
+
useIds: () => Ref<string[], string[]>;
|
|
10
|
+
useAll: () => Ref<T[], T[]>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { onScopeDispose as e, shallowRef as t } from "vue";
|
|
2
|
+
//#region src/vue/useEntity.ts
|
|
3
|
+
function n(n, r) {
|
|
4
|
+
let i = String(r), a = t(n.getOne(i));
|
|
5
|
+
return e(n.subscribeOne(i, () => {
|
|
6
|
+
a.value = n.getOne(i);
|
|
7
|
+
})), a;
|
|
8
|
+
}
|
|
9
|
+
function r(n) {
|
|
10
|
+
let r = t(n.getIds());
|
|
11
|
+
return e(n.subscribeIds(() => {
|
|
12
|
+
r.value = n.getIds();
|
|
13
|
+
})), r;
|
|
14
|
+
}
|
|
15
|
+
function i(n) {
|
|
16
|
+
let r = t(n.getAll());
|
|
17
|
+
return e(n.subscribeAll(() => {
|
|
18
|
+
r.value = n.getAll();
|
|
19
|
+
})), r;
|
|
20
|
+
}
|
|
21
|
+
function a(e) {
|
|
22
|
+
return {
|
|
23
|
+
useOne: (t) => n(e, t),
|
|
24
|
+
useIds: () => r(e),
|
|
25
|
+
useAll: () => i(e)
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { a as useEntity, i as useEntityAll, r as useEntityIds, n as useEntityOne };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PathOf, PathValue, StoreApi } from '../types';
|
|
2
|
+
import { Ref, WritableComputedRef } from 'vue';
|
|
3
|
+
export type UseStoreOptions<TState extends object> = {
|
|
4
|
+
store?: StoreApi<TState>;
|
|
5
|
+
};
|
|
6
|
+
export declare function useStoreValue<TState extends object>(options?: UseStoreOptions<TState>): Ref<TState>;
|
|
7
|
+
export declare function useStoreValue<TState extends object, P extends PathOf<TState>>(path: P, options?: UseStoreOptions<TState>): Ref<PathValue<TState, P> | undefined>;
|
|
8
|
+
export declare function useStore<TState extends object, P extends PathOf<TState>>(path: P, options?: UseStoreOptions<TState>): WritableComputedRef<PathValue<TState, P> | undefined>;
|
|
9
|
+
export declare function createStoreComposable<TState extends object>(): {
|
|
10
|
+
useStore: <P extends PathOf<TState>>(path: P, options?: UseStoreOptions<TState>) => WritableComputedRef<PathValue<TState, P> | undefined, PathValue<TState, P> | undefined>;
|
|
11
|
+
useStoreValue: <P extends PathOf<TState>>(path: P, options?: UseStoreOptions<TState>) => Ref<PathValue<TState, P> | undefined, PathValue<TState, P> | undefined>;
|
|
12
|
+
useStoreState: (options?: UseStoreOptions<TState>) => Ref<TState, TState>;
|
|
13
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { injectStore as e } from "./injection.mjs";
|
|
2
|
+
import { computed as t, onScopeDispose as n, shallowRef as r } from "vue";
|
|
3
|
+
//#region src/vue/useStore.ts
|
|
4
|
+
function i(e, t) {
|
|
5
|
+
let i = () => t === void 0 ? e.getState() : e.getPath(t), a = r(i());
|
|
6
|
+
return n(t === void 0 ? e.subscribe(() => {
|
|
7
|
+
a.value = i();
|
|
8
|
+
}) : e.subscribePath(t, () => {
|
|
9
|
+
a.value = i();
|
|
10
|
+
})), a;
|
|
11
|
+
}
|
|
12
|
+
function a(t, n) {
|
|
13
|
+
let r = typeof t == "string", a = r ? t : void 0;
|
|
14
|
+
return i(((r ? n : t) ?? {}).store ?? e(), a);
|
|
15
|
+
}
|
|
16
|
+
function o(n, r) {
|
|
17
|
+
let i = r?.store ?? e(), o = a(n, { store: i });
|
|
18
|
+
return t({
|
|
19
|
+
get: () => o.value,
|
|
20
|
+
set: (e) => i.set(n, e)
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function s() {
|
|
24
|
+
return {
|
|
25
|
+
useStore: (e, t) => o(e, t),
|
|
26
|
+
useStoreValue: (e, t) => a(e, t),
|
|
27
|
+
useStoreState: (e) => a(e)
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { s as createStoreComposable, o as useStore, a as useStoreValue };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HistorySnapshot } from '../middleware/historyMiddleware';
|
|
2
|
+
import { StoreApi } from '../types';
|
|
3
|
+
import { ComputedRef } from 'vue';
|
|
4
|
+
export type UseStoreHistoryReturn<TState> = HistorySnapshot<TState> & {
|
|
5
|
+
undo: () => void;
|
|
6
|
+
redo: () => void;
|
|
7
|
+
travelTo: (index: number) => void;
|
|
8
|
+
clear: () => void;
|
|
9
|
+
};
|
|
10
|
+
export declare function useStoreHistory<TState extends object>(options?: {
|
|
11
|
+
store?: StoreApi<TState>;
|
|
12
|
+
}): ComputedRef<UseStoreHistoryReturn<TState>>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { getStoreHistory as e } from "../middleware/historyMiddleware.mjs";
|
|
2
|
+
import { isProd as t } from "../env.mjs";
|
|
3
|
+
import { injectStore as n } from "./injection.mjs";
|
|
4
|
+
import { computed as r, onScopeDispose as i, shallowRef as a } from "vue";
|
|
5
|
+
//#region src/vue/useStoreHistory.ts
|
|
6
|
+
var o = {
|
|
7
|
+
entries: [],
|
|
8
|
+
index: -1,
|
|
9
|
+
canUndo: !1,
|
|
10
|
+
canRedo: !1
|
|
11
|
+
}, s = () => {}, c = /* @__PURE__ */ new WeakSet(), l = (e) => {
|
|
12
|
+
t || c.has(e) || (c.add(e), console.warn("[nexus] useStoreHistory: this store has no history. Add `historyMiddleware()` to its middlewares to record an action log — until then the composable returns an empty, no-op view."));
|
|
13
|
+
};
|
|
14
|
+
function u(t) {
|
|
15
|
+
let c = t?.store ?? n(), u = e(c);
|
|
16
|
+
u || l(c);
|
|
17
|
+
let d = a(u ? u.getSnapshot() : o);
|
|
18
|
+
u && i(u.subscribe(() => {
|
|
19
|
+
d.value = u.getSnapshot();
|
|
20
|
+
}));
|
|
21
|
+
let f = {
|
|
22
|
+
undo: u?.undo ?? s,
|
|
23
|
+
redo: u?.redo ?? s,
|
|
24
|
+
travelTo: u?.travelTo ?? s,
|
|
25
|
+
clear: u?.clear ?? s
|
|
26
|
+
};
|
|
27
|
+
return r(() => ({
|
|
28
|
+
...d.value,
|
|
29
|
+
...f
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { u as useStoreHistory };
|
package/logo.svg
CHANGED
|
@@ -1,29 +1,51 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="210" viewBox="0 0 640 210" fill="none" role="img" aria-label="@plitzi/nexus — one store, every framework">
|
|
2
2
|
<defs>
|
|
3
|
-
<linearGradient id="bg" x1="0" y1="0" x2="640" y2="
|
|
4
|
-
<stop stop-color="#
|
|
5
|
-
<stop offset="1" stop-color="#
|
|
3
|
+
<linearGradient id="bg" x1="0" y1="0" x2="640" y2="210" gradientUnits="userSpaceOnUse">
|
|
4
|
+
<stop stop-color="#0b0b11" />
|
|
5
|
+
<stop offset="1" stop-color="#15131f" />
|
|
6
6
|
</linearGradient>
|
|
7
|
+
<radialGradient id="glow" cx="0.5" cy="0.5" r="0.5">
|
|
8
|
+
<stop stop-color="#7c3aed" stop-opacity="0.55" />
|
|
9
|
+
<stop offset="1" stop-color="#7c3aed" stop-opacity="0" />
|
|
10
|
+
</radialGradient>
|
|
7
11
|
<linearGradient id="mark" x1="0" y1="0" x2="1" y2="1">
|
|
8
|
-
<stop stop-color="#
|
|
12
|
+
<stop stop-color="#c4b5fd" />
|
|
9
13
|
<stop offset="1" stop-color="#7c3aed" />
|
|
10
14
|
</linearGradient>
|
|
11
|
-
<linearGradient id="
|
|
12
|
-
<stop stop-color="#
|
|
13
|
-
<stop offset="1" stop-color="#
|
|
15
|
+
<linearGradient id="hero" x1="0" y1="0" x2="1" y2="0">
|
|
16
|
+
<stop stop-color="#8b5cf6" />
|
|
17
|
+
<stop offset="1" stop-color="#6d28d9" />
|
|
14
18
|
</linearGradient>
|
|
19
|
+
<linearGradient id="word" x1="150" y1="0" x2="600" y2="0" gradientUnits="userSpaceOnUse">
|
|
20
|
+
<stop stop-color="#ffffff" />
|
|
21
|
+
<stop offset="1" stop-color="#b794f6" />
|
|
22
|
+
</linearGradient>
|
|
23
|
+
<linearGradient id="pill" x1="0" y1="0" x2="0" y2="1">
|
|
24
|
+
<stop stop-color="#ffffff" stop-opacity="0.10" />
|
|
25
|
+
<stop offset="1" stop-color="#ffffff" stop-opacity="0.025" />
|
|
26
|
+
</linearGradient>
|
|
27
|
+
<filter id="soft" x="-60%" y="-60%" width="220%" height="220%">
|
|
28
|
+
<feGaussianBlur stdDeviation="7" result="b" />
|
|
29
|
+
<feMerge>
|
|
30
|
+
<feMergeNode in="b" />
|
|
31
|
+
<feMergeNode in="SourceGraphic" />
|
|
32
|
+
</feMerge>
|
|
33
|
+
</filter>
|
|
15
34
|
</defs>
|
|
16
35
|
|
|
17
|
-
<rect width="640" height="
|
|
18
|
-
<rect x="0.5" y="0.5" width="639" height="
|
|
36
|
+
<rect width="640" height="210" rx="22" fill="url(#bg)" />
|
|
37
|
+
<rect x="0.5" y="0.5" width="639" height="209" rx="21.5" fill="none" stroke="#2a2740" />
|
|
19
38
|
|
|
20
|
-
|
|
39
|
+
<!-- ambient glow -->
|
|
40
|
+
<circle cx="92" cy="105" r="150" fill="url(#glow)" />
|
|
21
41
|
|
|
22
42
|
<!-- nexus mark -->
|
|
23
|
-
<g transform="translate(
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
43
|
+
<g transform="translate(92 105)">
|
|
44
|
+
<g filter="url(#soft)">
|
|
45
|
+
<rect x="-38" y="-38" width="76" height="76" rx="20" fill="url(#mark)" />
|
|
46
|
+
</g>
|
|
47
|
+
<g transform="scale(2.1)" stroke="#fff" stroke-linecap="round" stroke-linejoin="round">
|
|
48
|
+
<path d="M0 -8.5 7.4 -4.25 7.4 4.25 0 8.5 -7.4 4.25 -7.4 -4.25 Z" stroke-width="1.2" stroke-opacity="0.4" />
|
|
27
49
|
<g stroke-width="1.5">
|
|
28
50
|
<path d="M0 0 0 -8.5" />
|
|
29
51
|
<path d="M0 0 7.4 -4.25" />
|
|
@@ -33,7 +55,7 @@
|
|
|
33
55
|
<path d="M0 0 -7.4 -4.25" />
|
|
34
56
|
</g>
|
|
35
57
|
</g>
|
|
36
|
-
<g transform="scale(2.
|
|
58
|
+
<g transform="scale(2.1)" fill="#fff">
|
|
37
59
|
<circle cx="0" cy="-8.5" r="1.7" />
|
|
38
60
|
<circle cx="7.4" cy="-4.25" r="1.7" />
|
|
39
61
|
<circle cx="7.4" cy="4.25" r="1.7" />
|
|
@@ -45,13 +67,46 @@
|
|
|
45
67
|
</g>
|
|
46
68
|
|
|
47
69
|
<!-- wordmark -->
|
|
48
|
-
<text x="
|
|
70
|
+
<text x="166" y="70" font-family="'Inter', system-ui, sans-serif" font-size="46" font-weight="800" letter-spacing="-1.5" fill="url(#word)">
|
|
49
71
|
@plitzi/nexus
|
|
50
72
|
</text>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
path subscriptions · scoped stores · time-travel
|
|
73
|
+
|
|
74
|
+
<!-- punchy tagline -->
|
|
75
|
+
<text x="168" y="103" font-family="'Inter', system-ui, sans-serif" font-size="21" font-weight="600" letter-spacing="-0.3" fill="#ece7ff">
|
|
76
|
+
One store. Every framework.
|
|
56
77
|
</text>
|
|
78
|
+
|
|
79
|
+
<!-- hero attribute — the headline feature -->
|
|
80
|
+
<g>
|
|
81
|
+
<rect x="166" y="120" width="264" height="32" rx="16" fill="url(#hero)" filter="url(#soft)" />
|
|
82
|
+
<rect x="166" y="120" width="264" height="32" rx="16" fill="url(#hero)" />
|
|
83
|
+
<path transform="translate(186 136)" d="M2.2 -8 L-4.4 1.2 L0 1.2 L-2.2 8 L4.4 -1.2 L0 -1.2 Z" fill="#fff" />
|
|
84
|
+
<text x="200" y="141" font-family="'Inter', system-ui, sans-serif" font-size="14.5" font-weight="700" letter-spacing="-0.2" fill="#ffffff">
|
|
85
|
+
Re-renders only what changed
|
|
86
|
+
</text>
|
|
87
|
+
</g>
|
|
88
|
+
|
|
89
|
+
<!-- framework pills -->
|
|
90
|
+
<g font-family="'JetBrains Mono', ui-monospace, monospace" font-size="13" font-weight="500" letter-spacing="0.3" text-anchor="middle">
|
|
91
|
+
<g>
|
|
92
|
+
<rect x="166" y="164" width="74" height="28" rx="14" fill="url(#pill)" stroke="#a78bfa" stroke-opacity="0.4" />
|
|
93
|
+
<text x="203" y="182.5" fill="#d4c6ff">React</text>
|
|
94
|
+
</g>
|
|
95
|
+
<g>
|
|
96
|
+
<rect x="250" y="164" width="60" height="28" rx="14" fill="url(#pill)" stroke="#a78bfa" stroke-opacity="0.4" />
|
|
97
|
+
<text x="280" y="182.5" fill="#d4c6ff">Vue</text>
|
|
98
|
+
</g>
|
|
99
|
+
<g>
|
|
100
|
+
<rect x="320" y="164" width="66" height="28" rx="14" fill="url(#pill)" stroke="#a78bfa" stroke-opacity="0.4" />
|
|
101
|
+
<text x="353" y="182.5" fill="#d4c6ff">Next</text>
|
|
102
|
+
</g>
|
|
103
|
+
<g>
|
|
104
|
+
<rect x="396" y="164" width="80" height="28" rx="14" fill="url(#pill)" stroke="#a78bfa" stroke-opacity="0.4" />
|
|
105
|
+
<text x="436" y="182.5" fill="#d4c6ff">Svelte</text>
|
|
106
|
+
</g>
|
|
107
|
+
<g>
|
|
108
|
+
<rect x="486" y="164" width="100" height="28" rx="14" fill="url(#pill)" stroke="#a78bfa" stroke-opacity="0.4" />
|
|
109
|
+
<text x="536" y="182.5" fill="#d4c6ff">SSR · RSC</text>
|
|
110
|
+
</g>
|
|
111
|
+
</g>
|
|
57
112
|
</svg>
|