@almadar/patterns 2.0.0 → 2.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  // src/patterns-registry.json
2
2
  var patterns_registry_default = {
3
3
  version: "1.0.0",
4
- exportedAt: "2026-02-23T07:59:54.575Z",
4
+ exportedAt: "2026-03-03T11:14:06.592Z",
5
5
  patterns: {
6
6
  "entity-table": {
7
7
  type: "entity-table",
@@ -446,7 +446,7 @@ var patterns_registry_default = {
446
446
  types: [
447
447
  "node"
448
448
  ],
449
- description: "Children elements (cards) - optional when using entity/data props"
449
+ description: "Children elements (cards) - optional when using entity prop"
450
450
  },
451
451
  fields: {
452
452
  types: [
@@ -491,6 +491,84 @@ var patterns_registry_default = {
491
491
  ],
492
492
  typicalSize: "medium",
493
493
  propsSchema: {
494
+ entity: {
495
+ types: [
496
+ "string"
497
+ ],
498
+ description: "Entity name for schema-driven integration"
499
+ },
500
+ data: {
501
+ types: [
502
+ "array"
503
+ ],
504
+ description: "Data array provided by the trait via render-ui"
505
+ },
506
+ className: {
507
+ types: [
508
+ "string"
509
+ ],
510
+ description: "Additional CSS classes"
511
+ },
512
+ isLoading: {
513
+ types: [
514
+ "boolean"
515
+ ],
516
+ description: "Loading state indicator"
517
+ },
518
+ error: {
519
+ types: [
520
+ "object"
521
+ ],
522
+ description: "Error state"
523
+ },
524
+ sortBy: {
525
+ types: [
526
+ "string"
527
+ ],
528
+ description: "Current sort field"
529
+ },
530
+ sortDirection: {
531
+ types: [
532
+ "string"
533
+ ],
534
+ description: "Current sort direction"
535
+ },
536
+ searchValue: {
537
+ types: [
538
+ "string"
539
+ ],
540
+ description: "Current search query value"
541
+ },
542
+ page: {
543
+ types: [
544
+ "number"
545
+ ],
546
+ description: "Current page number"
547
+ },
548
+ pageSize: {
549
+ types: [
550
+ "number"
551
+ ],
552
+ description: "Number of items per page"
553
+ },
554
+ totalCount: {
555
+ types: [
556
+ "number"
557
+ ],
558
+ description: "Total number of items"
559
+ },
560
+ activeFilters: {
561
+ types: [
562
+ "object"
563
+ ],
564
+ description: "Active filters"
565
+ },
566
+ selectedIds: {
567
+ types: [
568
+ "array"
569
+ ],
570
+ description: "Currently selected item IDs"
571
+ },
494
572
  title: {
495
573
  types: [
496
574
  "string"
@@ -551,13 +629,6 @@ var patterns_registry_default = {
551
629
  ],
552
630
  description: "Alias for fields - backwards compatibility"
553
631
  },
554
- data: {
555
- types: [
556
- "object",
557
- "unknown"
558
- ],
559
- description: "Data object provided by the trait via render-ui"
560
- },
561
632
  initialData: {
562
633
  types: [
563
634
  "object",
@@ -582,6 +653,24 @@ var patterns_registry_default = {
582
653
  "string"
583
654
  ],
584
655
  description: "Panel width (CSS value, e.g., '400px', '50%')"
656
+ },
657
+ entityId: {
658
+ types: [
659
+ "string"
660
+ ],
661
+ description: "Entity ID for fetching specific entity"
662
+ },
663
+ displayFields: {
664
+ types: [
665
+ "unknown"
666
+ ],
667
+ description: "Display fields (alias for fields)"
668
+ },
669
+ showActions: {
670
+ types: [
671
+ "boolean"
672
+ ],
673
+ description: "Show actions flag"
585
674
  }
586
675
  }
587
676
  },
@@ -741,7 +830,8 @@ var patterns_registry_default = {
741
830
  },
742
831
  entity: {
743
832
  types: [
744
- "string"
833
+ "string",
834
+ "orbitalentity"
745
835
  ],
746
836
  description: "Schema-based props"
747
837
  },
@@ -927,7 +1017,8 @@ var patterns_registry_default = {
927
1017
  },
928
1018
  entity: {
929
1019
  types: [
930
- "string"
1020
+ "string",
1021
+ "orbitalentity"
931
1022
  ],
932
1023
  description: "Schema-based props"
933
1024
  },
@@ -1899,6 +1990,84 @@ var patterns_registry_default = {
1899
1990
  ],
1900
1991
  typicalSize: "small",
1901
1992
  propsSchema: {
1993
+ entity: {
1994
+ types: [
1995
+ "string"
1996
+ ],
1997
+ description: "Entity name for schema-driven integration"
1998
+ },
1999
+ data: {
2000
+ types: [
2001
+ "array"
2002
+ ],
2003
+ description: "Data array provided by the trait via render-ui"
2004
+ },
2005
+ className: {
2006
+ types: [
2007
+ "string"
2008
+ ],
2009
+ description: "Additional CSS classes"
2010
+ },
2011
+ isLoading: {
2012
+ types: [
2013
+ "boolean"
2014
+ ],
2015
+ description: "Loading state indicator"
2016
+ },
2017
+ error: {
2018
+ types: [
2019
+ "object"
2020
+ ],
2021
+ description: "Error state"
2022
+ },
2023
+ sortBy: {
2024
+ types: [
2025
+ "string"
2026
+ ],
2027
+ description: "Current sort field"
2028
+ },
2029
+ sortDirection: {
2030
+ types: [
2031
+ "string"
2032
+ ],
2033
+ description: "Current sort direction"
2034
+ },
2035
+ searchValue: {
2036
+ types: [
2037
+ "string"
2038
+ ],
2039
+ description: "Current search query value"
2040
+ },
2041
+ page: {
2042
+ types: [
2043
+ "number"
2044
+ ],
2045
+ description: "Current page number"
2046
+ },
2047
+ pageSize: {
2048
+ types: [
2049
+ "number"
2050
+ ],
2051
+ description: "Number of items per page"
2052
+ },
2053
+ totalCount: {
2054
+ types: [
2055
+ "number"
2056
+ ],
2057
+ description: "Total number of items"
2058
+ },
2059
+ activeFilters: {
2060
+ types: [
2061
+ "object"
2062
+ ],
2063
+ description: "Active filters"
2064
+ },
2065
+ selectedIds: {
2066
+ types: [
2067
+ "array"
2068
+ ],
2069
+ description: "Currently selected item IDs"
2070
+ },
1902
2071
  label: {
1903
2072
  types: [
1904
2073
  "string"
@@ -1980,41 +2149,11 @@ var patterns_registry_default = {
1980
2149
  ],
1981
2150
  description: "Action button"
1982
2151
  },
1983
- className: {
1984
- types: [
1985
- "string"
1986
- ],
1987
- description: "className prop"
1988
- },
1989
- entity: {
1990
- types: [
1991
- "string"
1992
- ],
1993
- description: "Schema-based props"
1994
- },
1995
2152
  metrics: {
1996
2153
  types: [
1997
2154
  "unknown"
1998
2155
  ],
1999
2156
  description: "Metrics to display (schema format) - accepts readonly for compatibility with generated const arrays"
2000
- },
2001
- data: {
2002
- types: [
2003
- "unknown"
2004
- ],
2005
- description: "Data to calculate stats from - accepts readonly for compatibility with generated const arrays"
2006
- },
2007
- isLoading: {
2008
- types: [
2009
- "boolean"
2010
- ],
2011
- description: "Loading state indicator"
2012
- },
2013
- error: {
2014
- types: [
2015
- "error"
2016
- ],
2017
- description: "Error state"
2018
2157
  }
2019
2158
  }
2020
2159
  },
@@ -6533,108 +6672,162 @@ var patterns_registry_default = {
6533
6672
  ],
6534
6673
  typicalSize: "large",
6535
6674
  propsSchema: {
6536
- logo: {
6675
+ entity: {
6537
6676
  types: [
6538
- "node"
6677
+ "string"
6539
6678
  ],
6540
- description: "Logo/Brand content - can be a ReactNode or logo config"
6679
+ description: "Entity name for schema-driven integration"
6541
6680
  },
6542
- logoSrc: {
6681
+ data: {
6543
6682
  types: [
6544
- "string"
6683
+ "array"
6545
6684
  ],
6546
- description: "Logo image source"
6685
+ description: "Data array provided by the trait via render-ui"
6547
6686
  },
6548
- brandName: {
6687
+ className: {
6549
6688
  types: [
6550
6689
  "string"
6551
6690
  ],
6552
- description: "Brand/App name"
6691
+ description: "Additional CSS classes"
6553
6692
  },
6554
- items: {
6693
+ isLoading: {
6555
6694
  types: [
6556
- "array"
6695
+ "boolean"
6557
6696
  ],
6558
- description: "Navigation items",
6559
- required: true
6697
+ description: "Loading state indicator"
6560
6698
  },
6561
- userSection: {
6699
+ error: {
6562
6700
  types: [
6563
- "node"
6701
+ "object"
6564
6702
  ],
6565
- description: "User section content"
6703
+ description: "Error state"
6566
6704
  },
6567
- footerContent: {
6705
+ sortBy: {
6568
6706
  types: [
6569
- "node"
6707
+ "string"
6570
6708
  ],
6571
- description: "Footer content (e.g., theme toggle)"
6709
+ description: "Current sort field"
6572
6710
  },
6573
- collapsed: {
6711
+ sortDirection: {
6574
6712
  types: [
6575
- "boolean"
6713
+ "string"
6576
6714
  ],
6577
- description: "Collapsed state (controlled)"
6715
+ description: "Current sort direction"
6578
6716
  },
6579
- defaultCollapsed: {
6717
+ searchValue: {
6580
6718
  types: [
6581
- "boolean"
6719
+ "string"
6582
6720
  ],
6583
- description: "Default collapsed state"
6721
+ description: "Current search query value"
6584
6722
  },
6585
- onCollapseChange: {
6723
+ page: {
6586
6724
  types: [
6587
- "function"
6725
+ "number"
6588
6726
  ],
6589
- description: "Callback when collapse state changes"
6727
+ description: "Current page number"
6590
6728
  },
6591
- hideCollapseButton: {
6729
+ pageSize: {
6592
6730
  types: [
6593
- "boolean"
6731
+ "number"
6594
6732
  ],
6595
- description: "Hide the collapse/expand button"
6733
+ description: "Number of items per page"
6596
6734
  },
6597
- showCloseButton: {
6735
+ totalCount: {
6598
6736
  types: [
6599
- "boolean"
6737
+ "number"
6600
6738
  ],
6601
- description: "Show a close button (for mobile)"
6739
+ description: "Total number of items"
6602
6740
  },
6603
- onClose: {
6741
+ activeFilters: {
6604
6742
  types: [
6605
- "function"
6743
+ "object"
6606
6744
  ],
6607
- description: "Callback when close button is clicked"
6745
+ description: "Active filters"
6608
6746
  },
6609
- onLogoClick: {
6747
+ selectedIds: {
6610
6748
  types: [
6611
- "function"
6749
+ "array"
6612
6750
  ],
6613
- description: "Callback when logo/brand is clicked"
6751
+ description: "Currently selected item IDs"
6614
6752
  },
6615
- className: {
6753
+ logo: {
6754
+ types: [
6755
+ "node"
6756
+ ],
6757
+ description: "Logo/Brand content - can be a ReactNode or logo config"
6758
+ },
6759
+ logoSrc: {
6616
6760
  types: [
6617
6761
  "string"
6618
6762
  ],
6619
- description: "Additional CSS classes"
6763
+ description: "Logo image source"
6620
6764
  },
6621
- isLoading: {
6765
+ brandName: {
6766
+ types: [
6767
+ "string"
6768
+ ],
6769
+ description: "Brand/App name"
6770
+ },
6771
+ items: {
6772
+ types: [
6773
+ "array"
6774
+ ],
6775
+ description: "Navigation items",
6776
+ required: true
6777
+ },
6778
+ userSection: {
6779
+ types: [
6780
+ "node"
6781
+ ],
6782
+ description: "User section content"
6783
+ },
6784
+ footerContent: {
6785
+ types: [
6786
+ "node"
6787
+ ],
6788
+ description: "Footer content (e.g., theme toggle)"
6789
+ },
6790
+ collapsed: {
6622
6791
  types: [
6623
6792
  "boolean"
6624
6793
  ],
6625
- description: "Loading state indicator"
6794
+ description: "Collapsed state (controlled)"
6626
6795
  },
6627
- error: {
6796
+ defaultCollapsed: {
6628
6797
  types: [
6629
- "error"
6798
+ "boolean"
6630
6799
  ],
6631
- description: "Error state"
6800
+ description: "Default collapsed state"
6632
6801
  },
6633
- entity: {
6802
+ collapseChangeEvent: {
6634
6803
  types: [
6635
6804
  "string"
6636
6805
  ],
6637
- description: "Entity name for schema-driven auto-fetch"
6806
+ description: "Event emitted when collapse state changes, payload: { collapsed: boolean }"
6807
+ },
6808
+ hideCollapseButton: {
6809
+ types: [
6810
+ "boolean"
6811
+ ],
6812
+ description: "Hide the collapse/expand button"
6813
+ },
6814
+ showCloseButton: {
6815
+ types: [
6816
+ "boolean"
6817
+ ],
6818
+ description: "Show a close button (for mobile)"
6819
+ },
6820
+ closeEvent: {
6821
+ types: [
6822
+ "string"
6823
+ ],
6824
+ description: "Event emitted when close button is clicked"
6825
+ },
6826
+ logoClickEvent: {
6827
+ types: [
6828
+ "string"
6829
+ ],
6830
+ description: "Event emitted when logo/brand is clicked"
6638
6831
  }
6639
6832
  }
6640
6833
  },
@@ -7639,59 +7832,107 @@ var patterns_registry_default = {
7639
7832
  ],
7640
7833
  typicalSize: "medium",
7641
7834
  propsSchema: {
7642
- title: {
7835
+ entity: {
7643
7836
  types: [
7644
7837
  "string"
7645
7838
  ],
7646
- description: "Timeline title"
7839
+ description: "Entity name for schema-driven integration"
7647
7840
  },
7648
- items: {
7841
+ data: {
7649
7842
  types: [
7650
- "unknown"
7843
+ "array"
7651
7844
  ],
7652
- description: "Timeline items"
7845
+ description: "Data array provided by the trait via render-ui"
7653
7846
  },
7654
- data: {
7847
+ className: {
7655
7848
  types: [
7656
- "unknown"
7849
+ "string"
7657
7850
  ],
7658
- description: "Schema-driven data"
7851
+ description: "Additional CSS classes"
7659
7852
  },
7660
- fields: {
7853
+ isLoading: {
7661
7854
  types: [
7662
- "unknown"
7855
+ "boolean"
7663
7856
  ],
7664
- description: "Fields to display"
7857
+ description: "Loading state indicator"
7665
7858
  },
7666
- itemActions: {
7859
+ error: {
7667
7860
  types: [
7668
- "unknown"
7861
+ "object"
7669
7862
  ],
7670
- description: "Actions per item"
7863
+ description: "Error state"
7671
7864
  },
7672
- entity: {
7865
+ sortBy: {
7673
7866
  types: [
7674
7867
  "string"
7675
7868
  ],
7676
- description: "Entity name for schema-driven auto-fetch"
7869
+ description: "Current sort field"
7677
7870
  },
7678
- isLoading: {
7871
+ sortDirection: {
7679
7872
  types: [
7680
- "boolean"
7873
+ "string"
7681
7874
  ],
7682
- description: "Loading state"
7875
+ description: "Current sort direction"
7683
7876
  },
7684
- error: {
7877
+ searchValue: {
7685
7878
  types: [
7686
- "error"
7879
+ "string"
7687
7880
  ],
7688
- description: "Error state"
7881
+ description: "Current search query value"
7689
7882
  },
7690
- className: {
7883
+ page: {
7884
+ types: [
7885
+ "number"
7886
+ ],
7887
+ description: "Current page number"
7888
+ },
7889
+ pageSize: {
7890
+ types: [
7891
+ "number"
7892
+ ],
7893
+ description: "Number of items per page"
7894
+ },
7895
+ totalCount: {
7896
+ types: [
7897
+ "number"
7898
+ ],
7899
+ description: "Total number of items"
7900
+ },
7901
+ activeFilters: {
7902
+ types: [
7903
+ "object"
7904
+ ],
7905
+ description: "Active filters"
7906
+ },
7907
+ selectedIds: {
7908
+ types: [
7909
+ "array"
7910
+ ],
7911
+ description: "Currently selected item IDs"
7912
+ },
7913
+ title: {
7691
7914
  types: [
7692
7915
  "string"
7693
7916
  ],
7694
- description: "Additional CSS classes"
7917
+ description: "Timeline title"
7918
+ },
7919
+ items: {
7920
+ types: [
7921
+ "unknown"
7922
+ ],
7923
+ description: "Timeline items"
7924
+ },
7925
+ fields: {
7926
+ types: [
7927
+ "unknown"
7928
+ ],
7929
+ description: "Fields to display"
7930
+ },
7931
+ itemActions: {
7932
+ types: [
7933
+ "unknown"
7934
+ ],
7935
+ description: "Actions per item"
7695
7936
  }
7696
7937
  }
7697
7938
  },
@@ -7707,89 +7948,137 @@ var patterns_registry_default = {
7707
7948
  ],
7708
7949
  typicalSize: "medium",
7709
7950
  propsSchema: {
7710
- title: {
7951
+ entity: {
7711
7952
  types: [
7712
7953
  "string"
7713
7954
  ],
7714
- description: "Gallery title"
7715
- },
7716
- items: {
7717
- types: [
7718
- "unknown"
7719
- ],
7720
- description: "Media items"
7955
+ description: "Entity name for schema-driven integration"
7721
7956
  },
7722
7957
  data: {
7723
7958
  types: [
7724
- "unknown"
7959
+ "array"
7725
7960
  ],
7726
- description: "Schema-driven data"
7961
+ description: "Data array provided by the trait via render-ui"
7727
7962
  },
7728
- columns: {
7963
+ className: {
7729
7964
  types: [
7730
- "number"
7965
+ "string"
7731
7966
  ],
7732
- description: "Column count"
7967
+ description: "Additional CSS classes"
7733
7968
  },
7734
- selectable: {
7969
+ isLoading: {
7735
7970
  types: [
7736
7971
  "boolean"
7737
7972
  ],
7738
- description: "Enable item selection"
7973
+ description: "Loading state indicator"
7739
7974
  },
7740
- selectedItems: {
7975
+ error: {
7741
7976
  types: [
7742
- "unknown"
7977
+ "object"
7743
7978
  ],
7744
- description: "Selected item IDs"
7979
+ description: "Error state"
7745
7980
  },
7746
- onSelectionChange: {
7981
+ sortBy: {
7747
7982
  types: [
7748
- "function"
7983
+ "string"
7749
7984
  ],
7750
- description: "Selection change callback"
7985
+ description: "Current sort field"
7751
7986
  },
7752
- showUpload: {
7987
+ sortDirection: {
7753
7988
  types: [
7754
- "boolean"
7989
+ "string"
7755
7990
  ],
7756
- description: "Show upload button"
7991
+ description: "Current sort direction"
7757
7992
  },
7758
- actions: {
7993
+ searchValue: {
7759
7994
  types: [
7760
- "unknown"
7995
+ "string"
7761
7996
  ],
7762
- description: "Actions"
7997
+ description: "Current search query value"
7763
7998
  },
7764
- aspectRatio: {
7999
+ page: {
7765
8000
  types: [
7766
- "string"
8001
+ "number"
7767
8002
  ],
7768
- description: "Aspect ratio for thumbnails"
8003
+ description: "Current page number"
7769
8004
  },
7770
- entity: {
8005
+ pageSize: {
7771
8006
  types: [
7772
- "string"
8007
+ "number"
7773
8008
  ],
7774
- description: "Entity name for schema-driven auto-fetch"
8009
+ description: "Number of items per page"
7775
8010
  },
7776
- isLoading: {
8011
+ totalCount: {
7777
8012
  types: [
7778
- "boolean"
8013
+ "number"
7779
8014
  ],
7780
- description: "Loading state"
8015
+ description: "Total number of items"
7781
8016
  },
7782
- error: {
8017
+ activeFilters: {
7783
8018
  types: [
7784
- "error"
8019
+ "object"
7785
8020
  ],
7786
- description: "Error state"
8021
+ description: "Active filters"
7787
8022
  },
7788
- className: {
8023
+ selectedIds: {
8024
+ types: [
8025
+ "array"
8026
+ ],
8027
+ description: "Currently selected item IDs"
8028
+ },
8029
+ title: {
7789
8030
  types: [
7790
8031
  "string"
7791
8032
  ],
7792
- description: "Additional CSS classes"
8033
+ description: "Gallery title"
8034
+ },
8035
+ items: {
8036
+ types: [
8037
+ "unknown"
8038
+ ],
8039
+ description: "Media items"
8040
+ },
8041
+ columns: {
8042
+ types: [
8043
+ "number"
8044
+ ],
8045
+ description: "Column count"
8046
+ },
8047
+ selectable: {
8048
+ types: [
8049
+ "boolean"
8050
+ ],
8051
+ description: "Enable item selection"
8052
+ },
8053
+ selectedItems: {
8054
+ types: [
8055
+ "unknown"
8056
+ ],
8057
+ description: "Selected item IDs"
8058
+ },
8059
+ selectionEvent: {
8060
+ types: [
8061
+ "string"
8062
+ ],
8063
+ description: "Event name emitted when selection changes (emitted as UI:{selectionEvent})"
8064
+ },
8065
+ showUpload: {
8066
+ types: [
8067
+ "boolean"
8068
+ ],
8069
+ description: "Show upload button"
8070
+ },
8071
+ actions: {
8072
+ types: [
8073
+ "unknown"
8074
+ ],
8075
+ description: "Actions"
8076
+ },
8077
+ aspectRatio: {
8078
+ types: [
8079
+ "string"
8080
+ ],
8081
+ description: "Aspect ratio for thumbnails"
7793
8082
  }
7794
8083
  }
7795
8084
  },
@@ -9174,18 +9463,6 @@ var patterns_registry_default = {
9174
9463
  description: "World map entity data",
9175
9464
  required: true
9176
9465
  },
9177
- isLoading: {
9178
- types: [
9179
- "boolean"
9180
- ],
9181
- description: "Loading state indicator"
9182
- },
9183
- error: {
9184
- types: [
9185
- "error"
9186
- ],
9187
- description: "Error state"
9188
- },
9189
9466
  scale: {
9190
9467
  types: [
9191
9468
  "number"
@@ -11698,173 +11975,1167 @@ var patterns_registry_default = {
11698
11975
  types: [
11699
11976
  "number"
11700
11977
  ],
11701
- description: "Number of items per page"
11978
+ description: "Number of items per page"
11979
+ },
11980
+ totalCount: {
11981
+ types: [
11982
+ "number"
11983
+ ],
11984
+ description: "Total number of items"
11985
+ },
11986
+ activeFilters: {
11987
+ types: [
11988
+ "object"
11989
+ ],
11990
+ description: "Active filters"
11991
+ },
11992
+ selectedIds: {
11993
+ types: [
11994
+ "array"
11995
+ ],
11996
+ description: "Currently selected item IDs"
11997
+ },
11998
+ parts: {
11999
+ types: [
12000
+ "array"
12001
+ ],
12002
+ description: "parts prop",
12003
+ required: true
12004
+ },
12005
+ currentChapterId: {
12006
+ types: [
12007
+ "string"
12008
+ ],
12009
+ description: "currentChapterId prop"
12010
+ },
12011
+ direction: {
12012
+ types: [
12013
+ "string"
12014
+ ],
12015
+ description: "direction prop"
12016
+ }
12017
+ }
12018
+ },
12019
+ "book-viewer": {
12020
+ type: "book-viewer",
12021
+ category: "display",
12022
+ description: "BookViewer Organism Flippable book reader with cover, TOC, chapter views, and navigation. Supports RTL layout (Arabic), CSS slide transitions, and print mode. Page model: 0 = cover, 1 = TOC, 2+ = chapters (flattened from parts) Event Contract: - Emits: UI:BOOK_PAGE_CHANGE { pageIndex, chapterId? } - Listens: UI:BOOK_START, UI:BOOK_NAVIGATE, UI:BOOK_PAGE_PREV/NEXT, UI:BOOK_PRINT, UI:BOOK_SHOW_TOC",
12023
+ suggestedFor: [
12024
+ "book",
12025
+ "viewer",
12026
+ "book viewer"
12027
+ ],
12028
+ typicalSize: "large",
12029
+ propsSchema: {
12030
+ entity: {
12031
+ types: [
12032
+ "string"
12033
+ ],
12034
+ description: "Entity name for schema-driven integration"
12035
+ },
12036
+ data: {
12037
+ types: [
12038
+ "array"
12039
+ ],
12040
+ description: "Data array provided by the trait via render-ui"
12041
+ },
12042
+ className: {
12043
+ types: [
12044
+ "string"
12045
+ ],
12046
+ description: "Additional CSS classes"
12047
+ },
12048
+ isLoading: {
12049
+ types: [
12050
+ "boolean"
12051
+ ],
12052
+ description: "Loading state indicator"
12053
+ },
12054
+ error: {
12055
+ types: [
12056
+ "object"
12057
+ ],
12058
+ description: "Error state"
12059
+ },
12060
+ sortBy: {
12061
+ types: [
12062
+ "string"
12063
+ ],
12064
+ description: "Current sort field"
12065
+ },
12066
+ sortDirection: {
12067
+ types: [
12068
+ "string"
12069
+ ],
12070
+ description: "Current sort direction"
12071
+ },
12072
+ searchValue: {
12073
+ types: [
12074
+ "string"
12075
+ ],
12076
+ description: "Current search query value"
12077
+ },
12078
+ page: {
12079
+ types: [
12080
+ "number"
12081
+ ],
12082
+ description: "Current page number"
12083
+ },
12084
+ pageSize: {
12085
+ types: [
12086
+ "number"
12087
+ ],
12088
+ description: "Number of items per page"
12089
+ },
12090
+ totalCount: {
12091
+ types: [
12092
+ "number"
12093
+ ],
12094
+ description: "Total number of items"
12095
+ },
12096
+ activeFilters: {
12097
+ types: [
12098
+ "object"
12099
+ ],
12100
+ description: "Active filters"
12101
+ },
12102
+ selectedIds: {
12103
+ types: [
12104
+ "array"
12105
+ ],
12106
+ description: "Currently selected item IDs"
12107
+ },
12108
+ initialPage: {
12109
+ types: [
12110
+ "number"
12111
+ ],
12112
+ description: "Initial page index (default: 0 = cover)"
12113
+ },
12114
+ fieldMap: {
12115
+ types: [
12116
+ "bookfieldmap",
12117
+ "string"
12118
+ ],
12119
+ description: 'Field name translation map \u2014 a BookFieldMap object or locale key ("ar")'
12120
+ }
12121
+ }
12122
+ },
12123
+ "scaled-diagram": {
12124
+ type: "scaled-diagram",
12125
+ category: "component",
12126
+ description: "ScaledDiagram Molecule Wraps a fixed-size diagram (like JazariStateMachine / StateMachineView) and CSS-scales it to fit the parent container width. The diagram renders at its natural (large) size. We observe the content element and once the diagram is measured we apply transform:scale() with a corrected container height so surrounding layout flows correctly. Event Contract: - No events emitted (layout-only wrapper) - entityAware: false",
12127
+ suggestedFor: [
12128
+ "scaled",
12129
+ "diagram",
12130
+ "scaled diagram"
12131
+ ],
12132
+ typicalSize: "medium",
12133
+ propsSchema: {
12134
+ children: {
12135
+ types: [
12136
+ "node"
12137
+ ],
12138
+ description: "children prop",
12139
+ required: true
12140
+ },
12141
+ className: {
12142
+ types: [
12143
+ "string"
12144
+ ],
12145
+ description: "className prop"
12146
+ }
12147
+ }
12148
+ },
12149
+ "combat-log": {
12150
+ type: "combat-log",
12151
+ category: "game",
12152
+ description: "CombatLog Component Scrollable log of combat events with icons and colors. Generalized from Trait Wars \u2014 removed asset manifest coupling.",
12153
+ suggestedFor: [
12154
+ "combat",
12155
+ "log",
12156
+ "combat log"
12157
+ ],
12158
+ typicalSize: "large",
12159
+ propsSchema: {
12160
+ events: {
12161
+ types: [
12162
+ "array"
12163
+ ],
12164
+ description: "events prop",
12165
+ required: true
12166
+ },
12167
+ maxVisible: {
12168
+ types: [
12169
+ "number"
12170
+ ],
12171
+ description: "maxVisible prop"
12172
+ },
12173
+ autoScroll: {
12174
+ types: [
12175
+ "boolean"
12176
+ ],
12177
+ description: "autoScroll prop"
12178
+ },
12179
+ showTimestamps: {
12180
+ types: [
12181
+ "boolean"
12182
+ ],
12183
+ description: "showTimestamps prop"
12184
+ },
12185
+ title: {
12186
+ types: [
12187
+ "string"
12188
+ ],
12189
+ description: "title prop"
12190
+ },
12191
+ className: {
12192
+ types: [
12193
+ "string"
12194
+ ],
12195
+ description: "className prop"
12196
+ }
12197
+ }
12198
+ },
12199
+ "simulation-canvas": {
12200
+ type: "simulation-canvas",
12201
+ category: "game",
12202
+ description: "SimulationCanvas Self-contained 2D physics canvas for educational presets. Runs its own Euler integration loop \u2014 no external physics hook needed.",
12203
+ suggestedFor: [
12204
+ "simulation",
12205
+ "canvas",
12206
+ "simulation canvas"
12207
+ ],
12208
+ typicalSize: "large",
12209
+ propsSchema: {
12210
+ preset: {
12211
+ types: [
12212
+ "physicspreset"
12213
+ ],
12214
+ description: "preset prop",
12215
+ required: true
12216
+ },
12217
+ width: {
12218
+ types: [
12219
+ "number"
12220
+ ],
12221
+ description: "width prop"
12222
+ },
12223
+ height: {
12224
+ types: [
12225
+ "number"
12226
+ ],
12227
+ description: "height prop"
12228
+ },
12229
+ running: {
12230
+ types: [
12231
+ "boolean"
12232
+ ],
12233
+ description: "running prop",
12234
+ required: true
12235
+ },
12236
+ speed: {
12237
+ types: [
12238
+ "number"
12239
+ ],
12240
+ description: "speed prop"
12241
+ },
12242
+ className: {
12243
+ types: [
12244
+ "string"
12245
+ ],
12246
+ description: "className prop"
12247
+ }
12248
+ }
12249
+ },
12250
+ "simulation-controls": {
12251
+ type: "simulation-controls",
12252
+ category: "display",
12253
+ description: "SimulationControls Play/pause/step/reset controls with speed and parameter sliders.",
12254
+ suggestedFor: [
12255
+ "simulation",
12256
+ "controls",
12257
+ "simulation controls"
12258
+ ],
12259
+ typicalSize: "large",
12260
+ propsSchema: {
12261
+ running: {
12262
+ types: [
12263
+ "boolean"
12264
+ ],
12265
+ description: "running prop",
12266
+ required: true
12267
+ },
12268
+ speed: {
12269
+ types: [
12270
+ "number"
12271
+ ],
12272
+ description: "speed prop",
12273
+ required: true
12274
+ },
12275
+ parameters: {
12276
+ types: [
12277
+ "object"
12278
+ ],
12279
+ description: "parameters prop",
12280
+ required: true
12281
+ },
12282
+ onPlay: {
12283
+ types: [
12284
+ "function"
12285
+ ],
12286
+ description: "onPlay prop",
12287
+ required: true
12288
+ },
12289
+ onPause: {
12290
+ types: [
12291
+ "function"
12292
+ ],
12293
+ description: "onPause prop",
12294
+ required: true
12295
+ },
12296
+ onStep: {
12297
+ types: [
12298
+ "function"
12299
+ ],
12300
+ description: "onStep prop",
12301
+ required: true
12302
+ },
12303
+ onReset: {
12304
+ types: [
12305
+ "function"
12306
+ ],
12307
+ description: "onReset prop",
12308
+ required: true
12309
+ },
12310
+ onSpeedChange: {
12311
+ types: [
12312
+ "function"
12313
+ ],
12314
+ description: "onSpeedChange prop",
12315
+ required: true
12316
+ },
12317
+ onParameterChange: {
12318
+ types: [
12319
+ "function"
12320
+ ],
12321
+ description: "onParameterChange prop",
12322
+ required: true
12323
+ },
12324
+ className: {
12325
+ types: [
12326
+ "string"
12327
+ ],
12328
+ description: "className prop"
12329
+ }
12330
+ }
12331
+ },
12332
+ "simulation-graph": {
12333
+ type: "simulation-graph",
12334
+ category: "display",
12335
+ description: "SimulationGraph Real-time measurement graph for physics simulations. Renders measurement data as a simple line chart on canvas.",
12336
+ suggestedFor: [
12337
+ "simulation",
12338
+ "graph",
12339
+ "simulation graph"
12340
+ ],
12341
+ typicalSize: "large",
12342
+ propsSchema: {
12343
+ label: {
12344
+ types: [
12345
+ "string"
12346
+ ],
12347
+ description: "label prop",
12348
+ required: true
12349
+ },
12350
+ unit: {
12351
+ types: [
12352
+ "string"
12353
+ ],
12354
+ description: "unit prop",
12355
+ required: true
12356
+ },
12357
+ data: {
12358
+ types: [
12359
+ "array"
12360
+ ],
12361
+ description: "data prop",
12362
+ required: true
12363
+ },
12364
+ maxPoints: {
12365
+ types: [
12366
+ "number"
12367
+ ],
12368
+ description: "maxPoints prop"
12369
+ },
12370
+ width: {
12371
+ types: [
12372
+ "number"
12373
+ ],
12374
+ description: "width prop"
12375
+ },
12376
+ height: {
12377
+ types: [
12378
+ "number"
12379
+ ],
12380
+ description: "height prop"
12381
+ },
12382
+ color: {
12383
+ types: [
12384
+ "string"
12385
+ ],
12386
+ description: "color prop"
12387
+ },
12388
+ className: {
12389
+ types: [
12390
+ "string"
12391
+ ],
12392
+ description: "className prop"
12393
+ }
12394
+ }
12395
+ },
12396
+ "builder-board": {
12397
+ type: "builder-board",
12398
+ category: "game",
12399
+ description: "BuilderBoard Component-snapping game board. The player places components onto slots in a blueprint. Correct placement completes the build. Good for: architecture, circuits, molecules, system design stories. Events emitted via completeEvent (default UI:PUZZLE_COMPLETE).",
12400
+ suggestedFor: [
12401
+ "builder",
12402
+ "board",
12403
+ "builder board"
12404
+ ],
12405
+ typicalSize: "large",
12406
+ propsSchema: {
12407
+ entity: {
12408
+ types: [
12409
+ "builderpuzzleentity"
12410
+ ],
12411
+ description: "entity prop",
12412
+ required: true
12413
+ },
12414
+ completeEvent: {
12415
+ types: [
12416
+ "string"
12417
+ ],
12418
+ description: "completeEvent prop"
12419
+ }
12420
+ }
12421
+ },
12422
+ "classifier-board": {
12423
+ type: "classifier-board",
12424
+ category: "game",
12425
+ description: "ClassifierBoard Drag-and-drop classification game. The player sorts items into the correct category buckets. All items must be correctly classified to win. Good for: taxonomy, pattern recognition, sorting stories. Events emitted via completeEvent (default UI:PUZZLE_COMPLETE).",
12426
+ suggestedFor: [
12427
+ "classifier",
12428
+ "board",
12429
+ "classifier board"
12430
+ ],
12431
+ typicalSize: "large",
12432
+ propsSchema: {
12433
+ entity: {
12434
+ types: [
12435
+ "classifierpuzzleentity"
12436
+ ],
12437
+ description: "entity prop",
12438
+ required: true
12439
+ },
12440
+ completeEvent: {
12441
+ types: [
12442
+ "string"
12443
+ ],
12444
+ description: "completeEvent prop"
12445
+ }
12446
+ }
12447
+ },
12448
+ "debugger-board": {
12449
+ type: "debugger-board",
12450
+ category: "game",
12451
+ description: "DebuggerBoard Error-finding game board. The player reviews a code/system listing and identifies lines or elements that contain bugs. Good for: programming, logic, troubleshooting stories. Events emitted via completeEvent (default UI:PUZZLE_COMPLETE).",
12452
+ suggestedFor: [
12453
+ "debugger",
12454
+ "board",
12455
+ "debugger board"
12456
+ ],
12457
+ typicalSize: "large",
12458
+ propsSchema: {
12459
+ entity: {
12460
+ types: [
12461
+ "debuggerpuzzleentity"
12462
+ ],
12463
+ description: "entity prop",
12464
+ required: true
12465
+ },
12466
+ completeEvent: {
12467
+ types: [
12468
+ "string"
12469
+ ],
12470
+ description: "completeEvent prop"
12471
+ }
12472
+ }
12473
+ },
12474
+ "event-handler-board": {
12475
+ type: "event-handler-board",
12476
+ category: "game",
12477
+ description: "EventHandlerBoard Organism Contains ALL game logic for the Event Handler tier (ages 9-12). Kids click on world objects, set WHEN/THEN rules, and watch event chains cascade during playback. Encourages experimentation: on failure, resets to editing so the kid can try different rules. After 3 failures, shows a progressive hint.",
12478
+ suggestedFor: [
12479
+ "event",
12480
+ "handler",
12481
+ "board",
12482
+ "event handler board"
12483
+ ],
12484
+ typicalSize: "large",
12485
+ propsSchema: {
12486
+ entity: {
12487
+ types: [
12488
+ "eventhandlerpuzzleentity"
12489
+ ],
12490
+ description: "Puzzle data",
12491
+ required: true
12492
+ },
12493
+ stepDurationMs: {
12494
+ types: [
12495
+ "number"
12496
+ ],
12497
+ description: "Playback speed in ms per event"
12498
+ },
12499
+ playEvent: {
12500
+ types: [
12501
+ "string"
12502
+ ],
12503
+ description: "Emits UI:{playEvent}"
12504
+ },
12505
+ completeEvent: {
12506
+ types: [
12507
+ "string"
12508
+ ],
12509
+ description: "Emits UI:{completeEvent} with { success }"
12510
+ }
12511
+ }
12512
+ },
12513
+ "event-log": {
12514
+ type: "event-log",
12515
+ category: "display",
12516
+ description: "EventLog Component Scrolling log of events during playback in the Event Handler tier. Shows the chain reaction as events cascade through objects.",
12517
+ suggestedFor: [
12518
+ "event",
12519
+ "log",
12520
+ "event log"
12521
+ ],
12522
+ typicalSize: "large",
12523
+ propsSchema: {
12524
+ entries: {
12525
+ types: [
12526
+ "array"
12527
+ ],
12528
+ description: "Log entries",
12529
+ required: true
12530
+ },
12531
+ maxHeight: {
12532
+ types: [
12533
+ "number"
12534
+ ],
12535
+ description: "Max visible height before scroll"
12536
+ },
12537
+ label: {
12538
+ types: [
12539
+ "string"
12540
+ ],
12541
+ description: "Title label"
12542
+ },
12543
+ className: {
12544
+ types: [
12545
+ "string"
12546
+ ],
12547
+ description: "Additional CSS classes"
12548
+ }
12549
+ }
12550
+ },
12551
+ "object-rule-panel": {
12552
+ type: "object-rule-panel",
12553
+ category: "display",
12554
+ description: "ObjectRulePanel Component Shows the rules panel for a selected world object in the Event Handler tier. Displays object info, its current state (via TraitStateViewer), and a list of WHEN/THEN rules the kid has set.",
12555
+ suggestedFor: [
12556
+ "object",
12557
+ "rule",
12558
+ "panel",
12559
+ "object rule panel"
12560
+ ],
12561
+ typicalSize: "large",
12562
+ propsSchema: {
12563
+ object: {
12564
+ types: [
12565
+ "puzzleobjectdef"
12566
+ ],
12567
+ description: "The selected object",
12568
+ required: true
12569
+ },
12570
+ onRulesChange: {
12571
+ types: [
12572
+ "function"
12573
+ ],
12574
+ description: "Called when rules change",
12575
+ required: true
12576
+ },
12577
+ disabled: {
12578
+ types: [
12579
+ "boolean"
12580
+ ],
12581
+ description: "Whether editing is disabled"
12582
+ },
12583
+ className: {
12584
+ types: [
12585
+ "string"
12586
+ ],
12587
+ description: "Additional CSS classes"
12588
+ }
12589
+ }
12590
+ },
12591
+ "rule-editor": {
12592
+ type: "rule-editor",
12593
+ category: "display",
12594
+ description: "RuleEditor Component A single WHEN/THEN rule row for the Event Handler tier (ages 9-12). Kid picks an event trigger and an action from dropdowns.",
12595
+ suggestedFor: [
12596
+ "rule",
12597
+ "editor",
12598
+ "rule editor"
12599
+ ],
12600
+ typicalSize: "large",
12601
+ propsSchema: {
12602
+ rule: {
12603
+ types: [
12604
+ "ruledefinition"
12605
+ ],
12606
+ description: "The current rule",
12607
+ required: true
12608
+ },
12609
+ availableEvents: {
12610
+ types: [
12611
+ "array"
12612
+ ],
12613
+ description: "Available event triggers to listen for",
12614
+ required: true
12615
+ },
12616
+ availableActions: {
12617
+ types: [
12618
+ "array"
12619
+ ],
12620
+ description: "Available actions to perform",
12621
+ required: true
12622
+ },
12623
+ onChange: {
12624
+ types: [
12625
+ "function"
12626
+ ],
12627
+ description: "Called when rule changes",
12628
+ required: true
12629
+ },
12630
+ onRemove: {
12631
+ types: [
12632
+ "function"
12633
+ ],
12634
+ description: "Called when rule is removed"
12635
+ },
12636
+ disabled: {
12637
+ types: [
12638
+ "boolean"
12639
+ ],
12640
+ description: "Whether editing is disabled (during playback)"
12641
+ },
12642
+ className: {
12643
+ types: [
12644
+ "string"
12645
+ ],
12646
+ description: "Additional CSS classes"
12647
+ }
12648
+ }
12649
+ },
12650
+ "negotiator-board": {
12651
+ type: "negotiator-board",
12652
+ category: "game",
12653
+ description: "NegotiatorBoard Turn-based decision matrix game. The player makes choices over multiple rounds against an AI opponent. Each round both sides pick an action, and payoffs are determined by the combination. Good for: ethics, business, game theory, economics stories. Events emitted via completeEvent (default UI:PUZZLE_COMPLETE).",
12654
+ suggestedFor: [
12655
+ "negotiator",
12656
+ "board",
12657
+ "negotiator board"
12658
+ ],
12659
+ typicalSize: "large",
12660
+ propsSchema: {
12661
+ entity: {
12662
+ types: [
12663
+ "negotiatorpuzzleentity"
12664
+ ],
12665
+ description: "entity prop",
12666
+ required: true
12667
+ },
12668
+ completeEvent: {
12669
+ types: [
12670
+ "string"
12671
+ ],
12672
+ description: "completeEvent prop"
12673
+ }
12674
+ }
12675
+ },
12676
+ "action-palette": {
12677
+ type: "action-palette",
12678
+ category: "display",
12679
+ description: "ActionPalette Component Grid of draggable ActionTile components for the Sequencer tier. Kids pick from these to build their sequence.",
12680
+ suggestedFor: [
12681
+ "action",
12682
+ "palette",
12683
+ "action palette"
12684
+ ],
12685
+ typicalSize: "large",
12686
+ propsSchema: {
12687
+ actions: {
12688
+ types: [
12689
+ "array"
12690
+ ],
12691
+ description: "Available actions",
12692
+ required: true
12693
+ },
12694
+ usedActionIds: {
12695
+ types: [
12696
+ "array"
12697
+ ],
12698
+ description: "IDs of actions that are already used (shown as disabled)"
12699
+ },
12700
+ allowDuplicates: {
12701
+ types: [
12702
+ "boolean"
12703
+ ],
12704
+ description: "Whether each action can be used multiple times"
12705
+ },
12706
+ categoryColors: {
12707
+ types: [
12708
+ "object"
12709
+ ],
12710
+ description: "Category \u2192 color mapping"
12711
+ },
12712
+ size: {
12713
+ types: [
12714
+ "string"
12715
+ ],
12716
+ description: "Size variant"
12717
+ },
12718
+ label: {
12719
+ types: [
12720
+ "string"
12721
+ ],
12722
+ description: "Label above the palette"
12723
+ },
12724
+ className: {
12725
+ types: [
12726
+ "string"
12727
+ ],
12728
+ description: "Additional CSS classes"
12729
+ }
12730
+ }
12731
+ },
12732
+ "action-tile": {
12733
+ type: "action-tile",
12734
+ category: "game",
12735
+ description: "ActionTile Component A draggable action tile for the Sequencer tier (ages 5-8). Kids drag these from the ActionPalette into SequenceBar slots. Sets SlotItemData on dataTransfer for TraitSlot compatibility.",
12736
+ suggestedFor: [
12737
+ "action",
12738
+ "tile",
12739
+ "action tile"
12740
+ ],
12741
+ typicalSize: "large",
12742
+ propsSchema: {
12743
+ action: {
12744
+ types: [
12745
+ "slotitemdata"
12746
+ ],
12747
+ description: "The action data",
12748
+ required: true
12749
+ },
12750
+ size: {
12751
+ types: [
12752
+ "string"
12753
+ ],
12754
+ description: "Size variant"
12755
+ },
12756
+ disabled: {
12757
+ types: [
12758
+ "boolean"
12759
+ ],
12760
+ description: "Whether the tile is disabled / already used"
12761
+ },
12762
+ categoryColors: {
12763
+ types: [
12764
+ "object"
12765
+ ],
12766
+ description: "Category \u2192 color mapping"
12767
+ }
12768
+ }
12769
+ },
12770
+ "sequence-bar": {
12771
+ type: "sequence-bar",
12772
+ category: "display",
12773
+ description: "SequenceBar Component A row of TraitSlot components forming the action sequence for the Sequencer tier (ages 5-8). Kids drag ActionTiles from the palette into these slots to build their sequence.",
12774
+ suggestedFor: [
12775
+ "sequence",
12776
+ "bar",
12777
+ "sequence bar"
12778
+ ],
12779
+ typicalSize: "large",
12780
+ propsSchema: {
12781
+ slots: {
12782
+ types: [
12783
+ "array"
12784
+ ],
12785
+ description: "The current sequence (sparse \u2014 undefined means empty slot)",
12786
+ required: true
12787
+ },
12788
+ maxSlots: {
12789
+ types: [
12790
+ "number"
12791
+ ],
12792
+ description: "Max number of slots",
12793
+ required: true
12794
+ },
12795
+ onSlotDrop: {
12796
+ types: [
12797
+ "function"
12798
+ ],
12799
+ description: "Called when an item is dropped into slot at index",
12800
+ required: true
12801
+ },
12802
+ onSlotRemove: {
12803
+ types: [
12804
+ "function"
12805
+ ],
12806
+ description: "Called when a slot is cleared",
12807
+ required: true
12808
+ },
12809
+ playing: {
12810
+ types: [
12811
+ "boolean"
12812
+ ],
12813
+ description: "Whether the sequence is currently playing (disable interaction)"
12814
+ },
12815
+ currentStep: {
12816
+ types: [
12817
+ "number"
12818
+ ],
12819
+ description: "Current step index during playback (-1 = not playing)"
12820
+ },
12821
+ categoryColors: {
12822
+ types: [
12823
+ "object"
12824
+ ],
12825
+ description: "Category \u2192 color mapping"
12826
+ },
12827
+ slotFeedback: {
12828
+ types: [
12829
+ "array"
12830
+ ],
12831
+ description: "Per-slot correctness feedback shown after a failed attempt"
12832
+ },
12833
+ size: {
12834
+ types: [
12835
+ "string"
12836
+ ],
12837
+ description: "Size variant"
12838
+ },
12839
+ className: {
12840
+ types: [
12841
+ "string"
12842
+ ],
12843
+ description: "Additional CSS classes"
12844
+ }
12845
+ }
12846
+ },
12847
+ "sequencer-board": {
12848
+ type: "sequencer-board",
12849
+ category: "game",
12850
+ description: 'SequencerBoard Organism Contains ALL game logic for the Sequencer tier (ages 5-8). Manages the action sequence, validates it, and animates Kekec executing each step on the puzzle scene. Feedback-first UX: - On failure: slots stay in place, each slot gets a green or red ring showing exactly which steps are correct and which need to change. - Modifying a slot clears its individual feedback so the kid can re-try. - After 3 failures a persistent hint appears above the sequence bar. - "Reset" clears everything including attempts / hint. TraitStateViewer states use indexed labels ("1. Walk", "2. Jump") so that repeated actions are correctly highlighted during playback.',
12851
+ suggestedFor: [
12852
+ "sequencer",
12853
+ "board",
12854
+ "sequencer board"
12855
+ ],
12856
+ typicalSize: "large",
12857
+ propsSchema: {
12858
+ entity: {
12859
+ types: [
12860
+ "sequencerpuzzleentity"
12861
+ ],
12862
+ description: "Puzzle data",
12863
+ required: true
12864
+ },
12865
+ categoryColors: {
12866
+ types: [
12867
+ "object"
12868
+ ],
12869
+ description: "Category \u2192 color mapping"
12870
+ },
12871
+ stepDurationMs: {
12872
+ types: [
12873
+ "number"
12874
+ ],
12875
+ description: "Playback speed in ms per step"
12876
+ },
12877
+ playEvent: {
12878
+ types: [
12879
+ "string"
12880
+ ],
12881
+ description: "Emits UI:{playEvent} with { sequence: string[] }"
12882
+ },
12883
+ completeEvent: {
12884
+ types: [
12885
+ "string"
12886
+ ],
12887
+ description: "Emits UI:{completeEvent} with { success: boolean }"
12888
+ }
12889
+ }
12890
+ },
12891
+ "simulator-board": {
12892
+ type: "simulator-board",
12893
+ category: "game",
12894
+ description: "SimulatorBoard Parameter-slider game board. The player adjusts parameters and observes real-time output. Correct parameter values must bring the output within a target range to win. Good for: physics, economics, system design stories. Events emitted via completeEvent (default UI:PUZZLE_COMPLETE).",
12895
+ suggestedFor: [
12896
+ "simulator",
12897
+ "board",
12898
+ "simulator board"
12899
+ ],
12900
+ typicalSize: "large",
12901
+ propsSchema: {
12902
+ entity: {
12903
+ types: [
12904
+ "simulatorpuzzleentity"
12905
+ ],
12906
+ description: "entity prop",
12907
+ required: true
12908
+ },
12909
+ completeEvent: {
12910
+ types: [
12911
+ "string"
12912
+ ],
12913
+ description: "completeEvent prop"
12914
+ }
12915
+ }
12916
+ },
12917
+ "code-view": {
12918
+ type: "code-view",
12919
+ category: "display",
12920
+ description: "CodeView Component Shows the JSON code representation of a state machine. Toggle between visual and code view in State Architect tier.",
12921
+ suggestedFor: [
12922
+ "code",
12923
+ "view",
12924
+ "code view"
12925
+ ],
12926
+ typicalSize: "large",
12927
+ propsSchema: {
12928
+ data: {
12929
+ types: [
12930
+ "object"
12931
+ ],
12932
+ description: "JSON data to display",
12933
+ required: true
12934
+ },
12935
+ label: {
12936
+ types: [
12937
+ "string"
12938
+ ],
12939
+ description: "Label"
11702
12940
  },
11703
- totalCount: {
12941
+ defaultExpanded: {
11704
12942
  types: [
11705
- "number"
12943
+ "boolean"
11706
12944
  ],
11707
- description: "Total number of items"
12945
+ description: "Whether the code is expanded by default"
11708
12946
  },
11709
- activeFilters: {
12947
+ className: {
11710
12948
  types: [
11711
- "object"
12949
+ "string"
11712
12950
  ],
11713
- description: "Active filters"
11714
- },
11715
- selectedIds: {
12951
+ description: "Additional CSS classes"
12952
+ }
12953
+ }
12954
+ },
12955
+ "state-architect-board": {
12956
+ type: "state-architect-board",
12957
+ category: "display",
12958
+ description: "StateArchitectBoard Organism Contains ALL game logic for the State Architect tier (ages 13+). Kids design state machines via a visual graph editor, then run them to see if the behavior matches the puzzle goal.",
12959
+ suggestedFor: [
12960
+ "state",
12961
+ "architect",
12962
+ "board",
12963
+ "state architect board"
12964
+ ],
12965
+ typicalSize: "large",
12966
+ propsSchema: {
12967
+ entity: {
11716
12968
  types: [
11717
- "array"
12969
+ "statearchitectpuzzleentity"
11718
12970
  ],
11719
- description: "Currently selected item IDs"
12971
+ description: "Puzzle data",
12972
+ required: true
11720
12973
  },
11721
- parts: {
12974
+ stepDurationMs: {
11722
12975
  types: [
11723
- "array"
12976
+ "number"
11724
12977
  ],
11725
- description: "parts prop",
11726
- required: true
12978
+ description: "Playback speed"
11727
12979
  },
11728
- currentChapterId: {
12980
+ testEvent: {
11729
12981
  types: [
11730
12982
  "string"
11731
12983
  ],
11732
- description: "currentChapterId prop"
12984
+ description: "Emits UI:{testEvent}"
11733
12985
  },
11734
- direction: {
12986
+ completeEvent: {
11735
12987
  types: [
11736
12988
  "string"
11737
12989
  ],
11738
- description: "direction prop"
12990
+ description: "Emits UI:{completeEvent} with { success, passedTests }"
11739
12991
  }
11740
12992
  }
11741
12993
  },
11742
- "book-viewer": {
11743
- type: "book-viewer",
12994
+ "state-node": {
12995
+ type: "state-node",
11744
12996
  category: "display",
11745
- description: "BookViewer Organism Flippable book reader with cover, TOC, chapter views, and navigation. Supports RTL layout (Arabic), CSS slide transitions, and print mode. Page model: 0 = cover, 1 = TOC, 2+ = chapters (flattened from parts) Event Contract: - Emits: UI:BOOK_PAGE_CHANGE { pageIndex, chapterId? } - Listens: UI:BOOK_START, UI:BOOK_NAVIGATE, UI:BOOK_PAGE_PREV/NEXT, UI:BOOK_PRINT, UI:BOOK_SHOW_TOC",
12997
+ description: "StateNode Component A draggable state circle for the graph editor in the State Architect tier (ages 13+). Shows state name, highlights when current, and supports click to select.",
11746
12998
  suggestedFor: [
11747
- "book",
11748
- "viewer",
11749
- "book viewer"
12999
+ "state",
13000
+ "node",
13001
+ "state node"
11750
13002
  ],
11751
13003
  typicalSize: "large",
11752
13004
  propsSchema: {
11753
- entity: {
13005
+ name: {
11754
13006
  types: [
11755
13007
  "string"
11756
13008
  ],
11757
- description: "Entity name for schema-driven integration"
13009
+ description: "State name",
13010
+ required: true
11758
13011
  },
11759
- data: {
13012
+ isCurrent: {
11760
13013
  types: [
11761
- "array"
13014
+ "boolean"
11762
13015
  ],
11763
- description: "Data array provided by the trait via render-ui"
13016
+ description: "Whether this is the current active state"
11764
13017
  },
11765
- className: {
13018
+ isSelected: {
11766
13019
  types: [
11767
- "string"
13020
+ "boolean"
11768
13021
  ],
11769
- description: "Additional CSS classes"
13022
+ description: "Whether this node is selected for editing"
11770
13023
  },
11771
- isLoading: {
13024
+ isInitial: {
11772
13025
  types: [
11773
13026
  "boolean"
11774
13027
  ],
11775
- description: "Loading state indicator"
13028
+ description: "Whether this is the initial state"
11776
13029
  },
11777
- error: {
13030
+ position: {
11778
13031
  types: [
11779
13032
  "object"
11780
13033
  ],
11781
- description: "Error state"
11782
- },
11783
- sortBy: {
11784
- types: [
11785
- "string"
11786
- ],
11787
- description: "Current sort field"
13034
+ description: "Position on the graph canvas",
13035
+ required: true
11788
13036
  },
11789
- sortDirection: {
13037
+ onClick: {
11790
13038
  types: [
11791
- "string"
13039
+ "function"
11792
13040
  ],
11793
- description: "Current sort direction"
13041
+ description: "Click handler"
11794
13042
  },
11795
- searchValue: {
13043
+ className: {
11796
13044
  types: [
11797
13045
  "string"
11798
13046
  ],
11799
- description: "Current search query value"
11800
- },
11801
- page: {
13047
+ description: "Additional CSS classes"
13048
+ }
13049
+ }
13050
+ },
13051
+ "transition-arrow": {
13052
+ type: "transition-arrow",
13053
+ category: "display",
13054
+ description: "TransitionArrow Component An SVG arrow connecting two state nodes in the graph editor. Shows the event name as a label on the arrow.",
13055
+ suggestedFor: [
13056
+ "transition",
13057
+ "arrow",
13058
+ "transition arrow"
13059
+ ],
13060
+ typicalSize: "large",
13061
+ propsSchema: {
13062
+ from: {
11802
13063
  types: [
11803
- "number"
13064
+ "object"
11804
13065
  ],
11805
- description: "Current page number"
13066
+ description: "Start position (center of from-node)",
13067
+ required: true
11806
13068
  },
11807
- pageSize: {
13069
+ to: {
11808
13070
  types: [
11809
- "number"
13071
+ "object"
11810
13072
  ],
11811
- description: "Number of items per page"
13073
+ description: "End position (center of to-node)",
13074
+ required: true
11812
13075
  },
11813
- totalCount: {
13076
+ eventLabel: {
11814
13077
  types: [
11815
- "number"
13078
+ "string"
11816
13079
  ],
11817
- description: "Total number of items"
13080
+ description: "Event label shown on the arrow",
13081
+ required: true
11818
13082
  },
11819
- activeFilters: {
13083
+ guardHint: {
11820
13084
  types: [
11821
- "object"
13085
+ "string"
11822
13086
  ],
11823
- description: "Active filters"
13087
+ description: "Guard hint shown below event"
11824
13088
  },
11825
- selectedIds: {
13089
+ isActive: {
11826
13090
  types: [
11827
- "array"
13091
+ "boolean"
11828
13092
  ],
11829
- description: "Currently selected item IDs"
13093
+ description: "Whether this transition is currently active"
11830
13094
  },
11831
- initialPage: {
13095
+ onClick: {
11832
13096
  types: [
11833
- "number"
13097
+ "function"
11834
13098
  ],
11835
- description: "Initial page index (default: 0 = cover)"
13099
+ description: "Click handler"
11836
13100
  },
11837
- fieldMap: {
13101
+ className: {
11838
13102
  types: [
11839
- "bookfieldmap"
13103
+ "string"
11840
13104
  ],
11841
- description: "Field name translation map for non-English entity schemas"
13105
+ description: "Additional CSS classes for the SVG group"
11842
13106
  }
11843
13107
  }
11844
13108
  },
11845
- "scaled-diagram": {
11846
- type: "scaled-diagram",
11847
- category: "component",
11848
- description: "ScaledDiagram Molecule Wraps a fixed-size diagram (like JazariStateMachine / StateMachineView) and CSS-scales it to fit the parent container width. The diagram renders at its natural (large) size. We observe the content element and once the diagram is measured we apply transform:scale() with a corrected container height so surrounding layout flows correctly. Event Contract: - No events emitted (layout-only wrapper) - entityAware: false",
13109
+ "variable-panel": {
13110
+ type: "variable-panel",
13111
+ category: "display",
13112
+ description: "VariablePanel Component Shows entity variables and their current values during State Architect playback.",
11849
13113
  suggestedFor: [
11850
- "scaled",
11851
- "diagram",
11852
- "scaled diagram"
13114
+ "variable",
13115
+ "panel",
13116
+ "variable panel"
11853
13117
  ],
11854
- typicalSize: "medium",
13118
+ typicalSize: "large",
11855
13119
  propsSchema: {
11856
- children: {
13120
+ entityName: {
11857
13121
  types: [
11858
- "node"
13122
+ "string"
11859
13123
  ],
11860
- description: "children prop",
13124
+ description: "Entity name",
13125
+ required: true
13126
+ },
13127
+ variables: {
13128
+ types: [
13129
+ "array"
13130
+ ],
13131
+ description: "Variables to display",
11861
13132
  required: true
11862
13133
  },
11863
13134
  className: {
11864
13135
  types: [
11865
13136
  "string"
11866
13137
  ],
11867
- description: "className prop"
13138
+ description: "Additional CSS classes"
11868
13139
  }
11869
13140
  }
11870
13141
  },
@@ -12684,7 +13955,7 @@ var integrators_registry_default = {
12684
13955
  // src/component-mapping.json
12685
13956
  var component_mapping_default = {
12686
13957
  version: "1.0.0",
12687
- exportedAt: "2026-02-23T07:59:54.575Z",
13958
+ exportedAt: "2026-03-03T11:14:06.592Z",
12688
13959
  mappings: {
12689
13960
  "page-header": {
12690
13961
  component: "PageHeader",
@@ -13514,6 +14785,116 @@ var component_mapping_default = {
13514
14785
  importPath: "@/components/molecules/ScaledDiagram",
13515
14786
  category: "component"
13516
14787
  },
14788
+ "combat-log": {
14789
+ component: "CombatLog",
14790
+ importPath: "@/components/organisms/CombatLog",
14791
+ category: "game"
14792
+ },
14793
+ "simulation-canvas": {
14794
+ component: "SimulationCanvas",
14795
+ importPath: "@/components/organisms/SimulationCanvas",
14796
+ category: "game"
14797
+ },
14798
+ "simulation-controls": {
14799
+ component: "SimulationControls",
14800
+ importPath: "@/components/organisms/SimulationControls",
14801
+ category: "display"
14802
+ },
14803
+ "simulation-graph": {
14804
+ component: "SimulationGraph",
14805
+ importPath: "@/components/organisms/SimulationGraph",
14806
+ category: "display"
14807
+ },
14808
+ "builder-board": {
14809
+ component: "BuilderBoard",
14810
+ importPath: "@/components/organisms/BuilderBoard",
14811
+ category: "game"
14812
+ },
14813
+ "classifier-board": {
14814
+ component: "ClassifierBoard",
14815
+ importPath: "@/components/organisms/ClassifierBoard",
14816
+ category: "game"
14817
+ },
14818
+ "debugger-board": {
14819
+ component: "DebuggerBoard",
14820
+ importPath: "@/components/organisms/DebuggerBoard",
14821
+ category: "game"
14822
+ },
14823
+ "event-handler-board": {
14824
+ component: "EventHandlerBoard",
14825
+ importPath: "@/components/organisms/EventHandlerBoard",
14826
+ category: "game"
14827
+ },
14828
+ "event-log": {
14829
+ component: "EventLog",
14830
+ importPath: "@/components/organisms/EventLog",
14831
+ category: "display"
14832
+ },
14833
+ "object-rule-panel": {
14834
+ component: "ObjectRulePanel",
14835
+ importPath: "@/components/organisms/ObjectRulePanel",
14836
+ category: "display"
14837
+ },
14838
+ "rule-editor": {
14839
+ component: "RuleEditor",
14840
+ importPath: "@/components/organisms/RuleEditor",
14841
+ category: "display"
14842
+ },
14843
+ "negotiator-board": {
14844
+ component: "NegotiatorBoard",
14845
+ importPath: "@/components/organisms/NegotiatorBoard",
14846
+ category: "game"
14847
+ },
14848
+ "action-palette": {
14849
+ component: "ActionPalette",
14850
+ importPath: "@/components/organisms/ActionPalette",
14851
+ category: "display"
14852
+ },
14853
+ "action-tile": {
14854
+ component: "ActionTile",
14855
+ importPath: "@/components/organisms/ActionTile",
14856
+ category: "game"
14857
+ },
14858
+ "sequence-bar": {
14859
+ component: "SequenceBar",
14860
+ importPath: "@/components/organisms/SequenceBar",
14861
+ category: "display"
14862
+ },
14863
+ "sequencer-board": {
14864
+ component: "SequencerBoard",
14865
+ importPath: "@/components/organisms/SequencerBoard",
14866
+ category: "game"
14867
+ },
14868
+ "simulator-board": {
14869
+ component: "SimulatorBoard",
14870
+ importPath: "@/components/organisms/SimulatorBoard",
14871
+ category: "game"
14872
+ },
14873
+ "code-view": {
14874
+ component: "CodeView",
14875
+ importPath: "@/components/organisms/CodeView",
14876
+ category: "display"
14877
+ },
14878
+ "state-architect-board": {
14879
+ component: "StateArchitectBoard",
14880
+ importPath: "@/components/organisms/StateArchitectBoard",
14881
+ category: "display"
14882
+ },
14883
+ "state-node": {
14884
+ component: "StateNode",
14885
+ importPath: "@/components/organisms/StateNode",
14886
+ category: "display"
14887
+ },
14888
+ "transition-arrow": {
14889
+ component: "TransitionArrow",
14890
+ importPath: "@/components/organisms/TransitionArrow",
14891
+ category: "display"
14892
+ },
14893
+ "variable-panel": {
14894
+ component: "VariablePanel",
14895
+ importPath: "@/components/organisms/VariablePanel",
14896
+ category: "display"
14897
+ },
13517
14898
  heading: {
13518
14899
  component: "Typography",
13519
14900
  importPath: "@/components/atoms/Typography",
@@ -13530,7 +14911,7 @@ var component_mapping_default = {
13530
14911
  // src/event-contracts.json
13531
14912
  var event_contracts_default = {
13532
14913
  version: "1.0.0",
13533
- exportedAt: "2026-02-23T07:59:54.575Z",
14914
+ exportedAt: "2026-03-03T11:14:06.592Z",
13534
14915
  contracts: {
13535
14916
  form: {
13536
14917
  emits: [
@@ -13614,6 +14995,13 @@ var event_contracts_default = {
13614
14995
  payload: {
13615
14996
  type: "object"
13616
14997
  }
14998
+ },
14999
+ {
15000
+ event: "NAVIGATE",
15001
+ trigger: "action",
15002
+ payload: {
15003
+ type: "object"
15004
+ }
13617
15005
  }
13618
15006
  ],
13619
15007
  requires: [],
@@ -13622,6 +15010,13 @@ var event_contracts_default = {
13622
15010
  },
13623
15011
  "entity-table": {
13624
15012
  emits: [
15013
+ {
15014
+ event: "NAVIGATE",
15015
+ trigger: "action",
15016
+ payload: {
15017
+ type: "object"
15018
+ }
15019
+ },
13625
15020
  {
13626
15021
  event: "VIEW",
13627
15022
  trigger: "action",
@@ -13684,6 +15079,13 @@ var event_contracts_default = {
13684
15079
  payload: {
13685
15080
  type: "object"
13686
15081
  }
15082
+ },
15083
+ {
15084
+ event: "NAVIGATE",
15085
+ trigger: "action",
15086
+ payload: {
15087
+ type: "object"
15088
+ }
13687
15089
  }
13688
15090
  ],
13689
15091
  requires: [],
@@ -13692,6 +15094,13 @@ var event_contracts_default = {
13692
15094
  },
13693
15095
  "entity-list": {
13694
15096
  emits: [
15097
+ {
15098
+ event: "NAVIGATE",
15099
+ trigger: "action",
15100
+ payload: {
15101
+ type: "object"
15102
+ }
15103
+ },
13695
15104
  {
13696
15105
  event: "SELECT",
13697
15106
  trigger: "action",
@@ -13720,6 +15129,13 @@ var event_contracts_default = {
13720
15129
  },
13721
15130
  "detail-panel": {
13722
15131
  emits: [
15132
+ {
15133
+ event: "NAVIGATE",
15134
+ trigger: "action",
15135
+ payload: {
15136
+ type: "object"
15137
+ }
15138
+ },
13723
15139
  {
13724
15140
  event: "CLOSE",
13725
15141
  trigger: "action",
@@ -13729,17 +15145,16 @@ var event_contracts_default = {
13729
15145
  }
13730
15146
  ],
13731
15147
  requires: [],
13732
- entityAware: false
15148
+ entityAware: true
13733
15149
  },
13734
15150
  "page-header": {
13735
15151
  emits: [
13736
15152
  {
13737
- event: "CREATE",
13738
- trigger: "click",
15153
+ event: "NAVIGATE",
15154
+ trigger: "action",
13739
15155
  payload: {
13740
- type: "void"
13741
- },
13742
- optional: true
15156
+ type: "object"
15157
+ }
13743
15158
  }
13744
15159
  ],
13745
15160
  requires: [],
@@ -14064,28 +15479,11 @@ var event_contracts_default = {
14064
15479
  "game-menu": {
14065
15480
  emits: [
14066
15481
  {
14067
- event: "START",
14068
- trigger: "click",
14069
- payload: {
14070
- type: "void"
14071
- },
14072
- optional: true
14073
- },
14074
- {
14075
- event: "RESUME",
14076
- trigger: "click",
14077
- payload: {
14078
- type: "void"
14079
- },
14080
- optional: true
14081
- },
14082
- {
14083
- event: "RESTART",
14084
- trigger: "click",
15482
+ event: "NAVIGATE",
15483
+ trigger: "action",
14085
15484
  payload: {
14086
- type: "void"
14087
- },
14088
- optional: true
15485
+ type: "object"
15486
+ }
14089
15487
  }
14090
15488
  ],
14091
15489
  requires: [],
@@ -14484,13 +15882,6 @@ var event_contracts_default = {
14484
15882
  payload: {
14485
15883
  type: "object"
14486
15884
  }
14487
- },
14488
- {
14489
- event: "MEDIA_UPLOAD",
14490
- trigger: "action",
14491
- payload: {
14492
- type: "object"
14493
- }
14494
15885
  }
14495
15886
  ],
14496
15887
  requires: [],
@@ -14986,9 +16377,8 @@ function isEntityAwarePattern(patternType) {
14986
16377
  if (definition.entityAware === true) return true;
14987
16378
  const propsSchema = definition.propsSchema;
14988
16379
  if (!propsSchema) return false;
14989
- const hasEntityProp = "entity" in propsSchema;
14990
- const hasDataProp = "data" in propsSchema || "items" in propsSchema;
14991
- return hasEntityProp && hasDataProp;
16380
+ const entityTypes = propsSchema.entity?.types || [];
16381
+ return entityTypes.includes("array") || entityTypes.includes("object");
14992
16382
  }
14993
16383
 
14994
16384
  export { COMPONENT_MAPPING, EVENT_CONTRACTS, INTEGRATORS_REGISTRY, PATTERN_REGISTRY, PATTERN_TYPES, buildRecommendationContext, component_mapping_default as componentMapping, event_contracts_default as eventContracts, formatRecommendationsForPrompt, generatePatternDescription, getAllPatternTypes, getComponentForPattern, getPatternActionsRef, getPatternDefinition, getPatternMetadata, getPatternPropsCompact, getPatternsGroupedByCategory, integrators_registry_default as integratorsRegistry, isEntityAwarePattern, isValidPatternType, patterns_registry_default as patternsRegistry, recommendPatterns, registry };