xplorajs 0.0.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/README.md +104 -0
- package/dist/app/page.js +7 -0
- package/dist/assets/react-refresh.js +338 -0
- package/dist/assets/style.css +230 -0
- package/dist/cli.js +11 -0
- package/dist/commands/build.js +314 -0
- package/dist/commands/dev.js +400 -0
- package/dist/commands/start.js +139 -0
- package/dist/dev.js +21 -0
- package/dist/node_modules/react-refresh/runtime.js +7 -0
- package/dist/pages/index.js +7 -0
- package/dist/server.js +391 -0
- package/package.json +37 -0
package/README.md
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# XploraJS Core 🎯
|
|
2
|
+
|
|
3
|
+
Package utama dari framework XploraJS yang menyediakan fungsionalitas inti untuk static site generation.
|
|
4
|
+
|
|
5
|
+
## 🚀 Fitur
|
|
6
|
+
|
|
7
|
+
- CLI tool untuk development dan build
|
|
8
|
+
- Development mode dengan SSR untuk kecepatan development
|
|
9
|
+
- Production mode dengan SSG untuk performa optimal
|
|
10
|
+
- Build system yang cepat
|
|
11
|
+
- TypeScript support
|
|
12
|
+
- File system routing
|
|
13
|
+
- Incremental Static Regeneration (ISR)
|
|
14
|
+
- Optimized asset handling
|
|
15
|
+
|
|
16
|
+
## 📦 Instalasi
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
bun add xplora
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## 🛠️ Penggunaan
|
|
23
|
+
|
|
24
|
+
### CLI Commands
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Development server (SSR mode)
|
|
28
|
+
xplora dev
|
|
29
|
+
|
|
30
|
+
# Build static site (SSG mode)
|
|
31
|
+
xplora build
|
|
32
|
+
|
|
33
|
+
# Preview static site
|
|
34
|
+
xplora preview
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Development Mode
|
|
38
|
+
|
|
39
|
+
Development mode menggunakan SSR untuk:
|
|
40
|
+
- Hot Module Replacement (HMR)
|
|
41
|
+
- Instant feedback saat development
|
|
42
|
+
- Real-time data fetching
|
|
43
|
+
- Tidak perlu rebuild untuk melihat perubahan
|
|
44
|
+
|
|
45
|
+
### Production Mode
|
|
46
|
+
|
|
47
|
+
Production mode menggunakan SSG untuk:
|
|
48
|
+
- Performa optimal
|
|
49
|
+
- SEO yang lebih baik
|
|
50
|
+
- Hosting yang lebih murah
|
|
51
|
+
- Incremental Static Regeneration (ISR)
|
|
52
|
+
|
|
53
|
+
### Konfigurasi
|
|
54
|
+
|
|
55
|
+
Buat file `xplora.config.ts` di root project:
|
|
56
|
+
|
|
57
|
+
```typescript
|
|
58
|
+
import { defineConfig } from 'xplora'
|
|
59
|
+
|
|
60
|
+
export default defineConfig({
|
|
61
|
+
// Development options
|
|
62
|
+
dev: {
|
|
63
|
+
port: 3000,
|
|
64
|
+
hmr: true
|
|
65
|
+
},
|
|
66
|
+
// Static generation options
|
|
67
|
+
static: {
|
|
68
|
+
outputDir: './dist',
|
|
69
|
+
revalidate: 3600, // ISR interval in seconds
|
|
70
|
+
fallback: false
|
|
71
|
+
},
|
|
72
|
+
// Build options
|
|
73
|
+
build: {
|
|
74
|
+
minify: true,
|
|
75
|
+
sourcemap: true
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## 📚 API Reference
|
|
81
|
+
|
|
82
|
+
### CLI
|
|
83
|
+
|
|
84
|
+
- `dev`: Menjalankan development server (SSR mode)
|
|
85
|
+
- `build`: Build static site (SSG mode)
|
|
86
|
+
- `preview`: Preview static site
|
|
87
|
+
|
|
88
|
+
### Config Options
|
|
89
|
+
|
|
90
|
+
- `dev.port`: Port untuk development server
|
|
91
|
+
- `dev.hmr`: Enable/disable Hot Module Replacement
|
|
92
|
+
- `static.outputDir`: Output directory untuk static files
|
|
93
|
+
- `static.revalidate`: Interval ISR dalam detik
|
|
94
|
+
- `static.fallback`: Fallback behavior untuk dynamic routes
|
|
95
|
+
- `build.minify`: Minify output
|
|
96
|
+
- `build.sourcemap`: Generate sourcemaps
|
|
97
|
+
|
|
98
|
+
## 🤝 Kontribusi
|
|
99
|
+
|
|
100
|
+
Kami menyambut kontribusi! Silakan baca [CONTRIBUTING.md](../../CONTRIBUTING.md) untuk panduan kontribusi.
|
|
101
|
+
|
|
102
|
+
## 📝 Lisensi
|
|
103
|
+
|
|
104
|
+
MIT License - lihat [LICENSE](../../LICENSE) untuk detail lebih lanjut.
|
package/dist/app/page.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export default function Home() {
|
|
2
|
+
return /*#__PURE__*/ React.createElement("section", {
|
|
3
|
+
className: "flex h-screen items-center justify-center bg-gray-100"
|
|
4
|
+
}, /*#__PURE__*/ React.createElement("h1", {
|
|
5
|
+
className: "text-4xl font-bold text-teal-600"
|
|
6
|
+
}, "XploraJS \uD83D\uDE80"));
|
|
7
|
+
}
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-refresh-runtime.development.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
"use strict";
|
|
12
|
+
"production" !== process.env.NODE_ENV &&
|
|
13
|
+
(function () {
|
|
14
|
+
function computeFullKey(signature) {
|
|
15
|
+
if (null !== signature.fullKey) return signature.fullKey;
|
|
16
|
+
var fullKey = signature.ownKey;
|
|
17
|
+
try {
|
|
18
|
+
var hooks = signature.getCustomHooks();
|
|
19
|
+
} catch (err) {
|
|
20
|
+
return (signature.forceReset = !0), (signature.fullKey = fullKey);
|
|
21
|
+
}
|
|
22
|
+
for (var i = 0; i < hooks.length; i++) {
|
|
23
|
+
var hook = hooks[i];
|
|
24
|
+
if ("function" !== typeof hook)
|
|
25
|
+
return (signature.forceReset = !0), (signature.fullKey = fullKey);
|
|
26
|
+
hook = allSignaturesByType.get(hook);
|
|
27
|
+
if (void 0 !== hook) {
|
|
28
|
+
var nestedHookKey = computeFullKey(hook);
|
|
29
|
+
hook.forceReset && (signature.forceReset = !0);
|
|
30
|
+
fullKey += "\n---\n" + nestedHookKey;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return (signature.fullKey = fullKey);
|
|
34
|
+
}
|
|
35
|
+
function resolveFamily(type) {
|
|
36
|
+
return updatedFamiliesByType.get(type);
|
|
37
|
+
}
|
|
38
|
+
function cloneMap(map) {
|
|
39
|
+
var clone = new Map();
|
|
40
|
+
map.forEach(function (value, key) {
|
|
41
|
+
clone.set(key, value);
|
|
42
|
+
});
|
|
43
|
+
return clone;
|
|
44
|
+
}
|
|
45
|
+
function cloneSet(set) {
|
|
46
|
+
var clone = new Set();
|
|
47
|
+
set.forEach(function (value) {
|
|
48
|
+
clone.add(value);
|
|
49
|
+
});
|
|
50
|
+
return clone;
|
|
51
|
+
}
|
|
52
|
+
function getProperty(object, property) {
|
|
53
|
+
try {
|
|
54
|
+
return object[property];
|
|
55
|
+
} catch (err) {}
|
|
56
|
+
}
|
|
57
|
+
function register(type, id) {
|
|
58
|
+
if (
|
|
59
|
+
!(
|
|
60
|
+
null === type ||
|
|
61
|
+
("function" !== typeof type && "object" !== typeof type) ||
|
|
62
|
+
allFamiliesByType.has(type)
|
|
63
|
+
)
|
|
64
|
+
) {
|
|
65
|
+
var family = allFamiliesByID.get(id);
|
|
66
|
+
void 0 === family
|
|
67
|
+
? ((family = { current: type }), allFamiliesByID.set(id, family))
|
|
68
|
+
: pendingUpdates.push([family, type]);
|
|
69
|
+
allFamiliesByType.set(type, family);
|
|
70
|
+
if ("object" === typeof type && null !== type)
|
|
71
|
+
switch (getProperty(type, "$$typeof")) {
|
|
72
|
+
case REACT_FORWARD_REF_TYPE:
|
|
73
|
+
register(type.render, id + "$render");
|
|
74
|
+
break;
|
|
75
|
+
case REACT_MEMO_TYPE:
|
|
76
|
+
register(type.type, id + "$type");
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
function setSignature(type, key) {
|
|
81
|
+
var forceReset =
|
|
82
|
+
2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : !1,
|
|
83
|
+
getCustomHooks = 3 < arguments.length ? arguments[3] : void 0;
|
|
84
|
+
allSignaturesByType.has(type) ||
|
|
85
|
+
allSignaturesByType.set(type, {
|
|
86
|
+
forceReset: forceReset,
|
|
87
|
+
ownKey: key,
|
|
88
|
+
fullKey: null,
|
|
89
|
+
getCustomHooks:
|
|
90
|
+
getCustomHooks ||
|
|
91
|
+
function () {
|
|
92
|
+
return [];
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
if ("object" === typeof type && null !== type)
|
|
96
|
+
switch (getProperty(type, "$$typeof")) {
|
|
97
|
+
case REACT_FORWARD_REF_TYPE:
|
|
98
|
+
setSignature(type.render, key, forceReset, getCustomHooks);
|
|
99
|
+
break;
|
|
100
|
+
case REACT_MEMO_TYPE:
|
|
101
|
+
setSignature(type.type, key, forceReset, getCustomHooks);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
function collectCustomHooksForSignature(type) {
|
|
105
|
+
type = allSignaturesByType.get(type);
|
|
106
|
+
void 0 !== type && computeFullKey(type);
|
|
107
|
+
}
|
|
108
|
+
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
|
109
|
+
REACT_MEMO_TYPE = Symbol.for("react.memo"),
|
|
110
|
+
PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map,
|
|
111
|
+
allFamiliesByID = new Map(),
|
|
112
|
+
allFamiliesByType = new PossiblyWeakMap(),
|
|
113
|
+
allSignaturesByType = new PossiblyWeakMap(),
|
|
114
|
+
updatedFamiliesByType = new PossiblyWeakMap(),
|
|
115
|
+
pendingUpdates = [],
|
|
116
|
+
helpersByRendererID = new Map(),
|
|
117
|
+
helpersByRoot = new Map(),
|
|
118
|
+
mountedRoots = new Set(),
|
|
119
|
+
failedRoots = new Set(),
|
|
120
|
+
rootElements = "function" === typeof WeakMap ? new WeakMap() : null,
|
|
121
|
+
isPerformingRefresh = !1;
|
|
122
|
+
exports._getMountedRootCount = function () {
|
|
123
|
+
return mountedRoots.size;
|
|
124
|
+
};
|
|
125
|
+
exports.collectCustomHooksForSignature = collectCustomHooksForSignature;
|
|
126
|
+
exports.createSignatureFunctionForTransform = function () {
|
|
127
|
+
var savedType,
|
|
128
|
+
hasCustomHooks,
|
|
129
|
+
didCollectHooks = !1;
|
|
130
|
+
return function (type, key, forceReset, getCustomHooks) {
|
|
131
|
+
if ("string" === typeof key)
|
|
132
|
+
return (
|
|
133
|
+
savedType ||
|
|
134
|
+
((savedType = type),
|
|
135
|
+
(hasCustomHooks = "function" === typeof getCustomHooks)),
|
|
136
|
+
null == type ||
|
|
137
|
+
("function" !== typeof type && "object" !== typeof type) ||
|
|
138
|
+
setSignature(type, key, forceReset, getCustomHooks),
|
|
139
|
+
type
|
|
140
|
+
);
|
|
141
|
+
!didCollectHooks &&
|
|
142
|
+
hasCustomHooks &&
|
|
143
|
+
((didCollectHooks = !0), collectCustomHooksForSignature(savedType));
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
exports.getFamilyByID = function (id) {
|
|
147
|
+
return allFamiliesByID.get(id);
|
|
148
|
+
};
|
|
149
|
+
exports.getFamilyByType = function (type) {
|
|
150
|
+
return allFamiliesByType.get(type);
|
|
151
|
+
};
|
|
152
|
+
exports.hasUnrecoverableErrors = function () {
|
|
153
|
+
return !1;
|
|
154
|
+
};
|
|
155
|
+
exports.injectIntoGlobalHook = function (globalObject) {
|
|
156
|
+
var hook = globalObject.__REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
157
|
+
if (void 0 === hook) {
|
|
158
|
+
var nextID = 0;
|
|
159
|
+
globalObject.__REACT_DEVTOOLS_GLOBAL_HOOK__ = hook = {
|
|
160
|
+
renderers: new Map(),
|
|
161
|
+
supportsFiber: !0,
|
|
162
|
+
inject: function () {
|
|
163
|
+
return nextID++;
|
|
164
|
+
},
|
|
165
|
+
onScheduleFiberRoot: function () {},
|
|
166
|
+
onCommitFiberRoot: function () {},
|
|
167
|
+
onCommitFiberUnmount: function () {}
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
if (hook.isDisabled)
|
|
171
|
+
console.warn(
|
|
172
|
+
"Something has shimmed the React DevTools global hook (__REACT_DEVTOOLS_GLOBAL_HOOK__). Fast Refresh is not compatible with this shim and will be disabled."
|
|
173
|
+
);
|
|
174
|
+
else {
|
|
175
|
+
var oldInject = hook.inject;
|
|
176
|
+
hook.inject = function (injected) {
|
|
177
|
+
var id = oldInject.apply(this, arguments);
|
|
178
|
+
"function" === typeof injected.scheduleRefresh &&
|
|
179
|
+
"function" === typeof injected.setRefreshHandler &&
|
|
180
|
+
helpersByRendererID.set(id, injected);
|
|
181
|
+
return id;
|
|
182
|
+
};
|
|
183
|
+
hook.renderers.forEach(function (injected, id) {
|
|
184
|
+
"function" === typeof injected.scheduleRefresh &&
|
|
185
|
+
"function" === typeof injected.setRefreshHandler &&
|
|
186
|
+
helpersByRendererID.set(id, injected);
|
|
187
|
+
});
|
|
188
|
+
var oldOnCommitFiberRoot = hook.onCommitFiberRoot,
|
|
189
|
+
oldOnScheduleFiberRoot = hook.onScheduleFiberRoot || function () {};
|
|
190
|
+
hook.onScheduleFiberRoot = function (id, root, children) {
|
|
191
|
+
isPerformingRefresh ||
|
|
192
|
+
(failedRoots.delete(root),
|
|
193
|
+
null !== rootElements && rootElements.set(root, children));
|
|
194
|
+
return oldOnScheduleFiberRoot.apply(this, arguments);
|
|
195
|
+
};
|
|
196
|
+
hook.onCommitFiberRoot = function (
|
|
197
|
+
id,
|
|
198
|
+
root,
|
|
199
|
+
maybePriorityLevel,
|
|
200
|
+
didError
|
|
201
|
+
) {
|
|
202
|
+
var helpers = helpersByRendererID.get(id);
|
|
203
|
+
if (void 0 !== helpers) {
|
|
204
|
+
helpersByRoot.set(root, helpers);
|
|
205
|
+
helpers = root.current;
|
|
206
|
+
var alternate = helpers.alternate;
|
|
207
|
+
null !== alternate
|
|
208
|
+
? ((alternate =
|
|
209
|
+
null != alternate.memoizedState &&
|
|
210
|
+
null != alternate.memoizedState.element &&
|
|
211
|
+
mountedRoots.has(root)),
|
|
212
|
+
(helpers =
|
|
213
|
+
null != helpers.memoizedState &&
|
|
214
|
+
null != helpers.memoizedState.element),
|
|
215
|
+
!alternate && helpers
|
|
216
|
+
? (mountedRoots.add(root), failedRoots.delete(root))
|
|
217
|
+
: (alternate && helpers) ||
|
|
218
|
+
(alternate && !helpers
|
|
219
|
+
? (mountedRoots.delete(root),
|
|
220
|
+
didError
|
|
221
|
+
? failedRoots.add(root)
|
|
222
|
+
: helpersByRoot.delete(root))
|
|
223
|
+
: alternate ||
|
|
224
|
+
helpers ||
|
|
225
|
+
(didError && failedRoots.add(root))))
|
|
226
|
+
: mountedRoots.add(root);
|
|
227
|
+
}
|
|
228
|
+
return oldOnCommitFiberRoot.apply(this, arguments);
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
exports.isLikelyComponentType = function (type) {
|
|
233
|
+
switch (typeof type) {
|
|
234
|
+
case "function":
|
|
235
|
+
if (null != type.prototype) {
|
|
236
|
+
if (type.prototype.isReactComponent) return !0;
|
|
237
|
+
var ownNames = Object.getOwnPropertyNames(type.prototype);
|
|
238
|
+
if (
|
|
239
|
+
1 < ownNames.length ||
|
|
240
|
+
"constructor" !== ownNames[0] ||
|
|
241
|
+
type.prototype.__proto__ !== Object.prototype
|
|
242
|
+
)
|
|
243
|
+
return !1;
|
|
244
|
+
}
|
|
245
|
+
type = type.name || type.displayName;
|
|
246
|
+
return "string" === typeof type && /^[A-Z]/.test(type);
|
|
247
|
+
case "object":
|
|
248
|
+
if (null != type)
|
|
249
|
+
switch (getProperty(type, "$$typeof")) {
|
|
250
|
+
case REACT_FORWARD_REF_TYPE:
|
|
251
|
+
case REACT_MEMO_TYPE:
|
|
252
|
+
return !0;
|
|
253
|
+
}
|
|
254
|
+
return !1;
|
|
255
|
+
default:
|
|
256
|
+
return !1;
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
exports.performReactRefresh = function () {
|
|
260
|
+
if (0 === pendingUpdates.length || isPerformingRefresh) return null;
|
|
261
|
+
isPerformingRefresh = !0;
|
|
262
|
+
try {
|
|
263
|
+
var staleFamilies = new Set(),
|
|
264
|
+
updatedFamilies = new Set(),
|
|
265
|
+
updates = pendingUpdates;
|
|
266
|
+
pendingUpdates = [];
|
|
267
|
+
updates.forEach(function (_ref) {
|
|
268
|
+
var family = _ref[0];
|
|
269
|
+
_ref = _ref[1];
|
|
270
|
+
var prevType = family.current;
|
|
271
|
+
updatedFamiliesByType.set(prevType, family);
|
|
272
|
+
updatedFamiliesByType.set(_ref, family);
|
|
273
|
+
family.current = _ref;
|
|
274
|
+
(prevType.prototype && prevType.prototype.isReactComponent) ||
|
|
275
|
+
(_ref.prototype && _ref.prototype.isReactComponent)
|
|
276
|
+
? (_ref = !1)
|
|
277
|
+
: ((prevType = allSignaturesByType.get(prevType)),
|
|
278
|
+
(_ref = allSignaturesByType.get(_ref)),
|
|
279
|
+
(_ref =
|
|
280
|
+
(void 0 === prevType && void 0 === _ref) ||
|
|
281
|
+
(void 0 !== prevType &&
|
|
282
|
+
void 0 !== _ref &&
|
|
283
|
+
computeFullKey(prevType) === computeFullKey(_ref) &&
|
|
284
|
+
!_ref.forceReset)
|
|
285
|
+
? !0
|
|
286
|
+
: !1));
|
|
287
|
+
_ref ? updatedFamilies.add(family) : staleFamilies.add(family);
|
|
288
|
+
});
|
|
289
|
+
var update = {
|
|
290
|
+
updatedFamilies: updatedFamilies,
|
|
291
|
+
staleFamilies: staleFamilies
|
|
292
|
+
};
|
|
293
|
+
helpersByRendererID.forEach(function (helpers) {
|
|
294
|
+
helpers.setRefreshHandler(resolveFamily);
|
|
295
|
+
});
|
|
296
|
+
var didError = !1,
|
|
297
|
+
firstError = null,
|
|
298
|
+
failedRootsSnapshot = cloneSet(failedRoots),
|
|
299
|
+
mountedRootsSnapshot = cloneSet(mountedRoots),
|
|
300
|
+
helpersByRootSnapshot = cloneMap(helpersByRoot);
|
|
301
|
+
failedRootsSnapshot.forEach(function (root) {
|
|
302
|
+
var helpers = helpersByRootSnapshot.get(root);
|
|
303
|
+
if (void 0 === helpers)
|
|
304
|
+
throw Error(
|
|
305
|
+
"Could not find helpers for a root. This is a bug in React Refresh."
|
|
306
|
+
);
|
|
307
|
+
failedRoots.has(root);
|
|
308
|
+
if (null !== rootElements && rootElements.has(root)) {
|
|
309
|
+
var element = rootElements.get(root);
|
|
310
|
+
try {
|
|
311
|
+
helpers.scheduleRoot(root, element);
|
|
312
|
+
} catch (err) {
|
|
313
|
+
didError || ((didError = !0), (firstError = err));
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
mountedRootsSnapshot.forEach(function (root) {
|
|
318
|
+
var helpers = helpersByRootSnapshot.get(root);
|
|
319
|
+
if (void 0 === helpers)
|
|
320
|
+
throw Error(
|
|
321
|
+
"Could not find helpers for a root. This is a bug in React Refresh."
|
|
322
|
+
);
|
|
323
|
+
mountedRoots.has(root);
|
|
324
|
+
try {
|
|
325
|
+
helpers.scheduleRefresh(root, update);
|
|
326
|
+
} catch (err) {
|
|
327
|
+
didError || ((didError = !0), (firstError = err));
|
|
328
|
+
}
|
|
329
|
+
});
|
|
330
|
+
if (didError) throw firstError;
|
|
331
|
+
return update;
|
|
332
|
+
} finally {
|
|
333
|
+
isPerformingRefresh = !1;
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
exports.register = register;
|
|
337
|
+
exports.setSignature = setSignature;
|
|
338
|
+
})();
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
/*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer properties;
|
|
3
|
+
@layer theme, base, components, utilities;
|
|
4
|
+
@layer theme {
|
|
5
|
+
:root, :host {
|
|
6
|
+
--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
|
|
7
|
+
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
8
|
+
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
|
|
9
|
+
"Courier New", monospace;
|
|
10
|
+
--color-teal-600: oklch(60% 0.118 184.704);
|
|
11
|
+
--color-gray-100: oklch(96.7% 0.003 264.542);
|
|
12
|
+
--text-4xl: 2.25rem;
|
|
13
|
+
--text-4xl--line-height: calc(2.5 / 2.25);
|
|
14
|
+
--font-weight-bold: 700;
|
|
15
|
+
--default-font-family: var(--font-sans);
|
|
16
|
+
--default-mono-font-family: var(--font-mono);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
@layer base {
|
|
20
|
+
*, ::after, ::before, ::backdrop, ::file-selector-button {
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
margin: 0;
|
|
23
|
+
padding: 0;
|
|
24
|
+
border: 0 solid;
|
|
25
|
+
}
|
|
26
|
+
html, :host {
|
|
27
|
+
line-height: 1.5;
|
|
28
|
+
-webkit-text-size-adjust: 100%;
|
|
29
|
+
tab-size: 4;
|
|
30
|
+
font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
|
|
31
|
+
font-feature-settings: var(--default-font-feature-settings, normal);
|
|
32
|
+
font-variation-settings: var(--default-font-variation-settings, normal);
|
|
33
|
+
-webkit-tap-highlight-color: transparent;
|
|
34
|
+
}
|
|
35
|
+
hr {
|
|
36
|
+
height: 0;
|
|
37
|
+
color: inherit;
|
|
38
|
+
border-top-width: 1px;
|
|
39
|
+
}
|
|
40
|
+
abbr:where([title]) {
|
|
41
|
+
-webkit-text-decoration: underline dotted;
|
|
42
|
+
text-decoration: underline dotted;
|
|
43
|
+
}
|
|
44
|
+
h1, h2, h3, h4, h5, h6 {
|
|
45
|
+
font-size: inherit;
|
|
46
|
+
font-weight: inherit;
|
|
47
|
+
}
|
|
48
|
+
a {
|
|
49
|
+
color: inherit;
|
|
50
|
+
-webkit-text-decoration: inherit;
|
|
51
|
+
text-decoration: inherit;
|
|
52
|
+
}
|
|
53
|
+
b, strong {
|
|
54
|
+
font-weight: bolder;
|
|
55
|
+
}
|
|
56
|
+
code, kbd, samp, pre {
|
|
57
|
+
font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
|
|
58
|
+
font-feature-settings: var(--default-mono-font-feature-settings, normal);
|
|
59
|
+
font-variation-settings: var(--default-mono-font-variation-settings, normal);
|
|
60
|
+
font-size: 1em;
|
|
61
|
+
}
|
|
62
|
+
small {
|
|
63
|
+
font-size: 80%;
|
|
64
|
+
}
|
|
65
|
+
sub, sup {
|
|
66
|
+
font-size: 75%;
|
|
67
|
+
line-height: 0;
|
|
68
|
+
position: relative;
|
|
69
|
+
vertical-align: baseline;
|
|
70
|
+
}
|
|
71
|
+
sub {
|
|
72
|
+
bottom: -0.25em;
|
|
73
|
+
}
|
|
74
|
+
sup {
|
|
75
|
+
top: -0.5em;
|
|
76
|
+
}
|
|
77
|
+
table {
|
|
78
|
+
text-indent: 0;
|
|
79
|
+
border-color: inherit;
|
|
80
|
+
border-collapse: collapse;
|
|
81
|
+
}
|
|
82
|
+
:-moz-focusring {
|
|
83
|
+
outline: auto;
|
|
84
|
+
}
|
|
85
|
+
progress {
|
|
86
|
+
vertical-align: baseline;
|
|
87
|
+
}
|
|
88
|
+
summary {
|
|
89
|
+
display: list-item;
|
|
90
|
+
}
|
|
91
|
+
ol, ul, menu {
|
|
92
|
+
list-style: none;
|
|
93
|
+
}
|
|
94
|
+
img, svg, video, canvas, audio, iframe, embed, object {
|
|
95
|
+
display: block;
|
|
96
|
+
vertical-align: middle;
|
|
97
|
+
}
|
|
98
|
+
img, video {
|
|
99
|
+
max-width: 100%;
|
|
100
|
+
height: auto;
|
|
101
|
+
}
|
|
102
|
+
button, input, select, optgroup, textarea, ::file-selector-button {
|
|
103
|
+
font: inherit;
|
|
104
|
+
font-feature-settings: inherit;
|
|
105
|
+
font-variation-settings: inherit;
|
|
106
|
+
letter-spacing: inherit;
|
|
107
|
+
color: inherit;
|
|
108
|
+
border-radius: 0;
|
|
109
|
+
background-color: transparent;
|
|
110
|
+
opacity: 1;
|
|
111
|
+
}
|
|
112
|
+
:where(select:is([multiple], [size])) optgroup {
|
|
113
|
+
font-weight: bolder;
|
|
114
|
+
}
|
|
115
|
+
:where(select:is([multiple], [size])) optgroup option {
|
|
116
|
+
padding-inline-start: 20px;
|
|
117
|
+
}
|
|
118
|
+
::file-selector-button {
|
|
119
|
+
margin-inline-end: 4px;
|
|
120
|
+
}
|
|
121
|
+
::placeholder {
|
|
122
|
+
opacity: 1;
|
|
123
|
+
}
|
|
124
|
+
@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {
|
|
125
|
+
::placeholder {
|
|
126
|
+
color: currentcolor;
|
|
127
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
128
|
+
color: color-mix(in oklab, currentcolor 50%, transparent);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
textarea {
|
|
133
|
+
resize: vertical;
|
|
134
|
+
}
|
|
135
|
+
::-webkit-search-decoration {
|
|
136
|
+
-webkit-appearance: none;
|
|
137
|
+
}
|
|
138
|
+
::-webkit-date-and-time-value {
|
|
139
|
+
min-height: 1lh;
|
|
140
|
+
text-align: inherit;
|
|
141
|
+
}
|
|
142
|
+
::-webkit-datetime-edit {
|
|
143
|
+
display: inline-flex;
|
|
144
|
+
}
|
|
145
|
+
::-webkit-datetime-edit-fields-wrapper {
|
|
146
|
+
padding: 0;
|
|
147
|
+
}
|
|
148
|
+
::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
|
|
149
|
+
padding-block: 0;
|
|
150
|
+
}
|
|
151
|
+
:-moz-ui-invalid {
|
|
152
|
+
box-shadow: none;
|
|
153
|
+
}
|
|
154
|
+
button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {
|
|
155
|
+
appearance: button;
|
|
156
|
+
}
|
|
157
|
+
::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
|
|
158
|
+
height: auto;
|
|
159
|
+
}
|
|
160
|
+
[hidden]:where(:not([hidden="until-found"])) {
|
|
161
|
+
display: none !important;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
@layer utilities {
|
|
165
|
+
.flex {
|
|
166
|
+
display: flex;
|
|
167
|
+
}
|
|
168
|
+
.h-screen {
|
|
169
|
+
height: 100vh;
|
|
170
|
+
}
|
|
171
|
+
.transform {
|
|
172
|
+
transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
|
|
173
|
+
}
|
|
174
|
+
.items-center {
|
|
175
|
+
align-items: center;
|
|
176
|
+
}
|
|
177
|
+
.justify-center {
|
|
178
|
+
justify-content: center;
|
|
179
|
+
}
|
|
180
|
+
.bg-gray-100 {
|
|
181
|
+
background-color: var(--color-gray-100);
|
|
182
|
+
}
|
|
183
|
+
.text-4xl {
|
|
184
|
+
font-size: var(--text-4xl);
|
|
185
|
+
line-height: var(--tw-leading, var(--text-4xl--line-height));
|
|
186
|
+
}
|
|
187
|
+
.font-bold {
|
|
188
|
+
--tw-font-weight: var(--font-weight-bold);
|
|
189
|
+
font-weight: var(--font-weight-bold);
|
|
190
|
+
}
|
|
191
|
+
.text-teal-600 {
|
|
192
|
+
color: var(--color-teal-600);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
@property --tw-rotate-x {
|
|
196
|
+
syntax: "*";
|
|
197
|
+
inherits: false;
|
|
198
|
+
}
|
|
199
|
+
@property --tw-rotate-y {
|
|
200
|
+
syntax: "*";
|
|
201
|
+
inherits: false;
|
|
202
|
+
}
|
|
203
|
+
@property --tw-rotate-z {
|
|
204
|
+
syntax: "*";
|
|
205
|
+
inherits: false;
|
|
206
|
+
}
|
|
207
|
+
@property --tw-skew-x {
|
|
208
|
+
syntax: "*";
|
|
209
|
+
inherits: false;
|
|
210
|
+
}
|
|
211
|
+
@property --tw-skew-y {
|
|
212
|
+
syntax: "*";
|
|
213
|
+
inherits: false;
|
|
214
|
+
}
|
|
215
|
+
@property --tw-font-weight {
|
|
216
|
+
syntax: "*";
|
|
217
|
+
inherits: false;
|
|
218
|
+
}
|
|
219
|
+
@layer properties {
|
|
220
|
+
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
|
221
|
+
*, ::before, ::after, ::backdrop {
|
|
222
|
+
--tw-rotate-x: initial;
|
|
223
|
+
--tw-rotate-y: initial;
|
|
224
|
+
--tw-rotate-z: initial;
|
|
225
|
+
--tw-skew-x: initial;
|
|
226
|
+
--tw-skew-y: initial;
|
|
227
|
+
--tw-font-weight: initial;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import { build } from "./commands/build";
|
|
4
|
+
import { dev } from "./commands/dev";
|
|
5
|
+
import { start } from "./commands/start";
|
|
6
|
+
var program = new Command();
|
|
7
|
+
program.name("xplorajs").description("Xplora.js CLI tool").version("0.0.0");
|
|
8
|
+
program.command("dev").description("Start development server").action(dev);
|
|
9
|
+
program.command("build").description("Build for production").action(build);
|
|
10
|
+
program.command("start").description("Start production server").action(start);
|
|
11
|
+
program.parse();
|