@pure-ds/core 0.4.4 → 0.4.6

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.
@@ -85,7 +85,7 @@ export const ontology = {
85
85
  name: "Dialog",
86
86
  description: "Modal dialog element",
87
87
  selectors: ["dialog", ".dialog"],
88
- tags: ["modal", "overlay", "popup"],
88
+ tags: ["modal", "overlay", "popup", "modal"],
89
89
  category: "overlay"
90
90
  },
91
91
  {
@@ -521,6 +521,183 @@ export const ontology = {
521
521
  icons: { source: "svg", sets: ["core", "brand"] },
522
522
  interactive: ["focus", "hover", "active", "disabled"],
523
523
  states: ["success", "warning", "danger", "info", "muted"]
524
+ },
525
+
526
+ // ═══════════════════════════════════════════════════════════════════════════
527
+ // SEARCH RELATIONS (Cross-concept mappings for intelligent search)
528
+ // Used by PDS.query() and Storybook ontology search to expand user queries
529
+ // ═══════════════════════════════════════════════════════════════════════════
530
+ searchRelations: {
531
+ // Typography & Text
532
+ text: ["typography", "truncate", "text-muted", "text-primary", "text-left", "text-center", "text-right", "pds-richtext", "heading", "font", "label", "paragraph", "content", "ellipsis", "overflow", "input"],
533
+ font: ["typography", "text", "heading", "font-size", "font-weight", "font-family"],
534
+ type: ["typography", "text", "font"],
535
+ typography: ["text", "font", "heading", "truncate", "text-muted"],
536
+ heading: ["typography", "text", "font-size", "h1", "h2", "h3"],
537
+ truncate: ["text", "overflow", "ellipsis", "clamp", "nowrap", "typography"],
538
+ ellipsis: ["truncate", "text", "overflow", "clamp"],
539
+ overflow: ["truncate", "scroll", "hidden", "text"],
540
+ paragraph: ["text", "typography", "content", "body"],
541
+ content: ["text", "typography", "body", "article"],
542
+
543
+ // Forms & Inputs
544
+ form: ["input", "field", "label", "button", "fieldset", "pds-jsonform", "pds-upload", "pds-richtext", "pds-calendar", "required", "validation", "submit"],
545
+ input: ["form", "field", "text", "label", "required", "validation"],
546
+ field: ["form", "input", "label", "required"],
547
+ button: ["btn", "interactive", "action", "submit", "form", "btn-primary", "btn-secondary", "btn-working"],
548
+ btn: ["button", "interactive", "action"],
549
+ toggle: ["switch", "checkbox", "boolean", "form", "interactive"],
550
+ switch: ["toggle", "checkbox", "boolean"],
551
+ slider: ["range", "input", "form"],
552
+ range: ["slider", "input", "form"],
553
+ checkbox: ["toggle", "form", "fieldset", "boolean"],
554
+ radio: ["fieldset", "form", "group"],
555
+ select: ["dropdown", "form", "input", "menu"],
556
+ upload: ["file", "pds-upload", "form", "drag-drop"],
557
+ file: ["upload", "pds-upload", "form"],
558
+
559
+ // Modals & Overlays
560
+ modal: ["dialog", "pds-ask", "overlay", "popup", "backdrop", "pds-drawer", "alert", "confirm", "prompt", "lightbox"],
561
+ dialog: ["modal", "pds-ask", "overlay", "popup", "backdrop", "alert", "confirm", "prompt"],
562
+ popup: ["modal", "dialog", "dropdown", "popover", "overlay", "tooltip"],
563
+ popover: ["popup", "tooltip", "overlay"],
564
+ overlay: ["modal", "dialog", "backdrop", "drawer", "popup"],
565
+ drawer: ["pds-drawer", "sidebar", "panel", "overlay", "modal"],
566
+ backdrop: ["overlay", "modal", "dialog", "blur"],
567
+ confirm: ["pds-ask", "dialog", "modal"],
568
+ prompt: ["pds-ask", "dialog", "modal", "input"],
569
+ ask: ["pds-ask", "dialog", "confirm", "prompt", "modal"],
570
+
571
+ // Navigation & Menus
572
+ dropdown: ["menu", "nav-dropdown", "select", "popover"],
573
+ menu: ["dropdown", "navigation", "nav", "list"],
574
+ nav: ["navigation", "menu", "dropdown", "tabs", "links"],
575
+ navigation: ["nav", "menu", "tabs", "pds-tabstrip", "links", "routing"],
576
+ tabs: ["pds-tabstrip", "navigation", "panels"],
577
+ tab: ["tabs", "pds-tabstrip", "panel"],
578
+ link: ["navigation", "anchor", "href", "routing"],
579
+
580
+ // Feedback & Notifications (alert also relates to modal/dialog for "user prompts")
581
+ alert: ["notification", "feedback", "message", "status", "toast", "modal", "dialog", "pds-ask", "confirm", "warning", "error", "info", "success", "danger"],
582
+ notification: ["alert", "toast", "pds-toaster", "feedback", "message", "popup"],
583
+ toast: ["pds-toaster", "notification", "alert", "feedback", "popup", "snackbar"],
584
+ feedback: ["alert", "notification", "toast", "status", "badge", "validation", "error", "success"],
585
+ message: ["alert", "notification", "feedback", "dialog", "toast"],
586
+ status: ["badge", "alert", "indicator", "feedback", "state"],
587
+ error: ["alert", "danger", "validation", "feedback", "warning"],
588
+ success: ["alert", "feedback", "badge", "status", "check"],
589
+ warning: ["alert", "caution", "feedback", "status"],
590
+ info: ["alert", "information", "feedback", "status"],
591
+ danger: ["alert", "error", "feedback", "destructive", "delete"],
592
+ badge: ["status", "pill", "tag", "chip", "indicator", "label"],
593
+ pill: ["badge", "tag", "chip"],
594
+ tag: ["badge", "pill", "chip", "label"],
595
+ chip: ["badge", "pill", "tag"],
596
+
597
+ // Layout & Structure
598
+ layout: ["grid", "flex", "stack", "container", "gap", "spacing", "pds-splitpanel", "section"],
599
+ grid: ["layout", "columns", "css-grid", "table", "gallery"],
600
+ flex: ["layout", "flexbox", "alignment", "row", "column"],
601
+ stack: ["layout", "vertical", "spacing", "column", "gap"],
602
+ container: ["wrapper", "layout", "max-width", "centered"],
603
+ gap: ["spacing", "margin", "padding", "layout"],
604
+ spacing: ["gap", "margin", "padding", "section"],
605
+ section: ["spacing", "layout", "container", "page"],
606
+ split: ["pds-splitpanel", "resizable", "panels", "layout"],
607
+ panel: ["pds-splitpanel", "drawer", "sidebar", "section"],
608
+
609
+ // Cards & Surfaces
610
+ card: ["surface", "container", "elevated", "content"],
611
+ surface: ["card", "background", "elevated", "theming", "color"],
612
+ box: ["card", "container", "surface"],
613
+ elevated: ["surface", "shadow", "card"],
614
+
615
+ // Colors & Theming
616
+ color: ["palette", "theme", "surface", "primary", "secondary", "accent"],
617
+ colours: ["color", "palette", "theme"],
618
+ palette: ["color", "theme", "tokens"],
619
+ theme: ["color", "palette", "dark", "light", "surface"],
620
+ primary: ["color", "button", "badge", "surface"],
621
+ secondary: ["color", "button", "badge", "surface"],
622
+ accent: ["color", "highlight", "surface"],
623
+
624
+ // Borders & Effects
625
+ border: ["border-gradient", "border-glow", "outline", "radius"],
626
+ effect: ["border-gradient", "border-glow", "shadow", "glass", "animation"],
627
+ gradient: ["border-gradient", "color", "background"],
628
+ glow: ["border-glow", "effect", "shadow"],
629
+ shadow: ["elevated", "effect", "depth", "card"],
630
+ radius: ["rounded", "border", "corner"],
631
+ rounded: ["radius", "border", "corner"],
632
+ glass: ["liquid-glass", "backdrop", "blur", "effect"],
633
+
634
+ // Media & Icons
635
+ icon: ["pds-icon", "graphic", "symbol", "svg", "phosphor"],
636
+ image: ["img", "figure", "gallery", "media", "picture"],
637
+ img: ["image", "figure", "gallery", "media"],
638
+ figure: ["image", "media", "caption"],
639
+ gallery: ["images", "grid", "collection", "media"],
640
+ media: ["image", "icon", "figure", "gallery", "video"],
641
+
642
+ // Tables & Data
643
+ table: ["data", "grid", "tabular", "rows", "columns"],
644
+ data: ["table", "json", "form", "display"],
645
+
646
+ // Editors & Rich Content
647
+ editor: ["pds-richtext", "wysiwyg", "text", "content"],
648
+ wysiwyg: ["editor", "pds-richtext", "richtext"],
649
+ richtext: ["pds-richtext", "editor", "wysiwyg", "text"],
650
+
651
+ // Calendar & Dates
652
+ calendar: ["pds-calendar", "date", "picker", "datepicker"],
653
+ date: ["calendar", "pds-calendar", "picker", "input"],
654
+ datepicker: ["calendar", "date", "pds-calendar"],
655
+
656
+ // Scroll & Carousel
657
+ scroll: ["pds-scrollrow", "carousel", "horizontal", "overflow"],
658
+ carousel: ["scroll", "pds-scrollrow", "slider", "gallery"],
659
+
660
+ // Accordion & Disclosure
661
+ accordion: ["details", "collapsible", "expandable", "disclosure"],
662
+ collapsible: ["accordion", "details", "expandable"],
663
+ expandable: ["accordion", "collapsible", "disclosure"],
664
+ details: ["accordion", "summary", "disclosure"],
665
+
666
+ // Divider & Separator
667
+ divider: ["hr", "separator", "line", "rule"],
668
+ separator: ["divider", "hr", "line"],
669
+ hr: ["divider", "separator", "horizontal-rule"],
670
+
671
+ // Interactive States
672
+ interactive: ["hover", "focus", "active", "disabled", "button", "link"],
673
+ hover: ["interactive", "effect", "state"],
674
+ focus: ["interactive", "accessibility", "state", "outline"],
675
+ disabled: ["interactive", "state", "muted"],
676
+ loading: ["btn-working", "spinner", "async", "progress"],
677
+ spinner: ["loading", "btn-working", "progress"],
678
+
679
+ // Accessibility
680
+ accessibility: ["a11y", "aria", "focus", "label", "required"],
681
+ a11y: ["accessibility", "aria", "semantic"],
682
+ aria: ["accessibility", "a11y", "role"],
683
+ required: ["form", "validation", "asterisk", "input"],
684
+ validation: ["form", "required", "error", "feedback"],
685
+
686
+ // Documentation & Getting Started
687
+ start: ["getting-started", "intro", "overview", "whatispds"],
688
+ intro: ["getting-started", "overview", "start", "docs"],
689
+ getting: ["getting-started", "start", "intro"],
690
+ overview: ["intro", "start", "summary", "layout-overview"],
691
+ docs: ["documentation", "reference", "guide"],
692
+
693
+ // Category keywords (for searching by category name - ONE-WAY only, not bidirectional)
694
+ // These should NOT list individual items - that causes pollution when reversed
695
+ primitive: ["primitives"],
696
+ component: ["components"],
697
+ enhancement: ["enhancements"],
698
+ foundation: ["foundations", "color", "icon", "typography", "spacing", "tokens"],
699
+ utility: ["utilities", "text", "backdrop", "shadow", "border", "helper"],
700
+ pattern: ["patterns", "layout", "responsive", "mobile-stack"]
524
701
  }
525
702
  };
526
703