@vira-ui/cli 3.0.0 → 9.0.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/index.js CHANGED
@@ -901,7 +901,7 @@ function buildComponentBody(name, vrpConfig, props, hasProps, useViraUI) {
901
901
  // import { watch, signal } from '@vira-ui/core';
902
902
  // const [editValue, setEditValue] = signal('');
903
903
  // watch(() => editValue(), (newValue) => {
904
- // sendDiff({ [field]: newValue, updated_at: new Date().toISOString() });
904
+ // sendDiff({ [field]: newValue, updated_at: getLocalISOString() });
905
905
  // }, { debounce: 500 });
906
906
 
907
907
  return createElement('div', { className: '${name.toLowerCase()}' },
@@ -954,7 +954,7 @@ async function generateComponent(name, dir, config) {
954
954
  if (vrpConfig) {
955
955
  const typeName = vrpConfig.stateType.replace('State', '');
956
956
  componentCode += `// TODO: Если у вас есть синхронизированные типы из backend, используйте их:
957
- // import type { ${typeName} } from '../vira-types';
957
+ // import type { ${typeName} } from '@/vira-types';
958
958
  // export type ${vrpConfig.stateType} = ${typeName};
959
959
 
960
960
  export interface ${vrpConfig.stateType} {
@@ -1043,7 +1043,7 @@ import { createService, useService, batch } from '@vira-ui/core';
1043
1043
  import { useViraState } from '@vira-ui/react';
1044
1044
  import { v4 as uuid } from 'uuid';
1045
1045
  // TODO: Если у вас есть синхронизированные типы из backend, используйте их:
1046
- // import type { ${typeName} } from '../vira-types';
1046
+ // import type { ${typeName} } from '@/vira-types';
1047
1047
  // export type ${vrpConfig.stateType} = ${typeName};
1048
1048
 
1049
1049
  export interface ${vrpConfig.stateType} {
@@ -1091,12 +1091,12 @@ export function use${name}(id?: string) {
1091
1091
  const newItem: ${vrpConfig.stateType} = {
1092
1092
  ...item,
1093
1093
  id: itemId,
1094
- created_at: new Date().toISOString(),
1095
- updated_at: new Date().toISOString(),
1094
+ created_at: getLocalISOString(),
1095
+ updated_at: getLocalISOString(),
1096
1096
  } as ${vrpConfig.stateType};
1097
1097
  sendEvent('${lowerName}.created', {
1098
1098
  ...newItem,
1099
- timestamp: new Date().toISOString()
1099
+ timestamp: getLocalISOString()
1100
1100
  });
1101
1101
  },
1102
1102
  // Update operations
@@ -1104,15 +1104,15 @@ export function use${name}(id?: string) {
1104
1104
  sendDiff(updates);
1105
1105
  sendEvent('${lowerName}.updated', {
1106
1106
  ...updates,
1107
- updated_at: new Date().toISOString(),
1108
- timestamp: new Date().toISOString()
1107
+ updated_at: getLocalISOString(),
1108
+ timestamp: getLocalISOString()
1109
1109
  });
1110
1110
  },
1111
1111
  // Delete operation
1112
1112
  delete(itemId: string) {
1113
1113
  sendEvent('${lowerName}.deleted', {
1114
1114
  id: itemId,
1115
- timestamp: new Date().toISOString()
1115
+ timestamp: getLocalISOString()
1116
1116
  });
1117
1117
  },
1118
1118
  sendEvent,
@@ -1137,8 +1137,8 @@ createService('${lowerName}Bulk', () => ({
1137
1137
  sendEvent('${lowerName}.updated', {
1138
1138
  id,
1139
1139
  ...payload,
1140
- updated_at: new Date().toISOString(),
1141
- timestamp: new Date().toISOString()
1140
+ updated_at: getLocalISOString(),
1141
+ timestamp: getLocalISOString()
1142
1142
  });
1143
1143
  });
1144
1144
  });
@@ -1149,7 +1149,7 @@ createService('${lowerName}Bulk', () => ({
1149
1149
  ids.forEach(id => {
1150
1150
  sendEvent('${lowerName}.deleted', {
1151
1151
  id,
1152
- timestamp: new Date().toISOString()
1152
+ timestamp: getLocalISOString()
1153
1153
  });
1154
1154
  });
1155
1155
  });
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.envExample = void 0;
4
4
  exports.envExample = `# Frontend environment example
5
- VITE_API_URL=http://localhost:8080
5
+ VITE_API_URL=http://45.90.35.155
6
6
  VITE_AUTH_TOKEN=
7
7
  `;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.envLocal = void 0;
4
- exports.envLocal = `VITE_API_URL=http://localhost:8080
4
+ exports.envLocal = `VITE_API_URL=http://45.90.35.155
5
5
  `;
@@ -6,7 +6,7 @@ exports.indexHtml = `<!DOCTYPE html>
6
6
  <head>
7
7
  <meta charset="UTF-8" />
8
8
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
- <title>Vira App</title>
9
+ <title>VIRA SMP</title>
10
10
  </head>
11
11
  <body>
12
12
  <div id="root"></div>
@@ -17,7 +17,7 @@ import './index.css';
17
17
  * ✅ Server-authoritative state (client is terminal)
18
18
  * ✅ Auto-binding ready (action/model props)
19
19
  *
20
- * This is THE standard for Vira apps.
20
+ * This is THE standard for VIRA SMPs.
21
21
  */
22
22
 
23
23
  export function App() {
@@ -23,7 +23,7 @@ export function KanbanBoard({ boardId }: KanbanBoardProps) {
23
23
 
24
24
  return (
25
25
  <Container design={{ padding: 6, height: '100vh', display: 'flex', flexDirection: 'column' }}>
26
- <Box design={{ marginBottom: 6 }}>
26
+ <Box>
27
27
  <Input
28
28
  model={\`kanban.\${boardId}.title\`}
29
29
  value={board.board.title}
@@ -17,7 +17,7 @@ export function KanbanCard({ card, boardId }: KanbanCardProps) {
17
17
  return (
18
18
  <Card
19
19
  design={{
20
- marginBottom: 2,
20
+
21
21
  cursor: 'pointer',
22
22
  padding: 3,
23
23
  }}
@@ -25,11 +25,11 @@ export function KanbanCard({ card, boardId }: KanbanCardProps) {
25
25
  // Open card details (future: modal)
26
26
  }}
27
27
  >
28
- <Text design={{ fontWeight: 600, fontSize: '14px', marginBottom: 1 }}>
28
+ <Text design={{ fontWeight: 600, fontSize: '14px', }}>
29
29
  {card.title}
30
30
  </Text>
31
31
  {card.description && (
32
- <Text design={{ fontSize: '12px', color: '#666', marginBottom: 2 }}>
32
+ <Text design={{ fontSize: '12px', color: '#666', }}>
33
33
  {card.description}
34
34
  </Text>
35
35
  )}
@@ -35,13 +35,13 @@ export function KanbanColumn({ column, boardId }: KanbanColumnProps) {
35
35
  flexDirection: 'column',
36
36
  }}
37
37
  >
38
- <Text design={{ fontWeight: 600, fontSize: '16px', marginBottom: 4 }}>
38
+ <Text design={{ fontWeight: 600, fontSize: '16px', }}>
39
39
  {column.title}
40
40
  </Text>
41
41
  <ScrollArea
42
42
  design={{
43
43
  flex: 1,
44
- marginBottom: 3,
44
+
45
45
  }}
46
46
  >
47
47
  <Flex direction="column" gap={2}>
@@ -6,7 +6,7 @@ import react from '@vitejs/plugin-react';
6
6
 
7
7
  export default defineConfig(({ mode }) => {
8
8
  const env = loadEnv(mode, process.cwd(), '');
9
- const API_URL = env.VITE_API_URL || 'http://localhost:8080';
9
+ const API_URL = env.VITE_API_URL || 'http://45.90.35.155';
10
10
 
11
11
  return {
12
12
  plugins: [react()],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vira-ui/cli",
3
- "version": "3.0.0",
3
+ "version": "9.0.0",
4
4
  "description": "CLI tool for ViraJS project generation",
5
5
  "author": "Vira Team",
6
6
  "license": "MIT",