@ship-ui/core 0.19.4 → 0.19.5

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/bin/mcp/index.js CHANGED
@@ -10146,7 +10146,7 @@ function finalize(ctx, schema) {
10146
10146
  result.$schema = "http://json-schema.org/draft-07/schema#";
10147
10147
  } else if (ctx.target === "draft-04") {
10148
10148
  result.$schema = "http://json-schema.org/draft-04/schema#";
10149
- } else if (ctx.target === "openapi-3.0") {} else {}
10149
+ } else if (ctx.target === "openapi-3.0") {}
10150
10150
  if (ctx.external?.uri) {
10151
10151
  const id = ctx.external.registry.get(schema)?.id;
10152
10152
  if (!id)
@@ -10368,7 +10368,7 @@ var literalProcessor = (schema, ctx, json, _params) => {
10368
10368
  if (val === undefined) {
10369
10369
  if (ctx.unrepresentable === "throw") {
10370
10370
  throw new Error("Literal `undefined` cannot be represented in JSON Schema");
10371
- } else {}
10371
+ }
10372
10372
  } else if (typeof val === "bigint") {
10373
10373
  if (ctx.unrepresentable === "throw") {
10374
10374
  throw new Error("BigInt literals cannot be represented in JSON Schema");
@@ -13675,6 +13675,38 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
13675
13675
  },
13676
13676
  required: ["selector"]
13677
13677
  }
13678
+ },
13679
+ {
13680
+ name: "get_setup_instructions",
13681
+ description: "Get step-by-step setup and installation instructions for ShipUI in an Angular 19+ project",
13682
+ inputSchema: {
13683
+ type: "object",
13684
+ properties: {}
13685
+ }
13686
+ },
13687
+ {
13688
+ name: "get_design_tokens",
13689
+ description: "Get a comprehensive guide on ShipUI design tokens including Radix 1-12 colors, typography, shapes, and utility classes",
13690
+ inputSchema: {
13691
+ type: "object",
13692
+ properties: {}
13693
+ }
13694
+ },
13695
+ {
13696
+ name: "get_css_variable_abbreviations",
13697
+ description: "Get the complete cheat sheet for minified CSS variables and abbreviations used in ShipUI components (e.g. btn-c-h)",
13698
+ inputSchema: {
13699
+ type: "object",
13700
+ properties: {}
13701
+ }
13702
+ },
13703
+ {
13704
+ name: "get_icon_guide",
13705
+ description: "Get the setup and usage instructions for custom icon subsetting with Phosphor Icons and ship-fg CLI",
13706
+ inputSchema: {
13707
+ type: "object",
13708
+ properties: {}
13709
+ }
13678
13710
  }
13679
13711
  ]
13680
13712
  };
@@ -13721,6 +13753,233 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
13721
13753
  ]
13722
13754
  };
13723
13755
  }
13756
+ if (name === "get_setup_instructions") {
13757
+ return {
13758
+ content: [
13759
+ {
13760
+ type: "text",
13761
+ text: `# ShipUI Setup & Installation Guide
13762
+
13763
+ To integrate ShipUI in your Angular project, you must be using Angular 19 or newer. Follow these steps:
13764
+
13765
+ ## 1. Install Package
13766
+ \`\`\`bash
13767
+ npm i -S @ship-ui/core
13768
+ \`\`\`
13769
+
13770
+ ## 2. Import Global Styles
13771
+ Add this import at the top of your \`src/styles.scss\` (or main styles file):
13772
+ \`\`\`scss
13773
+ @use '@ship-ui/core/styles';
13774
+ \`\`\`
13775
+
13776
+ ## 3. Configure Assets in angular.json
13777
+ To enable bundling of default ShipUI fonts and assets, add the assets glob pattern to your project's assets array under \`architect.build.options.assets\` and \`architect.serve.options.assets\`:
13778
+ \`\`\`json
13779
+ "assets": [
13780
+ "src/assets",
13781
+ {
13782
+ "glob": "**/*",
13783
+ "input": "./node_modules/@ship-ui/core/assets",
13784
+ "output": "./ship-ui-assets/"
13785
+ }
13786
+ ]
13787
+ \`\`\`
13788
+
13789
+ ## 4. Setup Icon Font CLI
13790
+ Add scripts to \`package.json\` for compilation and watching of the custom Phosphor icon font:
13791
+ \`\`\`json
13792
+ "scripts": {
13793
+ "gen:font": "ship-fg --src='./src' --out='./src/assets' --rootPath='./'",
13794
+ "watch:font": "ship-fg --src='./src' --out='./src/assets' --rootPath='./' --watch",
13795
+ "start": "npm run watch:font & ng serve",
13796
+ "build": "npm run gen:font & ng build"
13797
+ }
13798
+ \`\`\`
13799
+
13800
+ Add the generated sheet link inside your \`<head>\` tag in \`index.html\`:
13801
+ \`\`\`html
13802
+ <link rel="stylesheet" href="/ship.css" />
13803
+ \`\`\``
13804
+ }
13805
+ ]
13806
+ };
13807
+ }
13808
+ if (name === "get_design_tokens") {
13809
+ return {
13810
+ content: [
13811
+ {
13812
+ type: "text",
13813
+ text: `# ShipUI Design Tokens Guide
13814
+
13815
+ ShipUI implements a cohesive, highly customizable design system based on modern CSS properties.
13816
+
13817
+ ## 1. HSL Color Scale (Radix 1-12 aligned)
13818
+ ShipUI uses semantic scales from 1 (lightest background / darkest shadow) to 12 (darkest text / solid foreground).
13819
+ Available palettes: \`--primary-\`, \`--accent-\`, \`--warn-\`, \`--error-\`, \`--success-\`, \`--base-\`.
13820
+
13821
+ Example Color CSS Variables:
13822
+ - \`--primary-1\`: Base app background
13823
+ - \`--primary-2\`: Subtle background
13824
+ - \`--primary-3\`: UI element background
13825
+ - \`--primary-4\`: Hover state background
13826
+ - \`--primary-5\`: Active state background
13827
+ - \`--primary-8\`: Brand primary color / solid border
13828
+ - \`--primary-9\`: Brand hover primary color
13829
+ - \`--primary-12\`: High contrast text
13830
+
13831
+ We also provide gradient scales for backgrounds:
13832
+ - \`--primary-g2\` / \`--primary-g3\`
13833
+ - \`--accent-g2\` / \`--accent-g3\`
13834
+ - \`--warn-g2\` / \`--warn-g3\`
13835
+ - \`--error-g2\` / \`--error-g3\`
13836
+ - \`--success-g2\` / \`--success-g3\`
13837
+ - \`--base-g2\` / \`--base-g3\` / \`--base-g6\` / \`--base-g7\`
13838
+
13839
+ ## 2. Typography Scale
13840
+ Custom typography definitions utilizing \`Inter Tight\`:
13841
+ - \`--display-10\` to \`--display-50\` (Large hero titles)
13842
+ - \`--title-10\` to \`--title-30B\` (Section headers)
13843
+ - \`--paragraph-10\` to \`--paragraph-40B\` (Body, labels, and micro-copy)
13844
+ - \`--code-10\` to \`--code-30\` (Monospace text)
13845
+
13846
+ Usage Example:
13847
+ \`\`\`css
13848
+ .card-title {
13849
+ font: var(--title-30B);
13850
+ }
13851
+ \`\`\`
13852
+
13853
+ ## 3. Shape Scale
13854
+ Used for rounded borders, scaling using \`--shape-scale\` multiplier (default is \`1\`):
13855
+ - \`--shape-1\`: 4px border-radius
13856
+ - \`--shape-2\`: 8px border-radius
13857
+ - \`--shape-3\`: 12px border-radius
13858
+ - \`--shape-4\`: 16px border-radius
13859
+ - \`--shape-5\`: 20px border-radius
13860
+
13861
+ ## 4. Shadows & Borders
13862
+ - Shadows: \`--box-shadow-10\` to \`--box-shadow-60\`.
13863
+ - Borders: \`--border-10\` (thin base color border), \`--border-20\` (medium base color border).
13864
+
13865
+ ## 5. Global CSS Helper Classes
13866
+ - \`.spacer\`: Flex-grow spacer helper (\`flex: 1 0;\`).
13867
+ - \`.sh-primary\`, \`.sh-accent\`, \`.sh-warn\`, \`.sh-error\`, \`.sh-success\`: Semantic text color helpers.`
13868
+ }
13869
+ ]
13870
+ };
13871
+ }
13872
+ if (name === "get_css_variable_abbreviations") {
13873
+ return {
13874
+ content: [
13875
+ {
13876
+ type: "text",
13877
+ text: `# CSS Variables Abbreviations Guide
13878
+
13879
+ ShipUI minifies all component CSS variables to reduce production bundle size without framework specific parsers.
13880
+ Variables follow the structural pattern: \`--[component]-[style]-[state]\`.
13881
+ For example, \`--btn-c-h\` represents \`[button]-[color]-[hover]\`.
13882
+
13883
+ ## Component Prefix Identifiers
13884
+ - \`btn\` : Button component
13885
+ - \`btng\`: Button group
13886
+ - \`pb\` : Progress bar
13887
+ - \`pbt\` : Progress bar track
13888
+ - \`rs\` : Range slider
13889
+ - \`rst\` : Range slider track
13890
+ - \`po\` : Popover
13891
+ - \`radio\`: Radio button
13892
+ - \`radiod\`: Radio dot / indicator
13893
+ - \`table\`: Data table
13894
+ - \`tabs\` : Tabs header/body
13895
+ - \`toggle\`: Switch toggle
13896
+ - \`togglek\`: Switch toggle knob
13897
+ - \`dp\` : Datepicker / datepicker input
13898
+ - \`chip\`: Chip component
13899
+
13900
+ ## Style Property Infixes
13901
+ - \`bs\` : box-shadow
13902
+ - \`bg\` : background-color
13903
+ - \`c\` : color (text)
13904
+ - \`br\` : border-radius
13905
+ - \`bw\` : border-width
13906
+ - \`b\` : border
13907
+ - \`s\` : shape
13908
+ - \`si\` : size
13909
+ - \`ih\` : icon-height
13910
+ - \`iw\` : icon-width
13911
+ - \`ic\` : icon-color
13912
+ - \`ir\` : icon-rotate
13913
+ - \`h\` : height
13914
+ - \`mh\` : max-height
13915
+ - \`mih\`: min-height
13916
+ - \`w\` : width
13917
+ - \`mw\` : max-width
13918
+ - \`miw\`: min-width
13919
+ - \`f\` : font
13920
+ - \`d\` : display
13921
+ - \`o\` : opacity
13922
+ - \`ad\` : animation-duration
13923
+
13924
+ ## State Suffixes
13925
+ - \`h\` : hover
13926
+ - \`a\` : active
13927
+ - \`d\` : disabled
13928
+ - \`s\` : selected
13929
+
13930
+ ## Example Usage
13931
+ To override button styles on hover, override \`--btn-c-h\`:
13932
+ \`\`\`css
13933
+ .my-custom-button {
13934
+ --btn-c-h: var(--accent-12);
13935
+ --btn-bg-h: var(--accent-3);
13936
+ }
13937
+ \`\`\``
13938
+ }
13939
+ ]
13940
+ };
13941
+ }
13942
+ if (name === "get_icon_guide") {
13943
+ return {
13944
+ content: [
13945
+ {
13946
+ type: "text",
13947
+ text: `# ShipUI Icons Integration & Usage Guide
13948
+
13949
+ ShipUI uses Phosphor Icons bundled into a minified custom webfont. Unused icons are automatically stripped via a custom CLI builder (\`ship-fg\`).
13950
+
13951
+ ## 1. Icon Syntax
13952
+ To render icons, use a standard element with the \`class\` prefixed with \`ph-\`.
13953
+ Example:
13954
+ \`\`\`html
13955
+ <i class="ph ph-heart"></i>
13956
+ \`\`\`
13957
+
13958
+ ## 2. Dynamic Weight & Style Suffixes
13959
+ You can use multiple Phosphor icon weights (bold, fill, light, regular, thin) in the exact same font file by suffixing the icon class name:
13960
+ - Bold style: \`ph-heart-bold\`
13961
+ - Fill style: \`ph-heart-fill\`
13962
+ - Light style: \`ph-heart-light\`
13963
+ - Thin style: \`ph-heart-thin\`
13964
+ - Regular style: \`ph-heart\` (or \`ph-heart-regular\`)
13965
+
13966
+ Example:
13967
+ \`\`\`html
13968
+ <i class="ph ph-envelope-fill"></i>
13969
+ \`\`\`
13970
+
13971
+ ## 3. CLI Subsetter (ship-fg)
13972
+ The subsetting engine scans your source files (\`.html\`, \`.ts\`, etc.) for references to \`ph-\` classes, downloads the respective SVG icons, and compiles them into a custom optimized web font on-the-fly.
13973
+
13974
+ Configuration options for \`ship-fg\`:
13975
+ - \`--src\`: Directory to scan for icon classes (e.g. \`./src\`).
13976
+ - \`--out\`: Directory to write generated font files (e.g. \`./src/assets\`).
13977
+ - \`--rootPath\`: Output URL root path (e.g. \`./\` or \`/\`).
13978
+ - \`--watch\`: Watch source files for changes and regenerate automatically.`
13979
+ }
13980
+ ]
13981
+ };
13982
+ }
13724
13983
  throw new Error(`Tool ${name} not found`);
13725
13984
  });
13726
13985
  server.setRequestHandler(ListPromptsRequestSchema, async () => {
@@ -13741,6 +14000,49 @@ server.setRequestHandler(ListPromptsRequestSchema, async () => {
13741
14000
  required: false
13742
14001
  }
13743
14002
  ]
14003
+ },
14004
+ {
14005
+ name: "setup_project",
14006
+ description: "Get interactive setup instructions tailored to your workspace layout",
14007
+ arguments: [
14008
+ {
14009
+ name: "projectType",
14010
+ description: "e.g., Standard Angular App, Nx Workspace (optional)",
14011
+ required: false
14012
+ },
14013
+ {
14014
+ name: "stylesFormat",
14015
+ description: "e.g., scss, css, sass (optional)",
14016
+ required: false
14017
+ }
14018
+ ]
14019
+ },
14020
+ {
14021
+ name: "customize_theme",
14022
+ description: "Generate custom CSS overrides or themes for ShipUI (colors, typography, radii)",
14023
+ arguments: [
14024
+ {
14025
+ name: "brandColor",
14026
+ description: "The hex or HSL value of your brand color (optional)",
14027
+ required: false
14028
+ },
14029
+ {
14030
+ name: "themeMode",
14031
+ description: "light, dark, or both (optional)",
14032
+ required: false
14033
+ }
14034
+ ]
14035
+ },
14036
+ {
14037
+ name: "implement_layout",
14038
+ description: "Get guidance and template code to build structured layouts using sh-sheet and CSS grids",
14039
+ arguments: [
14040
+ {
14041
+ name: "layoutType",
14042
+ description: "e.g., sidebar layout dashboard, header/footer dashboard, grid gallery (optional)",
14043
+ required: false
14044
+ }
14045
+ ]
13744
14046
  }
13745
14047
  ]
13746
14048
  };
@@ -13803,6 +14105,50 @@ Please help me implement this in my project.`
13803
14105
  ]
13804
14106
  };
13805
14107
  }
14108
+ if (name === "setup_project") {
14109
+ const projectType = args?.projectType || "Standard Angular App";
14110
+ const stylesFormat = args?.stylesFormat || "scss";
14111
+ return {
14112
+ messages: [
14113
+ {
14114
+ role: "user",
14115
+ content: {
14116
+ type: "text",
14117
+ text: `I want to integrate ShipUI in my ${projectType} project. I'm using ${stylesFormat} for styles. Please guide me through a full customized setup. Include installation commands, asset configuration in angular.json, global imports, CLI watchers for custom phosphor icons, and how to verify everything is working.`
14118
+ }
14119
+ }
14120
+ ]
14121
+ };
14122
+ }
14123
+ if (name === "customize_theme") {
14124
+ const brandColor = args?.brandColor || "hsl(217, 91%, 60%)";
14125
+ const themeMode = args?.themeMode || "both";
14126
+ return {
14127
+ messages: [
14128
+ {
14129
+ role: "user",
14130
+ content: {
14131
+ type: "text",
14132
+ text: `I want to customize the ShipUI design system theme. My target brand color is: ${brandColor}. I want to support ${themeMode} color mode(s). Please help me generate custom Radix-like 1-12 HSL scale overrides, custom theme utility rules, light-dark() CSS properties, and custom border/shape or shadow overrides. Ensure all generated classes correctly override ShipUI base styles.`
14133
+ }
14134
+ }
14135
+ ]
14136
+ };
14137
+ }
14138
+ if (name === "implement_layout") {
14139
+ const layoutType = args?.layoutType || "sidebar layout dashboard";
14140
+ return {
14141
+ messages: [
14142
+ {
14143
+ role: "user",
14144
+ content: {
14145
+ type: "text",
14146
+ text: `I want to build a ${layoutType} using ShipUI's layout tokens, sheet utilities (sh-sheet), and responsive structural patterns. Provide clean, modern HTML structure and CSS variables (using the correct abbreviations like po, rs, dp, btn, base-1 to base-12 scales) to achieve a beautiful, responsive, and zoneless-compatible interface.`
14147
+ }
14148
+ }
14149
+ ]
14150
+ };
14151
+ }
13806
14152
  throw new Error(`Prompt ${name} not found`);
13807
14153
  });
13808
14154
  var transport = new StdioServerTransport;
Binary file
package/bin/ship-fg.mjs CHANGED
@@ -199,7 +199,7 @@ var require_compress_binding = __commonJS((exports, module) => {
199
199
  setWindowTitle = function(title) {
200
200
  document.title = title;
201
201
  };
202
- } else {}
202
+ }
203
203
  var out = Module["print"] || console.log.bind(console);
204
204
  var err = Module["printErr"] || console.warn.bind(console);
205
205
  for (key in moduleOverrides) {
@@ -1083,7 +1083,7 @@ var require_compress_binding = __commonJS((exports, module) => {
1083
1083
  invokerFnBody += `var ret = retType.fromWireType(rv);
1084
1084
  ` + `return ret;
1085
1085
  `;
1086
- } else {}
1086
+ }
1087
1087
  invokerFnBody += `}
1088
1088
  `;
1089
1089
  args1.push(invokerFnBody);
@@ -1805,7 +1805,7 @@ var require_decompress_binding = __commonJS((exports, module) => {
1805
1805
  setWindowTitle = function(title) {
1806
1806
  document.title = title;
1807
1807
  };
1808
- } else {}
1808
+ }
1809
1809
  var out = Module["print"] || console.log.bind(console);
1810
1810
  var err = Module["printErr"] || console.warn.bind(console);
1811
1811
  for (key in moduleOverrides) {
@@ -2685,7 +2685,7 @@ var require_decompress_binding = __commonJS((exports, module) => {
2685
2685
  invokerFnBody += `var ret = retType.fromWireType(rv);
2686
2686
  ` + `return ret;
2687
2687
  `;
2688
- } else {}
2688
+ }
2689
2689
  invokerFnBody += `}
2690
2690
  `;
2691
2691
  args1.push(invokerFnBody);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ship-ui/core",
3
3
  "license": "MIT",
4
- "version": "0.19.4",
4
+ "version": "0.19.5",
5
5
  "peerDependencies": {
6
6
  "@angular/common": ">=20",
7
7
  "@angular/core": ">=20",
@@ -31,6 +31,7 @@ $shipCard: true !default;
31
31
  background-color: var(--card-bg);
32
32
  inset: 0;
33
33
  z-index: -2;
34
+ border-radius: inherit;
34
35
  }
35
36
 
36
37
  &:after {