@mark1russell7/guidebook-preparedness 0.2.2 → 0.2.3

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@mark1russell7/guidebook-preparedness",
4
- "version": "0.2.2",
4
+ "version": "0.2.3",
5
5
  "description": "The preparedness content of the guidebook: cited sources, the steps and marked gaps of 12 cases and 6 cuts, 40 topics in 12 areas, and the catalog of offline bundles.",
6
6
  "keywords": [
7
7
  "guidebook",
@@ -0,0 +1,95 @@
1
+ // The master chart: one chart for any disaster. A reader starts at a signal, answers at most 2 questions and goes to a tab.
2
+ // The chart asks for needs, not for kinds of event, so an event that nobody foresaw still has a route.
3
+ // A broadcast is one source of information. No answer of the chart waits for officials.
4
+
5
+ import type { ChartNode, Phase, Tab } from "@mark1russell7/guidebook-plans";
6
+
7
+ const ALL: readonly Phase[] = ["ready", "warned", "P0", "P1", "P2", "P3", "P4", "P5"];
8
+
9
+ /**
10
+ * The tabs of the printed plan, in the sequence of the binder. Each tab is for one need or one subject.
11
+ * Each state of society is a section in each tab. The page budgets come from the print.
12
+ */
13
+ export function tabsOf(cases: readonly string[]): readonly Tab[] {
14
+ return [
15
+ { id: "start", title: "Start: the master chart", keys: [], phases: [], pages: 2 },
16
+ { id: "first-72h", title: "The first 72 hours", keys: cases, phases: ["P0", "P1", "P2"], pages: 4 },
17
+ { id: "stay", title: "Stay: the home and the building", keys: ["home.dwelling"], phases: ALL, pages: 8 },
18
+ { id: "go", title: "Go: the routes and the other places", keys: ["road.local"], phases: ALL, pages: 4 },
19
+ { id: "water", title: "Water and sanitation", keys: ["water.main", "sewer.main", "hydration.drink"], phases: ALL, pages: 6 },
20
+ { id: "heat", title: "Heat, shelter and power", keys: ["power.grid", "gas.main", "fuel.retail", "power.electric"], phases: ALL, pages: 6 },
21
+ { id: "health", title: "Health and medicine", keys: ["care.local", "health.medicine", "health.medical-emergency"], phases: ALL, pages: 8 },
22
+ { id: "food", title: "Food", keys: ["food.retail", "food.energy"], phases: ALL, pages: 6 },
23
+ { id: "security", title: "The safety of the people", keys: ["security.civil-unrest", "security.armed-conflict"], phases: ALL, pages: 6 },
24
+ { id: "group", title: "Contact, the group and trade", keys: ["phone.network", "network.access", "cash.retail"], phases: ALL, pages: 6 },
25
+ { id: "long-term", title: "The long term: 5 weeks to 5 years", keys: cases, phases: ["P3", "P4", "P5"], pages: 10 },
26
+ { id: "hazards", title: "The hazards, case by case", keys: cases, phases: ALL, pages: 24 },
27
+ { id: "appendices", title: "The appendices", keys: [], phases: [], pages: 40 },
28
+ ];
29
+ }
30
+
31
+ /** The tab of the chart itself. It is the entry of the binder, so no path of the chart goes to it. */
32
+ export const START_TAB = "start";
33
+
34
+ const NEEDS_FIRST = "Do the needs by their danger. Safety comes in minutes, heat and water in hours and days, food in weeks.";
35
+
36
+ /** The nodes of the master chart: 3 signals, 5 questions and 12 ends. */
37
+ export const MASTER: readonly ChartNode[] = [
38
+ // The signals: what a reader sees, hears, smells, feels or learns.
39
+ { id: "sense", kind: "signal", text: "You see, hear, smell or feel a danger: fire, smoke, gas, shaking, a flash, rising water, a siren or shots.", next: "life" },
40
+ { id: "threat", kind: "signal", text: "You learn of a threat that comes: a storm, a flood, a fire, a disease, unrest, an attack or a war.", next: "known" },
41
+ { id: "supply", kind: "signal", text: "A supply stops, or help does not come: power, water, sewer, gas, phone, internet, fuel, food, cash, care or the law.", next: "society" },
42
+
43
+ // The questions. Each one has an answer that a reader can see without help.
44
+ {
45
+ id: "life", kind: "question", text: "Can the danger hurt you in the next minutes?", sources: [],
46
+ reasoning: "A danger of minutes leaves no time to read. Do the reflex first, then come back to the chart.",
47
+ answers: [{ label: "Yes", next: "to-72h" }, { label: "No", next: "place" }],
48
+ },
49
+ {
50
+ id: "known", kind: "question", text: "Does the hazards tab have a page for this event?", sources: [],
51
+ reasoning: "A page for the event gives its special risks. An event with no page still breaks down into needs, so the chart continues.",
52
+ answers: [{ label: "Yes", next: "to-hazards" }, { label: "No", next: "place" }],
53
+ },
54
+ {
55
+ id: "place", kind: "question", text: "Is your place safe to stay in: no fire, gas, flood water, damage or bad air?", sources: [],
56
+ reasoning: "Your place holds your supplies, so stay when it is safe. Go when the place itself is the danger.",
57
+ answers: [{ label: "Yes", next: "to-stay" }, { label: "No", next: "to-go" }],
58
+ },
59
+ {
60
+ id: "society", kind: "question", text: "Does society work: does help come when you call, and do the shops, the pharmacies and the grid operate?", sources: [],
61
+ reasoning: "With no help and no shops, each need depends on your group and your supplies for weeks or more. Then the long plan comes first.",
62
+ answers: [
63
+ { label: "Yes", next: "need", society: "works" },
64
+ { label: "In part", next: "need", society: "partly" },
65
+ { label: "No", next: "to-long", society: "none" },
66
+ ],
67
+ },
68
+ {
69
+ id: "need", kind: "question", text: "Which need is short first? Use the section of the tab for the state of society.", sources: [],
70
+ reasoning: NEEDS_FIRST,
71
+ answers: [
72
+ { label: "Safety of the people", next: "to-security" },
73
+ { label: "Heat, shelter or power", next: "to-heat" },
74
+ { label: "Water or a toilet", next: "to-water" },
75
+ { label: "Health or medicine", next: "to-health" },
76
+ { label: "Food", next: "to-food" },
77
+ { label: "Contact, money or trade", next: "to-group" },
78
+ { label: "A skill or a fact", next: "to-appendices" },
79
+ ],
80
+ },
81
+
82
+ // The ends: each one goes to a tab of the binder.
83
+ { id: "to-72h", kind: "goto", text: "Go to the tab: the first 72 hours.", tab: "first-72h" },
84
+ { id: "to-hazards", kind: "goto", text: "Go to the page of the event in the hazards tab.", tab: "hazards" },
85
+ { id: "to-stay", kind: "goto", text: "Go to the tab: stay.", tab: "stay" },
86
+ { id: "to-go", kind: "goto", text: "Go to the tab: go.", tab: "go" },
87
+ { id: "to-long", kind: "goto", text: "Go to the tab: the long term.", tab: "long-term" },
88
+ { id: "to-security", kind: "goto", text: "Go to the tab: the safety of the people.", tab: "security" },
89
+ { id: "to-heat", kind: "goto", text: "Go to the tab: heat, shelter and power.", tab: "heat" },
90
+ { id: "to-water", kind: "goto", text: "Go to the tab: water and sanitation.", tab: "water" },
91
+ { id: "to-health", kind: "goto", text: "Go to the tab: health and medicine.", tab: "health" },
92
+ { id: "to-food", kind: "goto", text: "Go to the tab: food.", tab: "food" },
93
+ { id: "to-group", kind: "goto", text: "Go to the tab: contact, the group and trade.", tab: "group" },
94
+ { id: "to-appendices", kind: "goto", text: "Go to the appendices.", tab: "appendices" },
95
+ ];
package/src/index.ts CHANGED
@@ -1,11 +1,14 @@
1
1
  // The preparedness content of the guidebook: the sources, the steps and the marked gaps of 12 cases and 12 cuts,
2
2
  // the topics of 12 areas, and the catalog of offline bundles.
3
3
 
4
+ import type { Tab } from "@mark1russell7/guidebook-plans";
5
+ import { tabsOf } from "./data/chart.ts";
4
6
  export { CHECKED, SOURCES } from "./data/sources.ts";
5
7
  export { CASE_STEPS, CUT_STEPS, STEPS } from "./data/steps.ts";
6
8
  export { GAPS } from "./data/gaps.ts";
7
9
  export { OPEN_CELLS } from "./data/coverage.ts";
8
10
  export { RULES } from "./data/rules.ts";
11
+ export { MASTER, START_TAB } from "./data/chart.ts";
9
12
  export { AREAS, TOPICS } from "./data/topics.ts";
10
13
  export { BUNDLES, BUNDLES_CHECKED, BUNDLE_LEVELS } from "./data/bundles.ts";
11
14
  export { MEDIA_UNITS, MEDIUM_GAPS, MEDIUM_LOSSES } from "./data/media.ts";
@@ -40,3 +43,6 @@ export const CUTS = ["power.grid", "water.main", "road.local", "phone.network",
40
43
 
41
44
  /** The need codes that the steps protect. */
42
45
  export const NEEDS = ["hydration.drink", "food.energy", "health.medicine", "power.electric"] as const;
46
+
47
+ /** The tabs of the printed plan, in the sequence of the binder. The master chart sends the reader to them. */
48
+ export const TABS: readonly Tab[] = tabsOf([...CASES, ...MORE_CASES]);