streetui 2.6.0 → 2.8.0
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/bin.cjs +1 -1
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/bin.js.map +1 -1
- package/dist/create-bin.cjs +1 -1
- package/dist/create-bin.cjs.map +1 -1
- package/dist/create-bin.js +1 -1
- package/dist/create-bin.js.map +1 -1
- package/dist/{hydration-diagnostics-D1GlzulR.d.cts → hydration-diagnostics-CvttL7mx.d.cts} +3 -3
- package/dist/{hydration-diagnostics-D1GlzulR.d.ts → hydration-diagnostics-CvttL7mx.d.ts} +3 -3
- package/dist/index.cjs +1391 -207
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1031 -15
- package/dist/index.d.ts +1031 -15
- package/dist/index.js +1325 -207
- package/dist/index.js.map +1 -1
- package/dist/{renderer-interface-BzLwBsyj.d.cts → renderer-interface-Cfa1Ts21.d.cts} +1 -1
- package/dist/{renderer-interface-CmVlxE95.d.ts → renderer-interface-WAzq2EVw.d.ts} +1 -1
- package/dist/{server-BP651UK6.d.ts → server-B94YjpnN.d.ts} +1 -1
- package/dist/{server-LJGg4GyH.d.cts → server-C2Wje065.d.cts} +1 -1
- package/dist/server.cjs +8 -1
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +8 -1
- package/dist/server.js.map +1 -1
- package/dist/testing.cjs +190 -183
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +4 -4
- package/dist/testing.d.ts +4 -4
- package/dist/testing.js +190 -183
- package/dist/testing.js.map +1 -1
- package/package.json +1 -1
package/dist/testing.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as StreetApp, H as HydrationDiagnostic, a as ComponentDefinition, b as ContainerBuilder } from './hydration-diagnostics-
|
|
2
|
-
export { V as VERSION } from './hydration-diagnostics-
|
|
3
|
-
import { R as RenderHandle } from './renderer-interface-
|
|
4
|
-
export * from 'streetui/diagnostics';
|
|
1
|
+
import { S as StreetApp, H as HydrationDiagnostic, a as ComponentDefinition, b as ContainerBuilder } from './hydration-diagnostics-CvttL7mx.cjs';
|
|
2
|
+
export { V as VERSION } from './hydration-diagnostics-CvttL7mx.cjs';
|
|
3
|
+
import { R as RenderHandle } from './renderer-interface-Cfa1Ts21.cjs';
|
|
4
|
+
export * from '@streetui/compiler/diagnostics';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* StreetUI Test Renderer.
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as StreetApp, H as HydrationDiagnostic, a as ComponentDefinition, b as ContainerBuilder } from './hydration-diagnostics-
|
|
2
|
-
export { V as VERSION } from './hydration-diagnostics-
|
|
3
|
-
import { R as RenderHandle } from './renderer-interface-
|
|
4
|
-
export * from 'streetui/diagnostics';
|
|
1
|
+
import { S as StreetApp, H as HydrationDiagnostic, a as ComponentDefinition, b as ContainerBuilder } from './hydration-diagnostics-CvttL7mx.js';
|
|
2
|
+
export { V as VERSION } from './hydration-diagnostics-CvttL7mx.js';
|
|
3
|
+
import { R as RenderHandle } from './renderer-interface-WAzq2EVw.js';
|
|
4
|
+
export * from '@streetui/compiler/diagnostics';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* StreetUI Test Renderer.
|
package/dist/testing.js
CHANGED
|
@@ -921,6 +921,13 @@ function applyProp(dom, element, name, value) {
|
|
|
921
921
|
}
|
|
922
922
|
return;
|
|
923
923
|
}
|
|
924
|
+
if (name.startsWith("style.")) {
|
|
925
|
+
const el = element;
|
|
926
|
+
const prop = name.slice("style.".length);
|
|
927
|
+
if (value === null || value === void 0) el.style.removeProperty(prop);
|
|
928
|
+
else el.style.setProperty(prop, String(value));
|
|
929
|
+
return;
|
|
930
|
+
}
|
|
924
931
|
if (value === null || value === void 0 || value === false) {
|
|
925
932
|
dom.removeAttribute(element, name);
|
|
926
933
|
return;
|
|
@@ -2013,6 +2020,188 @@ function wireComponentBehavior(ctx, graphNode, instance) {
|
|
|
2013
2020
|
for (const cleanup of fn()) instance.trackCleanup(cleanup);
|
|
2014
2021
|
}
|
|
2015
2022
|
|
|
2023
|
+
// ../state/src/signal.ts
|
|
2024
|
+
var _activeConsumer = null;
|
|
2025
|
+
function withConsumer(consumer, fn) {
|
|
2026
|
+
const prev = _activeConsumer;
|
|
2027
|
+
_activeConsumer = consumer;
|
|
2028
|
+
try {
|
|
2029
|
+
return fn();
|
|
2030
|
+
} finally {
|
|
2031
|
+
_activeConsumer = prev;
|
|
2032
|
+
}
|
|
2033
|
+
}
|
|
2034
|
+
var _batchDepth = 0;
|
|
2035
|
+
var _pendingFlushes = /* @__PURE__ */ new Map();
|
|
2036
|
+
function _enqueueBatchFlush(sig, value) {
|
|
2037
|
+
_pendingFlushes.set(sig, { signal: sig, value });
|
|
2038
|
+
}
|
|
2039
|
+
var Signal = class {
|
|
2040
|
+
_value;
|
|
2041
|
+
_subscribers = /* @__PURE__ */ new Set();
|
|
2042
|
+
_consumers = /* @__PURE__ */ new Set();
|
|
2043
|
+
constructor(initial) {
|
|
2044
|
+
this._value = initial;
|
|
2045
|
+
}
|
|
2046
|
+
get() {
|
|
2047
|
+
if (_activeConsumer !== null) {
|
|
2048
|
+
this._consumers.add(_activeConsumer);
|
|
2049
|
+
_activeConsumer._addSource(this);
|
|
2050
|
+
}
|
|
2051
|
+
return this._value;
|
|
2052
|
+
}
|
|
2053
|
+
peek() {
|
|
2054
|
+
return this._value;
|
|
2055
|
+
}
|
|
2056
|
+
set(value) {
|
|
2057
|
+
if (Object.is(this._value, value)) return;
|
|
2058
|
+
this._value = value;
|
|
2059
|
+
if (_batchDepth > 0) {
|
|
2060
|
+
_enqueueBatchFlush(this, value);
|
|
2061
|
+
} else {
|
|
2062
|
+
this._flush(value);
|
|
2063
|
+
}
|
|
2064
|
+
}
|
|
2065
|
+
update(fn) {
|
|
2066
|
+
this.set(fn(this._value));
|
|
2067
|
+
}
|
|
2068
|
+
subscribe(fn) {
|
|
2069
|
+
this._subscribers.add(fn);
|
|
2070
|
+
return () => {
|
|
2071
|
+
this._subscribers.delete(fn);
|
|
2072
|
+
};
|
|
2073
|
+
}
|
|
2074
|
+
_removeConsumer(consumer) {
|
|
2075
|
+
this._consumers.delete(consumer);
|
|
2076
|
+
}
|
|
2077
|
+
/**
|
|
2078
|
+
* Called by the batch machinery after the batch has completed.
|
|
2079
|
+
* Notifies subscribers with the final coalesced value.
|
|
2080
|
+
*/
|
|
2081
|
+
_flushBatch(value) {
|
|
2082
|
+
this._flush(value);
|
|
2083
|
+
}
|
|
2084
|
+
_flush(value) {
|
|
2085
|
+
for (const sub of [...this._subscribers]) sub(value);
|
|
2086
|
+
for (const consumer of [...this._consumers]) consumer._invalidate();
|
|
2087
|
+
}
|
|
2088
|
+
/**
|
|
2089
|
+
* @internal DevTools inspection only. The number of live observers
|
|
2090
|
+
* (direct subscribers plus derived/effect consumers). Read-only; never
|
|
2091
|
+
* mutates reactive state.
|
|
2092
|
+
*/
|
|
2093
|
+
_observerCount() {
|
|
2094
|
+
return this._subscribers.size + this._consumers.size;
|
|
2095
|
+
}
|
|
2096
|
+
};
|
|
2097
|
+
var DerivedSignal = class {
|
|
2098
|
+
_value = void 0;
|
|
2099
|
+
_dirty = true;
|
|
2100
|
+
_disposed = false;
|
|
2101
|
+
_fn;
|
|
2102
|
+
_subscribers = /* @__PURE__ */ new Set();
|
|
2103
|
+
/** All upstream sources this derived currently reads from. */
|
|
2104
|
+
_sources = /* @__PURE__ */ new Set();
|
|
2105
|
+
/** Downstream consumers that depend on this derived. */
|
|
2106
|
+
_consumers = /* @__PURE__ */ new Set();
|
|
2107
|
+
constructor(fn) {
|
|
2108
|
+
this._fn = fn;
|
|
2109
|
+
}
|
|
2110
|
+
get() {
|
|
2111
|
+
if (_activeConsumer !== null) {
|
|
2112
|
+
this._consumers.add(_activeConsumer);
|
|
2113
|
+
_activeConsumer._addSource(this);
|
|
2114
|
+
}
|
|
2115
|
+
if (this._dirty) this._recompute();
|
|
2116
|
+
return this._value;
|
|
2117
|
+
}
|
|
2118
|
+
peek() {
|
|
2119
|
+
if (this._dirty) this._recompute();
|
|
2120
|
+
return this._value;
|
|
2121
|
+
}
|
|
2122
|
+
subscribe(fn) {
|
|
2123
|
+
if (this._dirty) this._recompute();
|
|
2124
|
+
this._subscribers.add(fn);
|
|
2125
|
+
return () => {
|
|
2126
|
+
this._subscribers.delete(fn);
|
|
2127
|
+
};
|
|
2128
|
+
}
|
|
2129
|
+
_addSource(src) {
|
|
2130
|
+
this._sources.add(src);
|
|
2131
|
+
}
|
|
2132
|
+
_removeConsumer(consumer) {
|
|
2133
|
+
this._consumers.delete(consumer);
|
|
2134
|
+
}
|
|
2135
|
+
_invalidate() {
|
|
2136
|
+
if (this._disposed) return;
|
|
2137
|
+
this._dirty = true;
|
|
2138
|
+
const newVal = this.peek();
|
|
2139
|
+
for (const sub of [...this._subscribers]) sub(newVal);
|
|
2140
|
+
for (const consumer of [...this._consumers]) consumer._invalidate();
|
|
2141
|
+
}
|
|
2142
|
+
_recompute() {
|
|
2143
|
+
for (const src of this._sources) src._removeConsumer(this);
|
|
2144
|
+
this._sources.clear();
|
|
2145
|
+
this._value = withConsumer(this, this._fn);
|
|
2146
|
+
this._dirty = false;
|
|
2147
|
+
}
|
|
2148
|
+
dispose() {
|
|
2149
|
+
this._disposed = true;
|
|
2150
|
+
for (const src of this._sources) src._removeConsumer(this);
|
|
2151
|
+
this._sources.clear();
|
|
2152
|
+
this._subscribers.clear();
|
|
2153
|
+
this._consumers.clear();
|
|
2154
|
+
}
|
|
2155
|
+
/**
|
|
2156
|
+
* @internal DevTools inspection only. Live observers (subscribers plus
|
|
2157
|
+
* downstream consumers). Read-only.
|
|
2158
|
+
*/
|
|
2159
|
+
_observerCount() {
|
|
2160
|
+
return this._subscribers.size + this._consumers.size;
|
|
2161
|
+
}
|
|
2162
|
+
};
|
|
2163
|
+
var Effect = class {
|
|
2164
|
+
_fn;
|
|
2165
|
+
_cleanup = void 0;
|
|
2166
|
+
_disposed = false;
|
|
2167
|
+
_sources = /* @__PURE__ */ new Set();
|
|
2168
|
+
constructor(fn) {
|
|
2169
|
+
this._fn = fn;
|
|
2170
|
+
this._run();
|
|
2171
|
+
}
|
|
2172
|
+
_addSource(src) {
|
|
2173
|
+
this._sources.add(src);
|
|
2174
|
+
}
|
|
2175
|
+
_invalidate() {
|
|
2176
|
+
if (this._disposed) return;
|
|
2177
|
+
this._run();
|
|
2178
|
+
}
|
|
2179
|
+
_run() {
|
|
2180
|
+
for (const src of this._sources) src._removeConsumer(this);
|
|
2181
|
+
this._sources.clear();
|
|
2182
|
+
if (typeof this._cleanup === "function") this._cleanup();
|
|
2183
|
+
const result = withConsumer(this, this._fn);
|
|
2184
|
+
this._cleanup = typeof result === "function" ? result : void 0;
|
|
2185
|
+
}
|
|
2186
|
+
dispose() {
|
|
2187
|
+
this._disposed = true;
|
|
2188
|
+
for (const src of this._sources) src._removeConsumer(this);
|
|
2189
|
+
this._sources.clear();
|
|
2190
|
+
if (typeof this._cleanup === "function") this._cleanup();
|
|
2191
|
+
this._cleanup = void 0;
|
|
2192
|
+
}
|
|
2193
|
+
};
|
|
2194
|
+
function signal(initial) {
|
|
2195
|
+
return new Signal(initial);
|
|
2196
|
+
}
|
|
2197
|
+
function derived(fn) {
|
|
2198
|
+
return new DerivedSignal(fn);
|
|
2199
|
+
}
|
|
2200
|
+
function effect(fn) {
|
|
2201
|
+
const e = new Effect(fn);
|
|
2202
|
+
return () => e.dispose();
|
|
2203
|
+
}
|
|
2204
|
+
|
|
2016
2205
|
// ../renderer/src/hydration-diagnostics.ts
|
|
2017
2206
|
function formatHydrationDiagnostic(d) {
|
|
2018
2207
|
const at = ` at ${d.path}`;
|
|
@@ -2975,188 +3164,6 @@ function resolveHead(config) {
|
|
|
2975
3164
|
return { entries };
|
|
2976
3165
|
}
|
|
2977
3166
|
|
|
2978
|
-
// ../state/src/signal.ts
|
|
2979
|
-
var _activeConsumer = null;
|
|
2980
|
-
function withConsumer(consumer, fn) {
|
|
2981
|
-
const prev = _activeConsumer;
|
|
2982
|
-
_activeConsumer = consumer;
|
|
2983
|
-
try {
|
|
2984
|
-
return fn();
|
|
2985
|
-
} finally {
|
|
2986
|
-
_activeConsumer = prev;
|
|
2987
|
-
}
|
|
2988
|
-
}
|
|
2989
|
-
var _batchDepth = 0;
|
|
2990
|
-
var _pendingFlushes = /* @__PURE__ */ new Map();
|
|
2991
|
-
function _enqueueBatchFlush(sig, value) {
|
|
2992
|
-
_pendingFlushes.set(sig, { signal: sig, value });
|
|
2993
|
-
}
|
|
2994
|
-
var Signal = class {
|
|
2995
|
-
_value;
|
|
2996
|
-
_subscribers = /* @__PURE__ */ new Set();
|
|
2997
|
-
_consumers = /* @__PURE__ */ new Set();
|
|
2998
|
-
constructor(initial) {
|
|
2999
|
-
this._value = initial;
|
|
3000
|
-
}
|
|
3001
|
-
get() {
|
|
3002
|
-
if (_activeConsumer !== null) {
|
|
3003
|
-
this._consumers.add(_activeConsumer);
|
|
3004
|
-
_activeConsumer._addSource(this);
|
|
3005
|
-
}
|
|
3006
|
-
return this._value;
|
|
3007
|
-
}
|
|
3008
|
-
peek() {
|
|
3009
|
-
return this._value;
|
|
3010
|
-
}
|
|
3011
|
-
set(value) {
|
|
3012
|
-
if (Object.is(this._value, value)) return;
|
|
3013
|
-
this._value = value;
|
|
3014
|
-
if (_batchDepth > 0) {
|
|
3015
|
-
_enqueueBatchFlush(this, value);
|
|
3016
|
-
} else {
|
|
3017
|
-
this._flush(value);
|
|
3018
|
-
}
|
|
3019
|
-
}
|
|
3020
|
-
update(fn) {
|
|
3021
|
-
this.set(fn(this._value));
|
|
3022
|
-
}
|
|
3023
|
-
subscribe(fn) {
|
|
3024
|
-
this._subscribers.add(fn);
|
|
3025
|
-
return () => {
|
|
3026
|
-
this._subscribers.delete(fn);
|
|
3027
|
-
};
|
|
3028
|
-
}
|
|
3029
|
-
_removeConsumer(consumer) {
|
|
3030
|
-
this._consumers.delete(consumer);
|
|
3031
|
-
}
|
|
3032
|
-
/**
|
|
3033
|
-
* Called by the batch machinery after the batch has completed.
|
|
3034
|
-
* Notifies subscribers with the final coalesced value.
|
|
3035
|
-
*/
|
|
3036
|
-
_flushBatch(value) {
|
|
3037
|
-
this._flush(value);
|
|
3038
|
-
}
|
|
3039
|
-
_flush(value) {
|
|
3040
|
-
for (const sub of [...this._subscribers]) sub(value);
|
|
3041
|
-
for (const consumer of [...this._consumers]) consumer._invalidate();
|
|
3042
|
-
}
|
|
3043
|
-
/**
|
|
3044
|
-
* @internal DevTools inspection only. The number of live observers
|
|
3045
|
-
* (direct subscribers plus derived/effect consumers). Read-only; never
|
|
3046
|
-
* mutates reactive state.
|
|
3047
|
-
*/
|
|
3048
|
-
_observerCount() {
|
|
3049
|
-
return this._subscribers.size + this._consumers.size;
|
|
3050
|
-
}
|
|
3051
|
-
};
|
|
3052
|
-
var DerivedSignal = class {
|
|
3053
|
-
_value = void 0;
|
|
3054
|
-
_dirty = true;
|
|
3055
|
-
_disposed = false;
|
|
3056
|
-
_fn;
|
|
3057
|
-
_subscribers = /* @__PURE__ */ new Set();
|
|
3058
|
-
/** All upstream sources this derived currently reads from. */
|
|
3059
|
-
_sources = /* @__PURE__ */ new Set();
|
|
3060
|
-
/** Downstream consumers that depend on this derived. */
|
|
3061
|
-
_consumers = /* @__PURE__ */ new Set();
|
|
3062
|
-
constructor(fn) {
|
|
3063
|
-
this._fn = fn;
|
|
3064
|
-
}
|
|
3065
|
-
get() {
|
|
3066
|
-
if (_activeConsumer !== null) {
|
|
3067
|
-
this._consumers.add(_activeConsumer);
|
|
3068
|
-
_activeConsumer._addSource(this);
|
|
3069
|
-
}
|
|
3070
|
-
if (this._dirty) this._recompute();
|
|
3071
|
-
return this._value;
|
|
3072
|
-
}
|
|
3073
|
-
peek() {
|
|
3074
|
-
if (this._dirty) this._recompute();
|
|
3075
|
-
return this._value;
|
|
3076
|
-
}
|
|
3077
|
-
subscribe(fn) {
|
|
3078
|
-
if (this._dirty) this._recompute();
|
|
3079
|
-
this._subscribers.add(fn);
|
|
3080
|
-
return () => {
|
|
3081
|
-
this._subscribers.delete(fn);
|
|
3082
|
-
};
|
|
3083
|
-
}
|
|
3084
|
-
_addSource(src) {
|
|
3085
|
-
this._sources.add(src);
|
|
3086
|
-
}
|
|
3087
|
-
_removeConsumer(consumer) {
|
|
3088
|
-
this._consumers.delete(consumer);
|
|
3089
|
-
}
|
|
3090
|
-
_invalidate() {
|
|
3091
|
-
if (this._disposed) return;
|
|
3092
|
-
this._dirty = true;
|
|
3093
|
-
const newVal = this.peek();
|
|
3094
|
-
for (const sub of [...this._subscribers]) sub(newVal);
|
|
3095
|
-
for (const consumer of [...this._consumers]) consumer._invalidate();
|
|
3096
|
-
}
|
|
3097
|
-
_recompute() {
|
|
3098
|
-
for (const src of this._sources) src._removeConsumer(this);
|
|
3099
|
-
this._sources.clear();
|
|
3100
|
-
this._value = withConsumer(this, this._fn);
|
|
3101
|
-
this._dirty = false;
|
|
3102
|
-
}
|
|
3103
|
-
dispose() {
|
|
3104
|
-
this._disposed = true;
|
|
3105
|
-
for (const src of this._sources) src._removeConsumer(this);
|
|
3106
|
-
this._sources.clear();
|
|
3107
|
-
this._subscribers.clear();
|
|
3108
|
-
this._consumers.clear();
|
|
3109
|
-
}
|
|
3110
|
-
/**
|
|
3111
|
-
* @internal DevTools inspection only. Live observers (subscribers plus
|
|
3112
|
-
* downstream consumers). Read-only.
|
|
3113
|
-
*/
|
|
3114
|
-
_observerCount() {
|
|
3115
|
-
return this._subscribers.size + this._consumers.size;
|
|
3116
|
-
}
|
|
3117
|
-
};
|
|
3118
|
-
var Effect = class {
|
|
3119
|
-
_fn;
|
|
3120
|
-
_cleanup = void 0;
|
|
3121
|
-
_disposed = false;
|
|
3122
|
-
_sources = /* @__PURE__ */ new Set();
|
|
3123
|
-
constructor(fn) {
|
|
3124
|
-
this._fn = fn;
|
|
3125
|
-
this._run();
|
|
3126
|
-
}
|
|
3127
|
-
_addSource(src) {
|
|
3128
|
-
this._sources.add(src);
|
|
3129
|
-
}
|
|
3130
|
-
_invalidate() {
|
|
3131
|
-
if (this._disposed) return;
|
|
3132
|
-
this._run();
|
|
3133
|
-
}
|
|
3134
|
-
_run() {
|
|
3135
|
-
for (const src of this._sources) src._removeConsumer(this);
|
|
3136
|
-
this._sources.clear();
|
|
3137
|
-
if (typeof this._cleanup === "function") this._cleanup();
|
|
3138
|
-
const result = withConsumer(this, this._fn);
|
|
3139
|
-
this._cleanup = typeof result === "function" ? result : void 0;
|
|
3140
|
-
}
|
|
3141
|
-
dispose() {
|
|
3142
|
-
this._disposed = true;
|
|
3143
|
-
for (const src of this._sources) src._removeConsumer(this);
|
|
3144
|
-
this._sources.clear();
|
|
3145
|
-
if (typeof this._cleanup === "function") this._cleanup();
|
|
3146
|
-
this._cleanup = void 0;
|
|
3147
|
-
}
|
|
3148
|
-
};
|
|
3149
|
-
function signal(initial) {
|
|
3150
|
-
return new Signal(initial);
|
|
3151
|
-
}
|
|
3152
|
-
function derived(fn) {
|
|
3153
|
-
return new DerivedSignal(fn);
|
|
3154
|
-
}
|
|
3155
|
-
function effect(fn) {
|
|
3156
|
-
const e = new Effect(fn);
|
|
3157
|
-
return () => e.dispose();
|
|
3158
|
-
}
|
|
3159
|
-
|
|
3160
3167
|
// ../dsl/src/builders.ts
|
|
3161
3168
|
function isSignal(v) {
|
|
3162
3169
|
return v !== null && typeof v === "object" && typeof v["get"] === "function" && typeof v["subscribe"] === "function";
|
|
@@ -4127,7 +4134,7 @@ function trigger(el, type, init = {}) {
|
|
|
4127
4134
|
}
|
|
4128
4135
|
|
|
4129
4136
|
// src/version.ts
|
|
4130
|
-
var VERSION = "2.
|
|
4137
|
+
var VERSION = "2.8.0";
|
|
4131
4138
|
export {
|
|
4132
4139
|
VERSION,
|
|
4133
4140
|
analyzeGraph,
|