@ilokesto/utilinent 1.1.0 → 1.1.1

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.
Files changed (83) hide show
  1. package/README.md +10 -1
  2. package/dist/components/For/index.d.ts +2 -0
  3. package/dist/components/{For.js → For/index.js} +2 -2
  4. package/dist/components/For/types.d.ts +13 -0
  5. package/dist/components/For/types.js +2 -0
  6. package/dist/components/Mount/index.d.ts +2 -0
  7. package/dist/components/{Mount.js → Mount/index.js} +3 -5
  8. package/dist/components/Mount/types.d.ts +13 -0
  9. package/dist/components/{Observer.d.ts → Observer/index.d.ts} +1 -1
  10. package/dist/components/{Observer.js → Observer/index.js} +2 -2
  11. package/dist/components/Observer/types.d.ts +8 -0
  12. package/dist/components/{OptionalWrapper.d.ts → OptionalWrapper/index.d.ts} +1 -1
  13. package/dist/components/{OptionalWrapper.js → OptionalWrapper/index.js} +1 -1
  14. package/dist/components/OptionalWrapper/types.d.ts +6 -0
  15. package/dist/components/Repeat/index.d.ts +2 -0
  16. package/dist/components/{Repeat.js → Repeat/index.js} +3 -5
  17. package/dist/components/Repeat/types.d.ts +13 -0
  18. package/dist/components/Show/index.d.ts +2 -0
  19. package/dist/components/{Show.js → Show/index.js} +4 -6
  20. package/dist/components/Show/types.d.ts +18 -0
  21. package/dist/components/{Slacker.d.ts → Slacker/index.d.ts} +1 -1
  22. package/dist/components/{Slacker.js → Slacker/index.js} +1 -1
  23. package/dist/components/Slacker/types.d.ts +16 -0
  24. package/dist/components/{Slot.d.ts → Slot/Slot.d.ts} +0 -3
  25. package/dist/components/Slot/Slot.js +37 -0
  26. package/dist/components/Slot/Slottable.d.ts +4 -0
  27. package/dist/components/Slot/Slottable.js +8 -0
  28. package/dist/components/Slot/composeRefs.d.ts +2 -0
  29. package/dist/components/Slot/composeRefs.js +12 -0
  30. package/dist/components/Slot/index.d.ts +2 -0
  31. package/dist/components/Slot/index.js +2 -0
  32. package/dist/components/Slot/mergeProps.d.ts +2 -0
  33. package/dist/components/Slot/mergeProps.js +23 -0
  34. package/dist/components/Slot/types.d.ts +1 -0
  35. package/dist/components/Slot/types.js +1 -0
  36. package/dist/components/Switch/Match.d.ts +3 -0
  37. package/dist/components/Switch/Match.js +11 -0
  38. package/dist/components/Switch/Switch.d.ts +2 -0
  39. package/dist/components/Switch/Switch.js +24 -0
  40. package/dist/components/Switch/flattenChildren.d.ts +1 -0
  41. package/dist/components/Switch/flattenChildren.js +7 -0
  42. package/dist/components/Switch/index.d.ts +2 -0
  43. package/dist/components/Switch/index.js +2 -0
  44. package/dist/components/Switch/types.d.ts +16 -0
  45. package/dist/components/Switch/types.js +1 -0
  46. package/dist/constants/htmlTags.d.ts +88 -2
  47. package/dist/constants/htmlTags.js +87 -3
  48. package/dist/core/PluginManager.d.ts +7 -8
  49. package/dist/core/PluginManager.js +20 -15
  50. package/dist/core/createProxy.d.ts +2 -0
  51. package/dist/core/{createTagProxy.js → createProxy.js} +2 -2
  52. package/dist/index.d.ts +5 -3
  53. package/dist/index.js +7 -2
  54. package/dist/types/RegistryCategory.d.ts +1 -0
  55. package/dist/types/RegistryCategory.js +1 -0
  56. package/dist/types/index.d.ts +4 -47
  57. package/dist/types/index.js +4 -1
  58. package/dist/types/register.d.ts +4 -18
  59. package/dist/types/tagHelper.d.ts +20 -0
  60. package/dist/types/tagHelper.js +1 -0
  61. package/dist/types/utils.d.ts +14 -0
  62. package/dist/types/utils.js +1 -0
  63. package/package.json +1 -1
  64. package/dist/components/For.d.ts +0 -2
  65. package/dist/components/Mount.d.ts +0 -2
  66. package/dist/components/Repeat.d.ts +0 -2
  67. package/dist/components/Show.d.ts +0 -2
  68. package/dist/components/Slot.js +0 -75
  69. package/dist/components/Switch.d.ts +0 -4
  70. package/dist/components/Switch.js +0 -39
  71. package/dist/core/createTagProxy.d.ts +0 -3
  72. package/dist/core/tagProxyTypes.d.ts +0 -1
  73. package/dist/types/for.d.ts +0 -23
  74. package/dist/types/mount.d.ts +0 -20
  75. package/dist/types/repeat.d.ts +0 -24
  76. package/dist/types/show.d.ts +0 -31
  77. package/dist/types/switch.d.ts +0 -27
  78. /package/dist/{core/tagProxyTypes.js → components/Mount/types.js} +0 -0
  79. /package/dist/{types/for.js → components/Observer/types.js} +0 -0
  80. /package/dist/{types/mount.js → components/OptionalWrapper/types.js} +0 -0
  81. /package/dist/{types/repeat.js → components/Repeat/types.js} +0 -0
  82. /package/dist/{types/show.js → components/Show/types.js} +0 -0
  83. /package/dist/{types/switch.js → components/Slacker/types.js} +0 -0
@@ -1,31 +0,0 @@
1
- import { ComponentPropsWithRef } from "react";
2
- import { HtmlTag } from "../constants/htmlTags";
3
- import { Fallback, NonNullableElements } from "./";
4
- import { UtilinentRegisterBase, UtilinentRegisterShow } from "./register";
5
- export interface ShowPropsArray<T extends unknown[]> extends Fallback {
6
- when: T;
7
- children: React.ReactNode | ((item: NonNullableElements<T>) => React.ReactNode);
8
- }
9
- export interface ShowProps<T = unknown> extends Fallback {
10
- when: T;
11
- children: React.ReactNode | ((item: NonNullable<T>) => React.ReactNode);
12
- }
13
- type ShowTagHelper<K extends HtmlTag> = {
14
- <const T extends unknown[]>(props: Omit<ComponentPropsWithRef<K>, "children"> & ShowPropsArray<T>): React.ReactNode;
15
- <const T extends unknown>(props: Omit<ComponentPropsWithRef<K>, "children"> & ShowProps<T>): React.ReactNode;
16
- };
17
- type ShowRegisterHelper<C> = C extends React.ComponentType<infer P> ? {
18
- <const T extends unknown[]>(props: Omit<P, "children"> & ShowPropsArray<T>): React.ReactNode;
19
- <const T extends unknown>(props: Omit<P, "children"> & ShowProps<T>): React.ReactNode;
20
- } : C;
21
- export type ShowType = {
22
- <const T extends unknown[]>(props: ShowPropsArray<T>): React.ReactNode;
23
- <const T extends unknown>(props: ShowProps<T>): React.ReactNode;
24
- } & {
25
- [K in HtmlTag]: ShowTagHelper<K>;
26
- } & {
27
- [K in keyof UtilinentRegisterShow]: ShowRegisterHelper<UtilinentRegisterShow[K]>;
28
- } & {
29
- [K in keyof UtilinentRegisterBase]: ShowRegisterHelper<UtilinentRegisterBase[K]>;
30
- };
31
- export {};
@@ -1,27 +0,0 @@
1
- import { ComponentPropsWithRef } from "react";
2
- import { HtmlTag } from "../constants/htmlTags";
3
- import { Fallback } from ".";
4
- import { UtilinentRegisterBase, UtilinentRegisterSwitch } from "./register";
5
- export interface MatchProps<T = unknown> {
6
- when: T | null | undefined | false;
7
- children: React.ReactNode | ((item: NonNullable<T>) => React.ReactNode);
8
- }
9
- export interface SwitchProps extends Fallback {
10
- children: React.ReactNode;
11
- }
12
- type SwitchTagHelper<K extends HtmlTag> = {
13
- (props: SwitchProps & Omit<ComponentPropsWithRef<K>, "children">): React.ReactNode;
14
- };
15
- type SwitchRegisterHelper<C> = C extends React.ComponentType<infer P> ? {
16
- (props: Omit<P, "children"> & SwitchProps): React.ReactNode;
17
- } : C;
18
- export type SwitchType = {
19
- (props: SwitchProps): React.ReactNode;
20
- } & {
21
- [K in HtmlTag]: SwitchTagHelper<K>;
22
- } & {
23
- [K in keyof UtilinentRegisterSwitch]: SwitchRegisterHelper<UtilinentRegisterSwitch[K]>;
24
- } & {
25
- [K in keyof UtilinentRegisterBase]: SwitchRegisterHelper<UtilinentRegisterBase[K]>;
26
- };
27
- export {};