@pritzlaff/nano-elements 0.0.0-stage → 0.2.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,17 @@
1
+ import { type Component, type Registry } from '@pritzlaff/nano-core';
2
+ import { ModelElement } from './model-element.js';
3
+ /** Sets the registry that placed elements in `doc` use. */
4
+ export declare const provide: (doc: Document, registry: Registry) => void;
5
+ /** The registry provided for `doc`, if any. */
6
+ export declare const providedRegistry: (doc: Document) => Registry | undefined;
7
+ /**
8
+ * A ModelElement that brings its own component (`static component`). On the page it shows the instance named by
9
+ * its `name` attribute, creating it if it doesn't exist; an instance it created goes when the element does,
10
+ * unless the element has a `keep` attribute (a dock panel: closing it leaves the component in the system).
11
+ */
12
+ export declare abstract class PlacedElement extends ModelElement {
13
+ #private;
14
+ static component: Component;
15
+ connectedCallback(): void;
16
+ disconnectedCallback(): void;
17
+ }
package/styles.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ /** The library: host type, bare controls, and the classes (buttons, labels, cards, forms, tables, type, layout). */
2
+ export declare const base: import("lit").CSSResult;
package/tokens.d.ts ADDED
@@ -0,0 +1,39 @@
1
+ /** Every token, with the value an element uses when the host sets none. */
2
+ export declare const NANO_TOKENS: {
3
+ readonly bg: '#0D0F13';
4
+ readonly surface: '#14171D';
5
+ readonly 'surface-2': '#212632';
6
+ readonly border: '#2A303C';
7
+ readonly 'border-strong': '#3A4150';
8
+ readonly fg: '#E7E9EE';
9
+ readonly 'fg-2': '#C9CED6';
10
+ readonly muted: '#A3AAB8';
11
+ readonly 'on-accent': '#0D0F13';
12
+ readonly accent: '#6FA8FF';
13
+ readonly 'accent-soft': '#1C2A44';
14
+ readonly focus: '#6FA8FF';
15
+ readonly good: '#7EE787';
16
+ readonly 'good-bg': '#12301C';
17
+ readonly bad: '#FFB4A8';
18
+ readonly 'bad-bg': '#3A1D1D';
19
+ readonly warn: '#F2CC60';
20
+ readonly 'warn-bg': '#3A3016';
21
+ readonly font: 'Inter, system-ui, sans-serif';
22
+ readonly 'font-display': 'Inter, system-ui, sans-serif';
23
+ readonly 'font-mono': "'JetBrains Mono', ui-monospace, monospace";
24
+ readonly radius: '8px';
25
+ readonly 'radius-s': '6px';
26
+ readonly s1: '#7EE787';
27
+ readonly s2: '#F5A524';
28
+ readonly s3: '#4CC2FF';
29
+ readonly s4: '#FF7AB6';
30
+ readonly s5: '#D2A8FF';
31
+ readonly s6: '#FFA657';
32
+ readonly s7: '#79C0FF';
33
+ readonly s8: '#F2CC60';
34
+ };
35
+ export type NanoToken = keyof typeof NANO_TOKENS;
36
+ /** A token for use in `css`: `var(--nano-<name>, <fallback>)`. */
37
+ export declare const t: (name: NanoToken) => import("lit").CSSResult;
38
+ /** The same, as a string, for inline styles and SVG attributes. */
39
+ export declare const tv: (name: NanoToken) => string;