@brandsync/wc 0.0.3 → 0.0.4

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.
Files changed (77) hide show
  1. package/custom-elements.json +290 -0
  2. package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
  3. package/dist/brandsync-wc/{p-2b693545.entry.js → p-27288299.entry.js} +1 -1
  4. package/dist/brandsync-wc/{p-c2cc0d6f.entry.js → p-2742ecef.entry.js} +1 -1
  5. package/dist/brandsync-wc/p-4ce458bf.entry.js +1 -0
  6. package/dist/brandsync-wc/{p-69faa19c.entry.js → p-6c1fa4da.entry.js} +1 -1
  7. package/dist/brandsync-wc/{p-da11e421.entry.js → p-880ea3f8.entry.js} +1 -1
  8. package/dist/brandsync-wc/{p-f0ca3562.entry.js → p-9e5d2211.entry.js} +1 -1
  9. package/dist/brandsync-wc/{p-3134f5f5.entry.js → p-ab5cc7af.entry.js} +1 -1
  10. package/dist/brandsync-wc/p-b24c455f.entry.js +1 -0
  11. package/dist/brandsync-wc/{p-5739acaf.entry.js → p-cfc3421b.entry.js} +1 -1
  12. package/dist/brandsync-wc/{p-f9e93a35.entry.js → p-ea705742.entry.js} +1 -1
  13. package/dist/brandsync-wc/{p-BOj_41o9.js → p-nLORuTUY.js} +2 -2
  14. package/dist/cjs/brandsync-wc.cjs.js +2 -2
  15. package/dist/cjs/bs-badge.cjs.entry.js +1 -1
  16. package/dist/cjs/bs-button-skeleton.cjs.entry.js +1 -1
  17. package/dist/cjs/bs-button.cjs.entry.js +1 -1
  18. package/dist/cjs/bs-card.cjs.entry.js +1 -1
  19. package/dist/cjs/bs-chatbot-header.cjs.entry.js +144 -0
  20. package/dist/cjs/bs-chatbot-response-action.cjs.entry.js +66 -0
  21. package/dist/cjs/bs-composer.cjs.entry.js +1 -1
  22. package/dist/cjs/bs-data-table.cjs.entry.js +1 -1
  23. package/dist/cjs/bs-input.cjs.entry.js +3 -3
  24. package/dist/cjs/bs-modal.cjs.entry.js +1 -1
  25. package/dist/cjs/{index-nyOcuVbF.js → index-CVh-sqA_.js} +3 -0
  26. package/dist/cjs/loader.cjs.js +2 -2
  27. package/dist/collection/collection-manifest.json +2 -0
  28. package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.cmp.test.js +94 -0
  29. package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.css +81 -0
  30. package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.js +194 -0
  31. package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.stories.js +53 -0
  32. package/dist/collection/components/bs-chatbot-header/genie-logo.js +86 -0
  33. package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.cmp.test.js +133 -0
  34. package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.css +107 -0
  35. package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.js +216 -0
  36. package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.stories.js +33 -0
  37. package/dist/collection/components/bs-input/bs-input.js +2 -2
  38. package/dist/components/bs-badge.js +1 -1
  39. package/dist/components/bs-button-skeleton.js +1 -1
  40. package/dist/components/bs-button.js +1 -1
  41. package/dist/components/bs-card.js +1 -1
  42. package/dist/components/bs-chatbot-header.d.ts +11 -0
  43. package/dist/components/bs-chatbot-header.js +1 -0
  44. package/dist/components/bs-chatbot-response-action.d.ts +11 -0
  45. package/dist/components/bs-chatbot-response-action.js +1 -0
  46. package/dist/components/bs-composer.js +1 -1
  47. package/dist/components/bs-data-table.js +1 -1
  48. package/dist/components/bs-input.js +1 -1
  49. package/dist/components/bs-modal.js +1 -1
  50. package/dist/components/index.js +1 -1
  51. package/dist/components/{p-Cu4gTknX.js → p-BpvhHQSw.js} +1 -1
  52. package/dist/esm/brandsync-wc.js +3 -3
  53. package/dist/esm/bs-badge.entry.js +1 -1
  54. package/dist/esm/bs-button-skeleton.entry.js +1 -1
  55. package/dist/esm/bs-button.entry.js +1 -1
  56. package/dist/esm/bs-card.entry.js +1 -1
  57. package/dist/esm/bs-chatbot-header.entry.js +142 -0
  58. package/dist/esm/bs-chatbot-response-action.entry.js +64 -0
  59. package/dist/esm/bs-composer.entry.js +1 -1
  60. package/dist/esm/bs-data-table.entry.js +1 -1
  61. package/dist/esm/bs-input.entry.js +3 -3
  62. package/dist/esm/bs-modal.entry.js +1 -1
  63. package/dist/esm/{index-BOj_41o9.js → index-nLORuTUY.js} +3 -0
  64. package/dist/esm/loader.js +3 -3
  65. package/dist/types/components/bs-chatbot-header/bs-chatbot-header.cmp.test.d.ts +1 -0
  66. package/dist/types/components/bs-chatbot-header/bs-chatbot-header.d.ts +59 -0
  67. package/dist/types/components/bs-chatbot-header/bs-chatbot-header.stories.d.ts +9 -0
  68. package/dist/types/components/bs-chatbot-header/genie-logo.d.ts +1 -0
  69. package/dist/types/components/bs-chatbot-response-action/bs-chatbot-response-action.cmp.test.d.ts +1 -0
  70. package/dist/types/components/bs-chatbot-response-action/bs-chatbot-response-action.d.ts +67 -0
  71. package/dist/types/components/bs-chatbot-response-action/bs-chatbot-response-action.stories.d.ts +10 -0
  72. package/dist/types/components.d.ts +315 -0
  73. package/package.json +2 -1
  74. package/readme.md +38 -0
  75. package/dist/brandsync-wc/brandsync-wc.esm.js.map +0 -1
  76. package/dist/brandsync-wc/index-Cqxk7LcP.js.map +0 -1
  77. package/dist/brandsync-wc/index.esm.js.map +0 -1
package/readme.md CHANGED
@@ -46,3 +46,41 @@ import '@brandsync/wc/dist/components/bs-button.js';
46
46
 
47
47
  React and Angular get auto-generated wrapper packages (`@stencil/react-output-target` /
48
48
  `@stencil/angular-output-target`) built from the same source — see `stencil.config.ts`.
49
+
50
+ ## Design tokens — required, not optional
51
+
52
+ Every component's shadow-DOM CSS is written entirely against `--bs-*` custom properties
53
+ (`--bs-input-bg-default`, `--bs-composer-button-size`, `--bs-spacing-150`, ...). **This package does
54
+ not inject those variables anywhere** -- it only *consumes* them. If the consuming app hasn't
55
+ defined them, every `var(--bs-something)` (none of these declarations have a fallback) resolves to
56
+ its CSS-invalid-at-computed-value fallback: `border: none`, `background: transparent`,
57
+ `width`/`height`/`padding`/`gap: 0`, browser-default `font-size`. The component still renders in
58
+ the DOM -- it just silently collapses (no visible border/box, buttons shrink to nothing, text
59
+ fields push onto their own line) with no console error or exception pointing at the missing
60
+ tokens, which makes it a confusing first bug to debug.
61
+
62
+ Fix: load the token stylesheet this package ships (vendored from `brandsync-tokens`) once,
63
+ globally, in the consuming app -- **before** any `bs-*` element renders:
64
+
65
+ ```css
66
+ /* e.g. src/styles.css / global.css / angular.json "styles" array */
67
+ @import '@brandsync/wc/dist/brandsync-wc/brandsync-wc.css';
68
+ ```
69
+
70
+ ```html
71
+ <!-- plain HTML/CDN consumption -->
72
+ <link rel="stylesheet" href="https://unpkg.com/@brandsync/wc/dist/brandsync-wc/brandsync-wc.css">
73
+ ```
74
+
75
+ This applies identically to the HTML/CDN path, npm+bundler path, and the React/Angular wrapper
76
+ packages -- none of them auto-inject it. If a consuming app already has its own differently-named
77
+ design tokens (e.g. `--surface-base` instead of `--bs-color-surface-base`), that app-level token
78
+ file does **not** satisfy this requirement even if the values match conceptually -- the shadow-DOM
79
+ CSS only resolves `--bs-*`-prefixed names, so the vendored stylesheet above must be loaded
80
+ regardless.
81
+
82
+ Known harmless noise: the vendored `brandsync-wc.css` currently contains a handful of malformed
83
+ token declarations from an upstream `brandsync-tokens` export step (e.g.
84
+ `--bs-5-brand-colors-jade-brand-700: {Brand Colors.teal.700};`), which some build tools (e.g.
85
+ Angular's CSS budget/lint step) warn about. These are pre-existing in the vendored dependency, not
86
+ introduced by this package, and don't affect any token this library actually uses.
@@ -1 +0,0 @@
1
- {"version":3,"file":"brandsync-wc.esm.js","sources":["node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.44.0 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, H, promiseResolve, win } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? win.document && Array.from(win.document.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"names":[],"mappings":";;;AAAA;AACA;AACA;;AAKA,IAAI,YAAY,GAAG,MAAM;AACzB,EAAE,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE;AACvC,IAA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