@pyreon/coolgrid 0.3.0 → 0.11.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.js +1 -49
- package/package.json +10 -9
package/lib/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ALIGN_CONTENT_MAP_X, Provider, context, extendCss, makeItResponsive, value } from "@pyreon/unistyle";
|
|
2
2
|
import { createContext, provide, useContext } from "@pyreon/core";
|
|
3
3
|
import { config, get, omit, pick } from "@pyreon/ui-core";
|
|
4
|
+
import { jsx } from "@pyreon/core/jsx-runtime";
|
|
4
5
|
|
|
5
6
|
//#region src/constants.ts
|
|
6
7
|
const PKG_NAME = "@pyreon/coolgrid";
|
|
@@ -142,55 +143,6 @@ var styled_default$2 = styled$2(component$2)`
|
|
|
142
143
|
})};
|
|
143
144
|
`;
|
|
144
145
|
|
|
145
|
-
//#endregion
|
|
146
|
-
//#region ../../node_modules/.bun/@pyreon+core@0.7.12/node_modules/@pyreon/core/lib/jsx-runtime.js
|
|
147
|
-
/**
|
|
148
|
-
* Hyperscript function — the compiled output of JSX.
|
|
149
|
-
* `<div class="x">hello</div>` → `h("div", { class: "x" }, "hello")`
|
|
150
|
-
*
|
|
151
|
-
* Generic on P so TypeScript validates props match the component's signature
|
|
152
|
-
* at the call site, then stores the result in the loosely-typed VNode.
|
|
153
|
-
*/
|
|
154
|
-
/** Shared empty props sentinel — identity-checked in mountElement to skip applyProps. */
|
|
155
|
-
const EMPTY_PROPS = {};
|
|
156
|
-
function h(type, props, ...children) {
|
|
157
|
-
return {
|
|
158
|
-
type,
|
|
159
|
-
props: props ?? EMPTY_PROPS,
|
|
160
|
-
children: normalizeChildren(children),
|
|
161
|
-
key: props?.key ?? null
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
function normalizeChildren(children) {
|
|
165
|
-
for (let i = 0; i < children.length; i++) if (Array.isArray(children[i])) return flattenChildren(children);
|
|
166
|
-
return children;
|
|
167
|
-
}
|
|
168
|
-
function flattenChildren(children) {
|
|
169
|
-
const result = [];
|
|
170
|
-
for (const child of children) if (Array.isArray(child)) result.push(...flattenChildren(child));
|
|
171
|
-
else result.push(child);
|
|
172
|
-
return result;
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* JSX automatic runtime.
|
|
176
|
-
*
|
|
177
|
-
* When tsconfig has `"jsxImportSource": "@pyreon/core"`, the TS/bundler compiler
|
|
178
|
-
* rewrites JSX to imports from this file automatically:
|
|
179
|
-
* <div class="x" /> → jsx("div", { class: "x" })
|
|
180
|
-
*/
|
|
181
|
-
function jsx(type, props, key) {
|
|
182
|
-
const { children, ...rest } = props;
|
|
183
|
-
const propsWithKey = key != null ? {
|
|
184
|
-
...rest,
|
|
185
|
-
key
|
|
186
|
-
} : rest;
|
|
187
|
-
if (typeof type === "function") return h(type, children !== void 0 ? {
|
|
188
|
-
...propsWithKey,
|
|
189
|
-
children
|
|
190
|
-
} : propsWithKey);
|
|
191
|
-
return h(type, propsWithKey, ...children === void 0 ? [] : Array.isArray(children) ? children : [children]);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
146
|
//#endregion
|
|
195
147
|
//#region src/Col/component.tsx
|
|
196
148
|
/**
|
package/package.json
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pyreon/coolgrid",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/pyreon/ui-system",
|
|
7
|
-
"directory": "packages/coolgrid"
|
|
7
|
+
"directory": "packages/ui-system/coolgrid"
|
|
8
8
|
},
|
|
9
9
|
"description": "Responsive grid system for Pyreon",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"type": "module",
|
|
12
12
|
"sideEffects": false,
|
|
13
13
|
"exports": {
|
|
14
|
+
"bun": "./src/index.ts",
|
|
14
15
|
"source": "./src/index.ts",
|
|
15
16
|
"import": "./lib/index.js",
|
|
16
17
|
"types": "./lib/index.d.ts"
|
|
@@ -25,7 +26,7 @@
|
|
|
25
26
|
"LICENSE"
|
|
26
27
|
],
|
|
27
28
|
"engines": {
|
|
28
|
-
"node": ">=
|
|
29
|
+
"node": ">= 22"
|
|
29
30
|
},
|
|
30
31
|
"publishConfig": {
|
|
31
32
|
"access": "public"
|
|
@@ -41,14 +42,14 @@
|
|
|
41
42
|
"typecheck": "tsc --noEmit"
|
|
42
43
|
},
|
|
43
44
|
"peerDependencies": {
|
|
44
|
-
"@pyreon/core": "
|
|
45
|
-
"@pyreon/reactivity": "
|
|
46
|
-
"@pyreon/ui-core": "^0.
|
|
47
|
-
"@pyreon/unistyle": "^0.
|
|
48
|
-
"@pyreon/styler": "^0.
|
|
45
|
+
"@pyreon/core": "^0.11.0",
|
|
46
|
+
"@pyreon/reactivity": "^0.11.0",
|
|
47
|
+
"@pyreon/ui-core": "^0.11.0",
|
|
48
|
+
"@pyreon/unistyle": "^0.11.0",
|
|
49
|
+
"@pyreon/styler": "^0.11.0"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
51
52
|
"@vitus-labs/tools-rolldown": "^1.15.3",
|
|
52
|
-
"@pyreon/typescript": "^0.
|
|
53
|
+
"@pyreon/typescript": "^0.11.0"
|
|
53
54
|
}
|
|
54
55
|
}
|