@bergetai/ui 0.1.86 → 0.1.88

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.
@@ -16,7 +16,7 @@ var bergetShikiTheme = {
16
16
  {
17
17
  scope: ["comment", "punctuation.definition.comment"],
18
18
  settings: {
19
- foreground: "#e7e0d980",
19
+ foreground: "#b4b0ad",
20
20
  fontStyle: "italic"
21
21
  }
22
22
  },
@@ -124,4 +124,4 @@ export {
124
124
  defaultLanguages,
125
125
  getHighlighter
126
126
  };
127
- //# sourceMappingURL=chunk-YEGBDRHW.js.map
127
+ //# sourceMappingURL=chunk-SJTRISLQ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/shiki-theme.ts","../src/lib/shiki.ts"],"sourcesContent":["import type { ThemeRegistration } from 'shiki';\n\nexport const bergetShikiTheme: ThemeRegistration = {\n name: 'berget',\n type: 'dark',\n colors: {\n 'editor.background': '#1a1a1a',\n 'editor.foreground': '#e7e0d9',\n },\n settings: [\n {\n settings: {\n foreground: '#e7e0d9', // sandstone-100\n },\n },\n {\n scope: ['comment', 'punctuation.definition.comment'],\n settings: {\n foreground: '#b4b0ad',\n fontStyle: 'italic',\n },\n },\n {\n scope: ['keyword', 'keyword.control', 'keyword.operator.new', 'storage', 'storage.type'],\n settings: {\n foreground: '#57a57f', // moss-400\n },\n },\n {\n scope: ['string', 'string.quoted', 'string.template'],\n settings: {\n foreground: '#86c0a2', // moss-300\n },\n },\n {\n scope: ['entity.name.function', 'support.function', 'meta.function-call'],\n settings: {\n foreground: '#5b9ac1', // fjord-400\n },\n },\n {\n scope: ['entity.name.type', 'entity.name.class', 'support.type', 'support.class'],\n settings: {\n foreground: '#e3a500', // chanterelle-300\n },\n },\n {\n scope: ['constant.numeric', 'constant.language'],\n settings: {\n foreground: '#86c0a2', // moss-300\n },\n },\n {\n scope: ['variable', 'variable.other'],\n settings: {\n foreground: '#e7e0d9', // sandstone-100\n },\n },\n {\n scope: ['variable.parameter'],\n settings: {\n foreground: '#e7e0d9e6',\n },\n },\n {\n scope: ['punctuation', 'keyword.operator', 'keyword.operator.assignment'],\n settings: {\n foreground: '#e7e0d9b3',\n },\n },\n {\n scope: ['entity.name.tag', 'support.type.property-name'],\n settings: {\n foreground: '#57a57f', // moss-400 (for YAML keys, HTML tags)\n },\n },\n {\n scope: ['meta.object-literal.key'],\n settings: {\n foreground: '#5b9ac1', // fjord-400\n },\n },\n ],\n};\n","import { createHighlighterCore, type HighlighterCore } from 'shiki/core';\nimport { createOnigurumaEngine } from 'shiki/engine/oniguruma';\nimport { bergetShikiTheme } from './shiki-theme';\n\nexport const defaultLanguages = [\n import('shiki/langs/typescript.mjs'),\n import('shiki/langs/javascript.mjs'),\n import('shiki/langs/bash.mjs'),\n import('shiki/langs/yaml.mjs'),\n import('shiki/langs/json.mjs'),\n import('shiki/langs/python.mjs'),\n import('shiki/langs/dockerfile.mjs'),\n import('shiki/langs/markdown.mjs'),\n import('shiki/langs/html.mjs'),\n import('shiki/langs/css.mjs'),\n import('shiki/langs/shell.mjs'),\n];\n\nlet highlighterPromise: Promise<HighlighterCore> | null = null;\n\nexport function getHighlighter(): Promise<HighlighterCore> {\n if (!highlighterPromise) {\n highlighterPromise = createHighlighterCore({\n themes: [bergetShikiTheme],\n langs: defaultLanguages,\n engine: createOnigurumaEngine(import('shiki/wasm')),\n });\n }\n return highlighterPromise;\n}\n"],"mappings":";AAEO,IAAM,mBAAsC;AAAA,EACjD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,QAAQ;AAAA,IACN,qBAAqB;AAAA,IACrB,qBAAqB;AAAA,EACvB;AAAA,EACA,UAAU;AAAA,IACR;AAAA,MACE,UAAU;AAAA,QACR,YAAY;AAAA;AAAA,MACd;AAAA,IACF;AAAA,IACA;AAAA,MACE,OAAO,CAAC,WAAW,gCAAgC;AAAA,MACnD,UAAU;AAAA,QACR,YAAY;AAAA,QACZ,WAAW;AAAA,MACb;AAAA,IACF;AAAA,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AAAA,EAC9B,OAAO,4BAA4B;AAAA,EACnC,OAAO,4BAA4B;AAAA,EACnC,OAAO,sBAAsB;AAAA,EAC7B,OAAO,sBAAsB;AAAA,EAC7B,OAAO,sBAAsB;AAAA,EAC7B,OAAO,wBAAwB;AAAA,EAC/B,OAAO,4BAA4B;AAAA,EACnC,OAAO,0BAA0B;AAAA,EACjC,OAAO,sBAAsB;AAAA,EAC7B,OAAO,qBAAqB;AAAA,EAC5B,OAAO,uBAAuB;AAChC;AAEA,IAAI,qBAAsD;AAEnD,SAAS,iBAA2C;AACzD,MAAI,CAAC,oBAAoB;AACvB,yBAAqB,sBAAsB;AAAA,MACzC,QAAQ,CAAC,gBAAgB;AAAA,MACzB,OAAO;AAAA,MACP,QAAQ,sBAAsB,OAAO,YAAY,CAAC;AAAA,IACpD,CAAC;AAAA,EACH;AACA,SAAO;AACT;","names":[]}
package/dist/index.cjs CHANGED
@@ -302,7 +302,7 @@ var import_class_variance_authority = require("class-variance-authority");
302
302
  var import_react_slot = require("@radix-ui/react-slot");
303
303
  var import_jsx_runtime3 = require("react/jsx-runtime");
304
304
  var buttonVariants = (0, import_class_variance_authority.cva)(
305
- "inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
305
+ "inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
306
306
  {
307
307
  variants: {
308
308
  variant: {
@@ -345,8 +345,6 @@ function brandVariantClasses(variant) {
345
345
  switch (variant) {
346
346
  case "primary":
347
347
  return "bg-berget-button-primary-bg text-berget-button-primary-fg shadow-lg hover:bg-berget-button-primary-bg/90 hover:shadow-xl";
348
- case "secondary":
349
- return "bg-berget-button-secondary-bg text-berget-button-secondary-fg shadow hover:bg-berget-button-secondary-bg/80 hover:shadow-lg";
350
348
  case "destructive":
351
349
  return "bg-berget-button-destructive-bg text-berget-button-destructive-fg shadow-sm hover:bg-berget-button-destructive-bg/80 hover:shadow";
352
350
  case "outline":
@@ -363,6 +361,7 @@ function brandVariantClasses(variant) {
363
361
  function primitiveVariant(variant) {
364
362
  switch (variant) {
365
363
  case "primary":
364
+ case "destructive":
366
365
  return "ghost";
367
366
  default:
368
367
  return variant;
@@ -452,7 +451,7 @@ var typographyVariants = (0, import_class_variance_authority2.cva)("", {
452
451
  color: {
453
452
  default: "text-berget-foreground",
454
453
  muted: "text-berget-muted-foreground",
455
- dim: "text-berget-foreground/50"
454
+ dim: "text-berget-foreground/65"
456
455
  }
457
456
  },
458
457
  defaultVariants: {
@@ -784,7 +783,7 @@ var Checkbox = React13.forwardRef(({ className, children, ...props }, ref) => /*
784
783
  {
785
784
  ref,
786
785
  className: cn(
787
- "peer ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
786
+ "peer cursor-pointer ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
788
787
  className
789
788
  ),
790
789
  ...props,
@@ -977,7 +976,7 @@ var SelectTrigger = React16.forwardRef(({ className, children, ...props }, ref)
977
976
  {
978
977
  ref,
979
978
  className: cn(
980
- "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:border-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
979
+ "flex h-10 w-full cursor-pointer items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:border-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
981
980
  className
982
981
  ),
983
982
  ...props,
@@ -1399,26 +1398,29 @@ function FieldGroup({ className, ...props }) {
1399
1398
  }
1400
1399
  );
1401
1400
  }
1402
- var fieldVariants = (0, import_class_variance_authority12.cva)("group/field data-[invalid=true]:text-destructive flex w-full gap-3", {
1403
- variants: {
1404
- orientation: {
1405
- vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
1406
- horizontal: [
1407
- "flex-row items-center",
1408
- "[&>[data-slot=field-label]]:flex-auto",
1409
- "has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px has-[>[data-slot=field-content]]:items-start"
1410
- ],
1411
- responsive: [
1412
- "@md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto flex-col [&>*]:w-full [&>.sr-only]:w-auto",
1413
- "@md/field-group:[&>[data-slot=field-label]]:flex-auto",
1414
- "@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
1415
- ]
1401
+ var fieldVariants = (0, import_class_variance_authority12.cva)(
1402
+ "group/field data-[invalid=true]:text-berget-destructive-foreground flex w-full gap-3",
1403
+ {
1404
+ variants: {
1405
+ orientation: {
1406
+ vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
1407
+ horizontal: [
1408
+ "flex-row items-center",
1409
+ "[&>[data-slot=field-label]]:flex-auto",
1410
+ "has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px has-[>[data-slot=field-content]]:items-start"
1411
+ ],
1412
+ responsive: [
1413
+ "@md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto flex-col [&>*]:w-full [&>.sr-only]:w-auto",
1414
+ "@md/field-group:[&>[data-slot=field-label]]:flex-auto",
1415
+ "@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
1416
+ ]
1417
+ }
1418
+ },
1419
+ defaultVariants: {
1420
+ orientation: "vertical"
1416
1421
  }
1417
- },
1418
- defaultVariants: {
1419
- orientation: "vertical"
1420
1422
  }
1421
- });
1423
+ );
1422
1424
  function Field({
1423
1425
  className,
1424
1426
  orientation = "vertical",
@@ -1543,7 +1545,7 @@ function FieldError({
1543
1545
  {
1544
1546
  role: "alert",
1545
1547
  "data-slot": "field-error",
1546
- className: cn("text-destructive text-sm font-normal", className),
1548
+ className: cn("text-berget-destructive-foreground text-sm font-normal", className),
1547
1549
  ...props,
1548
1550
  children: content
1549
1551
  }
@@ -1592,7 +1594,7 @@ Icon2.displayName = "Icon";
1592
1594
  var import_lucide_react5 = require("lucide-react");
1593
1595
  var import_jsx_runtime24 = require("react/jsx-runtime");
1594
1596
  var linkVariants = (0, import_class_variance_authority13.cva)(
1595
- "inline-flex items-center gap-2 transition-all duration-200 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50",
1597
+ "inline-flex cursor-pointer items-center gap-2 transition-all duration-200 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50",
1596
1598
  {
1597
1599
  variants: {
1598
1600
  variant: {
@@ -2017,6 +2019,7 @@ var LanguageSelect = React30.forwardRef(({ className, options, value, onValueCha
2017
2019
  SelectPrimitive2.Trigger,
2018
2020
  {
2019
2021
  ref,
2022
+ "aria-label": "Select language",
2020
2023
  className: cn(
2021
2024
  // Base styles
2022
2025
  "h-8 w-8 p-0 rounded-full",
@@ -2608,7 +2611,7 @@ var bergetShikiTheme = {
2608
2611
  {
2609
2612
  scope: ["comment", "punctuation.definition.comment"],
2610
2613
  settings: {
2611
- foreground: "#e7e0d980",
2614
+ foreground: "#b4b0ad",
2612
2615
  fontStyle: "italic"
2613
2616
  }
2614
2617
  },