@streamscloud/kit 0.94.2 → 0.94.4
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.
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
<script lang="ts">"use strict";
|
|
2
2
|
let { mark = false, subheading = null, variant = 'mono', ariaLabel } = $props();
|
|
3
|
-
|
|
4
|
-
// `standard` paints the mark in the brand accent and the type in primary text,
|
|
5
|
-
// matching the Figma master Standard lockup.
|
|
6
|
-
const markFill = $derived(variant === 'standard' ? 'var(--sc-kit--color--accent)' : 'currentColor');
|
|
3
|
+
const markFill = $derived(variant === 'standard' ? 'var(--_logo--mark-color)' : 'currentColor');
|
|
7
4
|
const typeFill = $derived(variant === 'standard' ? 'var(--sc-kit--color--text--primary)' : 'currentColor');
|
|
8
5
|
// Path data per subheading. All positioned at y ≈ 135 in the lockup viewBox.
|
|
9
6
|
// Source: Figma export — paths preserved verbatim so kerning / letter shapes
|
|
@@ -56,21 +53,16 @@ const label = $derived(ariaLabel ?? (subheading ? `Streams ${subheading}` : 'Str
|
|
|
56
53
|
|
|
57
54
|
<!--
|
|
58
55
|
@component
|
|
59
|
-
Logo — the StreamsCloud brand mark, optionally locked up with the "Streams"
|
|
60
|
-
|
|
61
|
-
the consumer sets color via the parent's CSS `color` property.
|
|
56
|
+
Logo — the StreamsCloud brand mark, optionally locked up with the "Streams" wordmark and a sub-product name.
|
|
57
|
+
The `mono` variant paints in `currentColor`; `standard` paints the mark in Streams blue, which a workspace theme does not recolor.
|
|
62
58
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
Wrap in a colored container to set the fill:
|
|
69
|
-
<div style="color: var(--sc-kit--color--accent)">
|
|
70
|
-
<Logo subheading="studio" />
|
|
71
|
-
</div>
|
|
59
|
+
### CSS Custom Properties
|
|
60
|
+
| Property | Description | Default |
|
|
61
|
+
|---|---|---|
|
|
62
|
+
| `--sc-kit--logo--mark-color` | Mark color in the `standard` variant | Streams blue (`#144ab0` light, `#5a8dec` dark) |
|
|
72
63
|
-->
|
|
73
64
|
<style>.logo {
|
|
65
|
+
--_logo--mark-color: var(--sc-kit--logo--mark-color, light-dark(#144ab0, #5a8dec));
|
|
74
66
|
display: block;
|
|
75
67
|
width: 100%;
|
|
76
68
|
height: auto;
|
|
@@ -8,7 +8,7 @@ type Props = {
|
|
|
8
8
|
/**
|
|
9
9
|
* Color treatment.
|
|
10
10
|
* - `mono`: every path inherits `currentColor`. Compose with the parent's CSS color.
|
|
11
|
-
* - `standard`: brand-canonical two-tone — mark in `--sc-kit--color
|
|
11
|
+
* - `standard`: brand-canonical two-tone — mark in `--sc-kit--logo--mark-color` (Streams blue, independent of the theme accent), wordmark in `--sc-kit--color--text--primary`.
|
|
12
12
|
* @default 'mono'
|
|
13
13
|
*/
|
|
14
14
|
variant?: Variant;
|
|
@@ -16,19 +16,13 @@ type Props = {
|
|
|
16
16
|
ariaLabel?: string;
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
|
-
* Logo — the StreamsCloud brand mark, optionally locked up with the "Streams"
|
|
20
|
-
*
|
|
21
|
-
* the consumer sets color via the parent's CSS `color` property.
|
|
19
|
+
* Logo — the StreamsCloud brand mark, optionally locked up with the "Streams" wordmark and a sub-product name.
|
|
20
|
+
* The `mono` variant paints in `currentColor`; `standard` paints the mark in Streams blue, which a workspace theme does not recolor.
|
|
22
21
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* Wrap in a colored container to set the fill:
|
|
29
|
-
* <div style="color: var(--sc-kit--color--accent)">
|
|
30
|
-
* <Logo subheading="studio" />
|
|
31
|
-
* </div>
|
|
22
|
+
* ### CSS Custom Properties
|
|
23
|
+
* | Property | Description | Default |
|
|
24
|
+
* |---|---|---|
|
|
25
|
+
* | `--sc-kit--logo--mark-color` | Mark color in the `standard` variant | Streams blue (`#144ab0` light, `#5a8dec` dark) |
|
|
32
26
|
*/
|
|
33
27
|
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
34
28
|
type Cmp = ReturnType<typeof Cmp>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script lang="ts">import NodeView from './cmp.tree-node-view.svelte';
|
|
2
2
|
import { createTreeKeyboard } from './tree-keyboard.svelte';
|
|
3
|
-
let { nodes, checked, header } = $props();
|
|
3
|
+
let { nodes, checked, header, keepExpandSlot = false } = $props();
|
|
4
4
|
const nodesComputed = $derived(nodes ? (Array.isArray(nodes) ? nodes : [nodes]) : []);
|
|
5
|
-
const hideExpandIcon = $derived(nodesComputed.every((f) => !f.children.length));
|
|
5
|
+
const hideExpandIcon = $derived(!keepExpandSlot && nodesComputed.every((f) => !f.children.length));
|
|
6
6
|
const checkedSet = $derived(checked ? new Set(checked) : null);
|
|
7
7
|
$effect(() => {
|
|
8
8
|
for (const root of nodesComputed) {
|
|
@@ -7,6 +7,8 @@ type Props = {
|
|
|
7
7
|
checked?: readonly string[];
|
|
8
8
|
/** Optional content rendered above the nodes (e.g. a header). */
|
|
9
9
|
header?: Snippet;
|
|
10
|
+
/** Keeps the expand-chevron column even when no node has children, so several Trees stacked together line up. */
|
|
11
|
+
keepExpandSlot?: boolean;
|
|
10
12
|
};
|
|
11
13
|
/**
|
|
12
14
|
* Tree — hierarchical, collapsible node list driven by `TreeNode` model instances. Each `TreeNode`
|