@pyreon/elements 0.1.2 → 0.3.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.
package/lib/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Provider } from "@pyreon/unistyle";
2
2
  import * as _pyreon_core0 from "@pyreon/core";
3
- import { ComponentFn, VNodeChild } from "@pyreon/core";
3
+ import { ComponentFn, PyreonHTMLAttributes, VNodeChild } from "@pyreon/core";
4
4
  import { BreakpointKeys, HTMLTags, HTMLTextTags, config, render } from "@pyreon/ui-core";
5
5
  import * as _pyreon_reactivity0 from "@pyreon/reactivity";
6
6
 
@@ -25,7 +25,7 @@ type Direction = ContentDirection | ContentDirection[] | Partial<Record<Breakpoi
25
25
  type ResponsiveBoolType = ContentBoolean | ContentBoolean[] | Partial<Record<BreakpointKeys, ContentBoolean>>;
26
26
  type Responsive = ContentSimpleValue | ContentSimpleValue[] | Partial<Record<BreakpointKeys, number | string>>;
27
27
  type ExtendCss = Css | Css[] | Partial<Record<BreakpointKeys, Css>>;
28
- type PyreonComponent<P extends Record<string, any> = Record<string, unknown>> = ComponentFn<P> & PyreonStatic;
28
+ type PyreonComponent<P extends Record<string, any> = {}> = ComponentFn<P> & PyreonStatic;
29
29
  interface PyreonStatic {
30
30
  displayName?: string | undefined;
31
31
  pkgName?: string;
@@ -157,8 +157,8 @@ type Props = Partial<{
157
157
  * An additional prop for extending styling of the **afterContent** wrapper element.
158
158
  */
159
159
  afterContentCss: ExtendCss;
160
- }>;
161
- type PyreonElement<P extends Record<string, unknown> = Record<string, unknown>> = ComponentFn<Props & P> & PyreonStatic;
160
+ }> & PyreonHTMLAttributes;
161
+ type PyreonElement<P extends Record<string, unknown> = {}> = ComponentFn<Props & P> & PyreonStatic;
162
162
  //#endregion
163
163
  //#region src/Element/component.d.ts
164
164
  declare const Component: PyreonElement;
@@ -400,7 +400,7 @@ type Props$5 = Partial<{
400
400
  * If an additional styling needs to be added, it can be do so via injecting styles using this property.
401
401
  */
402
402
  css: ExtendCss;
403
- }> & Record<string, unknown>;
403
+ }> & PyreonHTMLAttributes;
404
404
  declare const Component$5: PyreonComponent<Props$5> & {
405
405
  isText?: true;
406
406
  };
package/lib/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Provider, alignContent, extendCss, makeItResponsive, value } from "@pyreon/unistyle";
2
- import { Fragment, Portal, createContext, onMount, onUnmount, popContext, pushContext, useContext } from "@pyreon/core";
2
+ import { Fragment, Portal, createContext, onMount, provide, useContext } from "@pyreon/core";
3
3
  import { config, isEmpty, omit, pick, render, throttle } from "@pyreon/ui-core";
4
4
  import { signal } from "@pyreon/reactivity";
5
5
 
@@ -83,7 +83,7 @@ const StyledComponent = styled$2(component$1)`
83
83
  `;
84
84
 
85
85
  //#endregion
86
- //#region ../../node_modules/.bun/@pyreon+core@0.5.4/node_modules/@pyreon/core/lib/jsx-runtime.js
86
+ //#region ../../node_modules/.bun/@pyreon+core@0.7.12/node_modules/@pyreon/core/lib/jsx-runtime.js
87
87
  /** Marker for fragment nodes — renders children without a wrapper element */
88
88
  const Fragment$1 = Symbol("Pyreon.Fragment");
89
89
  /**
@@ -664,7 +664,7 @@ const Component$1 = (({ rootElement = false, ref, ...props }) => {
664
664
  const renderedList = /* @__PURE__ */ jsx(Iterator_default, { ...pick(props, Iterator_default.RESERVED_PROPS) });
665
665
  if (!rootElement) return renderedList;
666
666
  return /* @__PURE__ */ jsx(Component, {
667
- ref,
667
+ ...ref ? { ref } : {},
668
668
  ...omit(props, Iterator_default.RESERVED_PROPS),
669
669
  children: renderedList
670
670
  });
@@ -679,13 +679,11 @@ Component$1.PYREON__COMPONENT = name$4;
679
679
  const context = createContext({});
680
680
  const useOverlayContext = () => useContext(context);
681
681
  const Component$3 = ({ children, blocked, setBlocked, setUnblocked }) => {
682
- const ctx = {
682
+ provide(context, {
683
683
  blocked,
684
684
  setBlocked,
685
685
  setUnblocked
686
- };
687
- pushContext(new Map([[context.id, ctx]]));
688
- onUnmount(() => popContext());
686
+ });
689
687
  return /* @__PURE__ */ jsx(Fragment$1, { children });
690
688
  };
691
689
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pyreon/elements",
3
- "version": "0.1.2",
3
+ "version": "0.3.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/pyreon/ui-system",
@@ -43,11 +43,11 @@
43
43
  "peerDependencies": {
44
44
  "@pyreon/core": ">=0.4.0 <1.0.0",
45
45
  "@pyreon/reactivity": ">=0.4.0 <1.0.0",
46
- "@pyreon/ui-core": ">=0.1.2",
47
- "@pyreon/unistyle": ">=0.1.2"
46
+ "@pyreon/ui-core": ">=0.3.0",
47
+ "@pyreon/unistyle": ">=0.3.0"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@vitus-labs/tools-rolldown": "^1.15.3",
51
- "@vitus-labs/tools-typescript": "^1.15.3"
51
+ "@pyreon/typescript": "^0.7.4"
52
52
  }
53
53
  }