@broberg/cms-inline-edit 0.6.0 → 0.6.1

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.cjs CHANGED
@@ -327,10 +327,12 @@ function showIdlePill() {
327
327
  removeIdlePill();
328
328
  const wrap = document.createElement("div");
329
329
  wrap.setAttribute("data-cms-inline-edit-idle", "");
330
+ wrap.setAttribute("data-testid", "inline-edit-idle");
330
331
  wrap.style.cssText = "position:fixed;bottom:16px;left:16px;display:inline-flex;align-items:stretch;z-index:2147483647;box-shadow:0 4px 16px rgba(0,0,0,.3);border-radius:999px;overflow:hidden;";
331
332
  const edit = document.createElement("button");
332
333
  edit.type = "button";
333
334
  edit.setAttribute("data-cms-inline-edit-enter", "");
335
+ edit.setAttribute("data-testid", "inline-edit-enter");
334
336
  edit.style.cssText = "display:inline-flex;align-items:center;gap:7px;background:#1c2027;color:#fff;font:600 12px system-ui,sans-serif;padding:8px 14px;border:none;cursor:pointer;";
335
337
  const editText = document.createElement("span");
336
338
  editText.textContent = options.connectLabel;
@@ -339,6 +341,7 @@ function showIdlePill() {
339
341
  const out = document.createElement("button");
340
342
  out.type = "button";
341
343
  out.setAttribute("data-cms-inline-edit-logout", "");
344
+ out.setAttribute("data-testid", "inline-edit-logout");
342
345
  out.textContent = options.logoutLabel;
343
346
  out.style.cssText = "background:#141821;color:#9aa4b2;font:600 11px system-ui,sans-serif;padding:8px 12px;border:none;border-left:1px solid rgba(255,255,255,.12);cursor:pointer;";
344
347
  out.addEventListener("click", () => {
@@ -1173,6 +1176,7 @@ function showPill(el, state) {
1173
1176
  if (!pill) {
1174
1177
  pill = document.createElement("span");
1175
1178
  pill.setAttribute("data-cms-inline-edit-pill", "");
1179
+ pill.setAttribute("data-testid", "inline-edit-pill");
1176
1180
  document.body.appendChild(pill);
1177
1181
  pills.set(el, pill);
1178
1182
  }
@@ -1200,6 +1204,7 @@ function showActiveBadge(options) {
1200
1204
  const badge = document.createElement("button");
1201
1205
  badge.type = "button";
1202
1206
  badge.setAttribute("data-cms-inline-edit-badge", "");
1207
+ badge.setAttribute("data-testid", "inline-edit-badge");
1203
1208
  badge.style.cssText = "position:fixed;bottom:16px;left:16px;display:inline-flex;align-items:center;gap:7px;background:#1c2027;color:#fff;font:600 12px system-ui,sans-serif;padding:8px 14px;border-radius:999px;z-index:2147483647;box-shadow:0 4px 16px rgba(0,0,0,.3);border:none;cursor:pointer;opacity:.9;transition:opacity .15s;";
1204
1209
  const text = document.createElement("span");
1205
1210
  text.textContent = options.disconnectLabel;