@rizom/site-rizom-ai 0.2.0-alpha.264 → 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 +22 -24
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
- package/src/story/living-organism.tsx +3 -8
- package/src/story/runtime.ts +23 -0
- package/src/story.css +11 -18
package/dist/index.js
CHANGED
|
@@ -39062,9 +39062,11 @@ var story_default = `/* The story pages: chapters beside one drawing, under the
|
|
|
39062
39062
|
before the opening in the chapters column and sticks at the figure's centre
|
|
39063
39063
|
line down the whole story (the story is a size container, so nothing in it
|
|
39064
39064
|
can be fixed to the screen). It stays while the opening is read, an answer
|
|
39065
|
-
included, and the words scroll past it.
|
|
39066
|
-
|
|
39067
|
-
|
|
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. */
|
|
39068
39070
|
@media not all and (max-width: 60rem) {
|
|
39069
39071
|
/* The words are the room's column (the kit scrolls it within the screen);
|
|
39070
39072
|
the bar and the opening's 4rem of padding above and below stay clear, so
|
|
@@ -39085,26 +39087,17 @@ var story_default = `/* The story pages: chapters beside one drawing, under the
|
|
|
39085
39087
|
100cqi - max(0px, (100cqi - 80rem) / 2) - clamp(1rem, 5vw, 5rem) -
|
|
39086
39088
|
var(--words) - var(--words-gap) - clamp(1rem, 6vw, 7rem)
|
|
39087
39089
|
);
|
|
39088
|
-
/* Back from the point, lit at once. */
|
|
39089
|
-
transition: opacity 0.3s ease;
|
|
39090
39090
|
}
|
|
39091
39091
|
:where(.chapters) > .net-layer > * {
|
|
39092
39092
|
translate: 0 -50%;
|
|
39093
|
-
|
|
39094
|
-
}
|
|
39095
|
-
.story:has(.figure:not([data-stage="0"])) :where(.chapters) > .net-layer > * {
|
|
39096
|
-
scale: 0;
|
|
39097
|
-
}
|
|
39098
|
-
.story:has(.figure:not([data-stage="0"])) :where(.chapters) > .net-layer,
|
|
39099
|
-
.story:has(.figure:not([data-stage="0"])) .net-leads {
|
|
39100
|
-
opacity: 0;
|
|
39101
|
-
}
|
|
39102
|
-
/* Lit while it draws in; out at the point. */
|
|
39103
|
-
.story:has(.figure:not([data-stage="0"])) :where(.chapters) > .net-layer {
|
|
39104
|
-
transition: opacity 0.6s ease 0.6s;
|
|
39093
|
+
scale: calc(1 - clamp(0, var(--handover, 0), 1));
|
|
39105
39094
|
}
|
|
39106
39095
|
.net-leads {
|
|
39107
|
-
|
|
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);
|
|
39108
39101
|
}
|
|
39109
39102
|
}
|
|
39110
39103
|
.net-svg {
|
|
@@ -40487,11 +40480,7 @@ var livingOrganism = organism({
|
|
|
40487
40480
|
...Object.fromEntries(economy.map((_2, i) => [`E${i + 1}`, i % 3 === 0 ? "lantern" : ""]))
|
|
40488
40481
|
},
|
|
40489
40482
|
stages: [
|
|
40490
|
-
{
|
|
40491
|
-
T1: [C3, 300, 0, 0],
|
|
40492
|
-
T2: [C3, 300, 0, 0],
|
|
40493
|
-
T3: [C3, 300, 0, 0]
|
|
40494
|
-
},
|
|
40483
|
+
{},
|
|
40495
40484
|
{
|
|
40496
40485
|
L: [C3, 300, 8, 1],
|
|
40497
40486
|
T1: at(team2[0], 6),
|
|
@@ -41874,9 +41863,17 @@ function readingLine(viewportHeight, stripBottom) {
|
|
|
41874
41863
|
const beside = 0.45;
|
|
41875
41864
|
return stripBottom === null ? viewportHeight * beside : stripBottom + 1;
|
|
41876
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
|
+
}
|
|
41877
41873
|
var storyRuntimeScript = ASK_ROOM_SCRIPT + `(function () {
|
|
41878
41874
|
${currentChapter.toString()}
|
|
41879
41875
|
${readingLine.toString()}
|
|
41876
|
+
${handoverProgress.toString()}
|
|
41880
41877
|
function init() {
|
|
41881
41878
|
var story = document.querySelector(".story");
|
|
41882
41879
|
if (!story) return;
|
|
@@ -41929,6 +41926,7 @@ var storyRuntimeScript = ASK_ROOM_SCRIPT + `(function () {
|
|
|
41929
41926
|
var current = currentChapter(tops, line);
|
|
41930
41927
|
var stage = currentChapter(tops, line, stageCount);
|
|
41931
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));
|
|
41932
41930
|
chapters.forEach(function (chapter, i) { chapter.classList.toggle("is-current", i === current); });
|
|
41933
41931
|
// A chapter that lights the network keeps the live drawing in view while it is read.
|
|
41934
41932
|
story.classList.toggle("is-asked", !!(chapters[current] && chapters[current].hasAttribute("data-lights-network")));
|
|
@@ -57982,4 +57980,4 @@ export {
|
|
|
57982
57980
|
workSections
|
|
57983
57981
|
};
|
|
57984
57982
|
|
|
57985
|
-
//# debugId=
|
|
57983
|
+
//# debugId=213DF796E82D7BB964756E2164756E21
|