@phis/ui 0.4.0 → 0.4.2
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/components/controls/phi-table-control.d.ts +6 -1
- package/components/controls/phi-table-control.js +16 -4
- package/components/layouts/layout-definitions.d.ts +2 -2
- package/components/layouts/layout-definitions.js +6 -1
- package/components/shell/use-phi-shell-sticky-top.d.ts +5 -0
- package/components/shell/use-phi-shell-sticky-top.js +78 -0
- package/components/widgets/helpers/semantic-html-translation.d.ts +3 -1
- package/components/widgets/helpers/semantic-html-translation.js +8 -3
- package/components/widgets/navigation-descriptor-resolver.server.js +6 -1
- package/components/widgets/shared/markdown-body-client.d.ts +2 -1
- package/components/widgets/shared/markdown-body-client.js +3 -1
- package/components/widgets/shared/markdown-render.js +23 -6
- package/helpers/text-source.d.ts +19 -0
- package/helpers/text-source.js +20 -0
- package/next/config.mjs +1 -1
- package/package.json +1 -1
- package/plugins/runtime-modules/auth/trees/phi-default-pub-confirm-page-tree.js +3 -0
- package/plugins/runtime-modules/auth/trees/phi-default-pub-login-page-tree.js +2 -0
- package/plugins/runtime-modules/auth/trees/phi-default-pub-registration-page-tree.js +3 -0
- package/plugins/runtime-modules/auth/trees/phi-default-pub-reset-password-page-tree.js +3 -0
- package/plugins/runtime-modules/builder/clients/widget-inspector.js +9 -0
- package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +4 -0
- package/plugins/runtime-modules/core/widgets/card/server.js +4 -2
- package/plugins/runtime-modules/core/widgets/description/config.d.ts +3 -0
- package/plugins/runtime-modules/core/widgets/description/config.js +2 -0
- package/plugins/runtime-modules/core/widgets/description/server.js +10 -12
- package/plugins/runtime-modules/core/widgets/entry-list/server.js +2 -2
- package/plugins/runtime-modules/core/widgets/html/server.js +1 -1
- package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +3 -1
- package/plugins/runtime-modules/core/widgets/markdown/config.js +14 -0
- package/plugins/runtime-modules/core/widgets/markdown-toc/server.js +7 -2
- package/plugins/runtime-modules/core/widgets/quick-links/config.d.ts +3 -0
- package/plugins/runtime-modules/core/widgets/quick-links/config.js +2 -0
- package/plugins/runtime-modules/core/widgets/quick-links/plugin.js +4 -2
- package/plugins/runtime-modules/core/widgets/quick-links/server.d.ts +5 -1
- package/plugins/runtime-modules/core/widgets/quick-links/server.js +4 -2
- package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +3 -0
- package/plugins/runtime-modules/core/widgets/simple-text/config.js +2 -0
- package/plugins/runtime-modules/core/widgets/simple-text/plugin.js +1 -1
- package/plugins/runtime-modules/core/widgets/simple-text/server.d.ts +4 -1
- package/plugins/runtime-modules/core/widgets/simple-text/server.js +3 -3
- package/plugins/runtime-modules/core/widgets/table/client.js +1 -1
- package/plugins/runtime-modules/core/widgets/table/config.d.ts +1 -0
- package/plugins/runtime-modules/core/widgets/table/config.js +3 -0
- package/plugins/runtime-modules/phi-default-site-area-preset-tree.js +12 -4
- package/plugins/runtime-modules/public/trees/phi-default-pub-contact-page-tree.js +2 -0
- package/plugins/runtime-modules/public/trees/phi-default-pub-unsubscribe-page-tree.js +3 -0
- package/plugins/runtime-modules/public/trees/phi-default-pub-welcome-page-tree.js +2 -1
- package/plugins/runtime-modules/revisions/trees/phi-default-builder-revisions-page-tree.js +4 -0
- package/server-helpers/translate.d.ts +9 -0
- package/server-helpers/translate.js +14 -0
- package/styles/controls.css +41 -1
- package/styles/root.css +20 -19
- package/types/core-widget-placements.d.ts +8 -0
- package/types/table-widget.d.ts +2 -0
package/styles/root.css
CHANGED
|
@@ -114,29 +114,30 @@ samp {
|
|
|
114
114
|
animation-timing-function: var(--phi-effects-animation-easing, ease-out);
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
:where([data-phi-renderable-block="true"][data-phi-effects-transition="composite"][data-phi-effects-trigger="on_visible"]) {
|
|
118
|
-
animation-composition: var(--phi-effects-animation-composition, replace);
|
|
119
|
-
animation-delay: var(--phi-effects-animation-delay, 0ms);
|
|
120
|
-
animation-duration: var(--phi-effects-animation-duration, 1000ms);
|
|
121
|
-
animation-name: var(--phi-effects-animation-name);
|
|
122
|
-
animation-play-state: paused;
|
|
123
|
-
animation-timing-function: var(--phi-effects-animation-easing, ease-out);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
:where([data-phi-renderable-block="true"][data-phi-effects-transition="composite"][data-phi-effects-trigger="on_visible"][data-phi-effects-state="running"]) {
|
|
127
|
-
animation-play-state: running;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
117
|
/*
|
|
131
|
-
* On ready, the whole rule inside the query that asks whether anything can release it.
|
|
118
|
+
* On visible and on ready, the whole rule inside the query that asks whether anything can release it.
|
|
132
119
|
*
|
|
133
|
-
* The animation is held at its first frame until the
|
|
134
|
-
* content the server streams in a segment of its own can land,
|
|
135
|
-
* behind an entrance that has not started. Only scripting sets the
|
|
136
|
-
* is none the Block would stand at that first frame for good, which
|
|
137
|
-
* without scripting there is no animation at all and the Block is
|
|
120
|
+
* The animation is held at its first frame -- until the Block is scrolled into view, or until the page
|
|
121
|
+
* has finished arriving, so a Widget whose content the server streams in a segment of its own can land,
|
|
122
|
+
* and everything below it can settle, behind an entrance that has not started. Only scripting sets the
|
|
123
|
+
* state that releases it; where there is none the Block would stand at that first frame for good, which
|
|
124
|
+
* for a fade in means invisible. So without scripting there is no animation at all and the Block is
|
|
125
|
+
* simply there.
|
|
138
126
|
*/
|
|
139
127
|
@media (scripting: enabled) {
|
|
128
|
+
:where([data-phi-renderable-block="true"][data-phi-effects-transition="composite"][data-phi-effects-trigger="on_visible"]) {
|
|
129
|
+
animation-composition: var(--phi-effects-animation-composition, replace);
|
|
130
|
+
animation-delay: var(--phi-effects-animation-delay, 0ms);
|
|
131
|
+
animation-duration: var(--phi-effects-animation-duration, 1000ms);
|
|
132
|
+
animation-name: var(--phi-effects-animation-name);
|
|
133
|
+
animation-play-state: paused;
|
|
134
|
+
animation-timing-function: var(--phi-effects-animation-easing, ease-out);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
:where([data-phi-renderable-block="true"][data-phi-effects-transition="composite"][data-phi-effects-trigger="on_visible"][data-phi-effects-state="running"]) {
|
|
138
|
+
animation-play-state: running;
|
|
139
|
+
}
|
|
140
|
+
|
|
140
141
|
:where([data-phi-renderable-block="true"][data-phi-effects-transition="composite"][data-phi-effects-trigger="on_ready"]) {
|
|
141
142
|
animation-composition: var(--phi-effects-animation-composition, replace);
|
|
142
143
|
animation-delay: var(--phi-effects-animation-delay, 0ms);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { PhiBulletListEntry, PhiBulletListStyle } from "../components/widgets/shared/bullet-list-vocabulary";
|
|
2
2
|
import type { PhiRenderableBlockBase } from "./renderable-block";
|
|
3
|
+
import type { PhiTextSource } from "../helpers/text-source";
|
|
3
4
|
import type { PhiRuntimeConditionExpression } from "./runtime-condition";
|
|
4
5
|
import type { PhiSignalRoute, PhiSignalValue } from "./signals";
|
|
5
6
|
import type { PhiCssLength } from "./length";
|
|
@@ -41,6 +42,8 @@ export type PhiWidgetPlacementSignalRoutes = {
|
|
|
41
42
|
type PhiControlPlacement = Omit<PhiControlConfig, "signalRoutes">;
|
|
42
43
|
/** Logical, not left and right: a Site in an RTL locale reads "start" as the right-hand edge. */
|
|
43
44
|
export type PhiMarkdownTextAlign = "start" | "center" | "end" | "justify";
|
|
45
|
+
/** Which edge the text's pictures stand at, with the words flowing past them; logical like the align. */
|
|
46
|
+
export type PhiMarkdownImageFloat = "start" | "end";
|
|
44
47
|
export type PhiMarkdownWidgetPlacement = PhiWidgetPlacementBase & {
|
|
45
48
|
sourceMode?: "inline" | "url";
|
|
46
49
|
markdown?: string;
|
|
@@ -48,6 +51,7 @@ export type PhiMarkdownWidgetPlacement = PhiWidgetPlacementBase & {
|
|
|
48
51
|
sourceLocale?: string;
|
|
49
52
|
revalidateSeconds?: number;
|
|
50
53
|
textAlign?: PhiMarkdownTextAlign;
|
|
54
|
+
imageFloat?: PhiMarkdownImageFloat;
|
|
51
55
|
textBlockSpacingBefore?: PhiSpacingScaleKey;
|
|
52
56
|
textBlockSpacingAfter?: PhiSpacingScaleKey;
|
|
53
57
|
headingBlockSpacingBefore?: PhiSpacingScaleKey;
|
|
@@ -71,6 +75,8 @@ export type PhiSimpleTextWidgetPlacement = PhiWidgetPlacementBase & {
|
|
|
71
75
|
tone?: PhiTextTone;
|
|
72
76
|
marks?: PhiSimpleTextMark[];
|
|
73
77
|
disabled?: boolean;
|
|
78
|
+
/** `"preset"` while the words are a Preset's (`helpers/text-source.ts`). */
|
|
79
|
+
textSource?: PhiTextSource;
|
|
74
80
|
};
|
|
75
81
|
export type PhiDescriptionWidgetPlacement = PhiWidgetPlacementBase & {
|
|
76
82
|
eyebrow?: string;
|
|
@@ -81,6 +87,8 @@ export type PhiDescriptionWidgetPlacement = PhiWidgetPlacementBase & {
|
|
|
81
87
|
asideList?: PhiBulletListStyle;
|
|
82
88
|
footer?: string;
|
|
83
89
|
tone?: PhiTextTone;
|
|
90
|
+
/** `"preset"` while the words are a Preset's (`helpers/text-source.ts`). */
|
|
91
|
+
textSource?: PhiTextSource;
|
|
84
92
|
};
|
|
85
93
|
export type PhiButtonWidgetPlacement = PhiWidgetPlacementBase & PhiControlPlacement & PhiControlBadgeConfig & {
|
|
86
94
|
action?: PhiCommonControlActionKey;
|
package/types/table-widget.d.ts
CHANGED
|
@@ -306,6 +306,8 @@ export type PhiTableWidgetPresentation = PhiControlPresentationConfig & {
|
|
|
306
306
|
borders?: boolean;
|
|
307
307
|
/** The header row; shown unless this says `false`. */
|
|
308
308
|
header?: boolean;
|
|
309
|
+
/** Whether the header row stays at the top while the rows scroll under it; on unless this says `false`. */
|
|
310
|
+
stickyHeader?: boolean;
|
|
309
311
|
footer?: PhiTableFooterConfig;
|
|
310
312
|
summary?: PhiTableSummaryConfig;
|
|
311
313
|
row?: {
|