@lostgradient/cinder 0.9.0 → 0.12.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/CHANGELOG.md +26 -0
- package/components.json +82 -4
- package/dist/components/access-gate/index.js +381 -239
- package/dist/components/chat/builders.d.ts +17 -8
- package/dist/components/chat/conversation-model.d.ts +1 -1
- package/dist/components/chat/index.d.ts +1 -1
- package/dist/components/chat/index.js +300 -17
- package/dist/components/chat/utilities/conversation.d.ts +6 -6
- package/dist/components/chat-conversation-header/index.js +19 -6
- package/dist/components/chat-conversation-list/index.js +19 -6
- package/dist/components/code-block/code-block.css +15 -9
- package/dist/components/code-block/code-block.variables.js +8 -2
- package/dist/components/confirm-dialog/confirm-dialog.css +2 -0
- package/dist/components/confirm-dialog/confirm-dialog.schema.js +10 -1
- package/dist/components/confirm-dialog/confirm-dialog.types.d.ts +7 -0
- package/dist/components/confirm-dialog/index.js +478 -106
- package/dist/components/connection-indicator/connection-indicator.css +136 -0
- package/dist/components/connection-indicator/connection-indicator.css.d.ts +1 -0
- package/dist/components/connection-indicator/connection-indicator.schema.d.ts +3 -0
- package/dist/components/connection-indicator/connection-indicator.schema.js +89 -0
- package/dist/components/connection-indicator/connection-indicator.svelte.d.ts +21 -0
- package/dist/components/connection-indicator/connection-indicator.types.d.ts +46 -0
- package/dist/components/connection-indicator/connection-indicator.variables.d.ts +2 -0
- package/dist/components/connection-indicator/connection-indicator.variables.js +61 -0
- package/dist/components/connection-indicator/index.d.ts +5 -0
- package/dist/components/connection-indicator/index.js +409 -0
- package/dist/components/container/container.schema.js +4 -4
- package/dist/components/faceted-filter-bar/faceted-filter-bar.schema.js +5 -1
- package/dist/components/faceted-filter-bar/faceted-filter-bar.types.d.ts +2 -0
- package/dist/components/faceted-filter-bar/index.js +40 -31
- package/dist/components/invocation-rule-builder/index.d.ts +1 -1
- package/dist/components/invocation-rule-builder/index.js +305 -150
- package/dist/components/invocation-rule-builder/invocation-rule-builder.css +28 -0
- package/dist/components/invocation-rule-builder/invocation-rule-builder.schema.js +89 -5
- package/dist/components/invocation-rule-builder/invocation-rule-builder.svelte.d.ts +2 -1
- package/dist/components/invocation-rule-builder/invocation-rule-builder.types.d.ts +114 -16
- package/dist/components/navigation-bar/index.js +11 -17
- package/dist/components/run-step-timeline/index.d.ts +1 -1
- package/dist/components/run-step-timeline/index.js +1052 -560
- package/dist/components/run-step-timeline/run-step-branch-disclosure.svelte.d.ts +17 -0
- package/dist/components/run-step-timeline/run-step-timeline.css +124 -0
- package/dist/components/run-step-timeline/run-step-timeline.schema.js +873 -350
- package/dist/components/run-step-timeline/run-step-timeline.svelte.d.ts +1 -15
- package/dist/components/run-step-timeline/run-step-timeline.types.d.ts +182 -5
- package/dist/components/run-step-timeline/run-step-timeline.utilities.d.ts +60 -0
- package/dist/components/schedule-builder/index.d.ts +5 -0
- package/dist/components/schedule-builder/index.js +3176 -0
- package/dist/components/schedule-builder/schedule-builder.css +121 -0
- package/dist/components/schedule-builder/schedule-builder.css.d.ts +1 -0
- package/dist/components/schedule-builder/schedule-builder.schema.d.ts +3 -0
- package/dist/components/schedule-builder/schedule-builder.schema.js +141 -0
- package/dist/components/schedule-builder/schedule-builder.svelte.d.ts +22 -0
- package/dist/components/schedule-builder/schedule-builder.types.d.ts +130 -0
- package/dist/components/schedule-builder/schedule-builder.utilities.d.ts +78 -0
- package/dist/components/schedule-builder/schedule-builder.variables.d.ts +2 -0
- package/dist/components/schedule-builder/schedule-builder.variables.js +61 -0
- package/dist/components/tag-input/index.js +22 -4
- package/dist/components/tag-input/tag-input.schema.js +5 -1
- package/dist/components/tag-input/tag-input.types.d.ts +4 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.js +23069 -20833
- package/dist/server/components/access-gate/index.js +2 -1
- package/dist/server/components/chat/index.js +4 -4
- package/dist/server/components/chat-conversation-header/index.js +5 -5
- package/dist/server/components/chat-conversation-list/index.js +3 -3
- package/dist/server/components/color-field/index.js +2 -2
- package/dist/server/components/confirm-dialog/index.js +7 -2
- package/dist/server/components/connection-indicator/index.js +16 -0
- package/dist/server/components/data-table/index.js +3 -3
- package/dist/server/components/diff-viewer/index.js +4 -3
- package/dist/server/components/faceted-filter-bar/index.js +1 -1
- package/dist/server/components/invocation-rule-builder/index.js +1 -1
- package/dist/server/components/json-schema-editor/index.js +4 -3
- package/dist/server/components/navigation-bar/index.js +1 -1
- package/dist/server/components/review-editor/index.js +4 -3
- package/dist/server/components/run-step-timeline/index.js +1 -1
- package/dist/server/components/schedule-builder/index.js +30 -0
- package/dist/server/components/side-navigation/index.js +2 -2
- package/dist/server/components/table/index.js +3 -3
- package/dist/server/components/tag-input/index.js +1 -1
- package/dist/server/components/time-field/index.js +5 -3
- package/dist/server/index.js +105 -92
- package/dist/server/index.server-0sx92swg.js +9 -0
- package/dist/server/{index.server-mzzb7dnm.js → index.server-2bbwajb2.js} +1 -1
- package/dist/server/{index.server-q7w4jw89.js → index.server-2s5h1d05.js} +2 -2
- package/dist/server/{index.server-dg83ke3k.js → index.server-2zdbz3rj.js} +1 -1
- package/dist/server/{index.server-0jhra85x.js → index.server-3w72dxz7.js} +4 -4
- package/dist/server/{index.server-5tf22d6e.js → index.server-4wx0qven.js} +3 -3
- package/dist/server/{index.server-qh9qzd5t.js → index.server-4x4hgvqe.js} +283 -13
- package/dist/server/{index.server-c6pe4kaf.js → index.server-5gzyqv78.js} +1 -1
- package/dist/server/{index.server-mqt1ngqw.js → index.server-6hnfzc7f.js} +19 -6
- package/dist/server/{index.server-894t97kv.js → index.server-7yvpb6z7.js} +4 -4
- package/dist/server/index.server-be9bpqeh.js +93 -0
- package/dist/server/{index.server-f3z7tpxr.js → index.server-c42b462p.js} +2 -4
- package/dist/server/{index.server-7vyzen5x.js → index.server-c5qv3p61.js} +171 -63
- package/dist/server/index.server-cch0eed5.js +144 -0
- package/dist/server/{index.server-btgb3d56.js → index.server-d5a5ccz7.js} +18 -12
- package/dist/server/index.server-g5jgq3jp.js +793 -0
- package/dist/server/index.server-gmh5ar16.js +2 -0
- package/dist/server/{index.server-0atyznp7.js → index.server-h89zk5ev.js} +7 -7
- package/dist/server/{index.server-jxg42jpz.js → index.server-jdcq5zza.js} +7 -7
- package/dist/server/{index.server-2dga5yzr.js → index.server-jfrssta6.js} +1 -1
- package/dist/server/{index.server-fy068yne.js → index.server-jj76374p.js} +1 -1
- package/dist/server/{index.server-39ne5cd1.js → index.server-pxq277t5.js} +32 -1
- package/dist/server/index.server-qbkxz7r2.js +750 -0
- package/dist/server/{index.server-marjz8ps.js → index.server-tcay903b.js} +3 -2
- package/dist/server/{index.server-yz4k36cw.js → index.server-z7hxtqs1.js} +1 -1
- package/package.json +87 -97
- package/src/components/chat/builders.ts +445 -14
- package/src/components/chat/conversation-model.ts +1 -0
- package/src/components/chat/index.ts +1 -0
- package/src/components/chat/utilities/conversation.ts +33 -15
- package/src/components/code-block/code-block.css +15 -9
- package/src/components/code-block/code-block.variables.json +7 -1
- package/src/components/code-block/code-block.variables.ts +7 -1
- package/src/components/confirm-dialog/confirm-dialog.css +2 -0
- package/src/components/confirm-dialog/confirm-dialog.schema.json +8 -0
- package/src/components/confirm-dialog/confirm-dialog.schema.ts +10 -0
- package/src/components/confirm-dialog/confirm-dialog.svelte +31 -3
- package/src/components/confirm-dialog/confirm-dialog.types.ts +7 -0
- package/src/components/connection-indicator/connection-indicator.css +136 -0
- package/src/components/connection-indicator/connection-indicator.examples.json +31 -0
- package/src/components/connection-indicator/connection-indicator.schema.json +29 -0
- package/src/components/connection-indicator/connection-indicator.schema.ts +36 -0
- package/src/components/connection-indicator/connection-indicator.svelte +63 -0
- package/src/components/connection-indicator/connection-indicator.types.ts +58 -0
- package/src/components/connection-indicator/connection-indicator.variables.json +1 -0
- package/src/components/connection-indicator/connection-indicator.variables.ts +3 -0
- package/src/components/connection-indicator/index.ts +10 -0
- package/src/components/container/container.schema.json +3 -3
- package/src/components/container/container.schema.ts +3 -3
- package/src/components/faceted-filter-bar/faceted-filter-bar.schema.json +4 -0
- package/src/components/faceted-filter-bar/faceted-filter-bar.schema.ts +4 -0
- package/src/components/faceted-filter-bar/faceted-filter-bar.svelte +13 -11
- package/src/components/faceted-filter-bar/faceted-filter-bar.types.ts +2 -0
- package/src/components/invocation-rule-builder/index.ts +4 -0
- package/src/components/invocation-rule-builder/invocation-rule-builder.css +28 -0
- package/src/components/invocation-rule-builder/invocation-rule-builder.examples.json +6 -0
- package/src/components/invocation-rule-builder/invocation-rule-builder.schema.json +76 -3
- package/src/components/invocation-rule-builder/invocation-rule-builder.schema.ts +83 -3
- package/src/components/invocation-rule-builder/invocation-rule-builder.svelte +326 -113
- package/src/components/invocation-rule-builder/invocation-rule-builder.types.ts +157 -43
- package/src/components/navigation-bar/navigation-bar.svelte +2 -2
- package/src/components/run-step-timeline/index.ts +8 -0
- package/src/components/run-step-timeline/run-step-branch-disclosure.svelte +16 -0
- package/src/components/run-step-timeline/run-step-timeline.css +124 -0
- package/src/components/run-step-timeline/run-step-timeline.examples.json +18 -0
- package/src/components/run-step-timeline/run-step-timeline.schema.json +872 -349
- package/src/components/run-step-timeline/run-step-timeline.schema.ts +931 -349
- package/src/components/run-step-timeline/run-step-timeline.svelte +388 -269
- package/src/components/run-step-timeline/run-step-timeline.types.ts +192 -5
- package/src/components/run-step-timeline/run-step-timeline.utilities.ts +310 -0
- package/src/components/schedule-builder/index.ts +14 -0
- package/src/components/schedule-builder/schedule-builder.css +121 -0
- package/src/components/schedule-builder/schedule-builder.examples.json +31 -0
- package/src/components/schedule-builder/schedule-builder.schema.json +78 -0
- package/src/components/schedule-builder/schedule-builder.schema.ts +86 -0
- package/src/components/schedule-builder/schedule-builder.svelte +629 -0
- package/src/components/schedule-builder/schedule-builder.types.ts +137 -0
- package/src/components/schedule-builder/schedule-builder.utilities.ts +344 -0
- package/src/components/schedule-builder/schedule-builder.variables.json +1 -0
- package/src/components/schedule-builder/schedule-builder.variables.ts +3 -0
- package/src/components/tag-input/tag-input.schema.json +4 -0
- package/src/components/tag-input/tag-input.schema.ts +4 -0
- package/src/components/tag-input/tag-input.svelte +20 -3
- package/src/components/tag-input/tag-input.types.ts +4 -0
- package/src/index.ts +23 -0
- package/src/styles/components.css +2 -0
- package/dist/server/index.server-qk1h0n02.js +0 -393
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
@layer cinder.tokens, cinder.foundation, cinder.components, cinder.utilities;
|
|
2
|
+
@layer cinder.components {
|
|
3
|
+
/* ========================================
|
|
4
|
+
* CONNECTION INDICATOR
|
|
5
|
+
*
|
|
6
|
+
* Small standalone status pill for a live connection. Color is driven
|
|
7
|
+
* exclusively from the `data-cinder-status` attribute via the existing
|
|
8
|
+
* semantic status tokens (`--cinder-success`, `--cinder-warning`,
|
|
9
|
+
* `--cinder-text-muted`) — never hard-code hex values when consuming this
|
|
10
|
+
* component. `polling` is deliberately quieter than `live`: it carries no
|
|
11
|
+
* motion and a lighter font-weight so it can never be mistaken for push,
|
|
12
|
+
* even under grayscale or forced-colors rendering where the color
|
|
13
|
+
* difference disappears.
|
|
14
|
+
* ======================================== */
|
|
15
|
+
|
|
16
|
+
.cinder-connection-indicator {
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
gap: var(--cinder-space-1-5);
|
|
20
|
+
padding: var(--cinder-space-0-5) var(--cinder-space-2-5);
|
|
21
|
+
border-radius: var(--cinder-radius-full);
|
|
22
|
+
background: var(--cinder-surface-inset);
|
|
23
|
+
color: var(--cinder-text-muted);
|
|
24
|
+
font-size: var(--cinder-text-xs);
|
|
25
|
+
font-weight: var(--cinder-font-medium);
|
|
26
|
+
line-height: 1.25;
|
|
27
|
+
vertical-align: middle;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.cinder-connection-indicator__dot {
|
|
31
|
+
display: inline-block;
|
|
32
|
+
flex-shrink: 0;
|
|
33
|
+
inline-size: 0.375rem;
|
|
34
|
+
block-size: 0.375rem;
|
|
35
|
+
border-radius: var(--cinder-radius-full);
|
|
36
|
+
background: currentColor;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.cinder-connection-indicator[data-cinder-status='live'] .cinder-connection-indicator__dot {
|
|
40
|
+
animation: cinder-connection-indicator-pulse 1.4s ease-in-out infinite;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@media (prefers-reduced-motion: reduce) {
|
|
44
|
+
.cinder-connection-indicator[data-cinder-status='live'] .cinder-connection-indicator__dot {
|
|
45
|
+
animation: none;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@keyframes cinder-connection-indicator-pulse {
|
|
50
|
+
0%,
|
|
51
|
+
100% {
|
|
52
|
+
opacity: 1;
|
|
53
|
+
}
|
|
54
|
+
50% {
|
|
55
|
+
opacity: 0.35;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.cinder-connection-indicator__icon {
|
|
60
|
+
display: inline-flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
flex-shrink: 0;
|
|
64
|
+
inline-size: 0.8125rem;
|
|
65
|
+
block-size: 0.8125rem;
|
|
66
|
+
color: currentColor;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* connecting and reconnecting both spin the icon wrapper to signal in-progress work. This
|
|
70
|
+
* targets the wrapper span (not the inner svg with a :global() selector) because this file is
|
|
71
|
+
* a plain CSS asset imported from index.ts — the Svelte compiler never processes it, so
|
|
72
|
+
* :global() has no effect here and browsers drop the whole rule as an unknown pseudo-class.
|
|
73
|
+
* Rotating the wrapper rotates its svg child identically. */
|
|
74
|
+
.cinder-connection-indicator[data-cinder-status='connecting'] .cinder-connection-indicator__icon,
|
|
75
|
+
.cinder-connection-indicator[data-cinder-status='reconnecting']
|
|
76
|
+
.cinder-connection-indicator__icon {
|
|
77
|
+
animation: cinder-connection-indicator-spin var(--cinder-duration-spin) linear infinite;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@media (prefers-reduced-motion: reduce) {
|
|
81
|
+
.cinder-connection-indicator[data-cinder-status='connecting']
|
|
82
|
+
.cinder-connection-indicator__icon,
|
|
83
|
+
.cinder-connection-indicator[data-cinder-status='reconnecting']
|
|
84
|
+
.cinder-connection-indicator__icon {
|
|
85
|
+
animation: none;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@keyframes cinder-connection-indicator-spin {
|
|
90
|
+
to {
|
|
91
|
+
transform: rotate(360deg);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.cinder-connection-indicator__label {
|
|
96
|
+
color: inherit;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.cinder-connection-indicator__attempt {
|
|
100
|
+
color: var(--cinder-text-muted);
|
|
101
|
+
font-weight: var(--cinder-font-normal);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* ----------------------------------------
|
|
105
|
+
* Status → semantic token mapping
|
|
106
|
+
*
|
|
107
|
+
* `polling` reuses the same muted tone as `closed` but is disambiguated by
|
|
108
|
+
* its icon, its lack of motion (see above), and its label text — color is
|
|
109
|
+
* never the sole signal (WCAG 1.4.1).
|
|
110
|
+
* ---------------------------------------- */
|
|
111
|
+
|
|
112
|
+
.cinder-connection-indicator[data-cinder-status='connecting'] {
|
|
113
|
+
color: var(--cinder-warning);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.cinder-connection-indicator[data-cinder-status='live'] {
|
|
117
|
+
color: var(--cinder-success);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.cinder-connection-indicator[data-cinder-status='reconnecting'] {
|
|
121
|
+
color: var(--cinder-warning);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.cinder-connection-indicator[data-cinder-status='polling'] {
|
|
125
|
+
color: var(--cinder-text-muted);
|
|
126
|
+
font-weight: var(--cinder-font-normal);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.cinder-connection-indicator[data-cinder-status='stale'] {
|
|
130
|
+
color: var(--cinder-info);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.cinder-connection-indicator[data-cinder-status='closed'] {
|
|
134
|
+
color: var(--cinder-text-muted);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
function __accessProp(key) {
|
|
7
|
+
return this[key];
|
|
8
|
+
}
|
|
9
|
+
var __toESMCache_node;
|
|
10
|
+
var __toESMCache_esm;
|
|
11
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
12
|
+
var canCache = mod != null && typeof mod === "object";
|
|
13
|
+
if (canCache) {
|
|
14
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
15
|
+
var cached = cache.get(mod);
|
|
16
|
+
if (cached)
|
|
17
|
+
return cached;
|
|
18
|
+
}
|
|
19
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
20
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
21
|
+
for (let key of __getOwnPropNames(mod))
|
|
22
|
+
if (!__hasOwnProp.call(to, key))
|
|
23
|
+
__defProp(to, key, {
|
|
24
|
+
get: __accessProp.bind(mod, key),
|
|
25
|
+
enumerable: true
|
|
26
|
+
});
|
|
27
|
+
if (canCache)
|
|
28
|
+
cache.set(mod, to);
|
|
29
|
+
return to;
|
|
30
|
+
};
|
|
31
|
+
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
32
|
+
var __returnValue = (v) => v;
|
|
33
|
+
function __exportSetter(name, newValue) {
|
|
34
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
35
|
+
}
|
|
36
|
+
var __export = (target, all) => {
|
|
37
|
+
for (var name in all)
|
|
38
|
+
__defProp(target, name, {
|
|
39
|
+
get: all[name],
|
|
40
|
+
enumerable: true,
|
|
41
|
+
configurable: true,
|
|
42
|
+
set: __exportSetter.bind(all, name)
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
46
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
47
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
48
|
+
}) : x)(function(x) {
|
|
49
|
+
if (typeof require !== "undefined")
|
|
50
|
+
return require.apply(this, arguments);
|
|
51
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
// src/components/connection-indicator/connection-indicator.schema.ts
|
|
55
|
+
var schema = {
|
|
56
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
57
|
+
type: "object",
|
|
58
|
+
properties: {
|
|
59
|
+
status: {
|
|
60
|
+
enum: ["connecting", "live", "reconnecting", "polling", "stale", "closed"],
|
|
61
|
+
description: "Current connection lifecycle state. Drives icon, text, and color via `data-cinder-status`."
|
|
62
|
+
},
|
|
63
|
+
label: {
|
|
64
|
+
type: "string",
|
|
65
|
+
description: 'Optional human label override. Replaces the default text for `status` (and the "Connection: …" accessible name).'
|
|
66
|
+
},
|
|
67
|
+
class: {
|
|
68
|
+
type: "string",
|
|
69
|
+
description: "Extra classes appended to the root element."
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
additionalProperties: false,
|
|
73
|
+
required: ["status"],
|
|
74
|
+
metadata: {
|
|
75
|
+
unsupportedProps: [
|
|
76
|
+
{
|
|
77
|
+
name: "attempt",
|
|
78
|
+
reason: "function-or-snippet",
|
|
79
|
+
description: "Attempt-count content rendered next to the label when `status` is `'reconnecting'`, e.g. \"attempt 3 of 5\". Ignored for other states."
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
var connection_indicator_schema_default = schema;
|
|
85
|
+
export {
|
|
86
|
+
connection_indicator_schema_default as default
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
//# debugId=37FEFFB18DEB9C6764756E2164756E21
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @cinder
|
|
3
|
+
* @category feedback
|
|
4
|
+
* @status beta
|
|
5
|
+
* @purpose Small standalone status pill for a live connection, distinguishing connecting, live, reconnecting, polling, stale, and closed states through icon and text rather than color alone.
|
|
6
|
+
* @tag connection
|
|
7
|
+
* @tag status
|
|
8
|
+
* @tag realtime
|
|
9
|
+
* @useWhen Surfacing the transport-level health of a websocket, SSE stream, or polling loop as a compact, self-contained pill.
|
|
10
|
+
* @useWhen Distinguishing push (`live`) from interval polling (`polling`) so operators don't mistake one for the other.
|
|
11
|
+
* @avoidWhen Annotating a static entity's state (a row, a user, a deployment) rather than a live transport — use status-dot instead. | status-dot
|
|
12
|
+
* @avoidWhen Rendering a full event log with per-event connection transitions — use event-stream-viewer instead. | event-stream-viewer
|
|
13
|
+
* @a11yPattern role="status" live region
|
|
14
|
+
* @a11yNote Status is conveyed by icon and text together, never color alone (WCAG 1.4.1); the live pulsing dot collapses to a static dot under prefers-reduced-motion.
|
|
15
|
+
* @related status-dot, event-stream-viewer, badge
|
|
16
|
+
*/
|
|
17
|
+
export type { ConnectionIndicatorProps, ConnectionIndicatorSchemaProps, ConnectionIndicatorStatus, } from './connection-indicator.types.ts';
|
|
18
|
+
import type { ConnectionIndicatorProps } from './connection-indicator.types.ts';
|
|
19
|
+
declare const ConnectionIndicator: import("svelte").Component<ConnectionIndicatorProps, {}, "">;
|
|
20
|
+
type ConnectionIndicator = ReturnType<typeof ConnectionIndicator>;
|
|
21
|
+
export default ConnectionIndicator;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
/**
|
|
4
|
+
* The six connection lifecycle states ConnectionIndicator understands.
|
|
5
|
+
*
|
|
6
|
+
* Stamped directly onto the root as `data-cinder-status` and driving color
|
|
7
|
+
* exclusively through `connection-indicator.css` — there are no hard-coded
|
|
8
|
+
* color classes on the component. Each state also carries its own icon and
|
|
9
|
+
* text label so status is never communicated by color alone (WCAG 1.4.1).
|
|
10
|
+
*
|
|
11
|
+
* - `connecting` — initial handshake in progress, no data yet.
|
|
12
|
+
* - `live` — connected and actively receiving pushed updates.
|
|
13
|
+
* - `reconnecting` — a previously live connection dropped and is retrying.
|
|
14
|
+
* - `polling` — receiving updates via interval polling rather than push.
|
|
15
|
+
* - `stale` — connected but data has not refreshed within an expected window.
|
|
16
|
+
* - `closed` — the connection is intentionally or terminally closed.
|
|
17
|
+
*/
|
|
18
|
+
export type ConnectionIndicatorStatus = 'connecting' | 'live' | 'reconnecting' | 'polling' | 'stale' | 'closed';
|
|
19
|
+
/**
|
|
20
|
+
* Props for ConnectionIndicator.
|
|
21
|
+
*
|
|
22
|
+
* The component always renders `role="status"` with a computed accessible
|
|
23
|
+
* name of the form "Connection: {label}" (overridable via `aria-label`), so
|
|
24
|
+
* assistive technology gets the same signal as sighted users regardless of
|
|
25
|
+
* which visual treatment (icon, motion, font-weight) carries the difference
|
|
26
|
+
* between states.
|
|
27
|
+
*/
|
|
28
|
+
export type ConnectionIndicatorProps = Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'children'> & {
|
|
29
|
+
/** Current connection lifecycle state. Drives icon, text, and color via `data-cinder-status`. */
|
|
30
|
+
status: ConnectionIndicatorStatus;
|
|
31
|
+
/** Optional human label override. Replaces the default text for `status` (and the "Connection: …" accessible name). */
|
|
32
|
+
label?: string;
|
|
33
|
+
/** Attempt-count content rendered next to the label when `status` is `'reconnecting'`, e.g. "attempt 3 of 5". Ignored for other states. */
|
|
34
|
+
attempt?: Snippet;
|
|
35
|
+
/** Extra classes appended to the root element. */
|
|
36
|
+
class?: string;
|
|
37
|
+
};
|
|
38
|
+
/** Schema-facing mirror of {@link ConnectionIndicatorProps}, omitting the non-serializable `attempt` snippet and native HTML attribute passthrough. */
|
|
39
|
+
export interface ConnectionIndicatorSchemaProps {
|
|
40
|
+
/** Current connection lifecycle state. Drives icon, text, and color via `data-cinder-status`. */
|
|
41
|
+
status: ConnectionIndicatorStatus;
|
|
42
|
+
/** Optional human label override. Replaces the default text for `status` (and the "Connection: …" accessible name). */
|
|
43
|
+
label?: string;
|
|
44
|
+
/** Extra classes appended to the root element. */
|
|
45
|
+
class?: string;
|
|
46
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
function __accessProp(key) {
|
|
7
|
+
return this[key];
|
|
8
|
+
}
|
|
9
|
+
var __toESMCache_node;
|
|
10
|
+
var __toESMCache_esm;
|
|
11
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
12
|
+
var canCache = mod != null && typeof mod === "object";
|
|
13
|
+
if (canCache) {
|
|
14
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
15
|
+
var cached = cache.get(mod);
|
|
16
|
+
if (cached)
|
|
17
|
+
return cached;
|
|
18
|
+
}
|
|
19
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
20
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
21
|
+
for (let key of __getOwnPropNames(mod))
|
|
22
|
+
if (!__hasOwnProp.call(to, key))
|
|
23
|
+
__defProp(to, key, {
|
|
24
|
+
get: __accessProp.bind(mod, key),
|
|
25
|
+
enumerable: true
|
|
26
|
+
});
|
|
27
|
+
if (canCache)
|
|
28
|
+
cache.set(mod, to);
|
|
29
|
+
return to;
|
|
30
|
+
};
|
|
31
|
+
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
32
|
+
var __returnValue = (v) => v;
|
|
33
|
+
function __exportSetter(name, newValue) {
|
|
34
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
35
|
+
}
|
|
36
|
+
var __export = (target, all) => {
|
|
37
|
+
for (var name in all)
|
|
38
|
+
__defProp(target, name, {
|
|
39
|
+
get: all[name],
|
|
40
|
+
enumerable: true,
|
|
41
|
+
configurable: true,
|
|
42
|
+
set: __exportSetter.bind(all, name)
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
46
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
47
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
48
|
+
}) : x)(function(x) {
|
|
49
|
+
if (typeof require !== "undefined")
|
|
50
|
+
return require.apply(this, arguments);
|
|
51
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
// src/components/connection-indicator/connection-indicator.variables.ts
|
|
55
|
+
var variables = [];
|
|
56
|
+
var connection_indicator_variables_default = variables;
|
|
57
|
+
export {
|
|
58
|
+
connection_indicator_variables_default as default
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
//# debugId=87811D7E55D42C3864756E2164756E21
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import './connection-indicator.css';
|
|
2
|
+
import ConnectionIndicator from './connection-indicator.svelte';
|
|
3
|
+
export default ConnectionIndicator;
|
|
4
|
+
export type { ConnectionIndicatorProps, ConnectionIndicatorSchemaProps, ConnectionIndicatorStatus, } from './connection-indicator.types.ts';
|
|
5
|
+
export { ConnectionIndicator };
|