@lotics/cli 0.45.1 → 0.46.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/dist/app_commands.d.ts +6 -0
- package/dist/app_commands.js +52 -0
- package/dist/app_commands.test.js +29 -1
- package/dist/client.js +1 -1
- package/dist/src/cli.js +2664 -2628
- package/dist/starter_template.js +20 -22
- package/package.json +3 -3
package/dist/starter_template.js
CHANGED
|
@@ -184,12 +184,11 @@ export default defineConfig({
|
|
|
184
184
|
dedupe: ["react", "react-dom", "react-native-web"],
|
|
185
185
|
},
|
|
186
186
|
optimizeDeps: {
|
|
187
|
-
// \`
|
|
188
|
-
//
|
|
189
|
-
//
|
|
190
|
-
//
|
|
191
|
-
//
|
|
192
|
-
// export. Production build (rollup) handles it correctly without this.
|
|
187
|
+
// \`react-native-svg\` (used by @lotics/ui's svg charts — PieChart, LineChart,
|
|
188
|
+
// Sparkline, RingGauge) ships a named-export entry Vite's dev optimizer won't
|
|
189
|
+
// resolve unbundled ("does not provide an export named 'parse'"), blanking the
|
|
190
|
+
// iframe the moment one of those charts renders. Pre-bundling it fixes the
|
|
191
|
+
// interop. Production build (rollup) resolves it without this — dev-only.
|
|
193
192
|
//
|
|
194
193
|
// react-native-web itself is force-prebundled (folds its core CJS deps like
|
|
195
194
|
// @react-native/normalize-colors into one interop'd chunk), and the deep
|
|
@@ -199,7 +198,7 @@ export default defineConfig({
|
|
|
199
198
|
// provide an export named 'default'"), blanking the iframe. (Production/rollup
|
|
200
199
|
// resolves the interop already, so this is dev-only.)
|
|
201
200
|
include: [
|
|
202
|
-
"
|
|
201
|
+
"react-native-svg",
|
|
203
202
|
"react-native-web", "@react-native/normalize-colors",
|
|
204
203
|
"inline-style-prefixer/lib/createPrefixer",
|
|
205
204
|
"inline-style-prefixer/lib/plugins/crossFade",
|
|
@@ -254,7 +253,7 @@ export default defineConfig({
|
|
|
254
253
|
optimizer: {
|
|
255
254
|
web: {
|
|
256
255
|
enabled: true,
|
|
257
|
-
include: ["react-native", "react-native-web", "@react-native-picker/picker"],
|
|
256
|
+
include: ["react-native", "react-native-web", "react-native-svg", "@react-native-picker/picker"],
|
|
258
257
|
esbuildOptions: {
|
|
259
258
|
resolveExtensions: [".web.tsx", ".web.ts", ".web.js", ".tsx", ".ts", ".jsx", ".js", ".json"],
|
|
260
259
|
},
|
|
@@ -275,11 +274,11 @@ export default defineConfig({
|
|
|
275
274
|
<title>${escapeHtml(args.app_name)}</title>
|
|
276
275
|
<style>
|
|
277
276
|
/*
|
|
278
|
-
* Full-viewport container chain for iframe apps.
|
|
279
|
-
*
|
|
280
|
-
* on a measured parent height. The browser
|
|
281
|
-
* content-sized collapses every \`flex: 1\`
|
|
282
|
-
* to fit only its rendered content.
|
|
277
|
+
* Full-viewport container chain for iframe apps. Any layout that uses
|
|
278
|
+
* \`flex: 1\` to fill available space (a scrollable table, list, or
|
|
279
|
+
* full-page surface) relies on a measured parent height. The browser
|
|
280
|
+
* default of html/body being content-sized collapses every \`flex: 1\`
|
|
281
|
+
* to 0 and the surface shrinks to fit only its rendered content.
|
|
283
282
|
*
|
|
284
283
|
* Also: #root is made a flex column so the outermost RN \`<View flex:1>\`
|
|
285
284
|
* inside App.tsx claims the full iframe height.
|
|
@@ -315,7 +314,7 @@ mount(
|
|
|
315
314
|
{
|
|
316
315
|
path: "src/App.tsx",
|
|
317
316
|
// Welcome screen demonstrates the full-container layout pattern that
|
|
318
|
-
// real apps (
|
|
317
|
+
// real apps (dashboards, tables, full-page surfaces) rely on:
|
|
319
318
|
// - Outer <View flex:1> claims the full iframe height (works because
|
|
320
319
|
// index.html sets html/body/#root to 100% + #root is a flex column).
|
|
321
320
|
// - Inner View is content-sized + centered for a card layout.
|
|
@@ -323,7 +322,8 @@ mount(
|
|
|
323
322
|
// We deliberately do NOT use @lotics/ui/stack for the outer chain.
|
|
324
323
|
// Stack wraps each child in an unstyled <View>, which breaks `flex: 1`
|
|
325
324
|
// propagation to children that need to claim flexible height (e.g., a
|
|
326
|
-
//
|
|
325
|
+
// scrollable table or list that fills the remaining space below a
|
|
326
|
+
// header + search).
|
|
327
327
|
// Use plain <View> with `flexDirection` + `gap` for any outer layout
|
|
328
328
|
// that hosts a flex-filling child; Stack is fine for content-sized
|
|
329
329
|
// groupings inside such a chain.
|
|
@@ -334,9 +334,9 @@ import { Button } from "@lotics/ui/button";
|
|
|
334
334
|
|
|
335
335
|
// Outer <View flex:1> claims the full iframe height — works because
|
|
336
336
|
// index.html sets html/body/#root to 100% and #root is a flex column.
|
|
337
|
-
// For real layouts with a fill-remaining-space child (
|
|
338
|
-
// keep this flex chain plain — @lotics/ui/stack wraps
|
|
339
|
-
// unstyled <View> that breaks \`flex: 1\` propagation.
|
|
337
|
+
// For real layouts with a fill-remaining-space child (a scrollable
|
|
338
|
+
// table/list etc.), keep this flex chain plain — @lotics/ui/stack wraps
|
|
339
|
+
// each child in an unstyled <View> that breaks \`flex: 1\` propagation.
|
|
340
340
|
export default function App() {
|
|
341
341
|
return (
|
|
342
342
|
<View
|
|
@@ -401,11 +401,9 @@ declare module "lucide-react-native/dist/esm/icons/*" {
|
|
|
401
401
|
|
|
402
402
|
// Augments react-native's types with the web-only fields @lotics/ui consumes:
|
|
403
403
|
// Pressable's \`hovered\` callback state, plus web-only ViewStyle / TextStyle
|
|
404
|
-
// properties (cursor, outline, boxShadow, etc.) used by
|
|
404
|
+
// properties (cursor, outline, boxShadow, etc.) used by its primitives.
|
|
405
405
|
// Each iframe app needs its own copy — TypeScript doesn't auto-pick-up
|
|
406
|
-
// \`.d.ts\` files inside dependencies.
|
|
407
|
-
// triple-slash reference to its own copy of this file so the augmentation
|
|
408
|
-
// kicks in transitively.
|
|
406
|
+
// \`.d.ts\` files inside dependencies.
|
|
409
407
|
declare module "react-native" {
|
|
410
408
|
interface PressableStateCallbackType {
|
|
411
409
|
hovered: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lotics/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.46.0",
|
|
4
4
|
"description": "Lotics SDK and CLI for AI agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@lotics/docx": "*",
|
|
24
24
|
"@lotics/xlsx": "*",
|
|
25
25
|
"@types/node": "^22.15.21",
|
|
26
|
-
"esbuild": "^0.
|
|
26
|
+
"esbuild": "^0.28.1",
|
|
27
27
|
"vitest": "^4.1.7"
|
|
28
28
|
},
|
|
29
29
|
"keywords": [
|
|
@@ -41,4 +41,4 @@
|
|
|
41
41
|
"url": "https://github.com/lotics/lotics.git",
|
|
42
42
|
"directory": "packages/sdk"
|
|
43
43
|
}
|
|
44
|
-
}
|
|
44
|
+
}
|