@lumiastream/ui 0.0.2-alpha.9 → 0.0.3

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.d.ts CHANGED
@@ -16,11 +16,12 @@ interface LSButtonProps {
16
16
  /** Primary UI component for user interaction */
17
17
  declare const LSButton: ({ primary, size, backgroundColor, label, ...props }: LSButtonProps) => react_jsx_runtime.JSX.Element;
18
18
 
19
- declare function allowedVariableCompletion(context: CompletionContext, variables: {
19
+ declare function variableCompletionOptions(context: CompletionContext, variables: {
20
20
  label: string;
21
21
  displayLabel: string;
22
22
  type: string;
23
23
  info: string;
24
+ shouldWrap?: boolean;
24
25
  }[]): {
25
26
  from: number;
26
27
  options: {
@@ -32,4 +33,4 @@ declare function allowedVariableCompletion(context: CompletionContext, variables
32
33
  validFor: RegExp;
33
34
  } | null;
34
35
 
35
- export { LSButton, type LSButtonProps, allowedVariableCompletion };
36
+ export { LSButton, type LSButtonProps, variableCompletionOptions };
package/dist/index.js CHANGED
@@ -49,8 +49,8 @@ var LSButton = ({
49
49
  );
50
50
  };
51
51
 
52
- // src/utils/allowedVariableCompletion.ts
53
- function allowedVariableCompletion(context, variables) {
52
+ // src/utils/variableCompletionOptions.ts
53
+ function variableCompletionOptions(context, variables) {
54
54
  const before = context.state.sliceDoc(0, context.pos);
55
55
  const after = context.state.sliceDoc(context.pos, context.pos + 2);
56
56
  const wordMatch = /(\w*)$/.exec(before);
@@ -64,7 +64,7 @@ function allowedVariableCompletion(context, variables) {
64
64
  const braceWrap = (v) => `${"{".repeat(openNeeded)}${v}${"}".repeat(closeNeeded)}`;
65
65
  const options = [
66
66
  ...variables.map((variable) => ({
67
- label: braceWrap(variable.label),
67
+ label: variable.shouldWrap ? braceWrap(variable.label) : variable.label,
68
68
  displayLabel: variable.displayLabel,
69
69
  type: variable.type,
70
70
  info: variable.info
@@ -79,5 +79,5 @@ function allowedVariableCompletion(context, variables) {
79
79
  }
80
80
  export {
81
81
  LSButton,
82
- allowedVariableCompletion
82
+ variableCompletionOptions
83
83
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumiastream/ui",
3
- "version": "0.0.2-alpha.9",
3
+ "version": "0.0.3",
4
4
  "author": "Lumia Stream",
5
5
  "license": "ISC",
6
6
  "description": "Lumia UI Kit",