@lmvz-ds/components 0.12.3-alpha.4 → 0.12.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/cjs/{Effect-BIlTHtLK.js → Effect-CNhHt4Xb.js} +615 -885
- package/dist/cjs/MutableQueue-Bk9tBfaK.js +462 -0
- package/dist/cjs/{aria-validation-controller-B7unOPxT.js → aria-validation-controller-B3hMkau3.js} +157 -156
- package/dist/cjs/assets-iuJtMMdw.js +60 -0
- package/dist/cjs/{icons-BFM1yQ_r.js → icons-CAiJpiUC.js} +22 -74
- package/dist/cjs/index.cjs.js +4 -2
- package/dist/cjs/lmvz-button.cjs.entry.js +3 -2
- package/dist/cjs/lmvz-card.cjs.entry.js +7 -2
- package/dist/cjs/lmvz-header.cjs.entry.js +3 -2
- package/dist/cjs/lmvz-icon.cjs.entry.js +5 -3
- package/dist/cjs/lmvz-input.cjs.entry.js +3 -2
- package/dist/cjs/lmvz-menuitem.cjs.entry.js +3 -2
- package/dist/collection/components/lmvz-card/lmvz-card.js +8 -3
- package/dist/collection/components/lmvz-icon/icons.js +3 -3
- package/dist/collection/utils/{url.js → assets.js} +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/lmvz-button.js +1 -1
- package/dist/components/lmvz-card.js +1 -1
- package/dist/components/lmvz-header.js +1 -1
- package/dist/components/lmvz-icon.js +1 -1
- package/dist/components/lmvz-input.js +1 -1
- package/dist/components/lmvz-menuitem.js +1 -1
- package/dist/components/p-3I3wZmp8.js +1 -0
- package/dist/components/p-BQTNPxka.js +1 -0
- package/dist/components/p-CdofjRtQ.js +1 -0
- package/dist/components/p-xpxyPpHZ.js +1 -0
- package/dist/esm/{Effect-D9S7OTyY.js → Effect-BhQLGXPs.js} +568 -829
- package/dist/esm/MutableQueue-CNlEFklh.js +431 -0
- package/dist/esm/{aria-validation-controller-C7nQzCCq.js → aria-validation-controller-iA4YWFG-.js} +2 -1
- package/dist/esm/assets-BymuU366.js +57 -0
- package/dist/esm/{icons-BFqdzPxR.js → icons-D7UubWaN.js} +5 -57
- package/dist/esm/index.js +4 -2
- package/dist/esm/lmvz-button.entry.js +3 -2
- package/dist/esm/lmvz-card.entry.js +8 -3
- package/dist/esm/lmvz-header.entry.js +3 -2
- package/dist/esm/lmvz-icon.entry.js +5 -3
- package/dist/esm/lmvz-input.entry.js +3 -2
- package/dist/esm/lmvz-menuitem.entry.js +3 -2
- package/dist/lmvz-components/index.esm.js +1 -1
- package/dist/lmvz-components/lmvz-components.esm.js +1 -1
- package/dist/lmvz-components/p-1d916449.entry.js +1 -0
- package/dist/lmvz-components/p-274c36df.entry.js +1 -0
- package/dist/lmvz-components/p-4b70fe08.entry.js +1 -0
- package/dist/lmvz-components/p-68001ab7.entry.js +1 -0
- package/dist/lmvz-components/p-77e26e71.entry.js +1 -0
- package/dist/lmvz-components/p-BhQLGXPs.js +1 -0
- package/dist/lmvz-components/p-CXWyvf0D.js +1 -0
- package/dist/lmvz-components/p-Ce_AL9kY.js +1 -0
- package/dist/lmvz-components/p-D7I-Bc5i.js +1 -0
- package/dist/lmvz-components/p-DohldYb4.js +1 -0
- package/dist/lmvz-components/p-de18e27e.entry.js +1 -0
- package/dist/manifest.json +1 -1
- package/dist/types/components/lmvz-card/lmvz-card.d.ts +1 -0
- package/dist/types/utils/{url.d.ts → assets.d.ts} +1 -1
- package/hydrate/index.js +487 -7
- package/hydrate/index.mjs +487 -7
- package/package.json +4 -4
- package/dist/components/p-BFwzIh71.js +0 -1
- package/dist/components/p-CfWkZ_yJ.js +0 -1
- package/dist/lmvz-components/assets/LMVZ_logo_175.svg +0 -1
- package/dist/lmvz-components/assets/card-placeholder.svg +0 -4
- package/dist/lmvz-components/assets/fonts/Router-Bold.woff +0 -0
- package/dist/lmvz-components/assets/fonts/Router-Book.woff +0 -0
- package/dist/lmvz-components/assets/fonts/Router-Medium.woff +0 -0
- package/dist/lmvz-components/assets/icons/Logo.svg +0 -10
- package/dist/lmvz-components/assets/icons/actions.svg +0 -5
- package/dist/lmvz-components/assets/icons/adduser.svg +0 -3
- package/dist/lmvz-components/assets/icons/alert.svg +0 -3
- package/dist/lmvz-components/assets/icons/apple.svg +0 -3
- package/dist/lmvz-components/assets/icons/arrow-down.svg +0 -3
- package/dist/lmvz-components/assets/icons/arrow-left.svg +0 -3
- package/dist/lmvz-components/assets/icons/arrow-right.svg +0 -3
- package/dist/lmvz-components/assets/icons/arrow-up.svg +0 -3
- package/dist/lmvz-components/assets/icons/book.svg +0 -3
- package/dist/lmvz-components/assets/icons/bookmark.svg +0 -3
- package/dist/lmvz-components/assets/icons/checkmark.svg +0 -3
- package/dist/lmvz-components/assets/icons/chevron-down.svg +0 -3
- package/dist/lmvz-components/assets/icons/chevron-left.svg +0 -3
- package/dist/lmvz-components/assets/icons/chevron-right.svg +0 -3
- package/dist/lmvz-components/assets/icons/chevron-up.svg +0 -3
- package/dist/lmvz-components/assets/icons/close-l.svg +0 -3
- package/dist/lmvz-components/assets/icons/close-sm.svg +0 -3
- package/dist/lmvz-components/assets/icons/cog.svg +0 -4
- package/dist/lmvz-components/assets/icons/computer.svg +0 -3
- package/dist/lmvz-components/assets/icons/dashboard.svg +0 -6
- package/dist/lmvz-components/assets/icons/delete.svg +0 -3
- package/dist/lmvz-components/assets/icons/download.svg +0 -3
- package/dist/lmvz-components/assets/icons/edit.svg +0 -3
- package/dist/lmvz-components/assets/icons/external.svg +0 -3
- package/dist/lmvz-components/assets/icons/facebook.svg +0 -3
- package/dist/lmvz-components/assets/icons/favorite.svg +0 -3
- package/dist/lmvz-components/assets/icons/filter.svg +0 -3
- package/dist/lmvz-components/assets/icons/group.svg +0 -3
- package/dist/lmvz-components/assets/icons/hide.svg +0 -3
- package/dist/lmvz-components/assets/icons/home.svg +0 -3
- package/dist/lmvz-components/assets/icons/info.svg +0 -3
- package/dist/lmvz-components/assets/icons/instagram.svg +0 -3
- package/dist/lmvz-components/assets/icons/letter.svg +0 -3
- package/dist/lmvz-components/assets/icons/linkedin.svg +0 -5
- package/dist/lmvz-components/assets/icons/logout.svg +0 -3
- package/dist/lmvz-components/assets/icons/map.svg +0 -3
- package/dist/lmvz-components/assets/icons/minus.svg +0 -3
- package/dist/lmvz-components/assets/icons/navigation.svg +0 -3
- package/dist/lmvz-components/assets/icons/plus.svg +0 -3
- package/dist/lmvz-components/assets/icons/qr-scan.svg +0 -3
- package/dist/lmvz-components/assets/icons/question.svg +0 -10
- package/dist/lmvz-components/assets/icons/reader.svg +0 -3
- package/dist/lmvz-components/assets/icons/reset.svg +0 -3
- package/dist/lmvz-components/assets/icons/school.svg +0 -3
- package/dist/lmvz-components/assets/icons/search.svg +0 -3
- package/dist/lmvz-components/assets/icons/send.svg +0 -3
- package/dist/lmvz-components/assets/icons/settings.svg +0 -3
- package/dist/lmvz-components/assets/icons/share.svg +0 -10
- package/dist/lmvz-components/assets/icons/shopping-cart.svg +0 -3
- package/dist/lmvz-components/assets/icons/show.svg +0 -3
- package/dist/lmvz-components/assets/icons/snapchat.svg +0 -3
- package/dist/lmvz-components/assets/icons/sort.svg +0 -3
- package/dist/lmvz-components/assets/icons/speech-bubble.svg +0 -3
- package/dist/lmvz-components/assets/icons/star.svg +0 -3
- package/dist/lmvz-components/assets/icons/student.svg +0 -3
- package/dist/lmvz-components/assets/icons/upload.svg +0 -3
- package/dist/lmvz-components/assets/icons/user.svg +0 -3
- package/dist/lmvz-components/assets/icons/warn-circle.svg +0 -3
- package/dist/lmvz-components/assets/icons/warn-triangle.svg +0 -3
- package/dist/lmvz-components/assets/icons/whatsapp.svg +0 -4
- package/dist/lmvz-components/assets/icons/world.svg +0 -10
- package/dist/lmvz-components/assets/icons/x.svg +0 -3
- package/dist/lmvz-components/assets/icons/youtube.svg +0 -3
- package/dist/lmvz-components/assets/zukunftslinie.svg +0 -3
- package/dist/lmvz-components/p-6d71c048.entry.js +0 -1
- package/dist/lmvz-components/p-CDfcYSci.js +0 -1
- package/dist/lmvz-components/p-D9S7OTyY.js +0 -1
- package/dist/lmvz-components/p-DlrjrWsu.js +0 -1
- package/dist/lmvz-components/p-a4615e4b.entry.js +0 -1
- package/dist/lmvz-components/p-a8c88454.entry.js +0 -1
- package/dist/lmvz-components/p-e63e239a.entry.js +0 -1
- package/dist/lmvz-components/p-f956a5e7.entry.js +0 -1
- package/dist/lmvz-components/p-fefd2fe4.entry.js +0 -1
package/hydrate/index.js
CHANGED
|
@@ -7001,7 +7001,7 @@ const merge$3 = /*#__PURE__*/match$8({
|
|
|
7001
7001
|
* @category getters
|
|
7002
7002
|
* @since 2.0.0
|
|
7003
7003
|
*/
|
|
7004
|
-
const getOrThrowWith = /*#__PURE__*/dual(2, (self, onLeft) => {
|
|
7004
|
+
const getOrThrowWith$1 = /*#__PURE__*/dual(2, (self, onLeft) => {
|
|
7005
7005
|
if (isRight(self)) {
|
|
7006
7006
|
return self.right;
|
|
7007
7007
|
}
|
|
@@ -7338,6 +7338,67 @@ const fromNullable = nullableValue => nullableValue == null ? none$4() : some(nu
|
|
|
7338
7338
|
* @since 2.0.0
|
|
7339
7339
|
*/
|
|
7340
7340
|
const getOrUndefined = /*#__PURE__*/getOrElse(constUndefined);
|
|
7341
|
+
/**
|
|
7342
|
+
* Extracts the value of an `Option` or throws an error if the `Option` is
|
|
7343
|
+
* `None`, using a custom error factory.
|
|
7344
|
+
*
|
|
7345
|
+
* **Details**
|
|
7346
|
+
*
|
|
7347
|
+
* This function allows you to extract the value of an `Option` when it is
|
|
7348
|
+
* `Some`. If the `Option` is `None`, it throws an error generated by the
|
|
7349
|
+
* provided `onNone` function. This utility is particularly useful when you need
|
|
7350
|
+
* a fail-fast behavior for empty `Option` values and want to provide a custom
|
|
7351
|
+
* error message or object.
|
|
7352
|
+
*
|
|
7353
|
+
* @example
|
|
7354
|
+
* ```ts
|
|
7355
|
+
* import * as assert from "node:assert"
|
|
7356
|
+
* import { Option } from "effect"
|
|
7357
|
+
*
|
|
7358
|
+
* assert.deepStrictEqual(
|
|
7359
|
+
* Option.getOrThrowWith(Option.some(1), () => new Error('Unexpected None')),
|
|
7360
|
+
* 1
|
|
7361
|
+
* )
|
|
7362
|
+
* assert.throws(() => Option.getOrThrowWith(Option.none(), () => new Error('Unexpected None')))
|
|
7363
|
+
* ```
|
|
7364
|
+
*
|
|
7365
|
+
* @see {@link getOrThrow} for a version that throws a default error.
|
|
7366
|
+
*
|
|
7367
|
+
* @category Conversions
|
|
7368
|
+
* @since 2.0.0
|
|
7369
|
+
*/
|
|
7370
|
+
const getOrThrowWith = /*#__PURE__*/dual(2, (self, onNone) => {
|
|
7371
|
+
if (isSome(self)) {
|
|
7372
|
+
return self.value;
|
|
7373
|
+
}
|
|
7374
|
+
throw onNone();
|
|
7375
|
+
});
|
|
7376
|
+
/**
|
|
7377
|
+
* Extracts the value of an `Option` or throws a default error if the `Option`
|
|
7378
|
+
* is `None`.
|
|
7379
|
+
*
|
|
7380
|
+
* **Details**
|
|
7381
|
+
*
|
|
7382
|
+
* This function extracts the value from an `Option` if it is `Some`. If the
|
|
7383
|
+
* `Option` is `None`, it throws a default error. It is useful for fail-fast
|
|
7384
|
+
* scenarios where the absence of a value is treated as an exceptional case and
|
|
7385
|
+
* a default error is sufficient.
|
|
7386
|
+
*
|
|
7387
|
+
* @example
|
|
7388
|
+
* ```ts
|
|
7389
|
+
* import * as assert from "node:assert"
|
|
7390
|
+
* import { Option } from "effect"
|
|
7391
|
+
*
|
|
7392
|
+
* assert.deepStrictEqual(Option.getOrThrow(Option.some(1)), 1)
|
|
7393
|
+
* assert.throws(() => Option.getOrThrow(Option.none()))
|
|
7394
|
+
* ```
|
|
7395
|
+
*
|
|
7396
|
+
* @see {@link getOrThrowWith} for a version that allows you to provide a custom error.
|
|
7397
|
+
*
|
|
7398
|
+
* @category Conversions
|
|
7399
|
+
* @since 2.0.0
|
|
7400
|
+
*/
|
|
7401
|
+
const getOrThrow = /*#__PURE__*/getOrThrowWith(() => new Error("getOrThrow called on a None"));
|
|
7341
7402
|
/**
|
|
7342
7403
|
* Transforms the value inside a `Some` to a new value using the provided
|
|
7343
7404
|
* function, while leaving `None` unchanged.
|
|
@@ -8387,7 +8448,7 @@ function refined(...args) {
|
|
|
8387
8448
|
onSome: left
|
|
8388
8449
|
});
|
|
8389
8450
|
};
|
|
8390
|
-
return Object.assign(unbranded => getOrThrowWith(either(unbranded), identity), {
|
|
8451
|
+
return Object.assign(unbranded => getOrThrowWith$1(either(unbranded), identity), {
|
|
8391
8452
|
[RefinedConstructorsTypeId]: RefinedConstructorsTypeId,
|
|
8392
8453
|
option: args => getRight(either(args)),
|
|
8393
8454
|
either,
|
|
@@ -12760,6 +12821,15 @@ const flipCauseOption$1 = self => match$5(self, {
|
|
|
12760
12821
|
/** @internal */
|
|
12761
12822
|
const interruptOption = self => find(self, cause => cause._tag === OP_INTERRUPT ? some(cause.fiberId) : none$4());
|
|
12762
12823
|
/** @internal */
|
|
12824
|
+
const keepDefectsAndElectFailures = self => match$5(self, {
|
|
12825
|
+
onEmpty: none$4(),
|
|
12826
|
+
onFail: failure => some(die$3(failure)),
|
|
12827
|
+
onDie: defect => some(die$3(defect)),
|
|
12828
|
+
onInterrupt: () => none$4(),
|
|
12829
|
+
onSequential: mergeWith$1(sequential$2),
|
|
12830
|
+
onParallel: mergeWith$1(parallel$2)
|
|
12831
|
+
});
|
|
12832
|
+
/** @internal */
|
|
12763
12833
|
const stripFailures = self => match$5(self, {
|
|
12764
12834
|
onEmpty: empty$9,
|
|
12765
12835
|
onFail: () => empty$9,
|
|
@@ -13781,6 +13851,8 @@ const onInterrupt = /*#__PURE__*/dual(2, (self, cleanup) => onExit$1(self, exitM
|
|
|
13781
13851
|
onSuccess: () => void_$3
|
|
13782
13852
|
})));
|
|
13783
13853
|
/* @internal */
|
|
13854
|
+
const orElse = /*#__PURE__*/dual(2, (self, that) => attemptOrElse(self, that, succeed$5));
|
|
13855
|
+
/* @internal */
|
|
13784
13856
|
const orDie = self => orDieWith(self, identity);
|
|
13785
13857
|
/* @internal */
|
|
13786
13858
|
const orDieWith = /*#__PURE__*/dual(2, (self, f) => matchEffect(self, {
|
|
@@ -13824,6 +13896,17 @@ const transplant = f => withFiberRuntime$1(state => {
|
|
|
13824
13896
|
return f(fiberRefLocally(currentForkScopeOverride, some(scope)));
|
|
13825
13897
|
});
|
|
13826
13898
|
/* @internal */
|
|
13899
|
+
const attemptOrElse = /*#__PURE__*/dual(3, (self, that, onSuccess) => matchCauseEffect$2(self, {
|
|
13900
|
+
onFailure: cause => {
|
|
13901
|
+
const defects$1 = defects(cause);
|
|
13902
|
+
if (defects$1.length > 0) {
|
|
13903
|
+
return failCause$7(getOrThrow(keepDefectsAndElectFailures(cause)));
|
|
13904
|
+
}
|
|
13905
|
+
return that();
|
|
13906
|
+
},
|
|
13907
|
+
onSuccess
|
|
13908
|
+
}));
|
|
13909
|
+
/* @internal */
|
|
13827
13910
|
const uninterruptible$1 = self => {
|
|
13828
13911
|
const effect = new EffectPrimitive(OP_UPDATE_RUNTIME_FLAGS);
|
|
13829
13912
|
effect.effect_instruction_i0 = disable(Interruption);
|
|
@@ -16265,6 +16348,24 @@ const isMetricLabel = u => hasProperty(u, MetricLabelTypeId);
|
|
|
16265
16348
|
/* @internal */
|
|
16266
16349
|
const asSome = self => map$6(self, some);
|
|
16267
16350
|
/* @internal */
|
|
16351
|
+
const try_$1 = arg => {
|
|
16352
|
+
let evaluate;
|
|
16353
|
+
let onFailure = undefined;
|
|
16354
|
+
if (typeof arg === "function") {
|
|
16355
|
+
evaluate = arg;
|
|
16356
|
+
} else {
|
|
16357
|
+
evaluate = arg.try;
|
|
16358
|
+
onFailure = arg.catch;
|
|
16359
|
+
}
|
|
16360
|
+
return suspend$3(() => {
|
|
16361
|
+
try {
|
|
16362
|
+
return succeed$5(internalCall(evaluate));
|
|
16363
|
+
} catch (error) {
|
|
16364
|
+
return fail$4(onFailure ? internalCall(() => onFailure(error)) : new UnknownException(error, "An unknown error occurred in Effect.try"));
|
|
16365
|
+
}
|
|
16366
|
+
});
|
|
16367
|
+
};
|
|
16368
|
+
/* @internal */
|
|
16268
16369
|
const catchSomeCause$1 = /*#__PURE__*/dual(2, (self, f) => matchCauseEffect$2(self, {
|
|
16269
16370
|
onFailure: cause => {
|
|
16270
16371
|
const option = f(cause);
|
|
@@ -16300,6 +16401,32 @@ const ignore$1 = self => match$3(self, {
|
|
|
16300
16401
|
onFailure: constVoid,
|
|
16301
16402
|
onSuccess: constVoid
|
|
16302
16403
|
});
|
|
16404
|
+
/** @internal */
|
|
16405
|
+
const logWithLevel = level => (...message) => {
|
|
16406
|
+
const levelOption = fromNullable(level);
|
|
16407
|
+
let cause = undefined;
|
|
16408
|
+
for (let i = 0, len = message.length; i < len; i++) {
|
|
16409
|
+
const msg = message[i];
|
|
16410
|
+
if (isCause(msg)) {
|
|
16411
|
+
if (cause !== undefined) {
|
|
16412
|
+
cause = sequential$2(cause, msg);
|
|
16413
|
+
} else {
|
|
16414
|
+
cause = msg;
|
|
16415
|
+
}
|
|
16416
|
+
message = [...message.slice(0, i), ...message.slice(i + 1)];
|
|
16417
|
+
i--;
|
|
16418
|
+
}
|
|
16419
|
+
}
|
|
16420
|
+
if (cause === undefined) {
|
|
16421
|
+
cause = empty$9;
|
|
16422
|
+
}
|
|
16423
|
+
return withFiberRuntime$1(fiberState => {
|
|
16424
|
+
fiberState.log(message, cause, levelOption);
|
|
16425
|
+
return void_$3;
|
|
16426
|
+
});
|
|
16427
|
+
};
|
|
16428
|
+
/** @internal */
|
|
16429
|
+
const logWarning$1 = /*#__PURE__*/logWithLevel(Warning);
|
|
16303
16430
|
/* @internal */
|
|
16304
16431
|
const mapErrorCause = /*#__PURE__*/dual(2, (self, f) => matchCauseEffect$2(self, {
|
|
16305
16432
|
onFailure: c => failCauseSync$1(() => f(c)),
|
|
@@ -16308,6 +16435,8 @@ const mapErrorCause = /*#__PURE__*/dual(2, (self, f) => matchCauseEffect$2(self,
|
|
|
16308
16435
|
/* @internal */
|
|
16309
16436
|
const negate = self => map$6(self, b => !b);
|
|
16310
16437
|
/* @internal */
|
|
16438
|
+
const orElseSucceed$1 = /*#__PURE__*/dual(2, (self, evaluate) => orElse(self, () => sync$2(evaluate)));
|
|
16439
|
+
/* @internal */
|
|
16311
16440
|
const patchFiberRefs = patch => updateFiberRefs((fiberId, fiberRefs) => pipe(patch, patch$2(fiberId, fiberRefs)));
|
|
16312
16441
|
/* @internal */
|
|
16313
16442
|
const promise$1 = evaluate => evaluate.length >= 1 ? async_((resolve, signal) => {
|
|
@@ -16334,6 +16463,19 @@ const succeedNone = /*#__PURE__*/succeed$5(/*#__PURE__*/none$4());
|
|
|
16334
16463
|
/* @internal */
|
|
16335
16464
|
const summarized = /*#__PURE__*/dual(3, (self, summary, f) => flatMap$4(summary, start => flatMap$4(self, value => map$6(summary, end => [f(start, end), value]))));
|
|
16336
16465
|
/* @internal */
|
|
16466
|
+
const tapError$1 = /*#__PURE__*/dual(2, (self, f) => matchCauseEffect$2(self, {
|
|
16467
|
+
onFailure: cause => {
|
|
16468
|
+
const either = failureOrCause$1(cause);
|
|
16469
|
+
switch (either._tag) {
|
|
16470
|
+
case "Left":
|
|
16471
|
+
return zipRight$3(f(either.left), failCause$7(cause));
|
|
16472
|
+
case "Right":
|
|
16473
|
+
return failCause$7(cause);
|
|
16474
|
+
}
|
|
16475
|
+
},
|
|
16476
|
+
onSuccess: succeed$5
|
|
16477
|
+
}));
|
|
16478
|
+
/* @internal */
|
|
16337
16479
|
const tapErrorCause$1 = /*#__PURE__*/dual(2, (self, f) => matchCauseEffect$2(self, {
|
|
16338
16480
|
onFailure: cause => zipRight$3(f(cause), failCause$7(cause)),
|
|
16339
16481
|
onSuccess: succeed$5
|
|
@@ -17268,6 +17410,51 @@ class MixedScheduler {
|
|
|
17268
17410
|
* @category schedulers
|
|
17269
17411
|
*/
|
|
17270
17412
|
const defaultScheduler = /*#__PURE__*/globalValue(/*#__PURE__*/Symbol.for("effect/Scheduler/defaultScheduler"), () => new MixedScheduler(2048));
|
|
17413
|
+
/**
|
|
17414
|
+
* @since 2.0.0
|
|
17415
|
+
* @category constructors
|
|
17416
|
+
*/
|
|
17417
|
+
class SyncScheduler {
|
|
17418
|
+
/**
|
|
17419
|
+
* @since 2.0.0
|
|
17420
|
+
*/
|
|
17421
|
+
tasks = /*#__PURE__*/new PriorityBuckets();
|
|
17422
|
+
/**
|
|
17423
|
+
* @since 2.0.0
|
|
17424
|
+
*/
|
|
17425
|
+
deferred = false;
|
|
17426
|
+
/**
|
|
17427
|
+
* @since 2.0.0
|
|
17428
|
+
*/
|
|
17429
|
+
scheduleTask(task, priority) {
|
|
17430
|
+
if (this.deferred) {
|
|
17431
|
+
defaultScheduler.scheduleTask(task, priority);
|
|
17432
|
+
} else {
|
|
17433
|
+
this.tasks.scheduleTask(task, priority);
|
|
17434
|
+
}
|
|
17435
|
+
}
|
|
17436
|
+
/**
|
|
17437
|
+
* @since 2.0.0
|
|
17438
|
+
*/
|
|
17439
|
+
shouldYield(fiber) {
|
|
17440
|
+
return fiber.currentOpCount > fiber.getFiberRef(currentMaxOpsBeforeYield) ? fiber.getFiberRef(currentSchedulingPriority) : false;
|
|
17441
|
+
}
|
|
17442
|
+
/**
|
|
17443
|
+
* @since 2.0.0
|
|
17444
|
+
*/
|
|
17445
|
+
flush() {
|
|
17446
|
+
while (this.tasks.buckets.length > 0) {
|
|
17447
|
+
const tasks = this.tasks.buckets;
|
|
17448
|
+
this.tasks.buckets = [];
|
|
17449
|
+
for (const [_, toRun] of tasks) {
|
|
17450
|
+
for (let i = 0; i < toRun.length; i++) {
|
|
17451
|
+
toRun[i]();
|
|
17452
|
+
}
|
|
17453
|
+
}
|
|
17454
|
+
}
|
|
17455
|
+
this.deferred = true;
|
|
17456
|
+
}
|
|
17457
|
+
}
|
|
17271
17458
|
/** @internal */
|
|
17272
17459
|
const currentScheduler = /*#__PURE__*/globalValue(/*#__PURE__*/Symbol.for("effect/FiberRef/currentScheduler"), () => fiberRefUnsafeMake(defaultScheduler));
|
|
17273
17460
|
|
|
@@ -20952,6 +21139,116 @@ const unsafeFork = /*#__PURE__*/makeDual((runtime, self, options) => {
|
|
|
20952
21139
|
return fiberRuntime;
|
|
20953
21140
|
});
|
|
20954
21141
|
/** @internal */
|
|
21142
|
+
const unsafeRunSync = /*#__PURE__*/makeDual((runtime, effect) => {
|
|
21143
|
+
const result = unsafeRunSyncExit(runtime)(effect);
|
|
21144
|
+
if (result._tag === "Failure") {
|
|
21145
|
+
throw fiberFailure(result.effect_instruction_i0);
|
|
21146
|
+
}
|
|
21147
|
+
return result.effect_instruction_i0;
|
|
21148
|
+
});
|
|
21149
|
+
class AsyncFiberExceptionImpl extends Error {
|
|
21150
|
+
fiber;
|
|
21151
|
+
_tag = "AsyncFiberException";
|
|
21152
|
+
constructor(fiber) {
|
|
21153
|
+
super(`Fiber #${fiber.id().id} cannot be resolved synchronously. This is caused by using runSync on an effect that performs async work`);
|
|
21154
|
+
this.fiber = fiber;
|
|
21155
|
+
this.name = this._tag;
|
|
21156
|
+
this.stack = this.message;
|
|
21157
|
+
}
|
|
21158
|
+
}
|
|
21159
|
+
const asyncFiberException = fiber => {
|
|
21160
|
+
const limit = Error.stackTraceLimit;
|
|
21161
|
+
Error.stackTraceLimit = 0;
|
|
21162
|
+
const error = new AsyncFiberExceptionImpl(fiber);
|
|
21163
|
+
Error.stackTraceLimit = limit;
|
|
21164
|
+
return error;
|
|
21165
|
+
};
|
|
21166
|
+
/** @internal */
|
|
21167
|
+
const FiberFailureId = /*#__PURE__*/Symbol.for("effect/Runtime/FiberFailure");
|
|
21168
|
+
/** @internal */
|
|
21169
|
+
const FiberFailureCauseId = /*#__PURE__*/Symbol.for("effect/Runtime/FiberFailure/Cause");
|
|
21170
|
+
class FiberFailureImpl extends Error {
|
|
21171
|
+
[FiberFailureId];
|
|
21172
|
+
[FiberFailureCauseId];
|
|
21173
|
+
constructor(cause) {
|
|
21174
|
+
const head = prettyErrors(cause)[0];
|
|
21175
|
+
super(head?.message || "An error has occurred");
|
|
21176
|
+
this[FiberFailureId] = FiberFailureId;
|
|
21177
|
+
this[FiberFailureCauseId] = cause;
|
|
21178
|
+
this.name = head ? `(FiberFailure) ${head.name}` : "FiberFailure";
|
|
21179
|
+
if (head?.stack) {
|
|
21180
|
+
this.stack = head.stack;
|
|
21181
|
+
}
|
|
21182
|
+
}
|
|
21183
|
+
toJSON() {
|
|
21184
|
+
return {
|
|
21185
|
+
_id: "FiberFailure",
|
|
21186
|
+
cause: this[FiberFailureCauseId].toJSON()
|
|
21187
|
+
};
|
|
21188
|
+
}
|
|
21189
|
+
toString() {
|
|
21190
|
+
return "(FiberFailure) " + pretty(this[FiberFailureCauseId], {
|
|
21191
|
+
renderErrorCause: true
|
|
21192
|
+
});
|
|
21193
|
+
}
|
|
21194
|
+
[NodeInspectSymbol]() {
|
|
21195
|
+
return this.toString();
|
|
21196
|
+
}
|
|
21197
|
+
}
|
|
21198
|
+
/** @internal */
|
|
21199
|
+
const fiberFailure = cause => {
|
|
21200
|
+
const limit = Error.stackTraceLimit;
|
|
21201
|
+
Error.stackTraceLimit = 0;
|
|
21202
|
+
const error = new FiberFailureImpl(cause);
|
|
21203
|
+
Error.stackTraceLimit = limit;
|
|
21204
|
+
return error;
|
|
21205
|
+
};
|
|
21206
|
+
const fastPath = effect => {
|
|
21207
|
+
const op = effect;
|
|
21208
|
+
switch (op._op) {
|
|
21209
|
+
case "Failure":
|
|
21210
|
+
case "Success":
|
|
21211
|
+
{
|
|
21212
|
+
// @ts-expect-error
|
|
21213
|
+
return op;
|
|
21214
|
+
}
|
|
21215
|
+
case "Left":
|
|
21216
|
+
{
|
|
21217
|
+
return exitFail(op.left);
|
|
21218
|
+
}
|
|
21219
|
+
case "Right":
|
|
21220
|
+
{
|
|
21221
|
+
return exitSucceed$1(op.right);
|
|
21222
|
+
}
|
|
21223
|
+
case "Some":
|
|
21224
|
+
{
|
|
21225
|
+
return exitSucceed$1(op.value);
|
|
21226
|
+
}
|
|
21227
|
+
case "None":
|
|
21228
|
+
{
|
|
21229
|
+
// @ts-expect-error
|
|
21230
|
+
return exitFail(new NoSuchElementException());
|
|
21231
|
+
}
|
|
21232
|
+
}
|
|
21233
|
+
};
|
|
21234
|
+
/** @internal */
|
|
21235
|
+
const unsafeRunSyncExit = /*#__PURE__*/makeDual((runtime, effect) => {
|
|
21236
|
+
const op = fastPath(effect);
|
|
21237
|
+
if (op) {
|
|
21238
|
+
return op;
|
|
21239
|
+
}
|
|
21240
|
+
const scheduler = new SyncScheduler();
|
|
21241
|
+
const fiberRuntime = unsafeFork(runtime)(effect, {
|
|
21242
|
+
scheduler
|
|
21243
|
+
});
|
|
21244
|
+
scheduler.flush();
|
|
21245
|
+
const result = fiberRuntime.unsafePoll();
|
|
21246
|
+
if (result) {
|
|
21247
|
+
return result;
|
|
21248
|
+
}
|
|
21249
|
+
return exitDie$1(capture(asyncFiberException(fiberRuntime), currentSpanFromFiber(fiberRuntime)));
|
|
21250
|
+
});
|
|
21251
|
+
/** @internal */
|
|
20955
21252
|
class RuntimeImpl {
|
|
20956
21253
|
context;
|
|
20957
21254
|
runtimeFlags;
|
|
@@ -20979,6 +21276,8 @@ const defaultRuntime = /*#__PURE__*/make$3({
|
|
|
20979
21276
|
});
|
|
20980
21277
|
/** @internal */
|
|
20981
21278
|
const unsafeForkEffect = /*#__PURE__*/unsafeFork(defaultRuntime);
|
|
21279
|
+
/** @internal */
|
|
21280
|
+
const unsafeRunSyncEffect = /*#__PURE__*/unsafeRunSync(defaultRuntime);
|
|
20982
21281
|
|
|
20983
21282
|
/** @internal */
|
|
20984
21283
|
const modifyEffect = /*#__PURE__*/dual(2, (self, f) => self.modifyEffect(f));
|
|
@@ -22382,6 +22681,7 @@ const catchSomeCause = catchSomeCause$1;
|
|
|
22382
22681
|
* @category Error handling
|
|
22383
22682
|
*/
|
|
22384
22683
|
const ignore = ignore$1;
|
|
22684
|
+
const try_ = try_$1;
|
|
22385
22685
|
/**
|
|
22386
22686
|
* Represents an effect that interrupts the current fiber.
|
|
22387
22687
|
*
|
|
@@ -23527,6 +23827,43 @@ const raceWith = raceWith$1;
|
|
|
23527
23827
|
* @category Sequencing
|
|
23528
23828
|
*/
|
|
23529
23829
|
const tap = tap$1;
|
|
23830
|
+
/**
|
|
23831
|
+
* Execute a side effect on failure without modifying the original effect.
|
|
23832
|
+
*
|
|
23833
|
+
* **Details**
|
|
23834
|
+
*
|
|
23835
|
+
* This function allows you to inspect and react to the failure of an effect by
|
|
23836
|
+
* executing an additional effect. The failure value is passed to the provided
|
|
23837
|
+
* function, enabling you to log it, track it, or perform any other operation.
|
|
23838
|
+
* Importantly, the original failure remains intact and is re-propagated, so the
|
|
23839
|
+
* effect's behavior is unchanged.
|
|
23840
|
+
*
|
|
23841
|
+
* The side effect you provide is only executed when the effect fails. If the
|
|
23842
|
+
* effect succeeds, the function is ignored, and the success value is propagated
|
|
23843
|
+
* as usual.
|
|
23844
|
+
*
|
|
23845
|
+
* **Example**
|
|
23846
|
+
*
|
|
23847
|
+
* ```ts
|
|
23848
|
+
* import { Effect, Console } from "effect"
|
|
23849
|
+
*
|
|
23850
|
+
* // Simulate a task that fails with an error
|
|
23851
|
+
* const task: Effect.Effect<number, string> = Effect.fail("NetworkError")
|
|
23852
|
+
*
|
|
23853
|
+
* // Use tapError to log the error message when the task fails
|
|
23854
|
+
* const tapping = Effect.tapError(task, (error) =>
|
|
23855
|
+
* Console.log(`expected error: ${error}`)
|
|
23856
|
+
* )
|
|
23857
|
+
*
|
|
23858
|
+
* Effect.runFork(tapping)
|
|
23859
|
+
* // Output:
|
|
23860
|
+
* // expected error: NetworkError
|
|
23861
|
+
* ```
|
|
23862
|
+
*
|
|
23863
|
+
* @since 2.0.0
|
|
23864
|
+
* @category Sequencing
|
|
23865
|
+
*/
|
|
23866
|
+
const tapError = tapError$1;
|
|
23530
23867
|
/**
|
|
23531
23868
|
* Inspect the complete cause of an error, including failures and defects.
|
|
23532
23869
|
*
|
|
@@ -23817,6 +24154,65 @@ const matchCause = matchCause$1;
|
|
|
23817
24154
|
* @category Matching
|
|
23818
24155
|
*/
|
|
23819
24156
|
const matchCauseEffect = matchCauseEffect$2;
|
|
24157
|
+
/**
|
|
24158
|
+
* Logs messages at the WARNING log level.
|
|
24159
|
+
*
|
|
24160
|
+
* **Details**
|
|
24161
|
+
*
|
|
24162
|
+
* This function logs messages at the WARNING level, suitable for highlighting
|
|
24163
|
+
* potential issues that are not errors but may require attention. These
|
|
24164
|
+
* messages indicate that something unexpected occurred or might lead to errors
|
|
24165
|
+
* in the future.
|
|
24166
|
+
*
|
|
24167
|
+
* @since 2.0.0
|
|
24168
|
+
* @category Logging
|
|
24169
|
+
*/
|
|
24170
|
+
const logWarning = logWarning$1;
|
|
24171
|
+
/**
|
|
24172
|
+
* Ensures the effect always succeeds by replacing failures with a default
|
|
24173
|
+
* success value.
|
|
24174
|
+
*
|
|
24175
|
+
* **Details**
|
|
24176
|
+
*
|
|
24177
|
+
* This function transforms an effect that may fail into one that cannot fail by
|
|
24178
|
+
* replacing any failure with a provided success value. If the original effect
|
|
24179
|
+
* fails, the failure is "swallowed," and the specified success value is
|
|
24180
|
+
* returned instead. If the original effect succeeds, its value remains
|
|
24181
|
+
* unchanged.
|
|
24182
|
+
*
|
|
24183
|
+
* **When to Use**
|
|
24184
|
+
*
|
|
24185
|
+
* This is especially useful for providing default values in case of failure,
|
|
24186
|
+
* ensuring that an effect always completes successfully. By using this
|
|
24187
|
+
* function, you can avoid the need for complex error handling and guarantee a
|
|
24188
|
+
* fallback result.
|
|
24189
|
+
*
|
|
24190
|
+
* **Example**
|
|
24191
|
+
*
|
|
24192
|
+
* ```ts
|
|
24193
|
+
* import { Effect } from "effect"
|
|
24194
|
+
*
|
|
24195
|
+
* const validate = (age: number): Effect.Effect<number, string> => {
|
|
24196
|
+
* if (age < 0) {
|
|
24197
|
+
* return Effect.fail("NegativeAgeError")
|
|
24198
|
+
* } else if (age < 18) {
|
|
24199
|
+
* return Effect.fail("IllegalAgeError")
|
|
24200
|
+
* } else {
|
|
24201
|
+
* return Effect.succeed(age)
|
|
24202
|
+
* }
|
|
24203
|
+
* }
|
|
24204
|
+
*
|
|
24205
|
+
* const program = Effect.orElseSucceed(validate(-1), () => 18)
|
|
24206
|
+
*
|
|
24207
|
+
* console.log(Effect.runSyncExit(program))
|
|
24208
|
+
* // Output:
|
|
24209
|
+
* // { _id: 'Exit', _tag: 'Success', value: 18 }
|
|
24210
|
+
* ```
|
|
24211
|
+
*
|
|
24212
|
+
* @since 2.0.0
|
|
24213
|
+
* @category Fallback
|
|
24214
|
+
*/
|
|
24215
|
+
const orElseSucceed = orElseSucceed$1;
|
|
23820
24216
|
/**
|
|
23821
24217
|
* Returns an effect that accesses the runtime, which can be used to (unsafely)
|
|
23822
24218
|
* execute tasks.
|
|
@@ -23907,6 +24303,84 @@ const makeSemaphore = makeSemaphore$1;
|
|
|
23907
24303
|
* @category Running Effects
|
|
23908
24304
|
*/
|
|
23909
24305
|
const runFork = unsafeForkEffect;
|
|
24306
|
+
/**
|
|
24307
|
+
* Executes an effect synchronously, running it immediately and returning the
|
|
24308
|
+
* result.
|
|
24309
|
+
*
|
|
24310
|
+
* **Details**
|
|
24311
|
+
*
|
|
24312
|
+
* This function evaluates the provided effect synchronously, returning its
|
|
24313
|
+
* result directly. It is ideal for effects that do not fail or include
|
|
24314
|
+
* asynchronous operations. If the effect does fail or involves async tasks, it
|
|
24315
|
+
* will throw an error. Execution stops at the point of failure or asynchronous
|
|
24316
|
+
* operation, making it unsuitable for effects that require asynchronous
|
|
24317
|
+
* handling.
|
|
24318
|
+
*
|
|
24319
|
+
* **Important**: Attempting to run effects that involve asynchronous operations
|
|
24320
|
+
* or failures will result in exceptions being thrown, so use this function with
|
|
24321
|
+
* care for purely synchronous and error-free effects.
|
|
24322
|
+
*
|
|
24323
|
+
* **When to Use**
|
|
24324
|
+
*
|
|
24325
|
+
* Use this function when:
|
|
24326
|
+
* - You are sure that the effect will not fail or involve asynchronous
|
|
24327
|
+
* operations.
|
|
24328
|
+
* - You need a direct, synchronous result from the effect.
|
|
24329
|
+
* - You are working within a context where asynchronous effects are not
|
|
24330
|
+
* allowed.
|
|
24331
|
+
*
|
|
24332
|
+
* Avoid using this function for effects that can fail or require asynchronous
|
|
24333
|
+
* handling. For such cases, consider using {@link runPromise} or
|
|
24334
|
+
* {@link runSyncExit}.
|
|
24335
|
+
*
|
|
24336
|
+
* **Example** (Synchronous Logging)
|
|
24337
|
+
*
|
|
24338
|
+
* ```ts
|
|
24339
|
+
* import { Effect } from "effect"
|
|
24340
|
+
*
|
|
24341
|
+
* const program = Effect.sync(() => {
|
|
24342
|
+
* console.log("Hello, World!")
|
|
24343
|
+
* return 1
|
|
24344
|
+
* })
|
|
24345
|
+
*
|
|
24346
|
+
* const result = Effect.runSync(program)
|
|
24347
|
+
* // Output: Hello, World!
|
|
24348
|
+
*
|
|
24349
|
+
* console.log(result)
|
|
24350
|
+
* // Output: 1
|
|
24351
|
+
* ```
|
|
24352
|
+
*
|
|
24353
|
+
* **Example** (Incorrect Usage with Failing or Async Effects)
|
|
24354
|
+
*
|
|
24355
|
+
* ```ts
|
|
24356
|
+
* import { Effect } from "effect"
|
|
24357
|
+
*
|
|
24358
|
+
* try {
|
|
24359
|
+
* // Attempt to run an effect that fails
|
|
24360
|
+
* Effect.runSync(Effect.fail("my error"))
|
|
24361
|
+
* } catch (e) {
|
|
24362
|
+
* console.error(e)
|
|
24363
|
+
* }
|
|
24364
|
+
* // Output:
|
|
24365
|
+
* // (FiberFailure) Error: my error
|
|
24366
|
+
*
|
|
24367
|
+
* try {
|
|
24368
|
+
* // Attempt to run an effect that involves async work
|
|
24369
|
+
* Effect.runSync(Effect.promise(() => Promise.resolve(1)))
|
|
24370
|
+
* } catch (e) {
|
|
24371
|
+
* console.error(e)
|
|
24372
|
+
* }
|
|
24373
|
+
* // Output:
|
|
24374
|
+
* // (FiberFailure) AsyncFiberException: Fiber #0 cannot be resolved synchronously. This is caused by using runSync on an effect that performs async work
|
|
24375
|
+
* ```
|
|
24376
|
+
*
|
|
24377
|
+
* @see {@link runSyncExit} for a version that returns an `Exit` type instead of
|
|
24378
|
+
* throwing an error.
|
|
24379
|
+
*
|
|
24380
|
+
* @since 2.0.0
|
|
24381
|
+
* @category Running Effects
|
|
24382
|
+
*/
|
|
24383
|
+
const runSync = unsafeRunSyncEffect;
|
|
23910
24384
|
/**
|
|
23911
24385
|
* Combines two effects into a single effect, producing a tuple of their
|
|
23912
24386
|
* results.
|
|
@@ -26891,6 +27365,12 @@ class LmvzButton extends ReactiveControllerHost {
|
|
|
26891
27365
|
}; }
|
|
26892
27366
|
}
|
|
26893
27367
|
|
|
27368
|
+
class URLCreationError extends TaggedError('URLCreationError') {
|
|
27369
|
+
}
|
|
27370
|
+
const syncCreateAssetUrlSafely = (file) => try_(() => getAssetPath(['../../assets', file].join('/').replace('//', '/').replace('/./', '/'))).pipe(tapError(() => logWarning(`Failed to create URL for icon "${file}".
|
|
27371
|
+
Please provide an absolute URL in your app's 'setAssetPath(...)' configuration!
|
|
27372
|
+
Falling back to /assets/`)), orElseSucceed(() => window.location.origin + '/assets/' + file));
|
|
27373
|
+
|
|
26894
27374
|
const lmvzCardCss = () => `@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'), local('Router'); font-weight: 400 normal; } @font-face { font-family: Router; src: local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'), local('Router'); font-weight: 500; } @font-face { font-family: Router; src: local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'), local('Router'); font-weight: 700 bold; } } @layer lmvz-ds.reset { h1, h2, h3, h4, h5, h6 { margin: 0; } } .sc-lmvz-card-h { button { --lmvz-button-color: var(--lmvz-component-color, var(--lmvz-semantic-color-int-on-primary, #ffffff)); --lmvz-button-padding-inline: var(--lmvz-button-padding, var(--lmvz-component-input-md-padding-x, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-padding-block: var(--lmvz-button-padding, var(--lmvz-component-input-md-padding-y, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-button-font: var(--lmvz-typography-body-lg, 400 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.4 Router); --lmvz-button-radius: var(--lmvz-component-input-radius-default, 999px); --lmvz-button-border-width: 0; --lmvz-button-border-color: transparent; --lmvz-button-background: var(--lmvz-semantic-color-int-primary, #000000); display: inline-flex; align-items: center; justify-content: center; gap: var(--lmvz-button-gap); padding-block: var(--lmvz-button-padding-block); padding-inline: var(--lmvz-button-padding-inline); border-radius: var(--lmvz-button-radius); border: var(--lmvz-button-border-width) solid var(--lmvz-button-border-color); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-align: center; text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } button > * { font: inherit; color: inherit; } button:focus-visible { outline: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-status-selected, #f1f9fe); outline-offset: var(--lmvz-component-input-sm-padding-x, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); } button:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } button:not([disabled]):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-primary-hover, #2e2e2e); } button:not([disabled]):active { --lmvz-button-background: var(--lmvz-semantic-color-int-primary-active, #545454); } button.secondary { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-secondary, #000000); --lmvz-button-border-width: var(--lmvz-semantic-border-width-default, 1px); --lmvz-button-border-color: var(--lmvz-semantic-color-border-default, #e0e0e0); } button.secondary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0); --lmvz-button-border-color: var(--lmvz-semantic-color-border-hover, #c7c7c7); } button.secondary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-active, #d4d4d4); --lmvz-button-border-color: var(--lmvz-semantic-color-border-active, #d4d4d4); } button.tertiary { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary, #ffffff); --lmvz-button-color: var(--lmvz-semantic-color-int-on-tertiary, #545454); } button.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); } button.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); } button.small { --lmvz-button-padding-inline: var(--lmvz-component-input-sm-padding-x, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --lmvz-button-padding-block: var(--lmvz-component-input-sm-padding-y, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --lmvz-button-gap: var(--lmvz-component-input-sm-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-button-font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); } button.large { --lmvz-button-padding-inline: var(--lmvz-component-input-lg-padding-x, clamp(0.88rem, 0.78rem + 0.39vw, 1.25rem)); --lmvz-button-padding-block: var(--lmvz-component-input-lg-padding-y, clamp(0.88rem, 0.78rem + 0.39vw, 1.25rem)); --lmvz-button-gap: var(--lmvz-component-input-lg-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-button-font: var(--lmvz-typography-body-lg, 400 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.4 Router); } display: flex; min-width: var(--lmvz-other-component-card-minwidth, 20.4375rem); max-width: var(--lmvz-other-component-card-maxwidth, 21.6875rem); flex-direction: column; align-items: flex-start; border-radius: var(--lmvz-semantic-border-radius-lg, 14px); border: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-default, #e0e0e0); background: var(--lmvz-semantic-color-surface-primary, #ffffff); } *.sc-lmvz-card { color: var(--lmvz-semantic-color-on-surface-primary, #000000); font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); } .top.sc-lmvz-card { display: flex; padding: var(--lmvz-dimension-8-12, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); flex-direction: column; justify-content: center; align-items: center; align-self: stretch; } .bottom.sc-lmvz-card { display: flex; min-width: 150px; padding: var(--lmvz-dimension-4-6, clamp(0.25rem, 0.22rem + 0.13vw, 0.38rem)) var(--lmvz-dimension-10-14, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)) var(--lmvz-dimension-10-14, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)) var(--lmvz-dimension-10-14, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)); flex-direction: column; align-items: flex-start; align-self: stretch; } .title.sc-lmvz-card { margin: 0; display: flex; justify-content: center; align-items: center; align-self: stretch; padding-bottom: var(--lmvz-global-s4, 4px); overflow-wrap: break-word; font: var(--lmvz-typography-heading-2xl, 500 clamp(2rem, 1.94rem + 0.26vw, 2.25rem) / 1.2 Router); } .description.sc-lmvz-card { display: flex; margin: 0; padding-bottom: var(--lmvz-component-body-sm-padding-bottom, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); align-items: flex-start; align-self: stretch; white-space: pre-line; font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); } .image-wrapper.sc-lmvz-card { aspect-ratio: 4 / 3; width: 100%; background-size: cover; background-position: center; flex: 1 0 0; align-self: stretch; border-radius: var(--lmvz-semantic-border-radius-md, 6px); } .actions.sc-lmvz-card { margin-top: var(--lmvz-component-form-wrapper-gap-y, clamp(1.13rem, 0.97rem + 0.65vw, 1.75rem)); display: flex; align-items: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); align-self: stretch; } button.primary.sc-lmvz-card, lmvz-button.primary.sc-lmvz-card { display: flex; justify-content: center; align-items: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); flex: 1 0 0; }`;
|
|
26895
27375
|
|
|
26896
27376
|
class LmvzCard {
|
|
@@ -26903,6 +27383,9 @@ class LmvzCard {
|
|
|
26903
27383
|
description;
|
|
26904
27384
|
primaryActionLabel = '';
|
|
26905
27385
|
primaryAction;
|
|
27386
|
+
get fallbackImage() {
|
|
27387
|
+
return runSync(syncCreateAssetUrlSafely('card-placeholder.svg'));
|
|
27388
|
+
}
|
|
26906
27389
|
_onPrimaryClick() {
|
|
26907
27390
|
this.primaryAction.emit();
|
|
26908
27391
|
}
|
|
@@ -26911,9 +27394,9 @@ class LmvzCard {
|
|
|
26911
27394
|
}
|
|
26912
27395
|
render() {
|
|
26913
27396
|
const imgStyle = {
|
|
26914
|
-
backgroundImage: `url(${this.imageUrl ??
|
|
27397
|
+
backgroundImage: `url(${this.imageUrl ?? this.fallbackImage})`,
|
|
26915
27398
|
};
|
|
26916
|
-
return (hAsync(Host, { key: '
|
|
27399
|
+
return (hAsync(Host, { key: '1438354a53604954320d01652aa1d84f8712e875', role: "article" }, hAsync("div", { key: 'dcffae2c48ebf8f8769cf07c2e78806f12df6888', class: "top" }, hAsync("div", { key: 'e41e1d0aafbfc5879b86022e91958ef3373b48b2', class: "image-wrapper", style: imgStyle }, hAsync("div", { key: 'f6a1fc9706012f39aca9dd0b995290e6042e3407', class: "chip-slot" }, hAsync("slot", { key: '4e014519c147705cc30b3268d652ea6c76c749ec', name: "chip" })))), hAsync("div", { key: 'e7baf78b660e9a97edd0b6a0aa1bdb1afa593fed', class: "bottom" }, hAsync("header", { key: 'a8dad9f91df60f535725328a4901833d47652678' }, hAsync("h2", { key: '1cdbca46469750187856a46fa155128f1f8a677f', class: "title" }, this.cardTitle)), hAsync("p", { key: 'f33c2c0af86d7be31fcbd676833b27c7d06e2dd9', class: "description" }, this.description), hAsync("div", { key: 'a12595d514167fb957aac71fe3d144810b442f9d', class: "actions" }, hAsync("button", { key: '9730cedbf83599c09eedaaae43331147691486d6', class: "primary", onClick: this._onPrimaryClick.bind(this), "data-testid": "primary" }, this.primaryActionLabel), hAsync("button", { key: '48e9c511c406beb75334452769beade3dec9a3f5', class: "tertiary", "aria-label": "More actions", onClick: this._onOverflowClick }, hAsync("span", { key: '81cc1af42a15dddb9dbd4f373a6a047c2e2cd563', class: "icon-placeholder" }, "..."))))));
|
|
26917
27400
|
}
|
|
26918
27401
|
static get assetsDirs() { return ["../../assets"]; }
|
|
26919
27402
|
static get style() { return lmvzCardCss(); }
|
|
@@ -27102,9 +27585,6 @@ class ResponseTextError extends TaggedError('ResponseTextError') {
|
|
|
27102
27585
|
}
|
|
27103
27586
|
}
|
|
27104
27587
|
|
|
27105
|
-
class URLCreationError extends TaggedError('URLCreationError') {
|
|
27106
|
-
}
|
|
27107
|
-
|
|
27108
27588
|
refined(isValidSVG, () => error('SVG data is malformed'));
|
|
27109
27589
|
class BrandValidationError extends TaggedError('BrandValidationError') {
|
|
27110
27590
|
constructor(error, type) {
|