@scalemule/news-publication 0.0.31 → 0.0.32

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.
@@ -578,6 +578,7 @@ function StoryReview({
578
578
  const selected = revisions.find((r) => r.id === compare), selectedAfter = revisions.find(
579
579
  (r) => r.id === (compareTo || review?.revision.id)
580
580
  );
581
+ const errorMessage = error ? /* @__PURE__ */ jsxRuntime.jsx("p", { ref: errorRef, tabIndex: -1, role: "alert", className: "sm-review-alert", children: error }) : null;
581
582
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `sm-review-frame${publicationHeader ? " sm-review-publication-frame" : ""}`, children: [
582
583
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sm-review-banner-wrap", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sm-review-private", children: [
583
584
  /* @__PURE__ */ jsxRuntime.jsx("strong", { children: review?.published ? "Private review" : "Private preview \xB7 Not published" }),
@@ -588,7 +589,7 @@ function StoryReview({
588
589
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: review?.publication.name || publicationName })
589
590
  ] }) }),
590
591
  /* @__PURE__ */ jsxRuntime.jsxs("main", { className: `sm-story-review${celebration ? " sm-review-celebration" : ""}`, children: [
591
- error && /* @__PURE__ */ jsxRuntime.jsx("p", { ref: errorRef, tabIndex: -1, role: "alert", className: "sm-review-alert", children: error }),
592
+ (!review || panel === "article" || verification) && errorMessage,
592
593
  notice && !(approved && finalEditor && notice === approvalThanks) && /* @__PURE__ */ jsxRuntime.jsx("p", { ref: noticeRef, tabIndex: -1, role: "status", className: "sm-review-notice", children: notice }),
593
594
  verification && /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "sm-review-form", children: [
594
595
  /* @__PURE__ */ jsxRuntime.jsx("h2", { children: "Verify your email" }),
@@ -835,6 +836,7 @@ function StoryReview({
835
836
  ] }),
836
837
  panel === "share" && /* @__PURE__ */ jsxRuntime.jsxs("section", { ref: responseRef, tabIndex: -1, className: "sm-review-form", "aria-label": "Share private preview", children: [
837
838
  /* @__PURE__ */ jsxRuntime.jsx("h2", { children: "Share with your family" }),
839
+ errorMessage,
838
840
  /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Anyone with this link can read the private preview. To send feedback or photos, they will enter their own name and verify their email. No account is needed." }),
839
841
  /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "review-share-url", children: "Private preview link" }),
840
842
  /* @__PURE__ */ jsxRuntime.jsx("input", { id: "review-share-url", readOnly: true, value: shareUrl, onFocus: (e) => e.currentTarget.select() }),
@@ -850,6 +852,7 @@ function StoryReview({
850
852
  ] }),
851
853
  panel === "identity" && /* @__PURE__ */ jsxRuntime.jsxs("section", { ref: responseRef, tabIndex: -1, className: "sm-review-form", "aria-label": "Introduce yourself", children: [
852
854
  /* @__PURE__ */ jsxRuntime.jsx("h2", { children: identityStep === "code" ? "Check your email" : "Who is helping with the story?" }),
855
+ errorMessage,
853
856
  /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Your name will accompany your feedback for the newsroom. Your email stays private. No password or account is needed." }),
854
857
  identityStep === "name" ? /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: async (e) => {
855
858
  e.preventDefault();
@@ -912,6 +915,7 @@ function StoryReview({
912
915
  ] }),
913
916
  panel === "feedback" && /* @__PURE__ */ jsxRuntime.jsxs("section", { ref: responseRef, tabIndex: -1, className: "sm-review-form", "aria-label": "Family feedback", children: [
914
917
  /* @__PURE__ */ jsxRuntime.jsx("h2", { children: "Looks good to you?" }),
918
+ errorMessage,
915
919
  /* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
916
920
  "We'll send your feedback as ",
917
921
  review.reviewer,
@@ -932,6 +936,7 @@ function StoryReview({
932
936
  /* @__PURE__ */ jsxRuntime.jsx("h2", { children: panel === "approve" ? "Approve this exact draft" : panel === "edits" ? "Propose changes" : panel === "media" ? photoToReplace ? "Change photo" : "Contribute a photograph" : panel === "questions" ? "Tell us a little more" : panel === "history" ? "Selected revision history" : panel === "decline" ? "Prefer not to publish" : panel === "changes" ? "Suggest a change" : "Message the newsroom" }),
933
937
  /* @__PURE__ */ jsxRuntime.jsx("button", { disabled: busy, onClick: () => setPanel("article"), children: "Close" })
934
938
  ] }),
939
+ errorMessage,
935
940
  panel !== "history" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sm-review-save-state", role: "status", "aria-live": "polite", children: [
936
941
  currentDraft?.status === "conflict" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
937
942
  /* @__PURE__ */ jsxRuntime.jsx("p", { children: "A response was saved in another tab or device. Your writing here is still available. Choose which version to keep." }),
@@ -576,6 +576,7 @@ function StoryReview({
576
576
  const selected = revisions.find((r) => r.id === compare), selectedAfter = revisions.find(
577
577
  (r) => r.id === (compareTo || review?.revision.id)
578
578
  );
579
+ const errorMessage = error ? /* @__PURE__ */ jsx("p", { ref: errorRef, tabIndex: -1, role: "alert", className: "sm-review-alert", children: error }) : null;
579
580
  return /* @__PURE__ */ jsxs("div", { className: `sm-review-frame${publicationHeader ? " sm-review-publication-frame" : ""}`, children: [
580
581
  /* @__PURE__ */ jsx("div", { className: "sm-review-banner-wrap", children: /* @__PURE__ */ jsxs("div", { className: "sm-review-private", children: [
581
582
  /* @__PURE__ */ jsx("strong", { children: review?.published ? "Private review" : "Private preview \xB7 Not published" }),
@@ -586,7 +587,7 @@ function StoryReview({
586
587
  /* @__PURE__ */ jsx("span", { children: review?.publication.name || publicationName })
587
588
  ] }) }),
588
589
  /* @__PURE__ */ jsxs("main", { className: `sm-story-review${celebration ? " sm-review-celebration" : ""}`, children: [
589
- error && /* @__PURE__ */ jsx("p", { ref: errorRef, tabIndex: -1, role: "alert", className: "sm-review-alert", children: error }),
590
+ (!review || panel === "article" || verification) && errorMessage,
590
591
  notice && !(approved && finalEditor && notice === approvalThanks) && /* @__PURE__ */ jsx("p", { ref: noticeRef, tabIndex: -1, role: "status", className: "sm-review-notice", children: notice }),
591
592
  verification && /* @__PURE__ */ jsxs("section", { className: "sm-review-form", children: [
592
593
  /* @__PURE__ */ jsx("h2", { children: "Verify your email" }),
@@ -833,6 +834,7 @@ function StoryReview({
833
834
  ] }),
834
835
  panel === "share" && /* @__PURE__ */ jsxs("section", { ref: responseRef, tabIndex: -1, className: "sm-review-form", "aria-label": "Share private preview", children: [
835
836
  /* @__PURE__ */ jsx("h2", { children: "Share with your family" }),
837
+ errorMessage,
836
838
  /* @__PURE__ */ jsx("p", { children: "Anyone with this link can read the private preview. To send feedback or photos, they will enter their own name and verify their email. No account is needed." }),
837
839
  /* @__PURE__ */ jsx("label", { htmlFor: "review-share-url", children: "Private preview link" }),
838
840
  /* @__PURE__ */ jsx("input", { id: "review-share-url", readOnly: true, value: shareUrl, onFocus: (e) => e.currentTarget.select() }),
@@ -848,6 +850,7 @@ function StoryReview({
848
850
  ] }),
849
851
  panel === "identity" && /* @__PURE__ */ jsxs("section", { ref: responseRef, tabIndex: -1, className: "sm-review-form", "aria-label": "Introduce yourself", children: [
850
852
  /* @__PURE__ */ jsx("h2", { children: identityStep === "code" ? "Check your email" : "Who is helping with the story?" }),
853
+ errorMessage,
851
854
  /* @__PURE__ */ jsx("p", { children: "Your name will accompany your feedback for the newsroom. Your email stays private. No password or account is needed." }),
852
855
  identityStep === "name" ? /* @__PURE__ */ jsxs("form", { onSubmit: async (e) => {
853
856
  e.preventDefault();
@@ -910,6 +913,7 @@ function StoryReview({
910
913
  ] }),
911
914
  panel === "feedback" && /* @__PURE__ */ jsxs("section", { ref: responseRef, tabIndex: -1, className: "sm-review-form", "aria-label": "Family feedback", children: [
912
915
  /* @__PURE__ */ jsx("h2", { children: "Looks good to you?" }),
916
+ errorMessage,
913
917
  /* @__PURE__ */ jsxs("p", { children: [
914
918
  "We'll send your feedback as ",
915
919
  review.reviewer,
@@ -930,6 +934,7 @@ function StoryReview({
930
934
  /* @__PURE__ */ jsx("h2", { children: panel === "approve" ? "Approve this exact draft" : panel === "edits" ? "Propose changes" : panel === "media" ? photoToReplace ? "Change photo" : "Contribute a photograph" : panel === "questions" ? "Tell us a little more" : panel === "history" ? "Selected revision history" : panel === "decline" ? "Prefer not to publish" : panel === "changes" ? "Suggest a change" : "Message the newsroom" }),
931
935
  /* @__PURE__ */ jsx("button", { disabled: busy, onClick: () => setPanel("article"), children: "Close" })
932
936
  ] }),
937
+ errorMessage,
933
938
  panel !== "history" && /* @__PURE__ */ jsxs("div", { className: "sm-review-save-state", role: "status", "aria-live": "polite", children: [
934
939
  currentDraft?.status === "conflict" ? /* @__PURE__ */ jsxs(Fragment, { children: [
935
940
  /* @__PURE__ */ jsx("p", { children: "A response was saved in another tab or device. Your writing here is still available. Choose which version to keep." }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scalemule/news-publication",
3
- "version": "0.0.31",
3
+ "version": "0.0.32",
4
4
  "description": "Shared server framework for ScaleMule local news publications. Walnut Creek Times is the broadsheet default; each paper supplies its own identity and feature flags.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",