@lucasvu/scope-ui 0.1.0 → 0.1.2

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.
@@ -0,0 +1 @@
1
+ export { ROOT_CLIENT_THEME_ATTRIBUTE, ROOT_COLOR_MODE_ATTRIBUTE, applyDocumentClientTheme, applyDocumentColorMode, cn, getSystemColorMode, initializeDocumentColorMode, isColorMode, subscribeToSystemColorMode, syncDocumentColorModeToSystem, uiAiManifest, uiDefaultThemePreset, uiProjectAiRules, uiScreenBlueprint, uiScreenBriefFields, uiThemeContract, uiThemeLayerAssets, uiThemePresets } from '../chunk-CL3F2TWE.js';
package/dist/index.cjs CHANGED
@@ -7491,15 +7491,182 @@ var uiThemeContract = {
7491
7491
  exampleCss: createThemePresetCssExample(uiDefaultThemePreset)
7492
7492
  };
7493
7493
  var uiProjectAiRules = [
7494
- "Use @lucasvu/scope-ui as the default UI library.",
7494
+ "Use @lucasvu/scope-ui as the default UI library for React projects, or @lucasvu/scope-ui/core for framework-agnostic theme/runtime usage.",
7495
7495
  "Import @lucasvu/scope-ui/styles.css once at the app entry.",
7496
- "Import the project override theme file after the package stylesheet.",
7496
+ "Import the project override theme file after the package stylesheet or bundled theme layer.",
7497
7497
  "Stay inside the approved theme preset declared by the project and do not invent a second palette.",
7498
7498
  "Read uiAiManifest to choose the correct component by intent before coding.",
7499
- "Read uiThemeContract before changing colors, shadows, radius, or theme behavior.",
7499
+ "Read uiThemeContract and uiThemeLayerAssets before changing colors, shadows, radius, or theme behavior.",
7500
7500
  "Prefer root exports and avoid MainFe unless the task explicitly targets a legacy screen."
7501
7501
  ];
7502
7502
 
7503
+ // src/theme-layer-assets.ts
7504
+ var uiThemeLayerAssets = [
7505
+ {
7506
+ id: "default",
7507
+ label: "Theme Default",
7508
+ importPath: "@lucasvu/scope-ui/themes/theme-default.css",
7509
+ activation: "global",
7510
+ description: "Global default token layer close to the legacy shared theme baseline.",
7511
+ recommendedFor: [
7512
+ "Projects that want a direct global theme layer without extra setup",
7513
+ "Legacy migrations"
7514
+ ]
7515
+ },
7516
+ {
7517
+ id: "new-main-fe",
7518
+ label: "New Main FE",
7519
+ importPath: "@lucasvu/scope-ui/themes/theme-ui-new-main-fe.css",
7520
+ activation: "global",
7521
+ description: "Global Argon-inspired shell layer that works immediately after import.",
7522
+ recommendedFor: [
7523
+ "Admin shells",
7524
+ "Projects that want the current shared main-fe tone"
7525
+ ]
7526
+ },
7527
+ {
7528
+ id: "citrus-ink",
7529
+ label: "Citrus Ink",
7530
+ importPath: "@lucasvu/scope-ui/themes/theme-ui-citrus-ink.css",
7531
+ activation: "data-client-theme",
7532
+ clientThemeAttributeValue: "citrus-ink",
7533
+ description: "High-contrast graphite theme with mint and citrus accents.",
7534
+ recommendedFor: ["Brand-heavy dashboards"]
7535
+ },
7536
+ {
7537
+ id: "facebook-blue",
7538
+ label: "Facebook Blue",
7539
+ importPath: "@lucasvu/scope-ui/themes/theme-ui-facebook-blue.css",
7540
+ activation: "data-client-theme",
7541
+ clientThemeAttributeValue: "facebook-blue",
7542
+ description: "Blue-first neutral theme tuned around a familiar social palette.",
7543
+ recommendedFor: ["Blue-branded products"]
7544
+ },
7545
+ {
7546
+ id: "neo-slate",
7547
+ label: "Neo Slate",
7548
+ importPath: "@lucasvu/scope-ui/themes/theme-ui-neo-slate.css",
7549
+ activation: "data-client-theme",
7550
+ clientThemeAttributeValue: "neo-slate",
7551
+ description: "Modern slate-indigo workspace theme with richer shell tokens.",
7552
+ recommendedFor: ["Contemporary SaaS dashboards", "Modern admin shells"]
7553
+ },
7554
+ {
7555
+ id: "siraya-brand",
7556
+ label: "Siraya Brand Sunset",
7557
+ importPath: "@lucasvu/scope-ui/themes/theme-ui-new-main-fe-sunset.css",
7558
+ activation: "data-client-theme",
7559
+ clientThemeAttributeValue: "siraya-brand",
7560
+ description: "Warm branded shell with typography and page-slot overrides.",
7561
+ recommendedFor: ["Brand-led marketing or hybrid product shells"]
7562
+ },
7563
+ {
7564
+ id: "pure-white",
7565
+ label: "Pure White",
7566
+ importPath: "@lucasvu/scope-ui/themes/theme-ui-pure-white.css",
7567
+ activation: "data-client-theme",
7568
+ clientThemeAttributeValue: "pure-white",
7569
+ description: "Clean white workspace theme with cobalt accents.",
7570
+ recommendedFor: ["Minimalist backoffices"]
7571
+ },
7572
+ {
7573
+ id: "siraya-vii-light",
7574
+ label: "Siraya VII Light",
7575
+ importPath: "@lucasvu/scope-ui/themes/theme-ui-siraya-vii-light.css",
7576
+ activation: "data-client-theme",
7577
+ clientThemeAttributeValue: "siraya-vii-light",
7578
+ description: "Light brand system based on the Siraya VII palette.",
7579
+ recommendedFor: ["Brand refresh experiments"]
7580
+ },
7581
+ {
7582
+ id: "solstice-pop",
7583
+ label: "Solstice Pop",
7584
+ importPath: "@lucasvu/scope-ui/themes/theme-ui-solstice-pop.css",
7585
+ activation: "data-client-theme",
7586
+ clientThemeAttributeValue: "solstice-pop",
7587
+ description: "Editorial warm-stone theme with stronger typography direction.",
7588
+ recommendedFor: ["Content-heavy dashboards"]
7589
+ },
7590
+ {
7591
+ id: "uat-aurora",
7592
+ label: "UAT Aurora",
7593
+ importPath: "@lucasvu/scope-ui/themes/theme-ui-uat-aurora.css",
7594
+ activation: "data-client-theme",
7595
+ clientThemeAttributeValue: "uat-aurora",
7596
+ description: "Soft slate-blue experimental theme using the same token structure as sunset.",
7597
+ recommendedFor: ["UAT or staging environments", "Blue-toned shells"]
7598
+ },
7599
+ {
7600
+ id: "custom-crisp",
7601
+ label: "Custom Crisp",
7602
+ importPath: "@lucasvu/scope-ui/themes/theme-ui-custom-crisp.css",
7603
+ activation: "data-client-theme",
7604
+ clientThemeAttributeValue: "*",
7605
+ description: "Cross-theme typography and control crispness overrides for client-theme-driven shells.",
7606
+ recommendedFor: ["Attribute-scoped client themes that need sharper controls"]
7607
+ }
7608
+ ];
7609
+
7610
+ // src/color-mode.ts
7611
+ var ROOT_COLOR_MODE_ATTRIBUTE = "data-ui-color-mode";
7612
+ var ROOT_CLIENT_THEME_ATTRIBUTE = "data-client-theme";
7613
+ var ROOT_DARK_CLASS = "dark";
7614
+ var SYSTEM_DARK_MEDIA_QUERY = "(prefers-color-scheme: dark)";
7615
+ var resolveColorModeMediaQuery = () => {
7616
+ if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
7617
+ return null;
7618
+ }
7619
+ return window.matchMedia(SYSTEM_DARK_MEDIA_QUERY);
7620
+ };
7621
+ var isColorMode = (value) => value === "light" || value === "dark";
7622
+ var getSystemColorMode = () => resolveColorModeMediaQuery()?.matches ? "dark" : "light";
7623
+ var applyDocumentColorMode = (colorMode) => {
7624
+ if (typeof document === "undefined") {
7625
+ return;
7626
+ }
7627
+ const root = document.documentElement;
7628
+ root.classList.toggle(ROOT_DARK_CLASS, colorMode === "dark");
7629
+ root.setAttribute(ROOT_COLOR_MODE_ATTRIBUTE, colorMode);
7630
+ root.style.colorScheme = colorMode;
7631
+ };
7632
+ var initializeDocumentColorMode = (colorMode = getSystemColorMode()) => {
7633
+ applyDocumentColorMode(colorMode);
7634
+ return colorMode;
7635
+ };
7636
+ var subscribeToSystemColorMode = (listener) => {
7637
+ const mediaQuery = resolveColorModeMediaQuery();
7638
+ if (!mediaQuery) {
7639
+ return () => void 0;
7640
+ }
7641
+ const handleChange = (event) => {
7642
+ listener(event.matches ? "dark" : "light");
7643
+ };
7644
+ if (typeof mediaQuery.addEventListener === "function") {
7645
+ mediaQuery.addEventListener("change", handleChange);
7646
+ return () => mediaQuery.removeEventListener("change", handleChange);
7647
+ }
7648
+ mediaQuery.addListener(handleChange);
7649
+ return () => mediaQuery.removeListener(handleChange);
7650
+ };
7651
+ var syncDocumentColorModeToSystem = () => {
7652
+ const applySystemColorMode = (colorMode) => {
7653
+ applyDocumentColorMode(colorMode);
7654
+ };
7655
+ applySystemColorMode(getSystemColorMode());
7656
+ return subscribeToSystemColorMode(applySystemColorMode);
7657
+ };
7658
+ var applyDocumentClientTheme = (themeId) => {
7659
+ if (typeof document === "undefined") {
7660
+ return;
7661
+ }
7662
+ const root = document.documentElement;
7663
+ if (!themeId) {
7664
+ root.removeAttribute(ROOT_CLIENT_THEME_ATTRIBUTE);
7665
+ return;
7666
+ }
7667
+ root.setAttribute(ROOT_CLIENT_THEME_ATTRIBUTE, themeId);
7668
+ };
7669
+
7503
7670
  exports.Alert = Alert;
7504
7671
  exports.ArgonSidebar = ArgonSidebar;
7505
7672
  exports.AsyncCombobox = AsyncCombobox;
@@ -7537,6 +7704,8 @@ exports.NumericInput = NumericInput;
7537
7704
  exports.OverflowTooltip = OverflowTooltip;
7538
7705
  exports.PageTitle = PageTitle;
7539
7706
  exports.Pagination = Pagination;
7707
+ exports.ROOT_CLIENT_THEME_ATTRIBUTE = ROOT_CLIENT_THEME_ATTRIBUTE;
7708
+ exports.ROOT_COLOR_MODE_ATTRIBUTE = ROOT_COLOR_MODE_ATTRIBUTE;
7540
7709
  exports.SearchableSelect = SearchableSelect;
7541
7710
  exports.SectionTitle = SectionTitle;
7542
7711
  exports.Select = Select;
@@ -7552,14 +7721,22 @@ exports.Tabs = Tabs;
7552
7721
  exports.Textarea = Textarea;
7553
7722
  exports.Tooltip = Tooltip;
7554
7723
  exports.TruncatedText = TruncatedText;
7724
+ exports.applyDocumentClientTheme = applyDocumentClientTheme;
7725
+ exports.applyDocumentColorMode = applyDocumentColorMode;
7555
7726
  exports.cn = cn;
7556
7727
  exports.defaultPermissionChecker = defaultPermissionChecker;
7557
7728
  exports.filterSidebarItems = filterSidebarItems;
7729
+ exports.getSystemColorMode = getSystemColorMode;
7558
7730
  exports.hasActiveDescendant = hasActiveDescendant;
7731
+ exports.initializeDocumentColorMode = initializeDocumentColorMode;
7732
+ exports.isColorMode = isColorMode;
7733
+ exports.subscribeToSystemColorMode = subscribeToSystemColorMode;
7734
+ exports.syncDocumentColorModeToSystem = syncDocumentColorModeToSystem;
7559
7735
  exports.uiAiManifest = uiAiManifest;
7560
7736
  exports.uiDefaultThemePreset = uiDefaultThemePreset;
7561
7737
  exports.uiProjectAiRules = uiProjectAiRules;
7562
7738
  exports.uiScreenBlueprint = uiScreenBlueprint;
7563
7739
  exports.uiScreenBriefFields = uiScreenBriefFields;
7564
7740
  exports.uiThemeContract = uiThemeContract;
7741
+ exports.uiThemeLayerAssets = uiThemeLayerAssets;
7565
7742
  exports.uiThemePresets = uiThemePresets;