@rizom/site-rizom-ai 0.2.0-alpha.263 → 0.2.0-alpha.265
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.js +92 -80
- package/dist/index.js.map +6 -6
- package/package.json +1 -1
- package/src/opening.tsx +55 -55
- package/src/story/living-organism.tsx +2 -1
- package/src/story/runtime.ts +23 -0
- package/src/story/story-page.tsx +2 -1
- package/src/story.css +20 -19
package/dist/index.js
CHANGED
|
@@ -39058,11 +39058,15 @@ var story_default = `/* The story pages: chapters beside one drawing, under the
|
|
|
39058
39058
|
width: min(100%, calc(100svh - var(--bar-height, 4.6rem) - 2rem));
|
|
39059
39059
|
aspect-ratio: 1;
|
|
39060
39060
|
}
|
|
39061
|
-
/* On a wide screen the opening's drawing
|
|
39062
|
-
|
|
39063
|
-
|
|
39064
|
-
|
|
39065
|
-
|
|
39061
|
+
/* On a wide screen the opening's drawing holds the figure's place: it stands
|
|
39062
|
+
before the opening in the chapters column and sticks at the figure's centre
|
|
39063
|
+
line down the whole story (the story is a size container, so nothing in it
|
|
39064
|
+
can be fixed to the screen). It stays while the opening is read, an answer
|
|
39065
|
+
included, and the words scroll past it. The handover to the figure follows
|
|
39066
|
+
the scroll (--handover, set by the runtime from the science's top on the
|
|
39067
|
+
screen): as the science comes up the network draws into its centre point,
|
|
39068
|
+
and past the reading line the figure's first drawing opens out of that same
|
|
39069
|
+
point; scrolling back runs it backwards. */
|
|
39066
39070
|
@media not all and (max-width: 60rem) {
|
|
39067
39071
|
/* The words are the room's column (the kit scrolls it within the screen);
|
|
39068
39072
|
the bar and the opening's 4rem of padding above and below stay clear, so
|
|
@@ -39070,31 +39074,30 @@ var story_default = `/* The story pages: chapters beside one drawing, under the
|
|
|
39070
39074
|
.chapter--opening .opening__words {
|
|
39071
39075
|
--ask-column-clear: calc(8rem + var(--bar-height, 4.6rem));
|
|
39072
39076
|
}
|
|
39073
|
-
:where(.
|
|
39077
|
+
:where(.chapters) > .net-layer {
|
|
39074
39078
|
position: sticky;
|
|
39075
|
-
order: -1;
|
|
39076
39079
|
top: calc(
|
|
39077
39080
|
var(--bar-height, 4.6rem) + (100svh - var(--bar-height, 4.6rem)) / 2
|
|
39078
39081
|
);
|
|
39082
|
+
left: auto;
|
|
39083
|
+
right: auto;
|
|
39079
39084
|
height: 0;
|
|
39080
39085
|
margin-left: calc(var(--words) + var(--words-gap));
|
|
39081
39086
|
width: calc(
|
|
39082
39087
|
100cqi - max(0px, (100cqi - 80rem) / 2) - clamp(1rem, 5vw, 5rem) -
|
|
39083
39088
|
var(--words) - var(--words-gap) - clamp(1rem, 6vw, 7rem)
|
|
39084
39089
|
);
|
|
39085
|
-
transition: opacity 0.6s ease;
|
|
39086
39090
|
}
|
|
39087
|
-
:where(.
|
|
39091
|
+
:where(.chapters) > .net-layer > * {
|
|
39088
39092
|
translate: 0 -50%;
|
|
39089
|
-
|
|
39090
|
-
.story:has(.figure:not([data-stage="0"]))
|
|
39091
|
-
:where(.chapter--opening)
|
|
39092
|
-
> .net-layer,
|
|
39093
|
-
.story:has(.figure:not([data-stage="0"])) .net-leads {
|
|
39094
|
-
opacity: 0;
|
|
39093
|
+
scale: calc(1 - clamp(0, var(--handover, 0), 1));
|
|
39095
39094
|
}
|
|
39096
39095
|
.net-leads {
|
|
39097
|
-
|
|
39096
|
+
opacity: calc(1 - clamp(0, var(--handover, 0) * 2, 1));
|
|
39097
|
+
}
|
|
39098
|
+
/* The figure's first drawing opens out of the point the network drew into. */
|
|
39099
|
+
.living-org .o-box {
|
|
39100
|
+
scale: clamp(0, var(--handover, 0) - 1, 1);
|
|
39098
39101
|
}
|
|
39099
39102
|
}
|
|
39100
39103
|
.net-svg {
|
|
@@ -39734,11 +39737,9 @@ var story_default = `/* The story pages: chapters beside one drawing, under the
|
|
|
39734
39737
|
viewport is their frame. On a phone the opening's drawing joins the open
|
|
39735
39738
|
conversation as the first item of its scroll, a slot holding its place. */
|
|
39736
39739
|
.net-leads {
|
|
39737
|
-
position:
|
|
39740
|
+
position: absolute;
|
|
39738
39741
|
inset: 0;
|
|
39739
39742
|
z-index: 2;
|
|
39740
|
-
width: 100vw;
|
|
39741
|
-
height: 100vh;
|
|
39742
39743
|
overflow: visible;
|
|
39743
39744
|
pointer-events: none;
|
|
39744
39745
|
}
|
|
@@ -41862,9 +41863,17 @@ function readingLine(viewportHeight, stripBottom) {
|
|
|
41862
41863
|
const beside = 0.45;
|
|
41863
41864
|
return stripBottom === null ? viewportHeight * beside : stripBottom + 1;
|
|
41864
41865
|
}
|
|
41866
|
+
function handoverProgress(nextTop, scrolled, viewportHeight, line) {
|
|
41867
|
+
if (nextTop > line) {
|
|
41868
|
+
return scrolled <= 0 ? 0 : scrolled / (scrolled + nextTop - line);
|
|
41869
|
+
}
|
|
41870
|
+
const span = viewportHeight - line;
|
|
41871
|
+
return span <= 0 ? 2 : 1 + Math.min(1, (line - nextTop) / span);
|
|
41872
|
+
}
|
|
41865
41873
|
var storyRuntimeScript = ASK_ROOM_SCRIPT + `(function () {
|
|
41866
41874
|
${currentChapter.toString()}
|
|
41867
41875
|
${readingLine.toString()}
|
|
41876
|
+
${handoverProgress.toString()}
|
|
41868
41877
|
function init() {
|
|
41869
41878
|
var story = document.querySelector(".story");
|
|
41870
41879
|
if (!story) return;
|
|
@@ -41917,6 +41926,7 @@ var storyRuntimeScript = ASK_ROOM_SCRIPT + `(function () {
|
|
|
41917
41926
|
var current = currentChapter(tops, line);
|
|
41918
41927
|
var stage = currentChapter(tops, line, stageCount);
|
|
41919
41928
|
if (figure) figure.dataset.stage = String(stage);
|
|
41929
|
+
if (tops.length > 1) story.style.setProperty("--handover", handoverProgress(tops[1], scrollY, innerHeight, line).toFixed(4));
|
|
41920
41930
|
chapters.forEach(function (chapter, i) { chapter.classList.toggle("is-current", i === current); });
|
|
41921
41931
|
// A chapter that lights the network keeps the live drawing in view while it is read.
|
|
41922
41932
|
story.classList.toggle("is-asked", !!(chapters[current] && chapters[current].hasAttribute("data-lights-network")));
|
|
@@ -55235,6 +55245,7 @@ function StoryPage({
|
|
|
55235
55245
|
/* @__PURE__ */ jsx49(ReadingThread, {}),
|
|
55236
55246
|
/* @__PURE__ */ jsxs35("div", {
|
|
55237
55247
|
className: "story",
|
|
55248
|
+
...{ [ASK_ROOM_ATTRIBUTE]: "" },
|
|
55238
55249
|
children: [
|
|
55239
55250
|
/* @__PURE__ */ jsx49("div", {
|
|
55240
55251
|
className: "chapters",
|
|
@@ -56694,67 +56705,8 @@ function NetworkLayer({
|
|
|
56694
56705
|
function Opening(data) {
|
|
56695
56706
|
const headingLead = data.headingLead ?? DEFAULT_COPY.headingLead;
|
|
56696
56707
|
const lede = data.lede ?? DEFAULT_COPY.lede;
|
|
56697
|
-
return /* @__PURE__ */ jsxs39(
|
|
56698
|
-
id: "hero",
|
|
56699
|
-
className: "chapter chapter--opening",
|
|
56700
|
-
"data-title": "Top",
|
|
56701
|
-
...data.askBox ? { [ASK_ROOM_ATTRIBUTE]: "" } : {},
|
|
56708
|
+
return /* @__PURE__ */ jsxs39(Fragment21, {
|
|
56702
56709
|
children: [
|
|
56703
|
-
/* @__PURE__ */ jsxs39("div", {
|
|
56704
|
-
className: "opening__words",
|
|
56705
|
-
...data.askBox ? { [ASK_COLUMN_ATTRIBUTE]: "" } : {},
|
|
56706
|
-
children: [
|
|
56707
|
-
data.kicker && /* @__PURE__ */ jsx56("p", {
|
|
56708
|
-
className: "eyebrow",
|
|
56709
|
-
children: data.kicker
|
|
56710
|
-
}),
|
|
56711
|
-
/* @__PURE__ */ jsxs39("h1", {
|
|
56712
|
-
children: [
|
|
56713
|
-
headingLead,
|
|
56714
|
-
data.headingAccent && /* @__PURE__ */ jsxs39(Fragment21, {
|
|
56715
|
-
children: [
|
|
56716
|
-
" ",
|
|
56717
|
-
/* @__PURE__ */ jsx56("em", {
|
|
56718
|
-
children: data.headingAccent
|
|
56719
|
-
})
|
|
56720
|
-
]
|
|
56721
|
-
})
|
|
56722
|
-
]
|
|
56723
|
-
}),
|
|
56724
|
-
/* @__PURE__ */ jsx56("p", {
|
|
56725
|
-
className: "lede",
|
|
56726
|
-
children: lede
|
|
56727
|
-
}),
|
|
56728
|
-
data.askBox ? /* @__PURE__ */ jsxs39("div", {
|
|
56729
|
-
className: "ask",
|
|
56730
|
-
children: [
|
|
56731
|
-
/* @__PURE__ */ jsx56(AskBoxHost, {
|
|
56732
|
-
prefix: "opening",
|
|
56733
|
-
placeholder: data.prompt ?? undefined
|
|
56734
|
-
}),
|
|
56735
|
-
data.topics.length > 0 && /* @__PURE__ */ jsx56("ul", {
|
|
56736
|
-
className: "ask__topics",
|
|
56737
|
-
"aria-label": "Suggested questions",
|
|
56738
|
-
children: data.topics.map((topic) => /* @__PURE__ */ jsx56("li", {
|
|
56739
|
-
children: /* @__PURE__ */ jsx56("button", {
|
|
56740
|
-
type: "button",
|
|
56741
|
-
"data-atlas-fill": topic,
|
|
56742
|
-
children: topic
|
|
56743
|
-
})
|
|
56744
|
-
}, topic))
|
|
56745
|
-
}),
|
|
56746
|
-
/* @__PURE__ */ jsx56("script", {
|
|
56747
|
-
src: ASK_BOX_SCRIPT_PATH,
|
|
56748
|
-
defer: true
|
|
56749
|
-
})
|
|
56750
|
-
]
|
|
56751
|
-
}) : data.ctaHref && data.ctaLabel && /* @__PURE__ */ jsx56("a", {
|
|
56752
|
-
className: "opening__door",
|
|
56753
|
-
href: data.ctaHref,
|
|
56754
|
-
children: data.ctaLabel
|
|
56755
|
-
})
|
|
56756
|
-
]
|
|
56757
|
-
}),
|
|
56758
56710
|
/* @__PURE__ */ jsx56(NetworkLayer, {
|
|
56759
56711
|
...placeNetwork(data),
|
|
56760
56712
|
lendable: data.askBox
|
|
@@ -56763,6 +56715,66 @@ function Opening(data) {
|
|
|
56763
56715
|
className: "net-leads",
|
|
56764
56716
|
...{ [ASK_LEADS_ATTRIBUTE]: "" },
|
|
56765
56717
|
"aria-hidden": "true"
|
|
56718
|
+
}),
|
|
56719
|
+
/* @__PURE__ */ jsx56("section", {
|
|
56720
|
+
id: "hero",
|
|
56721
|
+
className: "chapter chapter--opening",
|
|
56722
|
+
"data-title": "Top",
|
|
56723
|
+
children: /* @__PURE__ */ jsxs39("div", {
|
|
56724
|
+
className: "opening__words",
|
|
56725
|
+
...data.askBox ? { [ASK_COLUMN_ATTRIBUTE]: "" } : {},
|
|
56726
|
+
children: [
|
|
56727
|
+
data.kicker && /* @__PURE__ */ jsx56("p", {
|
|
56728
|
+
className: "eyebrow",
|
|
56729
|
+
children: data.kicker
|
|
56730
|
+
}),
|
|
56731
|
+
/* @__PURE__ */ jsxs39("h1", {
|
|
56732
|
+
children: [
|
|
56733
|
+
headingLead,
|
|
56734
|
+
data.headingAccent && /* @__PURE__ */ jsxs39(Fragment21, {
|
|
56735
|
+
children: [
|
|
56736
|
+
" ",
|
|
56737
|
+
/* @__PURE__ */ jsx56("em", {
|
|
56738
|
+
children: data.headingAccent
|
|
56739
|
+
})
|
|
56740
|
+
]
|
|
56741
|
+
})
|
|
56742
|
+
]
|
|
56743
|
+
}),
|
|
56744
|
+
/* @__PURE__ */ jsx56("p", {
|
|
56745
|
+
className: "lede",
|
|
56746
|
+
children: lede
|
|
56747
|
+
}),
|
|
56748
|
+
data.askBox ? /* @__PURE__ */ jsxs39("div", {
|
|
56749
|
+
className: "ask",
|
|
56750
|
+
children: [
|
|
56751
|
+
/* @__PURE__ */ jsx56(AskBoxHost, {
|
|
56752
|
+
prefix: "opening",
|
|
56753
|
+
placeholder: data.prompt ?? undefined
|
|
56754
|
+
}),
|
|
56755
|
+
data.topics.length > 0 && /* @__PURE__ */ jsx56("ul", {
|
|
56756
|
+
className: "ask__topics",
|
|
56757
|
+
"aria-label": "Suggested questions",
|
|
56758
|
+
children: data.topics.map((topic) => /* @__PURE__ */ jsx56("li", {
|
|
56759
|
+
children: /* @__PURE__ */ jsx56("button", {
|
|
56760
|
+
type: "button",
|
|
56761
|
+
"data-atlas-fill": topic,
|
|
56762
|
+
children: topic
|
|
56763
|
+
})
|
|
56764
|
+
}, topic))
|
|
56765
|
+
}),
|
|
56766
|
+
/* @__PURE__ */ jsx56("script", {
|
|
56767
|
+
src: ASK_BOX_SCRIPT_PATH,
|
|
56768
|
+
defer: true
|
|
56769
|
+
})
|
|
56770
|
+
]
|
|
56771
|
+
}) : data.ctaHref && data.ctaLabel && /* @__PURE__ */ jsx56("a", {
|
|
56772
|
+
className: "opening__door",
|
|
56773
|
+
href: data.ctaHref,
|
|
56774
|
+
children: data.ctaLabel
|
|
56775
|
+
})
|
|
56776
|
+
]
|
|
56777
|
+
})
|
|
56766
56778
|
})
|
|
56767
56779
|
]
|
|
56768
56780
|
});
|
|
@@ -57968,4 +57980,4 @@ export {
|
|
|
57968
57980
|
workSections
|
|
57969
57981
|
};
|
|
57970
57982
|
|
|
57971
|
-
//# debugId=
|
|
57983
|
+
//# debugId=213DF796E82D7BB964756E2164756E21
|