@nextbridgehq/payload-block-builder 0.1.2 → 0.1.4

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/client.cjs CHANGED
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/client.ts
31
31
  var client_exports = {};
32
32
  __export(client_exports, {
33
+ BlockBuilderNavLink: () => BlockBuilderNavLink,
33
34
  BlockDataField: () => BlockDataField,
34
35
  BuilderShell: () => BuilderShell,
35
36
  EditInBuilderButton: () => EditInBuilderButton,
@@ -2446,8 +2447,37 @@ function BuilderShell({ loadSlug }) {
2446
2447
  label
2447
2448
  ))));
2448
2449
  }
2450
+
2451
+ // src/components/BlockBuilderNavLink/index.tsx
2452
+ var import_react17 = __toESM(require("react"), 1);
2453
+ var import_link = __toESM(require("next/link"), 1);
2454
+ function BlockBuilderNavLink() {
2455
+ return /* @__PURE__ */ import_react17.default.createElement("div", { style: { padding: "0 16px", marginTop: "8px" } }, /* @__PURE__ */ import_react17.default.createElement(
2456
+ import_link.default,
2457
+ {
2458
+ href: "/block-builder",
2459
+ target: "_blank",
2460
+ rel: "noopener noreferrer",
2461
+ style: {
2462
+ display: "flex",
2463
+ alignItems: "center",
2464
+ gap: "8px",
2465
+ padding: "8px 12px",
2466
+ borderRadius: "6px",
2467
+ border: "1px solid #16a34a",
2468
+ color: "#16a34a",
2469
+ textDecoration: "none",
2470
+ fontSize: "13px",
2471
+ fontWeight: 500,
2472
+ transition: "background 0.15s"
2473
+ }
2474
+ },
2475
+ "Block Builder"
2476
+ ));
2477
+ }
2449
2478
  // Annotate the CommonJS export names for ESM import in node:
2450
2479
  0 && (module.exports = {
2480
+ BlockBuilderNavLink,
2451
2481
  BlockDataField,
2452
2482
  BuilderShell,
2453
2483
  EditInBuilderButton,
package/dist/client.d.cts CHANGED
@@ -17,4 +17,6 @@ type Props = {
17
17
  };
18
18
  declare function BuilderShell({ loadSlug }: Props): React.JSX.Element;
19
19
 
20
- export { BlockDataField, BuilderShell, EditInBuilderButton, SchemaBuilderField };
20
+ declare function BlockBuilderNavLink(): React.JSX.Element;
21
+
22
+ export { BlockBuilderNavLink, BlockDataField, BuilderShell, EditInBuilderButton, SchemaBuilderField };
package/dist/client.d.ts CHANGED
@@ -17,4 +17,6 @@ type Props = {
17
17
  };
18
18
  declare function BuilderShell({ loadSlug }: Props): React.JSX.Element;
19
19
 
20
- export { BlockDataField, BuilderShell, EditInBuilderButton, SchemaBuilderField };
20
+ declare function BlockBuilderNavLink(): React.JSX.Element;
21
+
22
+ export { BlockBuilderNavLink, BlockDataField, BuilderShell, EditInBuilderButton, SchemaBuilderField };
package/dist/client.js CHANGED
@@ -2434,7 +2434,36 @@ function BuilderShell({ loadSlug }) {
2434
2434
  label
2435
2435
  ))));
2436
2436
  }
2437
+
2438
+ // src/components/BlockBuilderNavLink/index.tsx
2439
+ import React17 from "react";
2440
+ import Link2 from "next/link";
2441
+ function BlockBuilderNavLink() {
2442
+ return /* @__PURE__ */ React17.createElement("div", { style: { padding: "0 16px", marginTop: "8px" } }, /* @__PURE__ */ React17.createElement(
2443
+ Link2,
2444
+ {
2445
+ href: "/block-builder",
2446
+ target: "_blank",
2447
+ rel: "noopener noreferrer",
2448
+ style: {
2449
+ display: "flex",
2450
+ alignItems: "center",
2451
+ gap: "8px",
2452
+ padding: "8px 12px",
2453
+ borderRadius: "6px",
2454
+ border: "1px solid #16a34a",
2455
+ color: "#16a34a",
2456
+ textDecoration: "none",
2457
+ fontSize: "13px",
2458
+ fontWeight: 500,
2459
+ transition: "background 0.15s"
2460
+ }
2461
+ },
2462
+ "Block Builder"
2463
+ ));
2464
+ }
2437
2465
  export {
2466
+ BlockBuilderNavLink,
2438
2467
  BlockDataField,
2439
2468
  BuilderShell,
2440
2469
  EditInBuilderButton,
package/dist/index.cjs CHANGED
@@ -1138,6 +1138,16 @@ var dynamicBlocksPlugin = (options = {}) => {
1138
1138
  } = options;
1139
1139
  if (!enabled) return incomingConfig;
1140
1140
  const config = { ...incomingConfig };
1141
+ config.admin = {
1142
+ ...config.admin,
1143
+ components: {
1144
+ ...config.admin?.components,
1145
+ afterNavLinks: [
1146
+ ...config.admin?.components?.afterNavLinks ?? [],
1147
+ "@nextbridgehq/payload-block-builder/client#BlockBuilderNavLink"
1148
+ ]
1149
+ }
1150
+ };
1141
1151
  config.collections = [
1142
1152
  ...config.collections ?? [],
1143
1153
  BlockDefinitions,
package/dist/index.js CHANGED
@@ -1110,6 +1110,16 @@ var dynamicBlocksPlugin = (options = {}) => {
1110
1110
  } = options;
1111
1111
  if (!enabled) return incomingConfig;
1112
1112
  const config = { ...incomingConfig };
1113
+ config.admin = {
1114
+ ...config.admin,
1115
+ components: {
1116
+ ...config.admin?.components,
1117
+ afterNavLinks: [
1118
+ ...config.admin?.components?.afterNavLinks ?? [],
1119
+ "@nextbridgehq/payload-block-builder/client#BlockBuilderNavLink"
1120
+ ]
1121
+ }
1122
+ };
1113
1123
  config.collections = [
1114
1124
  ...config.collections ?? [],
1115
1125
  BlockDefinitions,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextbridgehq/payload-block-builder",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Block Builder for Payload CMS",
5
5
  "keywords": ["payload", "payload-plugin", "cms", "block-builder", "dynamic-blocks"],
6
6
  "homepage": "https://github.com/nextbridgehq/block-builder",
@@ -1,6 +1,4 @@
1
- @import "tailwindcss";
2
-
3
- /* ── Block Builder — Light theme ──────────────────────────────────────────── */
1
+ /* ── Block Builder — Light theme ──────────────────────────────────────────── */
4
2
 
5
3
  *, *::before, *::after { box-sizing: border-box; }
6
4
 
@@ -1361,5 +1359,5 @@ body {
1361
1359
  line-height: 1;
1362
1360
  }
1363
1361
  }
1364
-
1365
-
1362
+
1363
+