@appkit/dek-lib 0.31.0 → 0.32.0

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.
@@ -1,5 +1,8 @@
1
+ import { CommandGroupAlignment } from './CommandGroup.styled';
1
2
  type Props = {
2
3
  groupKey: string;
4
+ title?: string;
5
+ align?: CommandGroupAlignment;
3
6
  };
4
- declare const CommandGroup: ({ groupKey }: Props) => import("react/jsx-runtime").JSX.Element | null;
7
+ declare const CommandGroup: ({ groupKey, title, align }: Props) => import("react/jsx-runtime").JSX.Element | null;
5
8
  export default CommandGroup;
@@ -1,3 +1,9 @@
1
1
  /// <reference types="react" />
2
- export declare const Container: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("../../../../ui/dist/components/View/View").ViewProps, never>> & Omit<({ label, direction, collapse, valign, halign, vscroll, hscroll, padding, paddingVert, paddingHorz, paddingRight, paddingLeft, paddingTop, paddingBottom, width, height, fixed, backColor, backColorHover, borderRadius, wrap, gap, gapRow, gapCol, className, onClick, style, children, }: import("../../../../ui/dist/components/View/View").ViewProps) => import("react/jsx-runtime").JSX.Element, keyof import("react").Component<any, {}, any>>;
3
- export declare const CommandItem: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
2
+ export type CommandGroupAlignment = 'left' | 'right';
3
+ type ContainerProps = {
4
+ $align: CommandGroupAlignment;
5
+ };
6
+ export declare const Container: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("../../../../ui/dist/components/View/View").ViewProps, ContainerProps>> & Omit<({ label, direction, collapse, valign, halign, vscroll, hscroll, padding, paddingVert, paddingHorz, paddingRight, paddingLeft, paddingTop, paddingBottom, width, height, fixed, backColor, backColorHover, borderRadius, wrap, gap, gapRow, gapCol, className, onClick, style, children, }: import("../../../../ui/dist/components/View/View").ViewProps) => import("react/jsx-runtime").JSX.Element, keyof import("react").Component<any, {}, any>>;
7
+ export declare const Group: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("../../../../ui/dist/components/View/View").ViewProps, ContainerProps>> & Omit<({ label, direction, collapse, valign, halign, vscroll, hscroll, padding, paddingVert, paddingHorz, paddingRight, paddingLeft, paddingTop, paddingBottom, width, height, fixed, backColor, backColorHover, borderRadius, wrap, gap, gapRow, gapCol, className, onClick, style, children, }: import("../../../../ui/dist/components/View/View").ViewProps) => import("react/jsx-runtime").JSX.Element, keyof import("react").Component<any, {}, any>>;
8
+ export declare const CommandItem: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ContainerProps>>;
9
+ export {};
package/dist/index.d.ts CHANGED
@@ -1,7 +1,10 @@
1
1
  export { default as Board } from './components/Board/Board';
2
2
  export { default as BoardProvider } from './components/BoardProvider/BoardProvider';
3
3
  export { default as CommandGroup } from './components/CommandGroup/CommandGroup';
4
- export { default as RouteResolver } from './components/RouteResolver/RouteResolver';
5
4
  export { default as Router } from './components/Router/Router';
5
+ export { default as RouteResolver } from './components/RouteResolver/RouteResolver';
6
6
  export { default as Zone } from './components/Zone/Zone';
7
7
  export { default as loadCustomDekPlugin } from './lib/utils/loadCustomPlugin';
8
+ export { default as useUserConfig } from './lib/hooks/useUserConfig';
9
+ export { default as getPluginApi } from './lib/utils/getPluginApi';
10
+ export { default as parsePropsForComponent } from './lib/utils/parsePropsForComponent';
package/dist/index.es.js CHANGED
@@ -66861,7 +66861,7 @@ async function fetchUserPlugins(email, password) {
66861
66861
  result.integrations.push({
66862
66862
  key: "base",
66863
66863
  pluginName: "base",
66864
- pluginVersion: "0.31.0",
66864
+ pluginVersion: "0.32.0",
66865
66865
  pluginConfig: []
66866
66866
  });
66867
66867
  return result;
@@ -67036,7 +67036,7 @@ const Header = ({ height = 70 }) => {
67036
67036
  };
67037
67037
  const About = () => {
67038
67038
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(u0, { padding: 20, direction: "vert", children: [
67039
- /* @__PURE__ */ jsxRuntimeExports.jsx(PU1, { children: `Dek ${"0.31.0"}` }),
67039
+ /* @__PURE__ */ jsxRuntimeExports.jsx(PU1, { children: `Dek ${"0.32.0"}` }),
67040
67040
  /* @__PURE__ */ jsxRuntimeExports.jsx(h4, { children: "From Appkit" })
67041
67041
  ] });
67042
67042
  };
@@ -103027,7 +103027,7 @@ async function updatePlugins(email, password) {
103027
103027
  {
103028
103028
  key: "base",
103029
103029
  pluginName: "base",
103030
- pluginVersion: "0.31.0",
103030
+ pluginVersion: "0.32.0",
103031
103031
  pluginConfig: []
103032
103032
  }
103033
103033
  ],
@@ -104215,15 +104215,22 @@ const BoardProvider = ({ email, password, plugin, pluginConfig }) => {
104215
104215
  ] });
104216
104216
  };
104217
104217
  const Container = styled(u0)`
104218
+ display: flex;
104219
+ flex-direction: column;
104220
+ ${({ $align }) => $align === "right" ? `align-items: flex-end;` : ""}
104221
+ `;
104222
+ const Group = styled(u0)`
104218
104223
  display: flex;
104219
104224
  flex-direction: row;
104220
104225
  flex-wrap: wrap;
104226
+ align-content: flex-start;
104227
+ ${({ $align }) => $align === "right" ? `justify-content: flex-end;` : ""}
104221
104228
  `;
104222
104229
  const CommandItem = styled.div`
104223
- margin-left: 10px;
104224
104230
  margin-top: 10px;
104231
+ ${({ $align }) => $align === "right" ? "margin-right: 10px;" : "margin-left: 10px;"}
104225
104232
  `;
104226
- const CommandGroup = ({ groupKey }) => {
104233
+ const CommandGroup = ({ groupKey, title, align = "left" }) => {
104227
104234
  const api2 = getPluginApi();
104228
104235
  const group = api2.commandGroups.find(
104229
104236
  (g) => g.key == groupKey
@@ -104231,13 +104238,27 @@ const CommandGroup = ({ groupKey }) => {
104231
104238
  if (!group) {
104232
104239
  return null;
104233
104240
  }
104234
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Container, { children: group.commands.map((command, idx) => {
104235
- const instance = api2.integration(command.integrationKey).component(
104236
- command.componentKey,
104237
- parsePropsForComponent(api2, command.props)
104238
- );
104239
- return /* @__PURE__ */ jsxRuntimeExports.jsx(CommandItem, { children: instance }, idx);
104240
- }) });
104241
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(Container, { $align: align, children: [
104242
+ title && /* @__PURE__ */ jsxRuntimeExports.jsx(
104243
+ h4,
104244
+ {
104245
+ size: "large",
104246
+ weight: "bold",
104247
+ family: "heading",
104248
+ paddingLeft: 14,
104249
+ paddingTop: 10,
104250
+ paddingRight: 10,
104251
+ children: title
104252
+ }
104253
+ ),
104254
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Group, { $align: align, children: group.commands.map((command, idx) => {
104255
+ const instance = api2.integration(command.integrationKey).component(
104256
+ command.componentKey,
104257
+ parsePropsForComponent(api2, command.props)
104258
+ );
104259
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(CommandItem, { $align: align, children: instance }, idx);
104260
+ }) })
104261
+ ] });
104241
104262
  };
104242
104263
  const CommandGroup$1 = CommandGroup;
104243
104264
  async function loadCustomPlugin(code) {
@@ -104263,5 +104284,8 @@ export {
104263
104284
  RouteResolver,
104264
104285
  Router,
104265
104286
  Zone,
104266
- loadCustomPlugin as loadCustomDekPlugin
104287
+ getPluginApi,
104288
+ loadCustomPlugin as loadCustomDekPlugin,
104289
+ parsePropsForComponent,
104290
+ useUserConfig
104267
104291
  };
package/dist/index.umd.js CHANGED
@@ -66878,7 +66878,7 @@ Arguments: ` + Array.prototype.slice.call(n5).join("") + `
66878
66878
  result.integrations.push({
66879
66879
  key: "base",
66880
66880
  pluginName: "base",
66881
- pluginVersion: "0.31.0",
66881
+ pluginVersion: "0.32.0",
66882
66882
  pluginConfig: []
66883
66883
  });
66884
66884
  return result;
@@ -67053,7 +67053,7 @@ Arguments: ` + Array.prototype.slice.call(n5).join("") + `
67053
67053
  };
67054
67054
  const About = () => {
67055
67055
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(u0, { padding: 20, direction: "vert", children: [
67056
- /* @__PURE__ */ jsxRuntimeExports.jsx(PU1, { children: `Dek ${"0.31.0"}` }),
67056
+ /* @__PURE__ */ jsxRuntimeExports.jsx(PU1, { children: `Dek ${"0.32.0"}` }),
67057
67057
  /* @__PURE__ */ jsxRuntimeExports.jsx(h4, { children: "From Appkit" })
67058
67058
  ] });
67059
67059
  };
@@ -103044,7 +103044,7 @@ Arguments: ` + Array.prototype.slice.call(n5).join("") + `
103044
103044
  {
103045
103045
  key: "base",
103046
103046
  pluginName: "base",
103047
- pluginVersion: "0.31.0",
103047
+ pluginVersion: "0.32.0",
103048
103048
  pluginConfig: []
103049
103049
  }
103050
103050
  ],
@@ -104233,14 +104233,21 @@ Arguments: ` + Array.prototype.slice.call(n5).join("") + `
104233
104233
  };
104234
104234
  const Container = styled(u0)`
104235
104235
  display: flex;
104236
+ flex-direction: column;
104237
+ ${({ $align }) => $align === "right" ? `align-items: flex-end;` : ""}
104238
+ `;
104239
+ const Group = styled(u0)`
104240
+ display: flex;
104236
104241
  flex-direction: row;
104237
104242
  flex-wrap: wrap;
104243
+ align-content: flex-start;
104244
+ ${({ $align }) => $align === "right" ? `justify-content: flex-end;` : ""}
104238
104245
  `;
104239
104246
  const CommandItem = styled.div`
104240
- margin-left: 10px;
104241
104247
  margin-top: 10px;
104248
+ ${({ $align }) => $align === "right" ? "margin-right: 10px;" : "margin-left: 10px;"}
104242
104249
  `;
104243
- const CommandGroup = ({ groupKey }) => {
104250
+ const CommandGroup = ({ groupKey, title, align = "left" }) => {
104244
104251
  const api2 = getPluginApi();
104245
104252
  const group = api2.commandGroups.find(
104246
104253
  (g) => g.key == groupKey
@@ -104248,13 +104255,27 @@ Arguments: ` + Array.prototype.slice.call(n5).join("") + `
104248
104255
  if (!group) {
104249
104256
  return null;
104250
104257
  }
104251
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Container, { children: group.commands.map((command, idx) => {
104252
- const instance = api2.integration(command.integrationKey).component(
104253
- command.componentKey,
104254
- parsePropsForComponent(api2, command.props)
104255
- );
104256
- return /* @__PURE__ */ jsxRuntimeExports.jsx(CommandItem, { children: instance }, idx);
104257
- }) });
104258
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(Container, { $align: align, children: [
104259
+ title && /* @__PURE__ */ jsxRuntimeExports.jsx(
104260
+ h4,
104261
+ {
104262
+ size: "large",
104263
+ weight: "bold",
104264
+ family: "heading",
104265
+ paddingLeft: 14,
104266
+ paddingTop: 10,
104267
+ paddingRight: 10,
104268
+ children: title
104269
+ }
104270
+ ),
104271
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Group, { $align: align, children: group.commands.map((command, idx) => {
104272
+ const instance = api2.integration(command.integrationKey).component(
104273
+ command.componentKey,
104274
+ parsePropsForComponent(api2, command.props)
104275
+ );
104276
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(CommandItem, { $align: align, children: instance }, idx);
104277
+ }) })
104278
+ ] });
104258
104279
  };
104259
104280
  const CommandGroup$1 = CommandGroup;
104260
104281
  async function loadCustomPlugin(code) {
@@ -104279,6 +104300,9 @@ Arguments: ` + Array.prototype.slice.call(n5).join("") + `
104279
104300
  exports2.RouteResolver = RouteResolver;
104280
104301
  exports2.Router = Router;
104281
104302
  exports2.Zone = Zone;
104303
+ exports2.getPluginApi = getPluginApi;
104282
104304
  exports2.loadCustomDekPlugin = loadCustomPlugin;
104305
+ exports2.parsePropsForComponent = parsePropsForComponent;
104306
+ exports2.useUserConfig = useUserConfig;
104283
104307
  Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
104284
104308
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@appkit/dek-lib",
3
3
  "private": false,
4
- "version": "0.31.0",
4
+ "version": "0.32.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite --port 5173 --host",