@pyreon/coolgrid 0.0.2 → 0.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.
- package/lib/index.js +49 -1
- package/package.json +13 -8
package/lib/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ALIGN_CONTENT_MAP_X, Provider, context, extendCss, makeItResponsive, value } from "@pyreon/unistyle";
|
|
2
2
|
import { createContext, onUnmount, popContext, pushContext, useContext } from "@pyreon/core";
|
|
3
3
|
import { config, get, omit, pick } from "@pyreon/ui-core";
|
|
4
|
-
import { jsx } from "@pyreon/core/jsx-runtime";
|
|
5
4
|
|
|
6
5
|
//#region src/constants.ts
|
|
7
6
|
const PKG_NAME = "@pyreon/coolgrid";
|
|
@@ -143,6 +142,55 @@ var styled_default$2 = styled$2(component$2)`
|
|
|
143
142
|
})};
|
|
144
143
|
`;
|
|
145
144
|
|
|
145
|
+
//#endregion
|
|
146
|
+
//#region ../../node_modules/.bun/@pyreon+core@0.5.4/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
|
+
|
|
146
194
|
//#endregion
|
|
147
195
|
//#region src/Col/component.tsx
|
|
148
196
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pyreon/coolgrid",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/pyreon/ui-system",
|
|
7
|
+
"directory": "packages/coolgrid"
|
|
8
|
+
},
|
|
4
9
|
"description": "Responsive grid system for Pyreon",
|
|
5
10
|
"license": "MIT",
|
|
6
11
|
"type": "module",
|
|
@@ -36,14 +41,14 @@
|
|
|
36
41
|
"typecheck": "tsc --noEmit"
|
|
37
42
|
},
|
|
38
43
|
"peerDependencies": {
|
|
39
|
-
"@pyreon/core": ">=0.
|
|
40
|
-
"@pyreon/reactivity": ">=0.
|
|
41
|
-
"@pyreon/ui-core": "^0.
|
|
42
|
-
"@pyreon/unistyle": "^0.
|
|
43
|
-
"@pyreon/styler": "^0.
|
|
44
|
+
"@pyreon/core": ">=0.4.0 <1.0.0",
|
|
45
|
+
"@pyreon/reactivity": ">=0.4.0 <1.0.0",
|
|
46
|
+
"@pyreon/ui-core": "^0.1.1",
|
|
47
|
+
"@pyreon/unistyle": "^0.1.1",
|
|
48
|
+
"@pyreon/styler": "^0.1.1"
|
|
44
49
|
},
|
|
45
50
|
"devDependencies": {
|
|
46
|
-
"@vitus-labs/tools-rolldown": "^1.15.
|
|
47
|
-
"@vitus-labs/tools-typescript": "^1.15.
|
|
51
|
+
"@vitus-labs/tools-rolldown": "^1.15.3",
|
|
52
|
+
"@vitus-labs/tools-typescript": "^1.15.3"
|
|
48
53
|
}
|
|
49
54
|
}
|