@grayscale-dev/dragon 0.1.3 → 0.1.5

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/README.md CHANGED
@@ -9,13 +9,21 @@ npm install
9
9
  npm --workspace packages/ui run build
10
10
  ```
11
11
 
12
+ **Manifest Build**
13
+
14
+ ```bash
15
+ npm --workspace packages/ui run build:manifest
16
+ ```
17
+
18
+ `build` always generates `dist/manifest.json` and validates it with zod.
19
+
12
20
  **Unit Tests**
13
21
 
14
22
  ```bash
15
23
  npm --workspace packages/ui run test
16
24
  ```
17
25
 
18
- Covers value/property sync, native `input`/`change` events, form association, focus forwarding, and styling hooks.
26
+ Covers value/property sync, native `input`/`change` events, form association, focus forwarding, styling hooks, and manifest integrity.
19
27
 
20
28
  **Usage (Vanilla)**
21
29
 
@@ -71,6 +79,25 @@ function handleInput(e: Event) {
71
79
  </template>
72
80
  ```
73
81
 
82
+ **Manifest Consumption**
83
+
84
+ Machine-readable docs/theme-builder metadata is exported at `@grayscale-dev/dragon/manifest`.
85
+
86
+ ```ts
87
+ import manifest from '@grayscale-dev/dragon/manifest';
88
+
89
+ for (const component of manifest.components) {
90
+ console.log(component.tag, component.cssTokens.length);
91
+ }
92
+ ```
93
+
94
+ Generate docs/theme controls from this manifest only, so package metadata remains your single source of truth.
95
+
96
+ **Metadata Files**
97
+
98
+ - `dist/manifest.json`: Dragon UI docs/theme-builder metadata (tokens, controls, builder groups, option enums).
99
+ - `custom-elements.json`: optional Web Components API standard file (not currently generated in this package).
100
+
74
101
  **Styling**
75
102
 
76
103
  CSS custom properties:
@@ -84,6 +111,12 @@ CSS custom properties:
84
111
  - `--ui-input-placeholder-color`
85
112
  - `--ui-input-focus-ring`
86
113
  - `--ui-input-label-font-size`
114
+ - `--ui-input-label-color`
115
+ - `--ui-input-floating-label-left`
116
+ - `--ui-input-floating-padding-top`
117
+ - `--ui-input-floating-padding-right`
118
+ - `--ui-input-floating-padding-bottom`
119
+ - `--ui-input-floating-padding-left`
87
120
 
88
121
  Default size values in `<dui-input>` are pixel-based.
89
122
 
package/dist/index.js CHANGED
@@ -102,11 +102,12 @@ e.styles = h`
102
102
 
103
103
  .field.floating label {
104
104
  position: absolute;
105
- left: var(--ui-input-floating-label-left, 12px);
105
+ left: var(--ui-input-floating-label-left, var(--ui-input-floating-padding-left, 12px));
106
106
  top: 50%;
107
107
  transform: translateY(-50%);
108
+ transform-origin: left center;
108
109
  margin: 0;
109
- padding: 0 4px;
110
+ padding: 0;
110
111
  background: var(--ui-input-bg, #ffffff);
111
112
  color: var(--ui-input-placeholder-color, #9aa4b2);
112
113
  pointer-events: none;
@@ -115,8 +116,8 @@ e.styles = h`
115
116
 
116
117
  .field.floating[data-has-value='true'] label,
117
118
  :host(:focus-within) .field.floating label {
118
- top: 6px;
119
- transform: translateY(0) scale(0.85);
119
+ top: 7px;
120
+ transform: scale(0.85);
120
121
  color: var(--ui-input-label-color, #475569);
121
122
  }
122
123
 
@@ -151,9 +152,9 @@ e.styles = h`
151
152
  }
152
153
 
153
154
  .field.floating input {
154
- padding-top: var(--ui-input-floating-padding-top, 15px);
155
+ padding-top: var(--ui-input-floating-padding-top, 22px);
155
156
  padding-right: var(--ui-input-floating-padding-right, 12px);
156
- padding-bottom: var(--ui-input-floating-padding-bottom, 7px);
157
+ padding-bottom: var(--ui-input-floating-padding-bottom, 8px);
157
158
  padding-left: var(--ui-input-floating-padding-left, 12px);
158
159
  }
159
160
  `;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { ComponentManifest } from '../schema.js';
2
+ export declare const duiInputManifest: ComponentManifest;
@@ -0,0 +1,5 @@
1
+ import { type DragonManifest } from './schema.js';
2
+ export declare const manifest: DragonManifest;
3
+ export declare function getManifest(): DragonManifest;
4
+ export { ManifestSchema, AttributeMetaSchema, PropertyMetaSchema, EventMetaSchema, PartMetaSchema, CssTokenMetaSchema, BuilderMetaSchema, ComponentManifestSchema } from './schema.js';
5
+ export type { DragonManifest, ComponentManifest, AttributeMeta, PropertyMeta, EventMeta, PartMeta, CssTokenMeta, BuilderMeta, BuilderControl } from './schema.js';