@quazardous/qdadm 2.37.0 → 2.39.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.
@@ -0,0 +1,111 @@
1
+ /**
2
+ * VanillaYamlEditor (#4303): the vanilla-yamleditor variables mapped to the
3
+ * PrimeVue theme, light and dark (.dark-mode).
4
+ */
5
+
6
+ .qd-yaml-editor .vye {
7
+ --vye-font: inherit;
8
+ --vye-bg: var(--p-content-background, #fff);
9
+ --vye-fg: var(--p-text-color, #1f2937);
10
+ --vye-muted: var(--p-text-muted-color, #6b7280);
11
+ --vye-border: var(--p-content-border-color, #e5e7eb);
12
+ --vye-panel: var(--p-surface-50, #f8fafc);
13
+ --vye-gutter-bg: var(--p-surface-50, #f8fafc);
14
+ --vye-accent: var(--p-primary-color, #3b82f6);
15
+ --vye-accent-fg: var(--p-primary-contrast-color, #fff);
16
+ --vye-input-bg: var(--p-form-field-background, #fff);
17
+ --vye-radius: var(--p-form-field-border-radius, 6px);
18
+ --vye-error: var(--p-red-600, #dc2626);
19
+ --vye-error-bg: var(--p-red-50, #fef2f2);
20
+ }
21
+
22
+ .dark-mode .qd-yaml-editor .vye {
23
+ --vye-panel: var(--p-surface-800, #1e293b);
24
+ --vye-gutter-bg: var(--p-surface-800, #1e293b);
25
+ --vye-error: var(--p-red-400, #f87171);
26
+ --vye-error-bg: color-mix(in srgb, var(--p-red-400, #f87171) 12%, transparent);
27
+ --vye-active-line: rgba(147, 197, 253, 0.07);
28
+ --vye-tok-key: #93c5fd;
29
+ --vye-tok-string: #86efac;
30
+ --vye-tok-number: #fcd34d;
31
+ --vye-tok-bool: #d8b4fe;
32
+ --vye-tok-comment: #9ca3af;
33
+ --vye-tok-meta: #f9a8d4;
34
+ }
35
+
36
+ /* YamlConfigEditor */
37
+ .qd-yaml-config {
38
+ display: flex;
39
+ flex-direction: column;
40
+ gap: 0.5rem;
41
+ }
42
+
43
+ .qd-yaml-config-bar {
44
+ display: flex;
45
+ flex-wrap: wrap;
46
+ align-items: center;
47
+ gap: 0.5rem;
48
+ }
49
+
50
+ .qd-yaml-config-state {
51
+ margin-right: auto;
52
+ color: var(--p-text-muted-color);
53
+ font-size: 0.875rem;
54
+ }
55
+
56
+ .qd-yaml-config-state--dirty {
57
+ color: var(--p-orange-600, #ea580c);
58
+ }
59
+
60
+ .qd-yaml-config-reason {
61
+ display: flex;
62
+ flex-direction: column;
63
+ gap: 0.35rem;
64
+ margin-top: 0.75rem;
65
+ }
66
+
67
+ .qd-yaml-history {
68
+ display: grid;
69
+ grid-template-columns: minmax(12rem, 18rem) 1fr;
70
+ gap: 0.75rem;
71
+ min-height: 20rem;
72
+ }
73
+
74
+ .qd-yaml-history-list {
75
+ display: flex;
76
+ flex-direction: column;
77
+ gap: 0.25rem;
78
+ overflow: auto;
79
+ max-height: 32rem;
80
+ }
81
+
82
+ .qd-yaml-history-entry {
83
+ display: flex;
84
+ flex-direction: column;
85
+ align-items: flex-start;
86
+ gap: 0.15rem;
87
+ padding: 0.5rem;
88
+ border: 1px solid var(--p-content-border-color);
89
+ border-radius: 6px;
90
+ background: transparent;
91
+ color: inherit;
92
+ font: inherit;
93
+ text-align: left;
94
+ cursor: pointer;
95
+ }
96
+
97
+ .qd-yaml-history-entry--active {
98
+ border-color: var(--p-primary-color);
99
+ background: color-mix(in srgb, var(--p-primary-color) 8%, transparent);
100
+ }
101
+
102
+ .qd-yaml-history-meta {
103
+ color: var(--p-text-muted-color);
104
+ font-size: 0.8125rem;
105
+ }
106
+
107
+ @media (max-width: 767px) {
108
+ .qd-yaml-history {
109
+ grid-template-columns: 1fr;
110
+ }
111
+ }
@@ -32,6 +32,8 @@
32
32
  @use './log-stream';
33
33
  @use './timeline';
34
34
  @use './payload';
35
+ @use './yaml-editor';
36
+ @use './cards-dashboard';
35
37
  @use './email';
36
38
  @use './tasks';
37
39
  @use './dialogs';
@@ -81,6 +81,24 @@ export interface WrapperInfo {
81
81
  /**
82
82
  * Block configuration
83
83
  */
84
+ /**
85
+ * A block as a dashboard card (#4320): read by CardsDashboard, ignored by a
86
+ * classic Zone, so the same block works in both. The block's `id` is the
87
+ * card's key in the user's saved arrangement; every field here is optional.
88
+ */
89
+ export interface BlockCard {
90
+ /** Names the card in the hidden tray and in announcements (an i18n key works); default: the block's `title` prop, else its id */
91
+ title?: string
92
+ /** Always shown: the user cannot hide it */
93
+ required?: boolean
94
+ /** Stays at its default place: the user cannot move it */
95
+ fixed?: boolean
96
+ /** Pinned at the top by default; the user can unpin it */
97
+ pinned?: boolean
98
+ /** Columns it spans, 1 to 3 (default 1) */
99
+ span?: number
100
+ }
101
+
84
102
  export interface BlockConfig {
85
103
  /** Vue component to render */
86
104
  component: Component
@@ -102,6 +120,8 @@ export interface BlockConfig {
102
120
  wraps?: string | null
103
121
  /** Wrappers applied to this block */
104
122
  wrappers?: WrapperInfo[]
123
+ /** As a dashboard card (#4320) */
124
+ card?: BlockCard | null
105
125
  }
106
126
 
107
127
  /**
@@ -118,6 +138,7 @@ interface InternalBlock {
118
138
  after: string | null
119
139
  wraps: string | null
120
140
  wrappers?: WrapperInfo[]
141
+ card: BlockCard | null
121
142
  }
122
143
 
123
144
  /**
@@ -380,6 +401,7 @@ export class ZoneRegistry {
380
401
  before: blockConfig.before ?? null,
381
402
  after: blockConfig.after ?? null,
382
403
  wraps: blockConfig.wraps ?? null,
404
+ card: blockConfig.card ?? null,
383
405
  }
384
406
 
385
407
  // Update wrap graph for cycle detection (wrap operation only)
@@ -611,6 +633,7 @@ export class ZoneRegistry {
611
633
  before: block.before,
612
634
  after: block.after,
613
635
  wraps: block.wraps,
636
+ card: block.card,
614
637
  wrappers: allWrappers.map((w) => ({
615
638
  component: w.component,
616
639
  props: w.props,
@@ -638,12 +661,13 @@ export class ZoneRegistry {
638
661
  }
639
662
 
640
663
  // Clean up internal operation fields for external consumers
641
- const cleaned: BlockConfig[] = result.map(({ component, weight, props, id, wrappers }) => ({
664
+ const cleaned: BlockConfig[] = result.map(({ component, weight, props, id, wrappers, card }) => ({
642
665
  component,
643
666
  weight,
644
667
  props,
645
668
  id,
646
669
  ...(wrappers ? { wrappers } : {}),
670
+ ...(card ? { card } : {}),
647
671
  }))
648
672
 
649
673
  // Cache the result
@@ -11,6 +11,7 @@ export {
11
11
  type BlockOperation,
12
12
  type WrapperInfo,
13
13
  type BlockConfig,
14
+ type BlockCard,
14
15
  type ZoneConfig,
15
16
  type ZoneDefineOptions,
16
17
  type ZoneListInfo,