myoperator-ui 0.0.147 → 0.0.149

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.
Files changed (2) hide show
  1. package/dist/index.js +26 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5522,7 +5522,9 @@ const PageHeader = React.forwardRef<HTMLDivElement, PageHeaderProps>(
5522
5522
  // Render actions for desktop (all inline)
5523
5523
  const renderDesktopActions = () => (
5524
5524
  <div className="hidden sm:flex items-center gap-2 ml-6">
5525
- {actionsArray}
5525
+ {actionsArray.map((action, index) => (
5526
+ <React.Fragment key={index}>{action}</React.Fragment>
5527
+ ))}
5526
5528
  </div>
5527
5529
  );
5528
5530
 
@@ -5577,7 +5579,11 @@ const PageHeader = React.forwardRef<HTMLDivElement, PageHeaderProps>(
5577
5579
 
5578
5580
  // For horizontal layout, always show all actions inline
5579
5581
  const renderHorizontalActions = () => (
5580
- <div className="flex items-center gap-2 ml-4">{actionsArray}</div>
5582
+ <div className="flex items-center gap-2 ml-4">
5583
+ {actionsArray.map((action, index) => (
5584
+ <React.Fragment key={index}>{action}</React.Fragment>
5585
+ ))}
5586
+ </div>
5581
5587
  );
5582
5588
 
5583
5589
  const renderActions = () => {
@@ -9470,9 +9476,24 @@ async function sync(options) {
9470
9476
  if (!exists) {
9471
9477
  toAdd.push(componentName);
9472
9478
  } else {
9473
- const existingContent = await fs4.readFile(mainFilePath, "utf-8");
9474
- const registryFile = component.files.find((f) => f.name === mainFileName);
9475
- if (registryFile && existingContent !== registryFile.content) {
9479
+ const normalizeForComparison = (content) => content.replace(/\r\n/g, "\n").split("\n").map((line) => line.trimEnd()).join("\n").trim();
9480
+ let needsUpdate = false;
9481
+ for (const registryFile of component.files) {
9482
+ const filePath = path4.join(targetDir, registryFile.name);
9483
+ const fileExists = await fs4.pathExists(filePath);
9484
+ if (!fileExists) {
9485
+ needsUpdate = true;
9486
+ break;
9487
+ }
9488
+ const existingContent = await fs4.readFile(filePath, "utf-8");
9489
+ const existingNormalized = normalizeForComparison(existingContent);
9490
+ const registryNormalized = normalizeForComparison(registryFile.content);
9491
+ if (existingNormalized !== registryNormalized) {
9492
+ needsUpdate = true;
9493
+ break;
9494
+ }
9495
+ }
9496
+ if (needsUpdate) {
9476
9497
  toUpdate.push(componentName);
9477
9498
  } else {
9478
9499
  upToDate.push(componentName);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myoperator-ui",
3
- "version": "0.0.147",
3
+ "version": "0.0.149",
4
4
  "description": "CLI for adding myOperator UI components to your project",
5
5
  "type": "module",
6
6
  "exports": "./dist/index.js",