@xenosystem/blocks 0.13.34 → 0.13.35
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/time/index.js +14 -136
- package/package.json +3 -3
package/dist/time/index.js
CHANGED
|
@@ -2855,7 +2855,7 @@ var timelineManifest = {
|
|
|
2855
2855
|
|
|
2856
2856
|
// src/time/timeline/react/TimelinePanelView.tsx
|
|
2857
2857
|
import { useCallback as useCallback2, useEffect as useEffect2, useRef as useRef2, useSyncExternalStore as useSyncExternalStore2 } from "react";
|
|
2858
|
-
import { Column as Column2, DrawnSurface, EmptyState, FilterChip, SegmentedControl, StatusBar, Text, TextButton as TextButton2, Toolbar, ToolbarGroup } from "@xenosystem/components/chrome";
|
|
2858
|
+
import { Clip, Column as Column2, DrawnSurface, EmptyState, FilterChip, Lane, Marquee, Playhead, Ruler, SegmentedControl, StatusBar, Text, TextButton as TextButton2, Tick, Toolbar, ToolbarGroup } from "@xenosystem/components/chrome";
|
|
2859
2859
|
|
|
2860
2860
|
// src/time/timeline/declaration.ts
|
|
2861
2861
|
import { formatTick as formatTick4 } from "@xenosystem/time-core";
|
|
@@ -3076,96 +3076,29 @@ function TimelineSurface({ controller }) {
|
|
|
3076
3076
|
onPointerCancel: onPointerUp,
|
|
3077
3077
|
onKeyDown,
|
|
3078
3078
|
children: [
|
|
3079
|
-
/* @__PURE__ */ jsx2(
|
|
3080
|
-
"div",
|
|
3081
|
-
{
|
|
3082
|
-
style: {
|
|
3083
|
-
position: "absolute",
|
|
3084
|
-
left: Math.floor(tick.x),
|
|
3085
|
-
bottom: 0,
|
|
3086
|
-
width: 1,
|
|
3087
|
-
height: tick.weight === "major" ? 8 : tick.weight === "medium" ? 5 : 3,
|
|
3088
|
-
background: "var(--xeno-active)"
|
|
3089
|
-
},
|
|
3090
|
-
children: tick.label ? /* @__PURE__ */ jsx2("span", { style: TICK_LABEL, className: "tabular-nums", children: tick.label }) : null
|
|
3091
|
-
},
|
|
3092
|
-
tick.tick
|
|
3093
|
-
)) }),
|
|
3079
|
+
/* @__PURE__ */ jsx2(Ruler, { height: RULER_PX, children: ticks.map((tick) => /* @__PURE__ */ jsx2(Tick, { x: tick.x, weight: tick.weight, label: tick.label ?? void 0 }, tick.tick)) }),
|
|
3094
3080
|
/* @__PURE__ */ jsxs2("div", { style: { position: "absolute", inset: `${RULER_PX}px 0 0 0`, overflow: "hidden" }, children: [
|
|
3095
|
-
state.visible.map((row) => {
|
|
3096
|
-
const
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
const x = scale.tickToX(shown.startTick);
|
|
3102
|
-
const width = Math.max(1, scale.durationToPx(shown.endTick - shown.startTick));
|
|
3103
|
-
return /* @__PURE__ */ jsx2(
|
|
3104
|
-
ClipRect,
|
|
3105
|
-
{
|
|
3106
|
-
clip,
|
|
3107
|
-
left: x - scale.gutterPx,
|
|
3108
|
-
width,
|
|
3109
|
-
selected: selected.has(clip.id)
|
|
3110
|
-
},
|
|
3111
|
-
clip.id
|
|
3112
|
-
);
|
|
3113
|
-
}) })
|
|
3114
|
-
] }, row.track.id);
|
|
3115
|
-
}),
|
|
3081
|
+
state.visible.map((row) => /* @__PURE__ */ jsx2(Lane, { top: row.topPx - scale.scrollTopPx, height: row.heightPx, gutterWidth: scale.gutterPx, name: row.track.name, children: row.clips.map((clip) => {
|
|
3082
|
+
const shown = preview?.clips[clip.id] ?? clip;
|
|
3083
|
+
const x = scale.tickToX(shown.startTick);
|
|
3084
|
+
const width = Math.max(1, scale.durationToPx(shown.endTick - shown.startTick));
|
|
3085
|
+
return /* @__PURE__ */ jsx2(Clip, { id: clip.id, left: x - scale.gutterPx, width, selected: selected.has(clip.id), name: clip.name ?? clip.id, color: clip.color }, clip.id);
|
|
3086
|
+
}) }, row.track.id)),
|
|
3116
3087
|
preview?.marquee ? /* @__PURE__ */ jsx2(
|
|
3117
|
-
|
|
3088
|
+
Marquee,
|
|
3118
3089
|
{
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
scale.tickToX(preview.marquee.toTick) - scale.tickToX(preview.marquee.fromTick)
|
|
3124
|
-
),
|
|
3125
|
-
top: Math.min(preview.marquee.fromY, preview.marquee.toY) - scale.scrollTopPx,
|
|
3126
|
-
height: Math.abs(preview.marquee.toY - preview.marquee.fromY)
|
|
3127
|
-
}
|
|
3090
|
+
left: Math.min(scale.tickToX(preview.marquee.fromTick), scale.tickToX(preview.marquee.toTick)),
|
|
3091
|
+
width: Math.abs(scale.tickToX(preview.marquee.toTick) - scale.tickToX(preview.marquee.fromTick)),
|
|
3092
|
+
top: Math.min(preview.marquee.fromY, preview.marquee.toY) - scale.scrollTopPx,
|
|
3093
|
+
height: Math.abs(preview.marquee.toY - preview.marquee.fromY)
|
|
3128
3094
|
}
|
|
3129
3095
|
) : null
|
|
3130
3096
|
] }),
|
|
3131
|
-
/* @__PURE__ */ jsx2(
|
|
3097
|
+
/* @__PURE__ */ jsx2(Playhead, { x: scale.tickToX(state.playheadTick) })
|
|
3132
3098
|
]
|
|
3133
3099
|
}
|
|
3134
3100
|
);
|
|
3135
3101
|
}
|
|
3136
|
-
function ClipRect({
|
|
3137
|
-
clip,
|
|
3138
|
-
left,
|
|
3139
|
-
width,
|
|
3140
|
-
selected
|
|
3141
|
-
}) {
|
|
3142
|
-
return /* @__PURE__ */ jsx2(
|
|
3143
|
-
"div",
|
|
3144
|
-
{
|
|
3145
|
-
"data-clip-id": clip.id,
|
|
3146
|
-
title: clip.name ?? clip.id,
|
|
3147
|
-
style: {
|
|
3148
|
-
position: "absolute",
|
|
3149
|
-
left,
|
|
3150
|
-
width,
|
|
3151
|
-
top: 2,
|
|
3152
|
-
bottom: 2,
|
|
3153
|
-
// Rectangles with a corner radius. Never a circle.
|
|
3154
|
-
borderRadius: 2,
|
|
3155
|
-
background: selected ? "var(--xeno-control)" : "var(--xeno-border)",
|
|
3156
|
-
border: `1px solid ${selected ? "var(--xeno-active)" : "var(--xeno-control)"}`,
|
|
3157
|
-
overflow: "hidden",
|
|
3158
|
-
fontSize: 10,
|
|
3159
|
-
lineHeight: "14px",
|
|
3160
|
-
padding: width >= 40 ? "0 4px" : 0,
|
|
3161
|
-
whiteSpace: "nowrap",
|
|
3162
|
-
color: "var(--xeno-text)",
|
|
3163
|
-
boxSizing: "border-box"
|
|
3164
|
-
},
|
|
3165
|
-
children: width >= 40 ? clip.name ?? "" : null
|
|
3166
|
-
}
|
|
3167
|
-
);
|
|
3168
|
-
}
|
|
3169
3102
|
function hitTest(state, x, y) {
|
|
3170
3103
|
const scale = state.scale;
|
|
3171
3104
|
if (x < scale.gutterPx) return { target: { kind: "lane" }, trackIndex: -1 };
|
|
@@ -3190,61 +3123,6 @@ function hitTest(state, x, y) {
|
|
|
3190
3123
|
}
|
|
3191
3124
|
return { target: { kind: "lane" }, trackIndex: -1 };
|
|
3192
3125
|
}
|
|
3193
|
-
var RULER = {
|
|
3194
|
-
position: "absolute",
|
|
3195
|
-
top: 0,
|
|
3196
|
-
left: 0,
|
|
3197
|
-
right: 0,
|
|
3198
|
-
borderBottom: "1px solid var(--xeno-border)"
|
|
3199
|
-
};
|
|
3200
|
-
var TICK_LABEL = {
|
|
3201
|
-
position: "absolute",
|
|
3202
|
-
left: 3,
|
|
3203
|
-
top: -12,
|
|
3204
|
-
fontSize: 9,
|
|
3205
|
-
color: "var(--xeno-active)",
|
|
3206
|
-
whiteSpace: "nowrap"
|
|
3207
|
-
};
|
|
3208
|
-
var GUTTER = {
|
|
3209
|
-
position: "absolute",
|
|
3210
|
-
left: 0,
|
|
3211
|
-
top: 0,
|
|
3212
|
-
bottom: 0,
|
|
3213
|
-
borderRight: "1px solid var(--xeno-border)",
|
|
3214
|
-
borderBottom: "1px solid var(--xeno-border-subtle)",
|
|
3215
|
-
display: "flex",
|
|
3216
|
-
alignItems: "center",
|
|
3217
|
-
padding: "0 6px",
|
|
3218
|
-
boxSizing: "border-box"
|
|
3219
|
-
};
|
|
3220
|
-
var TRACK_NAME = {
|
|
3221
|
-
fontSize: 10,
|
|
3222
|
-
color: "var(--xeno-text)",
|
|
3223
|
-
overflow: "hidden",
|
|
3224
|
-
textOverflow: "ellipsis",
|
|
3225
|
-
whiteSpace: "nowrap"
|
|
3226
|
-
};
|
|
3227
|
-
var LANE = {
|
|
3228
|
-
position: "absolute",
|
|
3229
|
-
right: 0,
|
|
3230
|
-
top: 0,
|
|
3231
|
-
bottom: 0,
|
|
3232
|
-
borderBottom: "1px solid var(--xeno-border-subtle)"
|
|
3233
|
-
};
|
|
3234
|
-
var MARQUEE = {
|
|
3235
|
-
position: "absolute",
|
|
3236
|
-
border: "1px solid var(--xeno-active)",
|
|
3237
|
-
background: "var(--xeno-border-subtle)",
|
|
3238
|
-
pointerEvents: "none"
|
|
3239
|
-
};
|
|
3240
|
-
var PLAYHEAD = {
|
|
3241
|
-
position: "absolute",
|
|
3242
|
-
top: 0,
|
|
3243
|
-
bottom: 0,
|
|
3244
|
-
width: 1,
|
|
3245
|
-
background: "var(--xeno-text)",
|
|
3246
|
-
pointerEvents: "none"
|
|
3247
|
-
};
|
|
3248
3126
|
var TIMELINE_RUNTIME_UNITS = ["timeline/Surface"];
|
|
3249
3127
|
function timelineRuntimeComponents(controller) {
|
|
3250
3128
|
return { "timeline/Surface": () => /* @__PURE__ */ jsx2(TimelineSurface, { controller }) };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xenosystem/blocks",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.35",
|
|
4
4
|
"description": "XENO Blocks — rung 3 of the front ladder: components composed into a contract-bearing unit (manifest: ports, intents, commands, agent surface), rendered by @xenosystem/workbench. ONE package, one subpath per family (/auth, /edit, /data, /time, /ops, /trust, /agent), one named export per block — XENO PACKAGE NAMING - STANDARD.md.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"@duckdb/duckdb-wasm": ">=1.28.0",
|
|
66
66
|
"@xenosystem/block-sdk": ">=0.3.4 <1",
|
|
67
|
-
"@xenosystem/components": ">=0.
|
|
67
|
+
"@xenosystem/components": ">=0.33.0 <1",
|
|
68
68
|
"@xenosystem/data-core": "^0.1.0",
|
|
69
69
|
"@xenosystem/elements": ">=0.0.1",
|
|
70
70
|
"@xenosystem/elements-react": ">=0.0.1",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@types/react": "^19.0.0",
|
|
82
82
|
"@types/react-dom": "^19.0.0",
|
|
83
83
|
"@xenosystem/block-sdk": "^0.3.4",
|
|
84
|
-
"@xenosystem/components": "^0.
|
|
84
|
+
"@xenosystem/components": "^0.33.0",
|
|
85
85
|
"@xenosystem/data-core": "^0.1.0",
|
|
86
86
|
"@xenosystem/elements": "0.0.1",
|
|
87
87
|
"@xenosystem/elements-react": "0.0.1",
|