@triptease/design-system-mcp 1.2.10 → 1.2.11
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 +132 -20
- package/package.json +6 -5
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,
|
|
7660
|
-
if ((
|
|
7659
|
+
function isValidIP(ip, version9) {
|
|
7660
|
+
if ((version9 === "v4" || !version9) && ipv4Regex.test(ip)) {
|
|
7661
7661
|
return true;
|
|
7662
7662
|
}
|
|
7663
|
-
if ((
|
|
7663
|
+
if ((version9 === "v6" || !version9) && 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,
|
|
7691
|
-
if ((
|
|
7690
|
+
function isValidCidr(ip, version9) {
|
|
7691
|
+
if ((version9 === "v4" || !version9) && ipv4CidrRegex.test(ip)) {
|
|
7692
7692
|
return true;
|
|
7693
7693
|
}
|
|
7694
|
-
if ((
|
|
7694
|
+
if ((version9 === "v6" || !version9) && 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 = (
|
|
11648
|
-
if (!
|
|
11647
|
+
var uuid = (version9) => {
|
|
11648
|
+
if (!version9)
|
|
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}-${
|
|
11650
|
+
return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version9}[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.
|
|
23305
|
+
version: "1.2.11",
|
|
23306
23306
|
description: "MCP server for Triptease design system documentation",
|
|
23307
23307
|
type: "module",
|
|
23308
23308
|
main: "dist/index.js",
|
|
@@ -23328,15 +23328,16 @@ var package_default = {
|
|
|
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.
|
|
23332
|
-
"@triptease/tt-date-range-picker": "6.4
|
|
23333
|
-
"@triptease/tt-dialog": "5.2.
|
|
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-weekday-picker": "1.0.1"
|
|
23340
23341
|
},
|
|
23341
23342
|
dependencies: {
|
|
23342
23343
|
"@triptease/stylesheet": "2.1.8"
|
|
@@ -24015,10 +24016,10 @@ var card_default = {
|
|
|
24015
24016
|
};
|
|
24016
24017
|
|
|
24017
24018
|
// src/utils/buildCDNUrls.ts
|
|
24018
|
-
var buildCDNUrl = (componentName,
|
|
24019
|
-
return `https://cdn.design-system.triptease.io/${componentName}/${
|
|
24019
|
+
var buildCDNUrl = (componentName, version9) => {
|
|
24020
|
+
return `https://cdn.design-system.triptease.io/${componentName}/${version9}/${componentName}.js`;
|
|
24020
24021
|
};
|
|
24021
|
-
var buildMajorVersion = (
|
|
24022
|
+
var buildMajorVersion = (version9) => `${version9.split(".")[0]}.x.x`;
|
|
24022
24023
|
|
|
24023
24024
|
// src/manifests/components/entries/table.ts
|
|
24024
24025
|
var tableWrapperVersion = package_default.componentVersions["@triptease/tt-table-wrapper"];
|
|
@@ -24601,7 +24602,7 @@ var datePicker_default = {
|
|
|
24601
24602
|
examples: [
|
|
24602
24603
|
{
|
|
24603
24604
|
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.",
|
|
24605
|
+
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
24606
|
code: `<label for="date-basic">Select a date</label>
|
|
24606
24607
|
<tt-date-picker id="date-basic"></tt-date-picker>`
|
|
24607
24608
|
},
|
|
@@ -24686,7 +24687,7 @@ var dateRangePicker_default = {
|
|
|
24686
24687
|
examples: [
|
|
24687
24688
|
{
|
|
24688
24689
|
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.",
|
|
24690
|
+
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
24691
|
code: `<label for="daterange-basic">Select date range</label>
|
|
24691
24692
|
<tt-date-range-picker id="daterange-basic"></tt-date-range-picker>`
|
|
24692
24693
|
},
|
|
@@ -25524,6 +25525,116 @@ var paginator_default = {
|
|
|
25524
25525
|
}
|
|
25525
25526
|
};
|
|
25526
25527
|
|
|
25528
|
+
// src/manifests/components/entries/weekdayPicker.ts
|
|
25529
|
+
var version8 = package_default.componentVersions["@triptease/tt-weekday-picker"];
|
|
25530
|
+
var weekdayPicker_default = {
|
|
25531
|
+
"weekday-picker": {
|
|
25532
|
+
name: "Weekday Picker",
|
|
25533
|
+
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.",
|
|
25534
|
+
ssrSafe: true,
|
|
25535
|
+
element: "tt-weekday-picker",
|
|
25536
|
+
usageGuidance: {
|
|
25537
|
+
whenToUse: [
|
|
25538
|
+
"A user needs to choose one or more days of the week"
|
|
25539
|
+
],
|
|
25540
|
+
avoid: [
|
|
25541
|
+
"A specific calendar date is needed \u2014 use the Date Picker instead",
|
|
25542
|
+
"The choice is binary (e.g. weekdays vs. weekends) \u2014 a select or radio group may be clearer"
|
|
25543
|
+
],
|
|
25544
|
+
accessibility: [
|
|
25545
|
+
'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',
|
|
25546
|
+
'Always associate a visible label using a <label for="..."> element \u2014 the component does not render its own label',
|
|
25547
|
+
"Use aria-describedby to associate error messages or helper text with the component",
|
|
25548
|
+
"Arrow keys navigate between day buttons; Space selects or deselects the focused button"
|
|
25549
|
+
]
|
|
25550
|
+
},
|
|
25551
|
+
installationOptions: {
|
|
25552
|
+
npm: [{ name: "@triptease/tt-weekday-picker", includesTypes: true, optional: false }],
|
|
25553
|
+
cdn: [
|
|
25554
|
+
{
|
|
25555
|
+
name: "@triptease/tt-weekday-picker",
|
|
25556
|
+
includesTypes: false,
|
|
25557
|
+
optional: false,
|
|
25558
|
+
moduleFormat: "esm",
|
|
25559
|
+
latestVersionUrl: buildCDNUrl("tt-weekday-picker", "latest"),
|
|
25560
|
+
pinnedMajorVersionUrl: buildCDNUrl("tt-weekday-picker", buildMajorVersion(version8)),
|
|
25561
|
+
pinnedVersionUrl: buildCDNUrl("tt-weekday-picker", version8),
|
|
25562
|
+
guidance: "Prefer pinned major version URL to avoid unexpected breaking changes. Do not use latest version URL in production code."
|
|
25563
|
+
}
|
|
25564
|
+
]
|
|
25565
|
+
},
|
|
25566
|
+
attributes: {
|
|
25567
|
+
name: { type: "string", description: "Form field name, used in form data submission" },
|
|
25568
|
+
value: {
|
|
25569
|
+
type: "string | string[]",
|
|
25570
|
+
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`
|
|
25571
|
+
},
|
|
25572
|
+
multiple: { type: "boolean", description: "Enables multi-select mode; omit for single-select" },
|
|
25573
|
+
disabled: { type: "boolean", description: "Disables all day buttons" },
|
|
25574
|
+
required: { type: "boolean", description: "Marks the field as required for form validation" },
|
|
25575
|
+
invalid: {
|
|
25576
|
+
type: "boolean",
|
|
25577
|
+
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)."
|
|
25578
|
+
},
|
|
25579
|
+
"aria-labelledby": { type: "string", description: "ID of an element that labels the picker group" },
|
|
25580
|
+
"aria-describedby": { type: "string", description: "ID of an element providing helper or error text" }
|
|
25581
|
+
},
|
|
25582
|
+
events: {
|
|
25583
|
+
change: {
|
|
25584
|
+
description: "Fired whenever a day is selected or deselected. Read the value property to get the updated value.",
|
|
25585
|
+
bubbles: true
|
|
25586
|
+
}
|
|
25587
|
+
},
|
|
25588
|
+
examples: [
|
|
25589
|
+
{
|
|
25590
|
+
title: "Basic usage",
|
|
25591
|
+
code: `<label for="checkin-day">Check-in day</label>
|
|
25592
|
+
<tt-weekday-picker id="checkin-day" name="checkin-day"></tt-weekday-picker>`
|
|
25593
|
+
},
|
|
25594
|
+
{
|
|
25595
|
+
title: "Multiple selection",
|
|
25596
|
+
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.",
|
|
25597
|
+
code: `<label for="campaign-days">Campaign active days</label>
|
|
25598
|
+
<tt-weekday-picker id="campaign-days" name="campaign-days" multiple></tt-weekday-picker>`
|
|
25599
|
+
},
|
|
25600
|
+
{
|
|
25601
|
+
title: "With preselected value",
|
|
25602
|
+
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.",
|
|
25603
|
+
code: `<label for="arrival-day">Preferred arrival day</label>
|
|
25604
|
+
<tt-weekday-picker id="arrival-day" name="arrival-day" value="friday"></tt-weekday-picker>
|
|
25605
|
+
|
|
25606
|
+
<label for="promo-days">Promotional rate days</label>
|
|
25607
|
+
<tt-weekday-picker id="promo-days" name="promo-days" multiple value="monday,wednesday,friday"></tt-weekday-picker>`
|
|
25608
|
+
},
|
|
25609
|
+
{
|
|
25610
|
+
title: "Required with error message",
|
|
25611
|
+
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.",
|
|
25612
|
+
code: `<label for="required-day">Check-in day</label>
|
|
25613
|
+
<tt-weekday-picker id="required-day" name="checkin-day" required aria-describedby="required-day-error"></tt-weekday-picker>
|
|
25614
|
+
<span id="required-day-error">Please select a check-in day</span>`
|
|
25615
|
+
},
|
|
25616
|
+
{
|
|
25617
|
+
title: "With event handler",
|
|
25618
|
+
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.",
|
|
25619
|
+
code: `<label for="targeting-days">Onsite message active days</label>
|
|
25620
|
+
<tt-weekday-picker id="targeting-days" multiple></tt-weekday-picker>
|
|
25621
|
+
|
|
25622
|
+
<script>
|
|
25623
|
+
document.getElementById('targeting-days').addEventListener('change', (e) => {
|
|
25624
|
+
console.log('Selected days:', e.target.value);
|
|
25625
|
+
});
|
|
25626
|
+
</script>`
|
|
25627
|
+
},
|
|
25628
|
+
{
|
|
25629
|
+
title: "Disabled",
|
|
25630
|
+
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.",
|
|
25631
|
+
code: `<label for="locked-day">Check-in day</label>
|
|
25632
|
+
<tt-weekday-picker id="locked-day" name="locked-day" value="saturday" disabled></tt-weekday-picker>`
|
|
25633
|
+
}
|
|
25634
|
+
]
|
|
25635
|
+
}
|
|
25636
|
+
};
|
|
25637
|
+
|
|
25527
25638
|
// src/manifests/components/index.ts
|
|
25528
25639
|
var componentManifest = {
|
|
25529
25640
|
...button_default,
|
|
@@ -25547,7 +25658,8 @@ var componentManifest = {
|
|
|
25547
25658
|
...statistic_default,
|
|
25548
25659
|
...banner_default,
|
|
25549
25660
|
...tabs_default,
|
|
25550
|
-
...paginator_default
|
|
25661
|
+
...paginator_default,
|
|
25662
|
+
...weekdayPicker_default
|
|
25551
25663
|
};
|
|
25552
25664
|
|
|
25553
25665
|
// 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.
|
|
3
|
+
"version": "1.2.11",
|
|
4
4
|
"description": "MCP server for Triptease design system documentation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -26,15 +26,16 @@
|
|
|
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.
|
|
30
|
-
"@triptease/tt-date-range-picker": "6.4
|
|
31
|
-
"@triptease/tt-dialog": "5.2.
|
|
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-weekday-picker": "1.0.1"
|
|
38
39
|
},
|
|
39
40
|
"dependencies": {
|
|
40
41
|
"@triptease/stylesheet": "2.1.8"
|