@cleanweb/oore 1.2.0-alpha.4 → 1.2.0-alpha.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.
@@ -1,17 +1,17 @@
1
- import type { ReactElement, ReactNode, JSXElementConstructor, FunctionComponent } from 'react';
1
+ import type { ReactElement, ReactNode, JSXElementConstructor } from 'react';
2
2
  export type TComponent = JSXElementConstructor<any>;
3
3
  export type TSlotName = keyof any;
4
4
  export type TSlotAlias = keyof any;
5
5
  export type TSlotsRecord<TKey extends TSlotAlias = TSlotAlias> = {
6
6
  [Key in TKey]: (string | SlotComponent);
7
7
  };
8
- export interface DisplayNamedComponent<TProps extends any = any> extends FunctionComponent<TProps> {
9
- displayName: string;
10
- }
8
+ export type DisplayNamedComponent<TComponentArg extends TComponent = TComponent, TDisplayNameArg extends string = string> = TComponentArg & {
9
+ displayName: TDisplayNameArg;
10
+ };
11
11
  export type SlotNamedComponent<TComponentArg extends TComponent = TComponent, TSlotNameArg extends TSlotName = TSlotName> = TComponentArg & {
12
12
  slotName: TSlotNameArg;
13
13
  };
14
- export type SlotComponent<Component extends TComponent = TComponent> = SlotNamedComponent | DisplayNamedComponent<Component>;
14
+ export type SlotComponent<TComponentArg extends TComponent = TComponent> = SlotNamedComponent<TComponentArg> | DisplayNamedComponent<TComponentArg>;
15
15
  export type SlottedComponent<TComponentArg extends TComponent = TComponent, TSlotAliasArg extends TSlotAlias = TSlotAlias, TSlotsRecordArg extends TSlotsRecord<TSlotAliasArg> = TSlotsRecord<TSlotAliasArg>> = TComponentArg & {
16
16
  Slots: TSlotsRecordArg;
17
17
  };
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- ;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleanweb/oore",
3
- "version": "1.2.0-alpha.4",
3
+ "version": "1.2.0-alpha.5",
4
4
  "description": "A library of helpers for writing cleaner React function components with object-oriented patterns.",
5
5
  "engines": {
6
6
  "node": ">=20"