praxis-kit 0.1.1 → 1.0.2

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.
@@ -17,6 +17,17 @@ import { RequireAtLeastOne, Simplify } from "type-fest";
17
17
  * utilities, so no additional prop-to-class mapping is required.
18
18
  */
19
19
  export declare const layoutKeys: readonly ["flex", "inline-flex", "grid", "inline-grid", "block", "inline-block", "inline", "hidden", "contents", "flow-root", "list-item", "table", "inline-table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row-group", "table-row"];
20
+ /**
21
+ * The concrete union of layout prop names — the pre-resolved form of
22
+ * `LayoutKey<typeof layoutKeys>`, colocated with the tuple it derives from.
23
+ *
24
+ * For code that needs to *name* the layout keys in a type without also importing the runtime
25
+ * tuple. A framework adapter uses it to collapse the mutually-exclusive `LayoutProps` union back
26
+ * out of an *extracted* prop type (`ContractProps<typeof Component>`): there a caller wants "the
27
+ * layout props exist and are optional `true`s", not the ~22-member discriminated union that the
28
+ * component's own call signature carries — where "only one may be `true`" is a useful error.
29
+ */
30
+ type LayoutKeyName = (typeof layoutKeys)[number];
20
31
  //#endregion
21
32
  //#region ../../lib/foundation/src/string-map.d.ts
22
33
  /**
@@ -194,4 +205,4 @@ type LayoutProps<T extends readonly string[]> = ExclusiveTrueProp<LayoutKey<T>>
194
205
  */
195
206
  export declare function createTailwindPipeline<V extends VariantMap = VariantMap>(options: ClassPipelineOptions<V>, diagnostics: Diagnostics): ClassPlugin<LayoutProps<typeof layoutKeys>>;
196
207
  //#endregion
197
- export type { LayoutKey, LayoutProps, ResolvedLayout };
208
+ export type { LayoutKey, LayoutKeyName, LayoutProps, ResolvedLayout };