desen-cli 1.0.0-draft.6 → 1.0.0-draft.7

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.
@@ -1,5 +1,5 @@
1
1
 
2
2
  
3
- > desen-cli@1.0.0-draft.6 build /Users/selmanay/Desktop/desen/packages/cli
3
+ > desen-cli@1.0.0-draft.7 build /Users/selmanay/Desktop/desen/packages/cli
4
4
  > tsc
5
5
 
package/dist/index.js CHANGED
@@ -249,8 +249,8 @@ program
249
249
  "start": "next start"
250
250
  },
251
251
  dependencies: {
252
- "desen-core": "1.0.0-draft.6",
253
- "desen": "1.0.0-draft.6",
252
+ "desen-core": "1.0.0-draft.7",
253
+ "desen": "1.0.0-draft.7",
254
254
  "next": "14.2.3",
255
255
  "react": "18.3.1",
256
256
  "react-dom": "18.3.1"
@@ -430,7 +430,7 @@ function buildCssFromNode(layout: any, style: any, opts?: { isText?: boolean; is
430
430
 
431
431
  if (layout) {
432
432
  css.display = 'flex';
433
- css.flexDirection = layout.direction === 'row' ? 'row' : 'column';
433
+ css.flexDirection = (layout.direction === 'row' || layout.direction === 'horizontal') ? 'row' : 'column';
434
434
  if (layout.gap !== undefined && layout.gap !== 0) css.gap = layout.gap;
435
435
 
436
436
  const am: Record<string, string> = { start:'flex-start', end:'flex-end', center:'center', 'space-between':'space-between', 'space-around':'space-around', 'space-evenly':'space-evenly' };
@@ -533,11 +533,18 @@ export const registry: Record<string, React.FC<any>> = {
533
533
  element: GenericContainer,
534
534
  group: GenericContainer,
535
535
  stack: GenericContainer,
536
+ Stack: GenericContainer,
537
+ Card: GenericContainer,
538
+ Grid: GenericContainer,
539
+ Header: GenericContainer,
540
+ Footer: GenericContainer,
536
541
  text: TextComponent,
537
542
  Text: TextComponent,
538
543
  button: ButtonComponent,
544
+ Button: ButtonComponent,
539
545
  input: (props: any) => <input style={buildCssFromNode(props.layout, props.style)} placeholder={props.content || props.name} />,
540
546
  icon: (props: any) => <div style={{ ...buildCssFromNode(props.layout, props.style), display:'inline-flex', alignItems:'center', justifyContent:'center' }}>⚙️</div>,
547
+ Icon: (props: any) => <div style={{ ...buildCssFromNode(props.layout, props.style), display:'inline-flex', alignItems:'center', justifyContent:'center' }}>⚙️</div>,
541
548
  };
542
549
  `.trim());
543
550
  console.log(chalk_1.default.green(`✅ Done! Standalone App Scaffolded.`));
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "desen-cli",
3
- "version": "1.0.0-draft.6",
3
+ "version": "1.0.0-draft.7",
4
4
  "main": "dist/index.js",
5
5
  "dependencies": {
6
6
  "chalk": "^5.6.2",
7
7
  "commander": "^14.0.3",
8
8
  "express": "^4.19.2",
9
9
  "cors": "^2.8.5",
10
- "desen-core": "1.0.0-draft.6"
10
+ "desen-core": "1.0.0-draft.7"
11
11
  },
12
12
  "devDependencies": {
13
13
  "@types/cors": "^2.8.19",
package/src/index.ts CHANGED
@@ -275,8 +275,8 @@ program
275
275
  "start": "next start"
276
276
  },
277
277
  dependencies: {
278
- "desen-core": "1.0.0-draft.6",
279
- "desen": "1.0.0-draft.6",
278
+ "desen-core": "1.0.0-draft.7",
279
+ "desen": "1.0.0-draft.7",
280
280
  "next": "14.2.3",
281
281
  "react": "18.3.1",
282
282
  "react-dom": "18.3.1"
@@ -465,7 +465,7 @@ function buildCssFromNode(layout: any, style: any, opts?: { isText?: boolean; is
465
465
 
466
466
  if (layout) {
467
467
  css.display = 'flex';
468
- css.flexDirection = layout.direction === 'row' ? 'row' : 'column';
468
+ css.flexDirection = (layout.direction === 'row' || layout.direction === 'horizontal') ? 'row' : 'column';
469
469
  if (layout.gap !== undefined && layout.gap !== 0) css.gap = layout.gap;
470
470
 
471
471
  const am: Record<string, string> = { start:'flex-start', end:'flex-end', center:'center', 'space-between':'space-between', 'space-around':'space-around', 'space-evenly':'space-evenly' };
@@ -568,11 +568,18 @@ export const registry: Record<string, React.FC<any>> = {
568
568
  element: GenericContainer,
569
569
  group: GenericContainer,
570
570
  stack: GenericContainer,
571
+ Stack: GenericContainer,
572
+ Card: GenericContainer,
573
+ Grid: GenericContainer,
574
+ Header: GenericContainer,
575
+ Footer: GenericContainer,
571
576
  text: TextComponent,
572
577
  Text: TextComponent,
573
578
  button: ButtonComponent,
579
+ Button: ButtonComponent,
574
580
  input: (props: any) => <input style={buildCssFromNode(props.layout, props.style)} placeholder={props.content || props.name} />,
575
581
  icon: (props: any) => <div style={{ ...buildCssFromNode(props.layout, props.style), display:'inline-flex', alignItems:'center', justifyContent:'center' }}>⚙️</div>,
582
+ Icon: (props: any) => <div style={{ ...buildCssFromNode(props.layout, props.style), display:'inline-flex', alignItems:'center', justifyContent:'center' }}>⚙️</div>,
576
583
  };
577
584
  `.trim());
578
585