@nowline/embed 0.0.0-dev.20261007205714.g1dd148a → 0.0.0-dev.20261008023422.ge014ee0

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/meta.json CHANGED
@@ -59,7 +59,7 @@
59
59
  "format": "esm"
60
60
  },
61
61
  "../layout/dist/themes/shared.js": {
62
- "bytes": 17068,
62
+ "bytes": 17498,
63
63
  "imports": [],
64
64
  "format": "esm"
65
65
  },
@@ -5671,17 +5671,17 @@
5671
5671
  "format": "esm"
5672
5672
  },
5673
5673
  "../core/dist/i18n/codes.js": {
5674
- "bytes": 2477,
5674
+ "bytes": 2493,
5675
5675
  "imports": [],
5676
5676
  "format": "esm"
5677
5677
  },
5678
5678
  "../core/dist/i18n/messages.en.js": {
5679
- "bytes": 20058,
5679
+ "bytes": 20246,
5680
5680
  "imports": [],
5681
5681
  "format": "esm"
5682
5682
  },
5683
5683
  "../core/dist/i18n/messages.fr.js": {
5684
- "bytes": 23729,
5684
+ "bytes": 23972,
5685
5685
  "imports": [],
5686
5686
  "format": "esm"
5687
5687
  },
@@ -5790,7 +5790,7 @@
5790
5790
  "format": "esm"
5791
5791
  },
5792
5792
  "../core/dist/language/nowline-validator.js": {
5793
- "bytes": 81710,
5793
+ "bytes": 84689,
5794
5794
  "imports": [
5795
5795
  {
5796
5796
  "path": "../../node_modules/.pnpm/langium@4.4.0/node_modules/langium/lib/index.js",
@@ -9165,7 +9165,7 @@
9165
9165
  "format": "esm"
9166
9166
  },
9167
9167
  "../layout/dist/nodes/roadmap-node.js": {
9168
- "bytes": 47816,
9168
+ "bytes": 48232,
9169
9169
  "imports": [
9170
9170
  {
9171
9171
  "path": "../layout/dist/band-scale.js",
@@ -9469,7 +9469,7 @@
9469
9469
  "format": "esm"
9470
9470
  },
9471
9471
  "../layout/dist/index.js": {
9472
- "bytes": 4731,
9472
+ "bytes": 4784,
9473
9473
  "imports": [
9474
9474
  {
9475
9475
  "path": "../layout/dist/calendar-resolver.js",
@@ -9623,7 +9623,7 @@
9623
9623
  "format": "esm"
9624
9624
  },
9625
9625
  "../renderer/dist/svg/render.js": {
9626
- "bytes": 106315,
9626
+ "bytes": 106360,
9627
9627
  "imports": [
9628
9628
  {
9629
9629
  "path": "../layout/dist/index.js",
@@ -9838,7 +9838,7 @@
9838
9838
  "imports": [],
9839
9839
  "exports": [],
9840
9840
  "inputs": {},
9841
- "bytes": 3770869
9841
+ "bytes": 3777528
9842
9842
  },
9843
9843
  "dist/nowline.min.js": {
9844
9844
  "imports": [],
@@ -9996,7 +9996,7 @@
9996
9996
  "bytesInOutput": 0
9997
9997
  },
9998
9998
  "../layout/dist/themes/shared.js": {
9999
- "bytesInOutput": 910
9999
+ "bytesInOutput": 999
10000
10000
  },
10001
10001
  "../layout/dist/group-title-tab-geometry.js": {
10002
10002
  "bytesInOutput": 87
@@ -10791,10 +10791,10 @@
10791
10791
  "bytesInOutput": 182
10792
10792
  },
10793
10793
  "../core/dist/i18n/messages.en.js": {
10794
- "bytesInOutput": 15111
10794
+ "bytesInOutput": 15289
10795
10795
  },
10796
10796
  "../core/dist/i18n/messages.fr.js": {
10797
- "bytesInOutput": 19110
10797
+ "bytesInOutput": 19343
10798
10798
  },
10799
10799
  "../core/dist/i18n/messages.fr-CA.js": {
10800
10800
  "bytesInOutput": 10
@@ -10821,7 +10821,7 @@
10821
10821
  "bytesInOutput": 9921
10822
10822
  },
10823
10823
  "../core/dist/language/nowline-validator.js": {
10824
- "bytesInOutput": 26242
10824
+ "bytesInOutput": 27123
10825
10825
  },
10826
10826
  "../core/dist/language/include-waves.js": {
10827
10827
  "bytesInOutput": 3829
@@ -10950,10 +10950,10 @@
10950
10950
  "bytesInOutput": 5667
10951
10951
  },
10952
10952
  "../layout/dist/nodes/roadmap-node.js": {
10953
- "bytesInOutput": 9518
10953
+ "bytesInOutput": 9556
10954
10954
  },
10955
10955
  "../layout/dist/layout.js": {
10956
- "bytesInOutput": 14234
10956
+ "bytesInOutput": 14236
10957
10957
  },
10958
10958
  "../layout/dist/layout-insights.js": {
10959
10959
  "bytesInOutput": 2374
@@ -10983,7 +10983,7 @@
10983
10983
  "bytesInOutput": 728
10984
10984
  },
10985
10985
  "../renderer/dist/svg/render.js": {
10986
- "bytesInOutput": 29971
10986
+ "bytesInOutput": 29977
10987
10987
  },
10988
10988
  "../renderer/dist/index.js": {
10989
10989
  "bytesInOutput": 0
@@ -11013,7 +11013,7 @@
11013
11013
  "bytesInOutput": 257
11014
11014
  }
11015
11015
  },
11016
- "bytes": 733416
11016
+ "bytes": 734843
11017
11017
  }
11018
11018
  }
11019
11019
  }
@@ -1,4 +1,4 @@
1
- /*! @nowline/embed 0.0.0-dev.20261007205714.g1dd148a sha=1dd148a built=2026-10-07T13:56:51-07:00 */
1
+ /*! @nowline/embed 0.0.0-dev.20261008023422.ge014ee0 sha=e014ee0 built=2026-10-07T19:33:55-07:00 */
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -7354,8 +7354,19 @@ var CORNER_RADIUS_PX = {
7354
7354
  };
7355
7355
  var MIN_ITEM_WIDTH = 8;
7356
7356
  var PROGRESS_STRIP_HEIGHT_PX = 4;
7357
- var TIMELINE_TICK_PANEL_HEIGHT_PX = 24;
7358
- var TIMELINE_TICK_LABEL_BASELINE_OFFSET_PX = 15;
7357
+ var HEADER_HEIGHT_PX = {
7358
+ none: 0,
7359
+ xs: 16,
7360
+ sm: 20,
7361
+ md: 24,
7362
+ lg: 32,
7363
+ xl: 40
7364
+ };
7365
+ var TIMELINE_TICK_PANEL_HEIGHT_PX = HEADER_HEIGHT_PX.md;
7366
+ function timelineTickLabelBaselineOffsetPx(panelHeightPx) {
7367
+ return Math.round(panelHeightPx / 2 + 3);
7368
+ }
7369
+ var TIMELINE_TICK_LABEL_BASELINE_OFFSET_PX = timelineTickLabelBaselineOffsetPx(TIMELINE_TICK_PANEL_HEIGHT_PX);
7359
7370
  var TIMELINE_TICK_LABEL_FONT_SIZE_PX = 10;
7360
7371
  var TRACK_BLOCK_TAIL_GUTTER_PX = 8;
7361
7372
  var FRAME_TAB_HEIGHT_PX = 22;
@@ -29929,6 +29940,7 @@ var messages = {
29929
29940
  "NL.W0701": (a) => `Wave "${a.id}" in "${a.path}" differs from this file's definition (${a.fields.map((f) => `${f.field} ${f.there === "" ? "none" : `"${f.there}"`} there, ${f.here === "" ? "none" : `"${f.here}"`} here`).join("; ")}); this file's definition is used.`,
29930
29941
  "NL.W0702": (a) => `"wave:" on ${a.target.kind === "default" ? `"default ${a.target.entityType}"` : !a.target.name && a.target.line !== void 0 ? `the ${a.target.kind === "parallel" ? "parallel block" : a.target.kind} on line ${a.target.line}` : `${a.target.kind} "${a.target.name}"`} is ignored: this roadmap declares no waves. Declare waves with "wave <id>" to use it, or remove the property.`,
29931
29942
  "NL.W0703": (a) => `"${a.key}" on "default ${a.entityType}" is ignored: it is a roadmap-only style key. Set it on "default roadmap" instead.`,
29943
+ "NL.W0704": (a) => `"timeline-position:${a.position}" draws no dates: "header-height:none" removes every timeline date strip. Set header-height to xs, sm, md, lg or xl to show them.`,
29932
29944
  // Waves
29933
29945
  "NL.E1100": (a) => `Wave ${a.title === void 0 ? `on line ${a.line}` : `"${a.title}"`} needs an explicit identifier so work can reference it with wave:<id>, e.g. wave build "Build".`,
29934
29946
  "NL.E1101": (a) => {
@@ -30188,6 +30200,7 @@ var messages2 = {
30188
30200
  "NL.W0701": (a) => `La vague ${q(a.id)} dans ${q(a.path)} diff\xE8re de la d\xE9finition de ce fichier (${a.fields.map((f) => `${FIELD_FR[f.field]} ${noneIfEmpty(f.there)} l\xE0-bas, ${noneIfEmpty(f.here)} ici`).join("\xA0; ")})\xA0; la d\xE9finition de ce fichier est utilis\xE9e.`,
30189
30201
  "NL.W0702": (a) => `\xAB\xA0wave:\xA0\xBB sur ${a.target.kind === "default" ? q(`default ${a.target.entityType}`) : !a.target.name && a.target.line !== void 0 ? a.target.kind === "item" || a.target.kind === "group" || a.target.kind === "parallel" ? entityText2({ kind: a.target.kind, name: "", line: a.target.line }) : `${a.target.kind} \xE0 la ligne ${a.target.line}` : `${a.target.kind} ${q(a.target.name)}`} est ignor\xE9\xA0: cette roadmap ne d\xE9clare aucune vague. D\xE9clarez des vagues avec \xAB\xA0wave <id>\xA0\xBB pour l'utiliser, ou retirez la propri\xE9t\xE9.`,
30190
30202
  "NL.W0703": (a) => `${q(a.key)} sur ${q(`default ${a.entityType}`)} est ignor\xE9\xA0: c'est une cl\xE9 de style propre \xE0 la roadmap. D\xE9finissez-la plut\xF4t sur \xAB\xA0default roadmap\xA0\xBB.`,
30203
+ "NL.W0704": (a) => `${q(`timeline-position:${a.position}`)} n'affiche aucune date\xA0: ${q("header-height:none")} retire tous les bandeaux de dates de la frise. Donnez \xE0 header-height la valeur xs, sm, md, lg ou xl pour les afficher.`,
30191
30204
  // Vagues
30192
30205
  "NL.E1100": (a) => `La vague ${a.title === void 0 ? `\xE0 la ligne ${a.line}` : q(a.title)} exige un identifiant explicite pour que le travail puisse la r\xE9f\xE9rencer avec wave:<id>, p.\xA0ex. wave build "Build".`,
30193
30206
  "NL.E1101": (a) => {
@@ -31925,6 +31938,7 @@ function registerValidationChecks(services) {
31925
31938
  validator.checkWaves,
31926
31939
  validator.checkDuplicateSizeIds,
31927
31940
  validator.checkCalendarBlockConsistency,
31941
+ validator.checkHiddenTimelineStrip,
31928
31942
  validator.checkPersonDeclarations,
31929
31943
  validator.checkDuplicateSymbolIds,
31930
31944
  validator.checkSymbolReferences
@@ -32707,6 +32721,71 @@ var NowlineValidator = class {
32707
32721
  }
32708
32722
  }
32709
32723
  }
32724
+ // --- Rule 20: header-height:none hides the timeline-position strips (NL.W0704) ---
32725
+ // `none` drops every date strip, so `timeline-position:bottom|both` draws
32726
+ // nothing. Walks the roadmap's style chain the way @nowline/layout's
32727
+ // resolveStyle does: `default roadmap`, then the style of each label on the
32728
+ // roadmap line, then the roadmap's own `style:`, a later key winning. A
32729
+ // style or label this file does not declare (one from an include) could
32730
+ // reset either key, so the check stays silent then.
32731
+ checkHiddenTimelineStrip(file, accept) {
32732
+ const roadmap = file.roadmapDecl;
32733
+ if (!roadmap)
32734
+ return;
32735
+ const styles = /* @__PURE__ */ new Map();
32736
+ let defaultRoadmap;
32737
+ for (const entry of file.configEntries) {
32738
+ if (isStyleDeclaration(entry) && entry.name && !styles.has(entry.name)) {
32739
+ styles.set(entry.name, entry);
32740
+ } else if (isDefaultDeclaration(entry) && entry.entityType === "roadmap") {
32741
+ defaultRoadmap ?? (defaultRoadmap = entry);
32742
+ }
32743
+ }
32744
+ const labelStyles = /* @__PURE__ */ new Map();
32745
+ for (const entry of file.roadmapEntries) {
32746
+ if (isLabelDeclaration(entry) && entry.name && !labelStyles.has(entry.name)) {
32747
+ const ref = entry.properties.find((p) => propKey2(p) === "style");
32748
+ labelStyles.set(entry.name, ref?.value);
32749
+ }
32750
+ }
32751
+ let headerHeight;
32752
+ let position;
32753
+ const apply = (props) => {
32754
+ for (const prop of props) {
32755
+ const key = propKey2(prop);
32756
+ if (key === "header-height")
32757
+ headerHeight = prop;
32758
+ else if (key === "timeline-position")
32759
+ position = prop;
32760
+ }
32761
+ };
32762
+ const applyStyle = (id) => {
32763
+ if (!id)
32764
+ return true;
32765
+ const decl = styles.get(id);
32766
+ if (decl)
32767
+ apply(decl.properties);
32768
+ return decl !== void 0;
32769
+ };
32770
+ if (defaultRoadmap)
32771
+ apply(defaultRoadmap.properties);
32772
+ const labelsProp = roadmap.properties.find((p) => propKey2(p) === "labels");
32773
+ const labelIds = labelsProp?.value ? [labelsProp.value] : labelsProp?.values ?? [];
32774
+ for (const id of labelIds) {
32775
+ if (!labelStyles.has(id) || !applyStyle(labelStyles.get(id)))
32776
+ return;
32777
+ }
32778
+ const styleProp = roadmap.properties.find((p) => propKey2(p) === "style");
32779
+ if (!applyStyle(styleProp?.value))
32780
+ return;
32781
+ if (headerHeight?.value !== "none")
32782
+ return;
32783
+ if (position?.value !== "bottom" && position?.value !== "both")
32784
+ return;
32785
+ acceptTr(accept, "warning", { node: position, property: "value" }, "NL.W0704", {
32786
+ position: position.value
32787
+ });
32788
+ }
32710
32789
  // --- Rule 7 (calendar): calendar block only valid when roadmap calendar:custom ---
32711
32790
  // Rule 8: custom calendar requires all four fields.
32712
32791
  checkCalendarBlockConsistency(file, accept) {
@@ -38002,8 +38081,9 @@ var RoadmapNode = class {
38002
38081
  const { startDate, endDate } = deps.computeDateWindow(file, { cal, sizes, calendar }, resolved, options.today, scale, plan);
38003
38082
  const headerStyle = resolveStyle("roadmap", file.roadmapDecl?.properties ?? [], styleCtx);
38004
38083
  const isBeside = headerStyle.headerPosition === "beside";
38005
- const showTopTickPanel = headerStyle.timelinePosition !== "bottom";
38006
- const showBottomTickPanel = headerStyle.timelinePosition === "bottom" || headerStyle.timelinePosition === "both";
38084
+ const tickPanelBucketHeight = HEADER_HEIGHT_PX[headerStyle.headerHeight] ?? HEADER_HEIGHT_PX.md;
38085
+ const showTopTickPanel = tickPanelBucketHeight > 0 && headerStyle.timelinePosition !== "bottom";
38086
+ const showBottomTickPanel = tickPanelBucketHeight > 0 && (headerStyle.timelinePosition === "bottom" || headerStyle.timelinePosition === "both");
38007
38087
  const nonWorking = isNonWorkingDisplay(options.nonWorking) ? options.nonWorking : headerStyle.nonWorking;
38008
38088
  const showsNonWorking = nonWorking === "show" && calendar.hasNonWorkingDays;
38009
38089
  const titleStr = file.roadmapDecl?.title ?? file.roadmapDecl?.name ?? "";
@@ -38022,7 +38102,7 @@ var RoadmapNode = class {
38022
38102
  const willHaveNowline = options.today !== void 0 && options.today >= startDate && options.today <= endDate;
38023
38103
  const hasMarkerEntities = resolved.content.anchors.size + resolved.content.milestones.size > 0;
38024
38104
  const pillRowHeight = willHaveNowline ? NOW_PILL_HEIGHT_PX : 0;
38025
- const tickPanelHeight = showTopTickPanel ? TIMELINE_TICK_PANEL_HEIGHT_PX : 0;
38105
+ const tickPanelHeight = showTopTickPanel ? tickPanelBucketHeight : 0;
38026
38106
  const waveStripHeight = plan ? WAVE_STRIP_HEIGHT_PX : 0;
38027
38107
  const timeScale = new TimeScale({
38028
38108
  domain: [startDate, endDate],
@@ -38343,8 +38423,8 @@ var RoadmapNode = class {
38343
38423
  if (showBottomTickPanel) {
38344
38424
  const gapAbovePanel = 8;
38345
38425
  ctx.timeline.bottomTickPanelY = ctx.chartBottomY + gapAbovePanel;
38346
- ctx.timeline.bottomTickPanelHeight = TIMELINE_TICK_PANEL_HEIGHT_PX;
38347
- ctx.chartBottomY += gapAbovePanel + TIMELINE_TICK_PANEL_HEIGHT_PX;
38426
+ ctx.timeline.bottomTickPanelHeight = tickPanelBucketHeight;
38427
+ ctx.chartBottomY += gapAbovePanel + tickPanelBucketHeight;
38348
38428
  }
38349
38429
  const strings = localeStrings(locale);
38350
38430
  const builtWaves = ctx.waves ? buildWaves(ctx.waves, ctx, strings, swimlanes, includes) : void 0;
@@ -40622,7 +40702,7 @@ function renderTimeline(t, palette, fonts) {
40622
40702
  if (hasTopTickPanel) {
40623
40703
  parts.push(textTag({
40624
40704
  x: num(tick.labelX),
40625
- y: num(tickPanelY + TIMELINE_TICK_LABEL_BASELINE_OFFSET_PX),
40705
+ y: num(tickPanelY + timelineTickLabelBaselineOffsetPx(tickPanelHeight)),
40626
40706
  "font-family": fonts.sans,
40627
40707
  "font-size": TIMELINE_TICK_LABEL_FONT_SIZE_PX,
40628
40708
  fill: labelColor,
@@ -40632,7 +40712,7 @@ function renderTimeline(t, palette, fonts) {
40632
40712
  if (hasBottomTickPanel) {
40633
40713
  parts.push(textTag({
40634
40714
  x: num(tick.labelX),
40635
- y: num(bottomTickPanelY + TIMELINE_TICK_LABEL_BASELINE_OFFSET_PX),
40715
+ y: num(bottomTickPanelY + timelineTickLabelBaselineOffsetPx(bottomTickPanelHeight)),
40636
40716
  "font-family": fonts.sans,
40637
40717
  "font-size": TIMELINE_TICK_LABEL_FONT_SIZE_PX,
40638
40718
  fill: labelColor,
@@ -42851,8 +42931,8 @@ function effectiveTheme(theme, systemTheme) {
42851
42931
  }
42852
42932
 
42853
42933
  // src/index.ts
42854
- var version = true ? "0.0.0-dev.20261007205714.g1dd148a" : "0.0.0";
42855
- var sha = true ? "1dd148a" : "unknown";
42934
+ var version = true ? "0.0.0-dev.20261008023422.ge014ee0" : "0.0.0";
42935
+ var sha = true ? "e014ee0" : "unknown";
42856
42936
  var DEFAULT_SELECTOR = "pre code.language-nowline, code.language-nowline";
42857
42937
  var initialConfig = {
42858
42938
  theme: "auto",