codebay 0.14.0 → 0.16.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/.mochi/manifest.json +778 -646
- package/.mochi/svelte-client/HydratableIsland-6y9p903x.js +1 -0
- package/.mochi/svelte-client/_hydrate-AppShell_2rtnxn6pgp2rh-nv6yzk0x.js +2 -0
- package/.mochi/svelte-client/_hydrate-AvatarsView_257s9yq1wwr4f-ry83ck8a.js +14 -0
- package/.mochi/svelte-client/_hydrate-InstanceView_2ma45l9bybfhl-vjt4jscf.js +3 -0
- package/.mochi/svelte-client/_hydrate-SettingsView_8hmarwmf8onq-1jdrk8x6.js +48 -0
- package/.mochi/svelte-client/{chunk-spk1b2r4.js → chunk-0vqvn81s.js} +1 -1
- package/.mochi/svelte-client/chunk-2dc6352a.js +1 -0
- package/.mochi/svelte-client/chunk-3cxaw5hr.js +2 -0
- package/.mochi/svelte-client/chunk-3jqc40sp.js +2 -0
- package/.mochi/svelte-client/chunk-3pgw6t5j.js +4 -0
- package/.mochi/svelte-client/chunk-7g3xt6ez.js +2 -0
- package/.mochi/svelte-client/chunk-b5s3mpg0.js +1 -0
- package/.mochi/svelte-client/chunk-bhseezf3.js +2 -0
- package/.mochi/svelte-client/chunk-bhwkq8er.js +1 -0
- package/.mochi/svelte-client/chunk-jm3ge348.js +1 -0
- package/.mochi/svelte-client/{chunk-0mc09cyb.js → chunk-sxcr9gzp.js} +1 -1
- package/.mochi/svelte-client/{chunk-ccfh8hxz.js → chunk-tss2473w.js} +1 -1
- package/.mochi/svelte-compile/{App-94xsdn0w.server.js → App-8mpgrxza.server.js} +470 -271
- package/.mochi/svelte-compile/{Avatars-fnccw47h.server.js → Avatars-y5nf6q25.server.js} +111 -110
- package/.mochi/svelte-compile/{DefaultError-je52k17d.server.js → DefaultError-rrjye0s2.server.js} +1 -2
- package/.mochi/svelte-compile/Instance-3sbzyp0g.server.js +695 -0
- package/.mochi/svelte-compile/{Settings-a7b11v90.server.js → Settings-ysvh5vhh.server.js} +838 -607
- package/.mochi/svelte-compile/chunk-7zaw9t5a.js +25 -0
- package/.mochi/svelte-compile/chunk-878xcmp4.js +65 -0
- package/.mochi/svelte-compile/chunk-d2z3qxxe.js +28 -0
- package/.mochi/svelte-compile/{chunk-60mpagr9.js → chunk-gnf5cnct.js} +661 -22
- package/.mochi/svelte-compile/{chunk-w0hca7va.js → chunk-jq7jj8jd.js} +18 -2
- package/.mochi/svelte-compile/chunk-vr0e32mv.js +24 -0
- package/.mochi/svelte-compile/{chunk-apdte4nh.js → chunk-xmygdsj4.js} +35 -612
- package/.mochi/svelte-compile/{chunk-pqb403fh.js → chunk-zk4a9zms.js} +28 -31
- package/.mochi/svelte-css/AgentLogBox-38adby5iygny7.css +1 -0
- package/.mochi/svelte-css/DropZone-1zeitd761uwyd.css +1 -0
- package/.mochi/svelte-css/IdeBar-d3un7kuigxc5.css +1 -0
- package/.mochi/svelte-css/{InstanceCard-25z7nas7y98zk.css → InstanceCard-3vxozrp9uoads.css} +1 -1
- package/.mochi/svelte-css/InstanceView-3ucotech5097w.css +1 -0
- package/.mochi/svelte-css/{SettingsView-bccw34agd2bj.css → SettingsView-2400myxb9ot56.css} +1 -1
- package/README.md +43 -3
- package/migrations/0009_agent_runs.sql +24 -0
- package/migrations/0010_agent_run_model.sql +2 -0
- package/migrations/0011_agent_run_rejected_structured_output.sql +2 -0
- package/package.json +13 -9
- package/src/__fixtures__/IdeBarStrip.svelte +41 -0
- package/src/avatars/dog.ts +1 -1
- package/src/avatars/lightning.ts +8 -9
- package/src/avatars/rocket.ts +4 -5
- package/src/components/AgentLogBox.svelte +458 -0
- package/src/components/AppShell.svelte +112 -1
- package/src/components/DropZone.svelte +77 -0
- package/src/components/FolderBrowser.svelte +13 -5
- package/src/components/HealthBox.svelte +6 -5
- package/src/components/IdeBar.svelte +222 -76
- package/src/components/InstanceCard.svelte +38 -0
- package/src/components/InstanceView.svelte +83 -2
- package/src/components/SettingsView.svelte +273 -0
- package/src/components/TerminalPane.svelte +54 -0
- package/src/components/UiShowcase.svelte +23 -3
- package/src/container-injections/claude-code-install.ts +1 -1
- package/src/container-injections/claude-history.ts +52 -0
- package/src/container-injections/claude-statusline.ts +4 -1
- package/src/container-injections/github-credentials.ts +12 -1
- package/src/container-injections/tmux.ts +6 -2
- package/src/index.ts +35 -7
- package/src/lib/agent-run-stream.ts +286 -0
- package/src/lib/agent-runs.server.ts +735 -0
- package/src/lib/auth.server.ts +11 -2
- package/src/lib/build-freshness.server.ts +71 -0
- package/src/lib/config.server.ts +36 -7
- package/src/lib/container-files.server.ts +1 -1
- package/src/lib/data-dir-lock.server.ts +78 -0
- package/src/lib/db.server.ts +124 -1
- package/src/lib/devcontainer.server.ts +93 -16
- package/src/lib/docker-client.server.ts +11 -5
- package/src/lib/drives.ts +11 -0
- package/src/lib/exec.server.ts +66 -5
- package/src/lib/injections.server.ts +5 -1
- package/src/lib/instances.server.ts +66 -7
- package/src/lib/log-capture.server.ts +63 -23
- package/src/lib/mcp-auth.server.ts +52 -0
- package/src/lib/osc52.ts +18 -0
- package/src/lib/picker.server.ts +23 -2
- package/src/lib/sandbox-ops.server.ts +263 -0
- package/src/lib/upload.ts +32 -0
- package/src/lib/uploads.server.ts +164 -0
- package/src/mcp/routes.server.ts +25 -0
- package/src/mcp/server.server.ts +55 -0
- package/src/mcp/tools.server.ts +660 -0
- package/src/pages/Instance.svelte +6 -2
- package/src/pages/Settings.svelte +15 -0
- package/src/routes.ts +79 -3
- package/src/types.ts +17 -0
- package/.mochi/svelte-client/HydratableIsland-zrdsrsmg.js +0 -1
- package/.mochi/svelte-client/_hydrate-AppShell_2rtnxn6pgp2rh-v7y7dh53.js +0 -2
- package/.mochi/svelte-client/_hydrate-AvatarsView_257s9yq1wwr4f-tmwd6fpb.js +0 -14
- package/.mochi/svelte-client/_hydrate-InstanceView_2ma45l9bybfhl-m7t64dbh.js +0 -1
- package/.mochi/svelte-client/_hydrate-SettingsView_8hmarwmf8onq-4a7ann1f.js +0 -40
- package/.mochi/svelte-client/chunk-5jwfs4p9.js +0 -2
- package/.mochi/svelte-client/chunk-6qg4q98a.js +0 -2
- package/.mochi/svelte-client/chunk-phf7v5jj.js +0 -4
- package/.mochi/svelte-client/chunk-tmeh70wg.js +0 -2
- package/.mochi/svelte-client/chunk-vs1yjbqt.js +0 -2
- package/.mochi/svelte-client/chunk-x0m3k0rn.js +0 -1
- package/.mochi/svelte-client/chunk-y7f4jbdm.js +0 -2
- package/.mochi/svelte-compile/Instance-knnkcn2p.server.js +0 -377
- package/.mochi/svelte-compile/chunk-ed46m58e.js +0 -22
- package/.mochi/svelte-compile/chunk-jx6h1xzp.js +0 -20
- package/.mochi/svelte-css/IdeBar-1mtgemqfuvqzi.css +0 -1
- package/.mochi/svelte-css/InstanceView-32j12hyg8v9u0.css +0 -1
|
@@ -3238,7 +3238,7 @@ import * as $3 from "svelte/internal/server";
|
|
|
3238
3238
|
import"svelte/internal/flags/async";
|
|
3239
3239
|
import * as $2 from "svelte/internal/server";
|
|
3240
3240
|
|
|
3241
|
-
// node_modules/@lucide/svelte/dist/defaultAttributes.js
|
|
3241
|
+
// node_modules/@lucide/svelte/dist/utils/defaultAttributes.js
|
|
3242
3242
|
var defaultAttributes = {
|
|
3243
3243
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3244
3244
|
width: 24,
|
|
@@ -3252,6 +3252,65 @@ var defaultAttributes = {
|
|
|
3252
3252
|
};
|
|
3253
3253
|
var defaultAttributes_default = defaultAttributes;
|
|
3254
3254
|
|
|
3255
|
+
// node_modules/@lucide/svelte/dist/utils/mergeClasses.js
|
|
3256
|
+
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
|
3257
|
+
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
|
|
3258
|
+
}).join(" ").trim();
|
|
3259
|
+
|
|
3260
|
+
// node_modules/@lucide/svelte/dist/utils/buildLucideIconNode.js
|
|
3261
|
+
function isDefined(value) {
|
|
3262
|
+
return value !== null && value !== undefined;
|
|
3263
|
+
}
|
|
3264
|
+
function buildLucideIconNode(icon, params2 = {}) {
|
|
3265
|
+
const attributeNames = params2.attributeNames ?? {};
|
|
3266
|
+
const getAttributeName = (attributeName) => attributeNames[attributeName] ?? attributeName;
|
|
3267
|
+
const viewBoxWidth = icon.size ?? icon.width ?? defaultAttributes_default["width"];
|
|
3268
|
+
const viewBoxHeight = icon.size ?? icon.height ?? defaultAttributes_default["height"];
|
|
3269
|
+
const aliasClassNames = icon.aliases?.filter((alias) => typeof alias === "string" && alias.trim() !== "").map((alias) => `lucide-${alias}`) ?? [];
|
|
3270
|
+
const iconClassNames = [...icon.name ? [`lucide-${icon.name}`] : [], ...aliasClassNames];
|
|
3271
|
+
const classNamesFromClassName = params2.className?.split(" ").filter(Boolean) ?? [];
|
|
3272
|
+
const className = params2.includeDefaultClasses === false ? mergeClasses(...classNamesFromClassName) : mergeClasses("lucide", ...iconClassNames, ...classNamesFromClassName);
|
|
3273
|
+
const calculatedStrokeWidth = params2.absoluteStrokeWidth ? Number(params2.strokeWidth ?? defaultAttributes_default["stroke-width"]) * Number(icon.size ?? icon.width ?? defaultAttributes_default["width"]) / Number(params2.size ?? params2.width ?? defaultAttributes_default["width"]) : params2.strokeWidth ?? defaultAttributes_default["stroke-width"];
|
|
3274
|
+
const attributes = {
|
|
3275
|
+
...Object.entries(defaultAttributes_default).reduce((attrs, [attrName, value]) => {
|
|
3276
|
+
attrs[getAttributeName(attrName)] = value;
|
|
3277
|
+
return attrs;
|
|
3278
|
+
}, {}),
|
|
3279
|
+
..."color" in params2 && params2.color && {
|
|
3280
|
+
[getAttributeName("stroke")]: params2.color
|
|
3281
|
+
},
|
|
3282
|
+
..."size" in params2 && isDefined(params2.size) && {
|
|
3283
|
+
[getAttributeName("width")]: params2.size,
|
|
3284
|
+
[getAttributeName("height")]: params2.size
|
|
3285
|
+
},
|
|
3286
|
+
..."width" in params2 && isDefined(params2.width) && {
|
|
3287
|
+
[getAttributeName("width")]: params2.width
|
|
3288
|
+
},
|
|
3289
|
+
..."height" in params2 && isDefined(params2.height) && {
|
|
3290
|
+
[getAttributeName("height")]: params2.height
|
|
3291
|
+
},
|
|
3292
|
+
[getAttributeName("stroke-width")]: calculatedStrokeWidth,
|
|
3293
|
+
...className && {
|
|
3294
|
+
[getAttributeName("class")]: className
|
|
3295
|
+
},
|
|
3296
|
+
[getAttributeName("viewBox")]: `0 0 ${viewBoxWidth} ${viewBoxHeight}`,
|
|
3297
|
+
...params2.hasA11yProp === false ? {
|
|
3298
|
+
[getAttributeName("aria-hidden")]: "true"
|
|
3299
|
+
} : {},
|
|
3300
|
+
..."attributes" in params2 && params2.attributes
|
|
3301
|
+
};
|
|
3302
|
+
return [
|
|
3303
|
+
"svg",
|
|
3304
|
+
attributes,
|
|
3305
|
+
icon.node.map((child) => {
|
|
3306
|
+
const [name, attrs, children] = child;
|
|
3307
|
+
const nextAttrs = params2.nonScalingStroke ? { [getAttributeName("vector-effect")]: "non-scaling-stroke", ...attrs } : attrs;
|
|
3308
|
+
return children ? [name, nextAttrs, children] : [name, nextAttrs];
|
|
3309
|
+
})
|
|
3310
|
+
];
|
|
3311
|
+
}
|
|
3312
|
+
var buildLucideIconNode_default = buildLucideIconNode;
|
|
3313
|
+
|
|
3255
3314
|
// node_modules/@lucide/svelte/dist/utils/hasA11yProp.js
|
|
3256
3315
|
var hasA11yProp = (props) => {
|
|
3257
3316
|
for (const prop in props) {
|
|
@@ -3272,34 +3331,39 @@ function Icon($$renderer, $$props) {
|
|
|
3272
3331
|
$$renderer.component(($$renderer2) => {
|
|
3273
3332
|
const globalProps = getLucideContext() ?? {};
|
|
3274
3333
|
const {
|
|
3275
|
-
name,
|
|
3276
3334
|
color = globalProps.color ?? "currentColor",
|
|
3277
3335
|
size = globalProps.size ?? 24,
|
|
3336
|
+
width = size,
|
|
3337
|
+
height = size,
|
|
3278
3338
|
strokeWidth = globalProps.strokeWidth ?? 2,
|
|
3279
3339
|
absoluteStrokeWidth = globalProps.absoluteStrokeWidth ?? false,
|
|
3340
|
+
nonScalingStroke = globalProps.nonScalingStroke ?? false,
|
|
3280
3341
|
iconNode = [],
|
|
3342
|
+
icon = { node: iconNode, aliases: [], size: 24 },
|
|
3343
|
+
class: propsClass,
|
|
3281
3344
|
children,
|
|
3282
3345
|
$$slots,
|
|
3283
3346
|
$$events,
|
|
3284
3347
|
...props
|
|
3285
3348
|
} = $$props;
|
|
3286
|
-
const
|
|
3287
|
-
$$
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
"
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
]
|
|
3301
|
-
}
|
|
3302
|
-
|
|
3349
|
+
const hasAccessibleProp = $2.derived(() => Boolean(children) || hasA11yProp(props));
|
|
3350
|
+
const $$d = $2.derived(() => buildLucideIconNode_default(icon, {
|
|
3351
|
+
color,
|
|
3352
|
+
width,
|
|
3353
|
+
height,
|
|
3354
|
+
strokeWidth,
|
|
3355
|
+
absoluteStrokeWidth,
|
|
3356
|
+
nonScalingStroke,
|
|
3357
|
+
className: mergeClasses("lucide-icon", globalProps.class),
|
|
3358
|
+
hasA11yProp: hasAccessibleProp(),
|
|
3359
|
+
attributes: props
|
|
3360
|
+
})), $$derived_array = $2.derived(() => $2.to_array($$d(), 3)), svgAttributes = $2.derived(() => $$derived_array()[1]), builtIconNode = $2.derived(() => $2.fallback($$derived_array()[2], () => [], true));
|
|
3361
|
+
const iconAttributes = $2.derived(() => ({
|
|
3362
|
+
...svgAttributes(),
|
|
3363
|
+
class: [...svgAttributes().class.split(" "), propsClass]
|
|
3364
|
+
}));
|
|
3365
|
+
$$renderer2.push(`<svg${$2.attributes({ ...iconAttributes() }, undefined, undefined, undefined, 3)}><!--[-->`);
|
|
3366
|
+
const each_array = $2.ensure_array_like(builtIconNode());
|
|
3303
3367
|
for (let $$index = 0, $$length = each_array.length;$$index < $$length; $$index++) {
|
|
3304
3368
|
let [tag, attrs] = each_array[$$index];
|
|
3305
3369
|
$2.element($$renderer2, tag, () => {
|
|
@@ -3315,8 +3379,12 @@ function Icon($$renderer, $$props) {
|
|
|
3315
3379
|
// node_modules/@lucide/svelte/dist/icons/x.svelte
|
|
3316
3380
|
function X($$renderer, $$props) {
|
|
3317
3381
|
let { $$slots, $$events, ...props } = $$props;
|
|
3318
|
-
const
|
|
3319
|
-
|
|
3382
|
+
const iconData = {
|
|
3383
|
+
name: "x",
|
|
3384
|
+
size: 24,
|
|
3385
|
+
node: [["path", { d: "M18 6 6 18" }], ["path", { d: "m6 6 12 12" }]]
|
|
3386
|
+
};
|
|
3387
|
+
Icon($$renderer, $3.spread_props([props, { icon: iconData }]));
|
|
3320
3388
|
}
|
|
3321
3389
|
// src/lib/popup-nav.ts
|
|
3322
3390
|
var POPUP_PARAM = "popup";
|
|
@@ -3324,4 +3392,575 @@ function withPopupMarker(href) {
|
|
|
3324
3392
|
return `${href}?${POPUP_PARAM}=1`;
|
|
3325
3393
|
}
|
|
3326
3394
|
|
|
3327
|
-
|
|
3395
|
+
// node_modules/svelte-french-toast/dist/components/Toaster.svelte
|
|
3396
|
+
import"svelte/internal/flags/async";
|
|
3397
|
+
import * as $11 from "svelte/internal/server";
|
|
3398
|
+
|
|
3399
|
+
// node_modules/svelte-french-toast/dist/core/store.js
|
|
3400
|
+
import { get as get2, writable } from "svelte/store";
|
|
3401
|
+
|
|
3402
|
+
// node_modules/svelte-writable-derived/index.mjs
|
|
3403
|
+
import { derived as derived2, get } from "svelte/store";
|
|
3404
|
+
function writableDerived(origins, derive, reflect, initial) {
|
|
3405
|
+
var childDerivedSetter, originValues, blockNextDerive = false;
|
|
3406
|
+
var reflectOldValues = reflect.length >= 2;
|
|
3407
|
+
var wrappedDerive = (got, set, update2) => {
|
|
3408
|
+
childDerivedSetter = set;
|
|
3409
|
+
if (reflectOldValues) {
|
|
3410
|
+
originValues = got;
|
|
3411
|
+
}
|
|
3412
|
+
if (!blockNextDerive) {
|
|
3413
|
+
let returned = derive(got, set, update2);
|
|
3414
|
+
if (derive.length < 2) {
|
|
3415
|
+
set(returned);
|
|
3416
|
+
} else {
|
|
3417
|
+
return returned;
|
|
3418
|
+
}
|
|
3419
|
+
}
|
|
3420
|
+
blockNextDerive = false;
|
|
3421
|
+
};
|
|
3422
|
+
var childDerived = derived2(origins, wrappedDerive, initial);
|
|
3423
|
+
var singleOrigin = !Array.isArray(origins);
|
|
3424
|
+
function doReflect(reflecting) {
|
|
3425
|
+
var setWith = reflect(reflecting, originValues);
|
|
3426
|
+
if (singleOrigin) {
|
|
3427
|
+
blockNextDerive = true;
|
|
3428
|
+
origins.set(setWith);
|
|
3429
|
+
} else {
|
|
3430
|
+
setWith.forEach((value, i) => {
|
|
3431
|
+
blockNextDerive = true;
|
|
3432
|
+
origins[i].set(value);
|
|
3433
|
+
});
|
|
3434
|
+
}
|
|
3435
|
+
blockNextDerive = false;
|
|
3436
|
+
}
|
|
3437
|
+
var tryingSet = false;
|
|
3438
|
+
function update(fn) {
|
|
3439
|
+
var isUpdated, mutatedBySubscriptions, oldValue, newValue;
|
|
3440
|
+
if (tryingSet) {
|
|
3441
|
+
newValue = fn(get(childDerived));
|
|
3442
|
+
childDerivedSetter(newValue);
|
|
3443
|
+
return;
|
|
3444
|
+
}
|
|
3445
|
+
var unsubscribe = childDerived.subscribe((value) => {
|
|
3446
|
+
if (!tryingSet) {
|
|
3447
|
+
oldValue = value;
|
|
3448
|
+
} else if (!isUpdated) {
|
|
3449
|
+
isUpdated = true;
|
|
3450
|
+
} else {
|
|
3451
|
+
mutatedBySubscriptions = true;
|
|
3452
|
+
}
|
|
3453
|
+
});
|
|
3454
|
+
newValue = fn(oldValue);
|
|
3455
|
+
tryingSet = true;
|
|
3456
|
+
childDerivedSetter(newValue);
|
|
3457
|
+
unsubscribe();
|
|
3458
|
+
tryingSet = false;
|
|
3459
|
+
if (mutatedBySubscriptions) {
|
|
3460
|
+
newValue = get(childDerived);
|
|
3461
|
+
}
|
|
3462
|
+
if (isUpdated) {
|
|
3463
|
+
doReflect(newValue);
|
|
3464
|
+
}
|
|
3465
|
+
}
|
|
3466
|
+
return {
|
|
3467
|
+
subscribe: childDerived.subscribe,
|
|
3468
|
+
set(value) {
|
|
3469
|
+
update(() => value);
|
|
3470
|
+
},
|
|
3471
|
+
update
|
|
3472
|
+
};
|
|
3473
|
+
}
|
|
3474
|
+
|
|
3475
|
+
// node_modules/svelte-french-toast/dist/core/store.js
|
|
3476
|
+
var TOAST_LIMIT = 20;
|
|
3477
|
+
var toasts = writable([]);
|
|
3478
|
+
var pausedAt = writable(null);
|
|
3479
|
+
var toastTimeouts = new Map;
|
|
3480
|
+
var addToRemoveQueue = (toastId) => {
|
|
3481
|
+
if (toastTimeouts.has(toastId)) {
|
|
3482
|
+
return;
|
|
3483
|
+
}
|
|
3484
|
+
const timeout = setTimeout(() => {
|
|
3485
|
+
toastTimeouts.delete(toastId);
|
|
3486
|
+
remove(toastId);
|
|
3487
|
+
}, 1000);
|
|
3488
|
+
toastTimeouts.set(toastId, timeout);
|
|
3489
|
+
};
|
|
3490
|
+
var clearFromRemoveQueue = (toastId) => {
|
|
3491
|
+
const timeout = toastTimeouts.get(toastId);
|
|
3492
|
+
if (timeout) {
|
|
3493
|
+
clearTimeout(timeout);
|
|
3494
|
+
}
|
|
3495
|
+
};
|
|
3496
|
+
function update(toast) {
|
|
3497
|
+
if (toast.id) {
|
|
3498
|
+
clearFromRemoveQueue(toast.id);
|
|
3499
|
+
}
|
|
3500
|
+
toasts.update(($toasts) => $toasts.map((t) => t.id === toast.id ? { ...t, ...toast } : t));
|
|
3501
|
+
}
|
|
3502
|
+
function add(toast) {
|
|
3503
|
+
toasts.update(($toasts) => [toast, ...$toasts].slice(0, TOAST_LIMIT));
|
|
3504
|
+
}
|
|
3505
|
+
function upsert(toast) {
|
|
3506
|
+
if (get2(toasts).find((t) => t.id === toast.id)) {
|
|
3507
|
+
update(toast);
|
|
3508
|
+
} else {
|
|
3509
|
+
add(toast);
|
|
3510
|
+
}
|
|
3511
|
+
}
|
|
3512
|
+
function dismiss(toastId) {
|
|
3513
|
+
toasts.update(($toasts) => {
|
|
3514
|
+
if (toastId) {
|
|
3515
|
+
addToRemoveQueue(toastId);
|
|
3516
|
+
} else {
|
|
3517
|
+
$toasts.forEach((toast) => {
|
|
3518
|
+
addToRemoveQueue(toast.id);
|
|
3519
|
+
});
|
|
3520
|
+
}
|
|
3521
|
+
return $toasts.map((t) => t.id === toastId || toastId === undefined ? { ...t, visible: false } : t);
|
|
3522
|
+
});
|
|
3523
|
+
}
|
|
3524
|
+
function remove(toastId) {
|
|
3525
|
+
toasts.update(($toasts) => {
|
|
3526
|
+
if (toastId === undefined) {
|
|
3527
|
+
return [];
|
|
3528
|
+
}
|
|
3529
|
+
return $toasts.filter((t) => t.id !== toastId);
|
|
3530
|
+
});
|
|
3531
|
+
}
|
|
3532
|
+
function startPause(time) {
|
|
3533
|
+
pausedAt.set(time);
|
|
3534
|
+
}
|
|
3535
|
+
function endPause(time) {
|
|
3536
|
+
let diff;
|
|
3537
|
+
pausedAt.update(($pausedAt) => {
|
|
3538
|
+
diff = time - ($pausedAt || 0);
|
|
3539
|
+
return null;
|
|
3540
|
+
});
|
|
3541
|
+
toasts.update(($toasts) => $toasts.map((t) => ({
|
|
3542
|
+
...t,
|
|
3543
|
+
pauseDuration: t.pauseDuration + diff
|
|
3544
|
+
})));
|
|
3545
|
+
}
|
|
3546
|
+
var defaultTimeouts = {
|
|
3547
|
+
blank: 4000,
|
|
3548
|
+
error: 4000,
|
|
3549
|
+
success: 2000,
|
|
3550
|
+
loading: Infinity,
|
|
3551
|
+
custom: 4000
|
|
3552
|
+
};
|
|
3553
|
+
function useToasterStore(toastOptions = {}) {
|
|
3554
|
+
const mergedToasts = writableDerived(toasts, ($toasts) => $toasts.map((t) => ({
|
|
3555
|
+
...toastOptions,
|
|
3556
|
+
...toastOptions[t.type],
|
|
3557
|
+
...t,
|
|
3558
|
+
duration: t.duration || toastOptions[t.type]?.duration || toastOptions?.duration || defaultTimeouts[t.type],
|
|
3559
|
+
style: [toastOptions.style, toastOptions[t.type]?.style, t.style].join(";")
|
|
3560
|
+
})), ($toasts) => $toasts);
|
|
3561
|
+
return {
|
|
3562
|
+
toasts: mergedToasts,
|
|
3563
|
+
pausedAt
|
|
3564
|
+
};
|
|
3565
|
+
}
|
|
3566
|
+
|
|
3567
|
+
// node_modules/svelte-french-toast/dist/core/types.js
|
|
3568
|
+
var isFunction = (valOrFunction) => typeof valOrFunction === "function";
|
|
3569
|
+
var resolveValue = (valOrFunction, arg) => isFunction(valOrFunction) ? valOrFunction(arg) : valOrFunction;
|
|
3570
|
+
|
|
3571
|
+
// node_modules/svelte-french-toast/dist/core/utils.js
|
|
3572
|
+
var genId = (() => {
|
|
3573
|
+
let count = 0;
|
|
3574
|
+
return () => {
|
|
3575
|
+
count += 1;
|
|
3576
|
+
return count.toString();
|
|
3577
|
+
};
|
|
3578
|
+
})();
|
|
3579
|
+
var prefersReducedMotion = (() => {
|
|
3580
|
+
let shouldReduceMotion;
|
|
3581
|
+
return () => {
|
|
3582
|
+
if (shouldReduceMotion === undefined && typeof window !== "undefined") {
|
|
3583
|
+
const mediaQuery = matchMedia("(prefers-reduced-motion: reduce)");
|
|
3584
|
+
shouldReduceMotion = !mediaQuery || mediaQuery.matches;
|
|
3585
|
+
}
|
|
3586
|
+
return shouldReduceMotion;
|
|
3587
|
+
};
|
|
3588
|
+
})();
|
|
3589
|
+
|
|
3590
|
+
// node_modules/svelte-french-toast/dist/core/toast.js
|
|
3591
|
+
var createToast = (message, type = "blank", opts) => ({
|
|
3592
|
+
createdAt: Date.now(),
|
|
3593
|
+
visible: true,
|
|
3594
|
+
type,
|
|
3595
|
+
ariaProps: {
|
|
3596
|
+
role: "status",
|
|
3597
|
+
"aria-live": "polite"
|
|
3598
|
+
},
|
|
3599
|
+
message,
|
|
3600
|
+
pauseDuration: 0,
|
|
3601
|
+
...opts,
|
|
3602
|
+
id: opts?.id || genId()
|
|
3603
|
+
});
|
|
3604
|
+
var createHandler = (type) => (message, options) => {
|
|
3605
|
+
const toast = createToast(message, type, options);
|
|
3606
|
+
upsert(toast);
|
|
3607
|
+
return toast.id;
|
|
3608
|
+
};
|
|
3609
|
+
var toast = (message, opts) => createHandler("blank")(message, opts);
|
|
3610
|
+
toast.error = createHandler("error");
|
|
3611
|
+
toast.success = createHandler("success");
|
|
3612
|
+
toast.loading = createHandler("loading");
|
|
3613
|
+
toast.custom = createHandler("custom");
|
|
3614
|
+
toast.dismiss = (toastId) => {
|
|
3615
|
+
dismiss(toastId);
|
|
3616
|
+
};
|
|
3617
|
+
toast.remove = (toastId) => remove(toastId);
|
|
3618
|
+
toast.promise = (promise, msgs, opts) => {
|
|
3619
|
+
const id = toast.loading(msgs.loading, { ...opts, ...opts?.loading });
|
|
3620
|
+
promise.then((p) => {
|
|
3621
|
+
toast.success(resolveValue(msgs.success, p), {
|
|
3622
|
+
id,
|
|
3623
|
+
...opts,
|
|
3624
|
+
...opts?.success
|
|
3625
|
+
});
|
|
3626
|
+
return p;
|
|
3627
|
+
}).catch((e) => {
|
|
3628
|
+
toast.error(resolveValue(msgs.error, e), {
|
|
3629
|
+
id,
|
|
3630
|
+
...opts,
|
|
3631
|
+
...opts?.error
|
|
3632
|
+
});
|
|
3633
|
+
});
|
|
3634
|
+
return promise;
|
|
3635
|
+
};
|
|
3636
|
+
var toast_default = toast;
|
|
3637
|
+
|
|
3638
|
+
// node_modules/svelte-french-toast/dist/core/use-toaster.js
|
|
3639
|
+
import { onDestroy } from "svelte";
|
|
3640
|
+
function calculateOffset(toast2, $toasts, opts) {
|
|
3641
|
+
const { reverseOrder, gutter = 8, defaultPosition } = opts || {};
|
|
3642
|
+
const relevantToasts = $toasts.filter((t) => (t.position || defaultPosition) === (toast2.position || defaultPosition) && t.height);
|
|
3643
|
+
const toastIndex = relevantToasts.findIndex((t) => t.id === toast2.id);
|
|
3644
|
+
const toastsBefore = relevantToasts.filter((toast3, i) => i < toastIndex && toast3.visible).length;
|
|
3645
|
+
const offset = relevantToasts.filter((t) => t.visible).slice(...reverseOrder ? [toastsBefore + 1] : [0, toastsBefore]).reduce((acc, t) => acc + (t.height || 0) + gutter, 0);
|
|
3646
|
+
return offset;
|
|
3647
|
+
}
|
|
3648
|
+
var handlers = {
|
|
3649
|
+
startPause() {
|
|
3650
|
+
startPause(Date.now());
|
|
3651
|
+
},
|
|
3652
|
+
endPause() {
|
|
3653
|
+
endPause(Date.now());
|
|
3654
|
+
},
|
|
3655
|
+
updateHeight: (toastId, height) => {
|
|
3656
|
+
update({ id: toastId, height });
|
|
3657
|
+
},
|
|
3658
|
+
calculateOffset
|
|
3659
|
+
};
|
|
3660
|
+
function useToaster(toastOptions) {
|
|
3661
|
+
const { toasts: toasts2, pausedAt: pausedAt2 } = useToasterStore(toastOptions);
|
|
3662
|
+
const timeouts = new Map;
|
|
3663
|
+
let _pausedAt;
|
|
3664
|
+
const unsubscribes = [
|
|
3665
|
+
pausedAt2.subscribe(($pausedAt) => {
|
|
3666
|
+
if ($pausedAt) {
|
|
3667
|
+
for (const [, timeoutId] of timeouts) {
|
|
3668
|
+
clearTimeout(timeoutId);
|
|
3669
|
+
}
|
|
3670
|
+
timeouts.clear();
|
|
3671
|
+
}
|
|
3672
|
+
_pausedAt = $pausedAt;
|
|
3673
|
+
}),
|
|
3674
|
+
toasts2.subscribe(($toasts) => {
|
|
3675
|
+
if (_pausedAt) {
|
|
3676
|
+
return;
|
|
3677
|
+
}
|
|
3678
|
+
const now = Date.now();
|
|
3679
|
+
for (const t of $toasts) {
|
|
3680
|
+
if (timeouts.has(t.id)) {
|
|
3681
|
+
continue;
|
|
3682
|
+
}
|
|
3683
|
+
if (t.duration === Infinity) {
|
|
3684
|
+
continue;
|
|
3685
|
+
}
|
|
3686
|
+
const durationLeft = (t.duration || 0) + t.pauseDuration - (now - t.createdAt);
|
|
3687
|
+
if (durationLeft < 0) {
|
|
3688
|
+
if (t.visible) {
|
|
3689
|
+
toast_default.dismiss(t.id);
|
|
3690
|
+
}
|
|
3691
|
+
return null;
|
|
3692
|
+
}
|
|
3693
|
+
timeouts.set(t.id, setTimeout(() => toast_default.dismiss(t.id), durationLeft));
|
|
3694
|
+
}
|
|
3695
|
+
})
|
|
3696
|
+
];
|
|
3697
|
+
onDestroy(() => {
|
|
3698
|
+
for (const unsubscribe of unsubscribes) {
|
|
3699
|
+
unsubscribe();
|
|
3700
|
+
}
|
|
3701
|
+
});
|
|
3702
|
+
return { toasts: toasts2, handlers };
|
|
3703
|
+
}
|
|
3704
|
+
|
|
3705
|
+
// node_modules/svelte-french-toast/dist/components/ToastWrapper.svelte
|
|
3706
|
+
import"svelte/internal/flags/async";
|
|
3707
|
+
import * as $10 from "svelte/internal/server";
|
|
3708
|
+
import { onMount } from "svelte";
|
|
3709
|
+
|
|
3710
|
+
// node_modules/svelte-french-toast/dist/components/ToastBar.svelte
|
|
3711
|
+
import"svelte/internal/flags/async";
|
|
3712
|
+
import * as $9 from "svelte/internal/server";
|
|
3713
|
+
|
|
3714
|
+
// node_modules/svelte-french-toast/dist/components/ToastIcon.svelte
|
|
3715
|
+
import"svelte/internal/flags/async";
|
|
3716
|
+
import * as $7 from "svelte/internal/server";
|
|
3717
|
+
|
|
3718
|
+
// node_modules/svelte-french-toast/dist/components/CheckmarkIcon.svelte
|
|
3719
|
+
import"svelte/internal/flags/async";
|
|
3720
|
+
import * as $4 from "svelte/internal/server";
|
|
3721
|
+
function CheckmarkIcon($$renderer, $$props) {
|
|
3722
|
+
let primary = $4.fallback($$props["primary"], "#61d345");
|
|
3723
|
+
let secondary = $4.fallback($$props["secondary"], "#fff");
|
|
3724
|
+
$$renderer.push(`<div class="svelte-1did3zw"${$4.attr_style("", { "--primary": primary, "--secondary": secondary })}></div>`);
|
|
3725
|
+
$4.bind_props($$props, { primary, secondary });
|
|
3726
|
+
}
|
|
3727
|
+
|
|
3728
|
+
// node_modules/svelte-french-toast/dist/components/ErrorIcon.svelte
|
|
3729
|
+
import"svelte/internal/flags/async";
|
|
3730
|
+
import * as $5 from "svelte/internal/server";
|
|
3731
|
+
function ErrorIcon($$renderer, $$props) {
|
|
3732
|
+
let primary = $5.fallback($$props["primary"], "#ff4b4b");
|
|
3733
|
+
let secondary = $5.fallback($$props["secondary"], "#fff");
|
|
3734
|
+
$$renderer.push(`<div class="svelte-1ro2ggf"${$5.attr_style("", { "--primary": primary, "--secondary": secondary })}></div>`);
|
|
3735
|
+
$5.bind_props($$props, { primary, secondary });
|
|
3736
|
+
}
|
|
3737
|
+
|
|
3738
|
+
// node_modules/svelte-french-toast/dist/components/LoaderIcon.svelte
|
|
3739
|
+
import"svelte/internal/flags/async";
|
|
3740
|
+
import * as $6 from "svelte/internal/server";
|
|
3741
|
+
function LoaderIcon($$renderer, $$props) {
|
|
3742
|
+
let primary = $6.fallback($$props["primary"], "#616161");
|
|
3743
|
+
let secondary = $6.fallback($$props["secondary"], "#e0e0e0");
|
|
3744
|
+
$$renderer.push(`<div class="svelte-tyythq"${$6.attr_style("", { "--primary": primary, "--secondary": secondary })}></div>`);
|
|
3745
|
+
$6.bind_props($$props, { primary, secondary });
|
|
3746
|
+
}
|
|
3747
|
+
|
|
3748
|
+
// node_modules/svelte-french-toast/dist/components/ToastIcon.svelte
|
|
3749
|
+
function ToastIcon($$renderer, $$props) {
|
|
3750
|
+
let type, icon, iconTheme;
|
|
3751
|
+
let toast2 = $$props["toast"];
|
|
3752
|
+
$:
|
|
3753
|
+
({ type, icon, iconTheme } = toast2);
|
|
3754
|
+
if (typeof icon === "string") {
|
|
3755
|
+
$$renderer.push(`<!--[0--><div class="animated svelte-t33qv2">${$7.escape(icon)}</div>`);
|
|
3756
|
+
} else if (typeof icon !== "undefined") {
|
|
3757
|
+
$$renderer.push("<!--[1-->");
|
|
3758
|
+
if (icon) {
|
|
3759
|
+
$$renderer.push("<!--[-->");
|
|
3760
|
+
icon($$renderer, {});
|
|
3761
|
+
$$renderer.push("<!--]-->");
|
|
3762
|
+
} else {
|
|
3763
|
+
$$renderer.push("<!--[!-->");
|
|
3764
|
+
$$renderer.push("<!--]-->");
|
|
3765
|
+
}
|
|
3766
|
+
} else if (type !== "blank") {
|
|
3767
|
+
$$renderer.push(`<!--[2--><div class="indicator svelte-t33qv2">`);
|
|
3768
|
+
LoaderIcon($$renderer, $7.spread_props([iconTheme]));
|
|
3769
|
+
$$renderer.push(`<!----> `);
|
|
3770
|
+
if (type !== "loading") {
|
|
3771
|
+
$$renderer.push(`<!--[0--><div class="status svelte-t33qv2">`);
|
|
3772
|
+
if (type === "error") {
|
|
3773
|
+
$$renderer.push("<!--[0-->");
|
|
3774
|
+
ErrorIcon($$renderer, $7.spread_props([iconTheme]));
|
|
3775
|
+
} else {
|
|
3776
|
+
$$renderer.push("<!--[-1-->");
|
|
3777
|
+
CheckmarkIcon($$renderer, $7.spread_props([iconTheme]));
|
|
3778
|
+
}
|
|
3779
|
+
$$renderer.push(`<!--]--></div>`);
|
|
3780
|
+
} else {
|
|
3781
|
+
$$renderer.push("<!--[-1-->");
|
|
3782
|
+
}
|
|
3783
|
+
$$renderer.push(`<!--]--></div>`);
|
|
3784
|
+
} else {
|
|
3785
|
+
$$renderer.push("<!--[-1-->");
|
|
3786
|
+
}
|
|
3787
|
+
$$renderer.push(`<!--]-->`);
|
|
3788
|
+
$7.bind_props($$props, { toast: toast2 });
|
|
3789
|
+
}
|
|
3790
|
+
|
|
3791
|
+
// node_modules/svelte-french-toast/dist/components/ToastMessage.svelte
|
|
3792
|
+
import"svelte/internal/flags/async";
|
|
3793
|
+
import * as $8 from "svelte/internal/server";
|
|
3794
|
+
function ToastMessage($$renderer, $$props) {
|
|
3795
|
+
$$renderer.component(($$renderer2) => {
|
|
3796
|
+
let toast2 = $$props["toast"];
|
|
3797
|
+
$$renderer2.push(`<div${$8.attributes({ class: "message", ...toast2.ariaProps }, "svelte-1gudbf6")}>`);
|
|
3798
|
+
if (typeof toast2.message === "string") {
|
|
3799
|
+
$$renderer2.push(`<!--[0-->${$8.escape(toast2.message)}`);
|
|
3800
|
+
} else {
|
|
3801
|
+
$$renderer2.push("<!--[-1-->");
|
|
3802
|
+
if (toast2.message) {
|
|
3803
|
+
$$renderer2.push("<!--[-->");
|
|
3804
|
+
toast2.message($$renderer2, { toast: toast2 });
|
|
3805
|
+
$$renderer2.push("<!--]-->");
|
|
3806
|
+
} else {
|
|
3807
|
+
$$renderer2.push("<!--[!-->");
|
|
3808
|
+
$$renderer2.push("<!--]-->");
|
|
3809
|
+
}
|
|
3810
|
+
}
|
|
3811
|
+
$$renderer2.push(`<!--]--></div>`);
|
|
3812
|
+
$8.bind_props($$props, { toast: toast2 });
|
|
3813
|
+
});
|
|
3814
|
+
}
|
|
3815
|
+
|
|
3816
|
+
// node_modules/svelte-french-toast/dist/components/ToastBar.svelte
|
|
3817
|
+
function ToastBar($$renderer, $$props) {
|
|
3818
|
+
$$renderer.component(($$renderer2) => {
|
|
3819
|
+
let toast2 = $$props["toast"];
|
|
3820
|
+
let position = $9.fallback($$props["position"], () => {
|
|
3821
|
+
return;
|
|
3822
|
+
}, true);
|
|
3823
|
+
let style = $9.fallback($$props["style"], "");
|
|
3824
|
+
let Component = $9.fallback($$props["Component"], () => {
|
|
3825
|
+
return;
|
|
3826
|
+
}, true);
|
|
3827
|
+
let factor;
|
|
3828
|
+
let animation;
|
|
3829
|
+
$: {
|
|
3830
|
+
const top = (toast2.position || position || "top-center").includes("top");
|
|
3831
|
+
factor = top ? 1 : -1;
|
|
3832
|
+
const [enter, exit] = prefersReducedMotion() ? ["fadeIn", "fadeOut"] : ["enter", "exit"];
|
|
3833
|
+
animation = toast2.visible ? enter : exit;
|
|
3834
|
+
}
|
|
3835
|
+
$$renderer2.push(`<div${$9.attr_class(`base ${$9.stringify(toast2.height ? animation : "transparent")} ${$9.stringify(toast2.className || "")}`, "svelte-yae3e8")}${$9.attr_style(`${$9.stringify(style)}; ${$9.stringify(toast2.style)}`, { "--factor": factor })}>`);
|
|
3836
|
+
if (Component) {
|
|
3837
|
+
$$renderer2.push("<!--[0-->");
|
|
3838
|
+
if (Component) {
|
|
3839
|
+
$$renderer2.push("<!--[-->");
|
|
3840
|
+
Component($$renderer2, {
|
|
3841
|
+
$$slots: {
|
|
3842
|
+
icon: ($$renderer3) => {
|
|
3843
|
+
ToastIcon($$renderer3, { toast: toast2, slot: "icon" });
|
|
3844
|
+
},
|
|
3845
|
+
message: ($$renderer3) => {
|
|
3846
|
+
ToastMessage($$renderer3, { toast: toast2, slot: "message" });
|
|
3847
|
+
}
|
|
3848
|
+
}
|
|
3849
|
+
});
|
|
3850
|
+
$$renderer2.push("<!--]-->");
|
|
3851
|
+
} else {
|
|
3852
|
+
$$renderer2.push("<!--[!-->");
|
|
3853
|
+
$$renderer2.push("<!--]-->");
|
|
3854
|
+
}
|
|
3855
|
+
} else {
|
|
3856
|
+
$$renderer2.push(`<!--[-1--><!--[-->`);
|
|
3857
|
+
$9.slot($$renderer2, $$props, "default", { ToastIcon, ToastMessage, toast: toast2 }, () => {
|
|
3858
|
+
ToastIcon($$renderer2, { toast: toast2 });
|
|
3859
|
+
$$renderer2.push(`<!----> `);
|
|
3860
|
+
ToastMessage($$renderer2, { toast: toast2 });
|
|
3861
|
+
$$renderer2.push(`<!---->`);
|
|
3862
|
+
});
|
|
3863
|
+
$$renderer2.push(`<!--]-->`);
|
|
3864
|
+
}
|
|
3865
|
+
$$renderer2.push(`<!--]--></div>`);
|
|
3866
|
+
$9.bind_props($$props, { toast: toast2, position, style, Component });
|
|
3867
|
+
});
|
|
3868
|
+
}
|
|
3869
|
+
|
|
3870
|
+
// node_modules/svelte-french-toast/dist/components/ToastWrapper.svelte
|
|
3871
|
+
function ToastWrapper($$renderer, $$props) {
|
|
3872
|
+
$$renderer.component(($$renderer2) => {
|
|
3873
|
+
let top, bottom, factor, justifyContent;
|
|
3874
|
+
let toast2 = $$props["toast"];
|
|
3875
|
+
let setHeight = $$props["setHeight"];
|
|
3876
|
+
let wrapperEl;
|
|
3877
|
+
onMount(() => {
|
|
3878
|
+
setHeight(wrapperEl.getBoundingClientRect().height);
|
|
3879
|
+
});
|
|
3880
|
+
$:
|
|
3881
|
+
top = toast2.position?.includes("top") ? 0 : null;
|
|
3882
|
+
$:
|
|
3883
|
+
bottom = toast2.position?.includes("bottom") ? 0 : null;
|
|
3884
|
+
$:
|
|
3885
|
+
factor = toast2.position?.includes("top") ? 1 : -1;
|
|
3886
|
+
$:
|
|
3887
|
+
justifyContent = toast2.position?.includes("center") && "center" || (toast2.position?.includes("right") || toast2.position?.includes("end")) && "flex-end" || null;
|
|
3888
|
+
$$renderer2.push(`<div${$10.attr_class("wrapper svelte-1pz3gqy", undefined, {
|
|
3889
|
+
active: toast2.visible,
|
|
3890
|
+
transition: !prefersReducedMotion()
|
|
3891
|
+
})}${$10.attr_style("", {
|
|
3892
|
+
"--factor": factor,
|
|
3893
|
+
"--offset": toast2.offset,
|
|
3894
|
+
top,
|
|
3895
|
+
bottom,
|
|
3896
|
+
"justify-content": justifyContent
|
|
3897
|
+
})}>`);
|
|
3898
|
+
if (toast2.type === "custom") {
|
|
3899
|
+
$$renderer2.push("<!--[0-->");
|
|
3900
|
+
ToastMessage($$renderer2, { toast: toast2 });
|
|
3901
|
+
} else {
|
|
3902
|
+
$$renderer2.push(`<!--[-1--><!--[-->`);
|
|
3903
|
+
$10.slot($$renderer2, $$props, "default", { toast: toast2 }, () => {
|
|
3904
|
+
ToastBar($$renderer2, { toast: toast2, position: toast2.position });
|
|
3905
|
+
});
|
|
3906
|
+
$$renderer2.push(`<!--]-->`);
|
|
3907
|
+
}
|
|
3908
|
+
$$renderer2.push(`<!--]--></div>`);
|
|
3909
|
+
$10.bind_props($$props, { toast: toast2, setHeight });
|
|
3910
|
+
});
|
|
3911
|
+
}
|
|
3912
|
+
|
|
3913
|
+
// node_modules/svelte-french-toast/dist/components/Toaster.svelte
|
|
3914
|
+
function Toaster($$renderer, $$props) {
|
|
3915
|
+
$$renderer.component(($$renderer2) => {
|
|
3916
|
+
var $$store_subs;
|
|
3917
|
+
let reverseOrder = $11.fallback($$props["reverseOrder"], false);
|
|
3918
|
+
let position = $11.fallback($$props["position"], "top-center");
|
|
3919
|
+
let toastOptions = $11.fallback($$props["toastOptions"], () => {
|
|
3920
|
+
return;
|
|
3921
|
+
}, true);
|
|
3922
|
+
let gutter = $11.fallback($$props["gutter"], 8);
|
|
3923
|
+
let containerStyle = $11.fallback($$props["containerStyle"], () => {
|
|
3924
|
+
return;
|
|
3925
|
+
}, true);
|
|
3926
|
+
let containerClassName = $11.fallback($$props["containerClassName"], () => {
|
|
3927
|
+
return;
|
|
3928
|
+
}, true);
|
|
3929
|
+
const { toasts: toasts2, handlers: handlers2 } = useToaster(toastOptions);
|
|
3930
|
+
let _toasts;
|
|
3931
|
+
$:
|
|
3932
|
+
_toasts = $11.store_get($$store_subs ??= {}, "$toasts", toasts2).map((toast2) => ({
|
|
3933
|
+
...toast2,
|
|
3934
|
+
position: toast2.position || position,
|
|
3935
|
+
offset: handlers2.calculateOffset(toast2, $11.store_get($$store_subs ??= {}, "$toasts", toasts2), { reverseOrder, gutter, defaultPosition: position })
|
|
3936
|
+
}));
|
|
3937
|
+
$$renderer2.push(`<div${$11.attr_class(`toaster ${$11.stringify(containerClassName || "")}`, "svelte-haq5xk")}${$11.attr_style(containerStyle)} role="alert"><!--[-->`);
|
|
3938
|
+
const each_array = $11.ensure_array_like(_toasts);
|
|
3939
|
+
for (let $$index = 0, $$length = each_array.length;$$index < $$length; $$index++) {
|
|
3940
|
+
let toast2 = each_array[$$index];
|
|
3941
|
+
ToastWrapper($$renderer2, {
|
|
3942
|
+
toast: toast2,
|
|
3943
|
+
setHeight: (height) => handlers2.updateHeight(toast2.id, height)
|
|
3944
|
+
});
|
|
3945
|
+
}
|
|
3946
|
+
$$renderer2.push(`<!--]--></div>`);
|
|
3947
|
+
if ($$store_subs)
|
|
3948
|
+
$11.unsubscribe_stores($$store_subs);
|
|
3949
|
+
$11.bind_props($$props, {
|
|
3950
|
+
reverseOrder,
|
|
3951
|
+
position,
|
|
3952
|
+
toastOptions,
|
|
3953
|
+
gutter,
|
|
3954
|
+
containerStyle,
|
|
3955
|
+
containerClassName
|
|
3956
|
+
});
|
|
3957
|
+
});
|
|
3958
|
+
}
|
|
3959
|
+
// node_modules/svelte-french-toast/dist/index.js
|
|
3960
|
+
var dist_default = toast_default;
|
|
3961
|
+
|
|
3962
|
+
// src/toast.ts
|
|
3963
|
+
var TOAST_STYLE = "border:1px solid var(--edge); background:var(--bg-card); color:var(--ink); box-shadow:4px 4px 0 var(--shadow); font-family:var(--font-mono); font-size:13px;";
|
|
3964
|
+
var TOAST_OPTIONS = { style: TOAST_STYLE };
|
|
3965
|
+
|
|
3966
|
+
export { emitIslandProps, isDev, cookies, HydratableBoundary, Icon, X, withPopupMarker, Toaster, dist_default, TOAST_OPTIONS };
|