@triptease/design-system-mcp 1.2.10 → 1.2.12

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.
Files changed (2) hide show
  1. package/dist/index.js +235 -22
  2. package/package.json +9 -7
package/dist/index.js CHANGED
@@ -7656,11 +7656,11 @@ function datetimeRegex(args) {
7656
7656
  regex = `${regex}(${opts.join("|")})`;
7657
7657
  return new RegExp(`^${regex}$`);
7658
7658
  }
7659
- function isValidIP(ip, version8) {
7660
- if ((version8 === "v4" || !version8) && ipv4Regex.test(ip)) {
7659
+ function isValidIP(ip, version10) {
7660
+ if ((version10 === "v4" || !version10) && ipv4Regex.test(ip)) {
7661
7661
  return true;
7662
7662
  }
7663
- if ((version8 === "v6" || !version8) && ipv6Regex.test(ip)) {
7663
+ if ((version10 === "v6" || !version10) && ipv6Regex.test(ip)) {
7664
7664
  return true;
7665
7665
  }
7666
7666
  return false;
@@ -7687,11 +7687,11 @@ function isValidJWT(jwt2, alg) {
7687
7687
  return false;
7688
7688
  }
7689
7689
  }
7690
- function isValidCidr(ip, version8) {
7691
- if ((version8 === "v4" || !version8) && ipv4CidrRegex.test(ip)) {
7690
+ function isValidCidr(ip, version10) {
7691
+ if ((version10 === "v4" || !version10) && ipv4CidrRegex.test(ip)) {
7692
7692
  return true;
7693
7693
  }
7694
- if ((version8 === "v6" || !version8) && ipv6CidrRegex.test(ip)) {
7694
+ if ((version10 === "v6" || !version10) && ipv6CidrRegex.test(ip)) {
7695
7695
  return true;
7696
7696
  }
7697
7697
  return false;
@@ -11644,10 +11644,10 @@ var nanoid = /^[a-zA-Z0-9_-]{21}$/;
11644
11644
  var duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;
11645
11645
  var extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
11646
11646
  var guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
11647
- var uuid = (version8) => {
11648
- if (!version8)
11647
+ var uuid = (version10) => {
11648
+ if (!version10)
11649
11649
  return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;
11650
- return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version8}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
11650
+ return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version10}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
11651
11651
  };
11652
11652
  var uuid4 = /* @__PURE__ */ uuid(4);
11653
11653
  var uuid6 = /* @__PURE__ */ uuid(6);
@@ -23302,7 +23302,7 @@ var StdioServerTransport = class {
23302
23302
  // package.json
23303
23303
  var package_default = {
23304
23304
  name: "@triptease/design-system-mcp",
23305
- version: "1.2.10",
23305
+ version: "1.2.12",
23306
23306
  description: "MCP server for Triptease design system documentation",
23307
23307
  type: "module",
23308
23308
  main: "dist/index.js",
@@ -23323,23 +23323,25 @@ var package_default = {
23323
23323
  node: ">=18.0.0"
23324
23324
  },
23325
23325
  componentVersions: {
23326
- "@triptease/stylesheet": "2.1.4",
23326
+ "@triptease/stylesheet": "2.1.9",
23327
23327
  "@triptease/tt-bar-chart": "1.1.3",
23328
23328
  "@triptease/tt-combobox": "5.7.4",
23329
23329
  "@triptease/tt-data-point": "1.1.1",
23330
23330
  "@triptease/tt-dataset": "1.1.1",
23331
- "@triptease/tt-date-picker": "6.3.1",
23332
- "@triptease/tt-date-range-picker": "6.4.1",
23333
- "@triptease/tt-dialog": "5.2.1",
23331
+ "@triptease/tt-date-picker": "6.3.5",
23332
+ "@triptease/tt-date-range-picker": "6.5.4",
23333
+ "@triptease/tt-dialog": "5.2.2",
23334
23334
  "@triptease/tt-highlight": "1.1.1",
23335
23335
  "@triptease/tt-line-chart": "1.1.3",
23336
23336
  "@triptease/tt-milestone": "1.1.1",
23337
23337
  "@triptease/tt-paginator": "1.0.7",
23338
23338
  "@triptease/tt-table-wrapper": "1.0.6",
23339
- "@triptease/tt-tabs": "1.1.0"
23339
+ "@triptease/tt-tabs": "1.1.0",
23340
+ "@triptease/tt-repeat-date-picker": "1.0.0",
23341
+ "@triptease/tt-weekday-picker": "1.0.1"
23340
23342
  },
23341
23343
  dependencies: {
23342
- "@triptease/stylesheet": "2.1.8"
23344
+ "@triptease/stylesheet": "2.1.9"
23343
23345
  },
23344
23346
  devDependencies: {
23345
23347
  "@modelcontextprotocol/sdk": "1.26.0",
@@ -24015,10 +24017,10 @@ var card_default = {
24015
24017
  };
24016
24018
 
24017
24019
  // src/utils/buildCDNUrls.ts
24018
- var buildCDNUrl = (componentName, version8) => {
24019
- return `https://cdn.design-system.triptease.io/${componentName}/${version8}/${componentName}.js`;
24020
+ var buildCDNUrl = (componentName, version10) => {
24021
+ return `https://cdn.design-system.triptease.io/${componentName}/${version10}/${componentName}.js`;
24020
24022
  };
24021
- var buildMajorVersion = (version8) => `${version8.split(".")[0]}.x.x`;
24023
+ var buildMajorVersion = (version10) => `${version10.split(".")[0]}.x.x`;
24022
24024
 
24023
24025
  // src/manifests/components/entries/table.ts
24024
24026
  var tableWrapperVersion = package_default.componentVersions["@triptease/tt-table-wrapper"];
@@ -24601,7 +24603,7 @@ var datePicker_default = {
24601
24603
  examples: [
24602
24604
  {
24603
24605
  title: "Basic usage",
24604
- description: "Date picker for selecting a single date. Value is in ISO format (YYYY-MM-DD). Use mindate and maxdate attributes to restrict selectable dates.",
24606
+ description: "Date picker for selecting a single date. Value is in ISO format (YYYY-MM-DD). Use mindate and maxdate attributes to restrict selectable dates. The calendar opens below the input by default and automatically opens above if there is insufficient space below the viewport.",
24605
24607
  code: `<label for="date-basic">Select a date</label>
24606
24608
  <tt-date-picker id="date-basic"></tt-date-picker>`
24607
24609
  },
@@ -24686,7 +24688,7 @@ var dateRangePicker_default = {
24686
24688
  examples: [
24687
24689
  {
24688
24690
  title: "Basic usage",
24689
- description: "Date range picker for selecting start and end dates. Dates are in ISO format (YYYY-MM-DD). Use start and end attributes for default values. Use mindate and maxdate attributes to restrict dates.",
24691
+ description: "Date range picker for selecting start and end dates. Dates are in ISO format (YYYY-MM-DD). Use start and end attributes for default values. Use mindate and maxdate attributes to restrict dates. The calendar opens below the input by default and automatically opens above if there is insufficient space below the viewport.",
24690
24692
  code: `<label for="daterange-basic">Select date range</label>
24691
24693
  <tt-date-range-picker id="daterange-basic"></tt-date-range-picker>`
24692
24694
  },
@@ -25524,6 +25526,215 @@ var paginator_default = {
25524
25526
  }
25525
25527
  };
25526
25528
 
25529
+ // src/manifests/components/entries/weekdayPicker.ts
25530
+ var version8 = package_default.componentVersions["@triptease/tt-weekday-picker"];
25531
+ var weekdayPicker_default = {
25532
+ "weekday-picker": {
25533
+ name: "Weekday Picker",
25534
+ description: "A weekday picker lets users select one or more days of the week. Days are represented as lowercase strings (sunday through saturday), ordered from Sunday. In single mode value is a string; in multi mode it is a string array in week order.",
25535
+ ssrSafe: true,
25536
+ element: "tt-weekday-picker",
25537
+ usageGuidance: {
25538
+ whenToUse: [
25539
+ "A user needs to choose one or more days of the week"
25540
+ ],
25541
+ avoid: [
25542
+ "A specific calendar date is needed \u2014 use the Date Picker instead",
25543
+ "The choice is binary (e.g. weekdays vs. weekends) \u2014 a select or radio group may be clearer"
25544
+ ],
25545
+ accessibility: [
25546
+ 'The component uses role="toolbar" with role="radio" buttons (single mode) or role="checkbox" buttons (multi mode). The Toolbar pattern is used because the buttons need arrow key navigation within a single tab stop, and because single mode must allow deselection \u2014 which a native radio group does not support',
25547
+ 'Always associate a visible label using a <label for="..."> element \u2014 the component does not render its own label',
25548
+ "Use aria-describedby to associate error messages or helper text with the component",
25549
+ "Arrow keys navigate between day buttons; Space selects or deselects the focused button"
25550
+ ]
25551
+ },
25552
+ installationOptions: {
25553
+ npm: [{ name: "@triptease/tt-weekday-picker", includesTypes: true, optional: false }],
25554
+ cdn: [
25555
+ {
25556
+ name: "@triptease/tt-weekday-picker",
25557
+ includesTypes: false,
25558
+ optional: false,
25559
+ moduleFormat: "esm",
25560
+ latestVersionUrl: buildCDNUrl("tt-weekday-picker", "latest"),
25561
+ pinnedMajorVersionUrl: buildCDNUrl("tt-weekday-picker", buildMajorVersion(version8)),
25562
+ pinnedVersionUrl: buildCDNUrl("tt-weekday-picker", version8),
25563
+ guidance: "Prefer pinned major version URL to avoid unexpected breaking changes. Do not use latest version URL in production code."
25564
+ }
25565
+ ]
25566
+ },
25567
+ attributes: {
25568
+ name: { type: "string", description: "Form field name, used in form data submission" },
25569
+ value: {
25570
+ type: "string | string[]",
25571
+ description: `In single mode, a string day name or empty string (e.g. "friday"). The HTML attribute accepts a single day name. In multi mode, an array of string day names in week order (e.g. ["monday", "wednesday", "friday"]). The HTML attribute accepts a comma-separated string (e.g. "monday,wednesday,friday") or a JSON array string (e.g. '["monday","wednesday","friday"]'). Valid day names: sunday, monday, tuesday, wednesday, thursday, friday, saturday`
25572
+ },
25573
+ multiple: { type: "boolean", description: "Enables multi-select mode; omit for single-select" },
25574
+ disabled: { type: "boolean", description: "Disables all day buttons" },
25575
+ required: { type: "boolean", description: "Marks the field as required for form validation" },
25576
+ invalid: {
25577
+ type: "boolean",
25578
+ description: "Shows the error outline. The component never sets this automatically \u2014 the consumer controls it entirely. When using a form library, pass the library's error state here (e.g. invalid={!!errors.day} in React Hook Form)."
25579
+ },
25580
+ "aria-labelledby": { type: "string", description: "ID of an element that labels the picker group" },
25581
+ "aria-describedby": { type: "string", description: "ID of an element providing helper or error text" }
25582
+ },
25583
+ events: {
25584
+ change: {
25585
+ description: "Fired whenever a day is selected or deselected. Read the value property to get the updated value.",
25586
+ bubbles: true
25587
+ }
25588
+ },
25589
+ examples: [
25590
+ {
25591
+ title: "Basic usage",
25592
+ code: `<label for="checkin-day">Check-in day</label>
25593
+ <tt-weekday-picker id="checkin-day" name="checkin-day"></tt-weekday-picker>`
25594
+ },
25595
+ {
25596
+ title: "Multiple selection",
25597
+ description: "Use multiple selection when a rule or configuration applies to more than one day of the week. Add the multiple attribute to enable this mode.",
25598
+ code: `<label for="campaign-days">Campaign active days</label>
25599
+ <tt-weekday-picker id="campaign-days" name="campaign-days" multiple></tt-weekday-picker>`
25600
+ },
25601
+ {
25602
+ title: "With preselected value",
25603
+ description: "Set the value attribute to pre-select a day on render. In single mode, pass a single day name. In multi mode, pass a comma-separated string or a JSON array string.",
25604
+ code: `<label for="arrival-day">Preferred arrival day</label>
25605
+ <tt-weekday-picker id="arrival-day" name="arrival-day" value="friday"></tt-weekday-picker>
25606
+
25607
+ <label for="promo-days">Promotional rate days</label>
25608
+ <tt-weekday-picker id="promo-days" name="promo-days" multiple value="monday,wednesday,friday"></tt-weekday-picker>`
25609
+ },
25610
+ {
25611
+ title: "Required with error message",
25612
+ description: "Use required when a day selection is mandatory. The error outline is controlled entirely by the invalid attribute \u2014 the component never shows it automatically. Set invalid when your form validation decides the field is in error, and clear it when it is not. Like a native required input, the component sets a browser validation message, but this produces a disruptive tooltip. Always provide a visible inline error message instead and associate it using aria-describedby.",
25613
+ code: `<label for="required-day">Check-in day</label>
25614
+ <tt-weekday-picker id="required-day" name="checkin-day" required aria-describedby="required-day-error"></tt-weekday-picker>
25615
+ <span id="required-day-error">Please select a check-in day</span>`
25616
+ },
25617
+ {
25618
+ title: "With event handler",
25619
+ description: "Use the change event when a selection should take effect immediately rather than on form submission \u2014 for example, auto-saving a preference, live-filtering results, or updating a UI preview. Read event.target.value to get the updated value.",
25620
+ code: `<label for="targeting-days">Onsite message active days</label>
25621
+ <tt-weekday-picker id="targeting-days" multiple></tt-weekday-picker>
25622
+
25623
+ <script>
25624
+ document.getElementById('targeting-days').addEventListener('change', (e) => {
25625
+ console.log('Selected days:', e.target.value);
25626
+ });
25627
+ </script>`
25628
+ },
25629
+ {
25630
+ title: "Disabled",
25631
+ description: "Use the disabled state when day selection is temporarily unavailable. If the field will never be available to this user, consider hiding it entirely rather than disabling it.",
25632
+ code: `<label for="locked-day">Check-in day</label>
25633
+ <tt-weekday-picker id="locked-day" name="locked-day" value="saturday" disabled></tt-weekday-picker>`
25634
+ }
25635
+ ]
25636
+ }
25637
+ };
25638
+
25639
+ // src/manifests/components/entries/repeatDatePicker.ts
25640
+ var version9 = package_default.componentVersions["@triptease/tt-repeat-date-picker"];
25641
+ var repeatDatePicker_default = {
25642
+ "repeat-date-picker": {
25643
+ name: "Repeat Date Picker",
25644
+ description: "A repeat date picker lets users define a date range and optionally schedule it to repeat on a regular basis. The form value is a JSON-encoded { dates, infinite } object. infinite is true only when repeat is on with no defined end condition; it is false when repeat is off or a finite list of occurrences has been set.",
25645
+ ssrSafe: true,
25646
+ element: "tt-repeat-date-picker",
25647
+ usageGuidance: {
25648
+ whenToUse: [
25649
+ "A user needs to schedule a recurring campaign, promotion, or event across multiple date ranges",
25650
+ "A booking offer or rate plan applies to several periods that follow a predictable pattern"
25651
+ ],
25652
+ avoid: [
25653
+ "A single, one-off date range is needed \u2014 use the Date Range Picker instead",
25654
+ "Only a single date (not a range) is needed \u2014 use the Date Picker instead"
25655
+ ],
25656
+ accessibility: [
25657
+ 'Always associate a visible label using a <label for="..."> element \u2014 the component does not render its own label',
25658
+ "The repeat option groups are wrapped in fieldset and legend elements, which screen readers announce as named groups"
25659
+ ]
25660
+ },
25661
+ installationOptions: {
25662
+ npm: [{ name: "@triptease/tt-repeat-date-picker", includesTypes: true, optional: false }],
25663
+ cdn: [
25664
+ {
25665
+ name: "@triptease/tt-repeat-date-picker",
25666
+ includesTypes: false,
25667
+ optional: false,
25668
+ moduleFormat: "esm",
25669
+ latestVersionUrl: buildCDNUrl("tt-repeat-date-picker", "latest"),
25670
+ pinnedMajorVersionUrl: buildCDNUrl("tt-repeat-date-picker", buildMajorVersion(version9)),
25671
+ pinnedVersionUrl: buildCDNUrl("tt-repeat-date-picker", version9),
25672
+ guidance: "Prefer pinned major version URL to avoid unexpected breaking changes. Do not use latest version URL in production code."
25673
+ }
25674
+ ]
25675
+ },
25676
+ attributes: {
25677
+ name: { type: "string", description: "Form field name used in form data submission" },
25678
+ mindate: { type: "string", description: "Earliest selectable date in YYYY-MM-DD format. Passed through to the internal date range picker." },
25679
+ maxdate: { type: "string", description: "Latest selectable date in YYYY-MM-DD format. Passed through to the internal date range picker." },
25680
+ required: {
25681
+ type: "boolean",
25682
+ description: "Marks the field as required. Reports valueMissing when no date range has been selected"
25683
+ },
25684
+ disabled: { type: "boolean", description: "Disables the date range picker and the repeat checkbox" }
25685
+ },
25686
+ events: {
25687
+ change: {
25688
+ description: "Fired whenever the selected range, repeat settings, or end condition changes. Read the value property to get the updated { dates, infinite } object.",
25689
+ bubbles: true
25690
+ }
25691
+ },
25692
+ examples: [
25693
+ {
25694
+ title: "Basic usage",
25695
+ code: `<label for="promo-dates">Promotional period</label>
25696
+ <tt-repeat-date-picker id="promo-dates" name="repeat-dates"></tt-repeat-date-picker>`
25697
+ },
25698
+ {
25699
+ title: "Date constraints",
25700
+ description: "Use mindate and maxdate to restrict which dates the user can select. Set mindate when the range cannot start before a certain date \u2014 for example, today for a future-only promotion. Set maxdate when the range must end before a certain date \u2014 for example, the end of a campaign window.",
25701
+ code: `<label for="promo-dates">Promotional period</label>
25702
+ <tt-repeat-date-picker id="promo-dates" name="repeat-dates" mindate="2026-01-01" maxdate="2026-12-31"></tt-repeat-date-picker>`
25703
+ },
25704
+ {
25705
+ title: "Disabled",
25706
+ description: "Use the disabled state when scheduling is temporarily unavailable. If scheduling will never be available to this user, consider hiding the component entirely rather than disabling it.",
25707
+ code: `<label for="promo-dates">Promotional period</label>
25708
+ <tt-repeat-date-picker id="promo-dates" name="repeat-dates" disabled></tt-repeat-date-picker>`
25709
+ },
25710
+ {
25711
+ title: "Required",
25712
+ description: "Use required when a schedule must be provided before the form can be submitted. Like a native required input, the component sets a browser validation message, but this produces a disruptive tooltip. Always provide a visible inline error message instead and associate it using aria-describedby.",
25713
+ code: `<form id="required-form" novalidate>
25714
+ <label for="promo-dates">Promotional period</label>
25715
+ <tt-repeat-date-picker id="promo-dates" name="repeat-dates" required aria-describedby="repeat-dates-error"></tt-repeat-date-picker>
25716
+ <span id="repeat-dates-error" hidden>Please select a date range</span>
25717
+ <button type="submit">Submit</button>
25718
+ </form>
25719
+
25720
+ <script>
25721
+ document.getElementById('required-form').addEventListener('submit', (e) => {
25722
+ e.preventDefault();
25723
+ const errorEl = document.getElementById('repeat-dates-error');
25724
+ if (!e.currentTarget.checkValidity()) {
25725
+ errorEl.hidden = false;
25726
+ return;
25727
+ }
25728
+ errorEl.hidden = true;
25729
+ const value = JSON.parse(new FormData(e.currentTarget).get('repeat-dates'));
25730
+ console.log(value); // { dates: [...], infinite: false }
25731
+ });
25732
+ </script>`
25733
+ }
25734
+ ]
25735
+ }
25736
+ };
25737
+
25527
25738
  // src/manifests/components/index.ts
25528
25739
  var componentManifest = {
25529
25740
  ...button_default,
@@ -25547,7 +25758,9 @@ var componentManifest = {
25547
25758
  ...statistic_default,
25548
25759
  ...banner_default,
25549
25760
  ...tabs_default,
25550
- ...paginator_default
25761
+ ...paginator_default,
25762
+ ...weekdayPicker_default,
25763
+ ...repeatDatePicker_default
25551
25764
  };
25552
25765
 
25553
25766
  // src/resources/components/list.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@triptease/design-system-mcp",
3
- "version": "1.2.10",
3
+ "version": "1.2.12",
4
4
  "description": "MCP server for Triptease design system documentation",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -21,23 +21,25 @@
21
21
  "node": ">=18.0.0"
22
22
  },
23
23
  "componentVersions": {
24
- "@triptease/stylesheet": "2.1.4",
24
+ "@triptease/stylesheet": "2.1.9",
25
25
  "@triptease/tt-bar-chart": "1.1.3",
26
26
  "@triptease/tt-combobox": "5.7.4",
27
27
  "@triptease/tt-data-point": "1.1.1",
28
28
  "@triptease/tt-dataset": "1.1.1",
29
- "@triptease/tt-date-picker": "6.3.1",
30
- "@triptease/tt-date-range-picker": "6.4.1",
31
- "@triptease/tt-dialog": "5.2.1",
29
+ "@triptease/tt-date-picker": "6.3.5",
30
+ "@triptease/tt-date-range-picker": "6.5.4",
31
+ "@triptease/tt-dialog": "5.2.2",
32
32
  "@triptease/tt-highlight": "1.1.1",
33
33
  "@triptease/tt-line-chart": "1.1.3",
34
34
  "@triptease/tt-milestone": "1.1.1",
35
35
  "@triptease/tt-paginator": "1.0.7",
36
36
  "@triptease/tt-table-wrapper": "1.0.6",
37
- "@triptease/tt-tabs": "1.1.0"
37
+ "@triptease/tt-tabs": "1.1.0",
38
+ "@triptease/tt-repeat-date-picker": "1.0.0",
39
+ "@triptease/tt-weekday-picker": "1.0.1"
38
40
  },
39
41
  "dependencies": {
40
- "@triptease/stylesheet": "2.1.8"
42
+ "@triptease/stylesheet": "2.1.9"
41
43
  },
42
44
  "devDependencies": {
43
45
  "@modelcontextprotocol/sdk": "1.26.0",